fix: unified spec-first official image import for ocp jobs#5213
fix: unified spec-first official image import for ocp jobs#5213deepsm007 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (19)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (15)
📝 WalkthroughWalkthroughSimplify Dockerfile registry extraction, make Dockerfile input detection aware of existing base images, add official-image resolution helpers and integrate them into input-tag creation, and refactor promotion/snapshot retry logic and fixtures. ChangesOfficial Image Resolution and Dockerfile Input Detection
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
🚥 Pre-merge checks | ✅ 16 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (16 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Actionable comments posted: 0 |
7ef25f4 to
e382c3e
Compare
|
/test e2e |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/steps/utils/image.go`:
- Around line 46-47: The current check in ImageDigestFor uses FindSpecTag(is,
tag) == nil to test tag existence but FindSpecTag returns the spec tag's From
reference so a spec entry with From == nil is treated as missing; add a helper
like hasSpecTag(is *imagev1.ImageStream, tag string) that scans is.Spec.Tags for
a name match, then change the conditional in ImageDigestFor to: if ref == nil &&
!hasSpecTag(is, tag) { return error } so spec-only tags with nil From are not
reported as absent (leave FindSpecTag behaviour unchanged).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 26cf2690-339d-4051-901b-393950fabf6a
📒 Files selected for processing (19)
cmd/registry-replacer/main.gopkg/defaults/defaults.gopkg/dockerfile/extract.gopkg/dockerfile/inputs.gopkg/dockerfile/inputs_test.gopkg/steps/input_image_tag.gopkg/steps/input_image_tag_test.gopkg/steps/release/promote.gopkg/steps/release/promote_test.gopkg/steps/release/snapshot.gopkg/steps/release/testdata/zz_fixture_TestGetPromotionPod_basic_case.yamlpkg/steps/release/testdata/zz_fixture_TestGetPromotionPod_basic_case__arm64_only.yamlpkg/steps/release/testdata/zz_fixture_TestGetPromotionPod_basic_case__multi_architecture.yamlpkg/steps/release/testdata/zz_fixture_TestGetPromotionPod_promotion_quay.yamlpkg/steps/release/testdata/zz_fixture_TestGetPromotionPod_promotion_quay_4.12.yamlpkg/steps/release/testdata/zz_fixture_TestGetPromotionPod_promotion_quay_multiple_tags.yamlpkg/steps/release/testdata/zz_fixture_TestGetPromotionPod_promotion_quay_non_release_namespace.yamlpkg/steps/utils/image.gopkg/steps/utils/image_test.go
✅ Files skipped from review due to trivial changes (2)
- pkg/steps/release/testdata/zz_fixture_TestGetPromotionPod_basic_case.yaml
- pkg/steps/release/testdata/zz_fixture_TestGetPromotionPod_basic_case__arm64_only.yaml
🚧 Files skipped from review as they are similar to previous changes (9)
- cmd/registry-replacer/main.go
- pkg/defaults/defaults.go
- pkg/steps/release/snapshot.go
- pkg/steps/utils/image_test.go
- pkg/dockerfile/extract.go
- pkg/dockerfile/inputs_test.go
- pkg/steps/input_image_tag_test.go
- pkg/steps/input_image_tag.go
- pkg/dockerfile/inputs.go
e382c3e to
caf8970
Compare
|
Actionable comments posted: 0 |
|
/assign @danilo-gemoli |
|
/retest |
|
Scheduling tests matching the |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deepsm007, jupierce The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold |
|
@deepsm007: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
/hold
/cc @openshift/test-platform
https://prow.ci.openshift.org/view/gs/test-platform-results/logs/openshift-api-2854-openshift-installer-10566-openshift-origin-31211-openshift-machine-config-operator-6076-ci-5.0-e2e-aws-ovn-techpreview-serial-3of3/2060029597415641088#1:build-log.txt%3A150-157
https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_continuous-release-jobs/1797/pull-ci-openshift-continuous-release-jobs-master-images/2060040001508347904
Unified spec-first official image import for OpenShift CI jobs
This PR changes how ci-operator detects and imports OpenShift base images for builds so the tool prefers ImageStream/spec-defined sources ("spec-first") and avoids duplicate Dockerfile-detected imports.
What changed (practical terms)
Components affected
Behavior change for CI users/operators
Risk / review notes
Additional PR metadata: the author added a hold and CC to
@openshift/test-platformand included Prow CI log references for related failures.