{"record":{"id":"83690c94b3712d66","repo":"apache/beam","slug":"unknown-artifact-type-s","errorCode":null,"errorMessage":"unknown artifact type: %s","messagePattern":"unknown artifact type: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/runners/portability/stager.py","lineNumber":167,"sourceCode":"      artifacts: list[beam_runner_api_pb2.ArtifactInformation]):\n    for artifact in artifacts:\n      if artifact.type_urn == common_urns.artifact_types.FILE.urn:\n        file_payload = beam_runner_api_pb2.ArtifactFilePayload()\n        file_payload.ParseFromString(artifact.type_payload)\n        src = file_payload.path\n        sha256 = file_payload.sha256\n        if artifact.role_urn == common_urns.artifact_roles.STAGING_TO.urn:\n          role_payload = beam_runner_api_pb2.ArtifactStagingToRolePayload()\n          role_payload.ParseFromString(artifact.role_payload)\n          dst = role_payload.staged_name\n        elif (artifact.role_urn ==\n              common_urns.artifact_roles.PIP_REQUIREMENTS_FILE.urn):\n          dst = hashlib.sha256(artifact.SerializeToString()).hexdigest()\n        else:\n          raise RuntimeError(\"unknown role type: %s\" % artifact.role_urn)\n        yield (src, dst, sha256)\n      else:\n        raise RuntimeError(\"unknown artifact type: %s\" % artifact.type_urn)\n\n  @staticmethod\n  def create_job_resources(\n      options: PipelineOptions,\n      temp_dir: str,\n      build_setup_args: Optional[list[str]] = None,\n      pypi_requirements: Optional[list[str]] = None,\n      populate_requirements_cache: Optional[Callable[[str, str, bool],\n                                                     None]] = None,\n      skip_prestaged_dependencies: Optional[bool] = False,\n      log_submission_env_dependencies: Optional[bool] = True,\n  ):\n    \"\"\"For internal use only; no backwards-compatibility guarantees.\n\n        Creates (if needed) a list of job resources.\n\n        Args:\n          options: Command line options. More specifically the function will","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/runners/portability/stager.py#L149-L185","documentation":"Stager.extract_staging_tuple_iter only supports artifact type_urn FILE (urllib or file type). When an artifact's type_urn is anything else, the Python stager cannot stage it and raises RuntimeError listing the unsupported type URN — the sibling check to the unknown-role error just above it in the same loop.","triggerScenarios":"An artifact list containing a non-FILE typed artifact (e.g. an embedded or future artifact type) is passed to create_job_resources/extract_staging_tuple_iter during job staging.","commonSituations":"Newer Beam SDK emitting new artifact types to an older stager; custom tooling constructing Artifact protos with experimental type URNs; corrupted or hand-written pipeline proto.","solutions":["Check the reported type_urn and remove/replace that artifact with a standard FILE artifact.","Align Beam versions across SDK, stager, and runner so artifact type sets match.","If you author the artifacts, emit type_urn FILE with proper role payloads instead of custom types.","File/consult Beam issue tracker if a legitimate new artifact type is being rejected — may need a stager update."],"exampleFix":"// before\nartifact = beam_runner_api_pb2.Artifact(type_urn='beam:artifact:type:unknown:v1', ...)\n// after\nartifact = beam_runner_api_pb2.Artifact(type_urn=common_urns.artifact_types.FILE.urn, ...)\nartifact.role_urn = common_urns.artifact_roles.STAGED_FILE.urn","handlingStrategy":"validation","validationCode":"from apache_beam.portability.api import beam_runner_api_pb2\nfrom apache_beam.runners.portability import common_urns\nfor a in artifacts:\n    if a.type_urn != common_urns.artifact_types.FILE.urn:\n        raise SystemExit(f'Unsupported artifact type: {a.type_urn}')","typeGuard":null,"tryCatchPattern":"try:\n    resources = Stager.create_and_stage_job_resources(options, tmpdir)\nexcept RuntimeError as e:\n    if e.args and e.args[0].startswith('unknown artifact type:'):\n        fix_or_drop_artifact(e.args[0].split(': ', 1)[1])\n    else:\n        raise","preventionTips":["Only emit FILE-typed artifacts to the Python stager","Upgrade Beam uniformly if new artifact types appear","Validate hand-built RunnerAPI protos in tests"],"tags":["apache-beam","staging","artifacts","protobuf"],"backgroundTag":"invalid-enum-value","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"}