Skip to content

spored run-pipeline-stage (and pkg/pipeline's stage runner) is unreachable: remove it or wire it into the orchestrator #910

Closed

Description

@scttfrdmn

Found while fixing #906.

spored run-pipeline-stage and the code only it reaches — pipeline.NewStageRunner, IsPipelineInstance, NewStageDataHandler and the S3 data handoff, GeneratePeerDiscoveryFile, downloadPipelineDefinitionFromS3 (and the unused DownloadResultsToLocal) — have no caller:

  • Nothing in this repo invokes run-pipeline-stage. The only reference outside its definition is cmd/spored/cli_test.go's list of subcommands. git log -S run-pipeline-stage shows it arrived with the spored source and has only been touched by the cobra conversion since.
  • The live path, spawn pipeline launch → the spawn-pipeline-orchestrator Lambda, launches stage instances whose user data (generatePipelineUserData) downloads spored but never runs it. It runs the stage command in bash and writes the COMPLETE/FAILED marker with the AWS CLI itself.
  • The stage runner could not work if it were invoked: loadStageInfoFromTags requires spawn:s3-config-key (and reads spawn:s3-bucket/spawn:s3-prefix), and the orchestrator tags instances with only pipeline-id, stage-id, stage-index, instance-index and Name.
  • No sibling repo under spore-host references run-pipeline-stage or imports pkg/pipeline. pkg/pipeline is not on the public surface.

#906 fixed the stage runner's AWS clients anyway (they get the instance's region from IMDS), with minimal changes.

Proposal: pick one of these.

  1. Remove the run-pipeline-stage subcommand and the stage-runner, data-handoff and peer-discovery code. Keep the Pipeline/Store/graph types that cmd/pipeline.go and the Lambda use.
  2. Wire it up: have the orchestrator tag s3-bucket/s3-prefix/s3-config-key, upload the definition, and run spored run-pipeline-stage from the user data instead of the inline bash. That would also implement data_input/data_output (see the related issue) and peer discovery, which the examples advertise.

This needs the maintainer to decide, so nothing has been deleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions