Skip to content

Harden config service - #7241

Merged
6543 merged 4 commits into
woodpecker-ci:mainfrom
6543-forks:harden-config-service
Nov 24, 2026
Merged

6543 merged 4 commits into
woodpecker-ci:mainfrom
6543-forks:harden-config-service

Conversation

@6543

@6543 6543 commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

while working on #7239 edgecases where discovered ... this handles them

@6543 6543 added server enhancement improve existing features labels Oct 7, 2026
@6543

6543 commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

@qwerty287 sorry that sliped through my own review ... the patches seem fine when i reviewed them 1 by 1 ... :{

Comment thread server/services/config/http.go Resolved
@xoxys

xoxys commented Oct 7, 2026

Copy link
Copy Markdown
Member

Overall, this is technically a breaking change. Users who relied on the silent fallback will be surprised or do I miss something?

@6543

6543 commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

i cant remember we documented tjese edgecases and i personally prefere hard fails per see ... but we dont have to rush this!

@6543
6543 marked this pull request as draft October 7, 2026 17:53
@xoxys

xoxys commented Oct 7, 2026

Copy link
Copy Markdown
Member

Thats fine. Just wanted to note it, we can still just merge and release as regular release.

An extension answering with `{"configs": [null]}` made the server
dereference a nil pointer. The answer of an extension is foreign input,
a broken or hostile one must only fail the pipeline it was asked for.
@6543
6543 force-pushed the harden-config-service branch from ec9229d to 7c9d020 Compare October 29, 2026 23:18
The combined config service asked every service and only kept the error
of the last one. With a config extension configured a forge that could
not be reached ended as "nothing to run": the extension had no config to
look at, kept it, and the pipeline got dropped without a trace instead
of showing the error.

Stop at the first failure. A missing config is the exception, as a later
service is allowed to provide one for a repo that has none.

The test forge answered a missing file with a plain error, while every
real forge uses ErrConfigNotFound for it. Make it do the same.
@6543
6543 force-pushed the harden-config-service branch from 7c9d020 to dd76c00 Compare October 29, 2026 23:21
@6543
6543 marked this pull request as ready for review October 29, 2026 23:23
@6543 6543 added bug Something isn't working and removed enhancement improve existing features labels Oct 29, 2026
@6543
6543 requested a review from xoxys October 29, 2026 23:24
@6543

6543 commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

@xoxys the break should be gone :)

@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.45%. Comparing base (d1aedfd) to head (7aea1f8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7241      +/-   ##
==========================================
+ Coverage   67.41%   67.45%   +0.04%     
==========================================
  Files         452      452              
  Lines       22793    22801       +8     
==========================================
+ Hits        15366    15381      +15     
+ Misses       7427     7420       -7     

☔ View full report in Codecov by Harness.
📢 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 merged commit 2a81afd into woodpecker-ci:main Nov 24, 2026
9 checks passed
@6543
6543 deleted the harden-config-service branch November 24, 2026 13:25
@woodpecker-bot woodpecker-bot mentioned this pull request Nov 24, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants