Skip to content

fix(cache): include SCM identity in source cache key#8523

Merged
olblak merged 1 commit into
updatecli:mainfrom
loispostula:fix/8522-source-cache-scm-collision
Apr 20, 2026
Merged

fix(cache): include SCM identity in source cache key#8523
olblak merged 1 commit into
updatecli:mainfrom
loispostula:fix/8522-source-cache-scm-collision

Conversation

@loispostula

Copy link
Copy Markdown
Contributor

Fix #8522

Two pipelines reusing the same SCMID label (e.g. scmid: source) against different repositories collide in the source cache when their Kind+Spec match, serving the first pipeline's content to the second.

Fold the resolved SCM URL and source branch into the cache key. Nil-SCM callers keep the pre-fix hash via json:"scm,omitempty". Credentials live in separate Config fields and are not part of the identity.

Test

To test this pull request, you can run the following commands:

cd pkg/core/cache
go test

Additional Information

Checklist

  • I have updated the documentation via pull request in website repository.

Tradeoff

Potential improvement

Two pipelines reusing the same SCMID label (e.g. scmid: source) against
different repositories collide in the source cache when their Kind+Spec
match, serving the first pipeline's content to the second.

Fold the resolved SCM URL and source branch into the cache key. Nil-SCM
callers keep the pre-fix hash via json:"scm,omitempty". Credentials live
in separate Config fields and are not part of the identity.

Fixes: updatecli#8522
@olblak olblak added bug Something isn't working core All things related to Updatecli core engine labels Apr 20, 2026

@olblak olblak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the quick fix

@olblak olblak merged commit 108339a into updatecli:main Apr 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core All things related to Updatecli core engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Updatecli is using the wrong source cache

2 participants