Skip to content

Add Container Registry credential extension#5993

Open
qwerty287 wants to merge 26 commits intowoodpecker-ci:mainfrom
qwerty287:registry-ext
Open

Add Container Registry credential extension#5993
qwerty287 wants to merge 26 commits intowoodpecker-ci:mainfrom
qwerty287:registry-ext

Conversation

@qwerty287
Copy link
Contributor

From #5852

Added UI and docs.

@qwerty287 qwerty287 requested a review from a team January 20, 2026 07:46
@qwerty287 qwerty287 added server feature add new functionality labels Jan 20, 2026
@woodpecker-bot
Copy link
Contributor

woodpecker-bot commented Jan 20, 2026

Surge PR preview deployment succeeded. View it at https://woodpecker-ci-woodpecker-pr-5993.surge.sh


// NewWithExtension returns a registry service that combines a base service with an HTTP extension.
// The extension is called during RegistryListPipeline to fetch additional registry credentials.
func NewWithExtension(base Service, extension *httpExtension) Service {
Copy link
Member

Choose a reason for hiding this comment

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

combined should be doing the same thing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, because it's the other way round:
Combined uses the base service for everything, while the other services are read only. And the base one has priority.
Here it has to use the read only services first. Of course this can be implemented with some extra boolswitch, should I do this? Not sure how easy this will be in combined though.

Copy link
Member

Choose a reason for hiding this comment

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

Couldn't you achieve this by just swapping the registries passed to combined already 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No because combined has a list of readonly services (that are not prioritized) and only one full service (that is prioritized).

Here we need one readonly that's prioritized.

qwerty287 and others added 2 commits January 20, 2026 09:30
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
@qwerty287 qwerty287 requested a review from anbraten January 22, 2026 07:19
@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 1.52672% with 129 lines in your changes missing coverage. Please review.
✅ Project coverage is 22.23%. Comparing base (92a489f) to head (60265fe).

Files with missing lines Patch % Lines
server/services/registry/with_extension.go 0.00% 60 Missing ⚠️
server/services/registry/http.go 0.00% 26 Missing ⚠️
server/services/registry/mocks/mock_Service.go 0.00% 21 Missing ⚠️
server/services/setup.go 0.00% 9 Missing ⚠️
server/services/manager.go 0.00% 5 Missing ⚠️
server/api/repo.go 0.00% 3 Missing ⚠️
server/services/registry/combined.go 0.00% 2 Missing ⚠️
server/pipeline/create.go 0.00% 1 Missing ⚠️
server/pipeline/items.go 66.66% 1 Missing ⚠️
server/services/registry/db.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5993      +/-   ##
==========================================
- Coverage   22.30%   22.23%   -0.08%     
==========================================
  Files         433      435       +2     
  Lines       39472    39575     +103     
==========================================
- Hits         8805     8800       -5     
- Misses      29850    29958     +108     
  Partials      817      817              

☔ 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.

@qwerty287 qwerty287 requested a review from a team January 29, 2026 13:29
@qwerty287
Copy link
Contributor Author

@woodpecker-ci/maintainers could I get a review here? :)

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

Labels

feature add new functionality server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants