{"record":{"id":"31657739c11d242e","repo":"apache/beam","slug":"f-attr-type-ix-of-test-specification-identifier-missing-a","errorCode":null,"errorMessage":"f'{attr_type} {ix} of test specification {identifier} missing a name'","messagePattern":"f'(.+?) (.+?) of test specification (.+?) missing a name'","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/yaml/yaml_testing.py","lineNumber":188,"sourceCode":"        f'test specification {identifier} '\n        f'has unknown attributes {list(unknown_attrs)}')\n\n  for attr_type in ('mock_inputs',\n                    'mock_outputs',\n                    'expected_outputs',\n                    'expected_inputs'):\n    attr = test_spec.get(attr_type, [])\n    if not isinstance(attr, list):\n      raise TypeError(\n          f'{attr_type} of test specification {identifier} '\n          f'must be a list, got {type(attr_type)}')\n    for ix, attr_item in enumerate(attr):\n      if not isinstance(attr_item, dict):\n        raise TypeError(\n            f'{attr_type} {ix} of test specification {identifier} '\n            f'must be an object, got {type(attr_item)}')\n      if 'name' not in attr_item:\n        raise TypeError(\n            f'{attr_type} {ix} of test specification {identifier} '\n            f'missing a name')\n      if 'elements' not in attr_item:\n        raise TypeError(\n            f'{attr_type} {ix} of test specification {identifier} '\n            f'missing a elements')\n      if not isinstance(attr_item['elements'], list):\n        raise TypeError(\n            f'{attr_type} {ix} of test specification {identifier} '\n            f'must be a list, got {type(attr_item[\"elements\"])}')\n\n\ndef inject_test_tranforms(spec, test_spec, fix_failures):\n  validate_test_spec(test_spec)\n  scope = yaml_transform.LightweightScope(spec['transforms'])\n\n  mocked_inputs_by_id = {\n      scope.get_transform_id(mock_input['name']): mock_input","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/yaml/yaml_testing.py#L170-L206","documentation":"An entry in one of the test spec's element-list attributes (mock_inputs, mock_outputs, expected_outputs, expected_inputs) is a mapping but lacks the required 'name' key. The name identifies which input/output of the transform under test the elements belong to, so validation fails before the entry can be matched to a transform output.","triggerScenarios":"Thrown at sdks/python/apache_beam/yaml/yaml_testing.py:188 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a 'name' key to the entry matching an input or output name of the transform being tested","For outputs referenced by tag, use the 'transform.output' naming convention in the name field"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}