Skip to content

feat: [1/3] refactor pipeline into shared package with step-aware log streaming#182

Open
alexvcodesphere wants to merge 1 commit intocodesphere-cloud:mainfrom
alexvcodesphere:feat/1-pipeline-refactor-streaming
Open

feat: [1/3] refactor pipeline into shared package with step-aware log streaming#182
alexvcodesphere wants to merge 1 commit intocodesphere-cloud:mainfrom
alexvcodesphere:feat/1-pipeline-refactor-streaming

Conversation

@alexvcodesphere
Copy link
Member

PR 1/3: Pipeline Refactor + Streaming

Extract pipeline stage execution from cli/cmd/start_pipeline.go into a reusable pkg/pipeline package.

Changes

  • pkg/pipeline/pipeline.goRunner orchestrates stage execution, discovers sub-steps from IDE server's pipeline status API, streams logs per-step via SSE
  • api/workspace.goStreamLogs SSE method for real-time log output
  • cli/cmd/start_pipeline.go — Refactored to delegate to pipeline.Runner
  • cli/cmd/client.go — Added StreamLogs to Client interface
  • pkg/pipeline/pipeline_test.go — 4 streaming unit tests

Merge Order

Merge this first, then PR 2/3, then PR 3/3.

  1. PR 1/3 ← this PR — pipeline refactor + streaming
  2. PR 2/3 — pkg/deploy package
  3. PR 3/3 — cs deploy github CLI command

…ming

Extract pipeline stage execution from cli/cmd/start_pipeline.go into a
reusable pkg/pipeline package with a Runner that orchestrates stage
execution, discovers sub-steps from the IDE server's pipeline status API,
and streams logs per-step via SSE.

- Add pkg/pipeline with Runner, Client interface, and step discovery
- Add StreamLogs SSE method to api/workspace.go for real-time log output
- Add StreamLogs to cli/cmd Client interface
- Refactor start_pipeline.go to delegate to pipeline.Runner
- Add pipeline streaming unit tests (single/multi-step, no-stream cases)
- Update .mockery.yml for pipeline mock generation

Signed-off-by: Alex <132889147+alexvcodesphere@users.noreply.github.com>
@alexvcodesphere alexvcodesphere requested a review from a team as a code owner February 20, 2026 18:33
@alexvcodesphere alexvcodesphere changed the title feat: refactor pipeline into shared package with step-aware log streaming feat: [1/3] refactor pipeline into shared package with step-aware log streaming Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant