Skip to content

Refactor server/pipeline package#6649

Open
6543 wants to merge 9 commits into
woodpecker-ci:mainfrom
6543-forks:refactor_server-pipeline
Open

Refactor server/pipeline package#6649
6543 wants to merge 9 commits into
woodpecker-ci:mainfrom
6543-forks:refactor_server-pipeline

Conversation

@6543

@6543 6543 commented May 26, 2026

Copy link
Copy Markdown
Member

get rid of some spagetii code in server/pipeline

and consistend naming

@6543 6543 added server refactor delete or replace old code labels May 26, 2026
@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 38.77551% with 60 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.16%. Comparing base (4c56f40) to head (9dbfb97).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
server/pipeline/create.go 31.03% 19 Missing and 1 partial ⚠️
server/pipeline/workflow_status.go 20.00% 12 Missing ⚠️
server/pipeline/run.go 60.00% 6 Missing and 2 partials ⚠️
server/rpc/rpc.go 14.28% 2 Missing and 4 partials ⚠️
server/pipeline/approve.go 33.33% 3 Missing and 1 partial ⚠️
server/pipeline/cancel.go 25.00% 2 Missing and 1 partial ⚠️
server/pipeline/decline.go 0.00% 3 Missing ⚠️
server/pipeline/restart.go 40.00% 3 Missing ⚠️
server/pipeline/start.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6649      +/-   ##
==========================================
+ Coverage   41.73%   42.16%   +0.42%     
==========================================
  Files         433      434       +1     
  Lines       28930    28920      -10     
==========================================
+ Hits        12075    12195     +120     
+ Misses      15765    15623     -142     
- Partials     1090     1102      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@6543 6543 marked this pull request as ready for review May 26, 2026 14:55
@6543 6543 requested a review from a team May 27, 2026 12:29
Comment thread server/pipeline/run.go
// the shared tail of Create, Approve and Restart: the caller has already
// persisted the pipeline and its workflows and set the final pre-dispatch
// status.
func finishPipeline(ctx context.Context, _forge forge.Forge, _store store.Store, pipeline *model.Pipeline, user *model.User, repo *model.Repo, pipelineItems []*builder.Item) (*model.Pipeline, error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finishPipeline is a weird name for a function that actually starts the pipeline. Maybe finishPipelineStart?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor delete or replace old code server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants