allow image references combining a tag and a digest#4579
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates function image reference validation to use the upstream OCI/Docker reference parser and expands test coverage for tag+digest combinations.
Changes:
- Replace custom regex-based image reference validation with
github.com/distribution/reference. - Update validation documentation to describe the accepted reference grammar (tag, digest, or both).
- Add tests covering tag+digest references and an invalid
name@taginput.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/api/kptfile/v1/validation.go | Switches validation to distribution/reference.Parse and updates doc comment accordingly. |
| pkg/api/kptfile/v1/validation_test.go | Adds test cases for tag+digest references and an invalid @v0.1.0 reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c00080c to
70dd193
Compare
✅ Deploy Preview for kptdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for kptdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for kptdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The failing test passes without any issues in my environment. It does not seem to be related to the changes in this PR. Is the test itself flaky? |
Yes, it looks like an image pull failure from ghcr. Re run passed. |
efiacor
left a comment
There was a problem hiding this comment.
Looks ok. Need to address any copilot comments before merge.
|
There's something weird happening on the CI jobs, nothing to do with your PR. I'll check with the CI experts later to see what's wrong. |
Signed-off-by: Shoma Kokuryo <s.kokuryo@gmail.com>
|
Thanks for the contribution @pddg |
Description
fix #4578
Motivation
The
name:tag@digestform is valid per the OCI/Docker reference grammar.