[ART-21083] fix(scanner): align okd-scan with build pipeline for arches and base chain#3095
[ART-21083] fix(scanner): align okd-scan with build pipeline for arches and base chain#3095lgarciaaco wants to merge 1 commit into
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift-eng/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (4)
WalkthroughOKD image filtering now includes ChangesOKD Scan Image Filtering and Arch Scoping
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
3157b49 to
ff43999
Compare
…chain okd-scan was not detecting two categories of changes that the OKD build pipeline acts on: 1. Arch expansion: adding aarch64 to OKD_ARCHES did not trigger rebuilds because okd-scan did not pass --arches to doozer, so scan_arch_changes compared against OCP's 4-arch group config instead of OKD's 2-arch target. 2. Base chain: base_only images (like openshift-enterprise-base-rhel9) were excluded from the OKD scan set because _is_image_enabled required for_payload=true, but the OKD build pipeline includes base_only parents. Changes: - Import OKD_ARCHES in okd_scan.py from okd.py (single source of truth) and pass --arches to doozer invocation - Update _is_image_enabled to include base_only images for OKD variant - Remove redundant for_payload filter in _is_image_enabled_for_scan - Make OKD_ARCHES a tuple for immutability - Add comprehensive unit tests for both gaps Resolves: ART-21083 rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
ff43999 to
5773312
Compare
Summary
Fixes two gaps where okd-scan did not detect changes that the OKD build pipeline acts on:
--arches(fromOKD_ARCHES) to doozer, soscan_arch_changescompares against OKD's 2-arch target instead of OCP's 4-arch group config._is_image_enablednow includesbase_onlyimages for OKD variant, matching whatartcd okdbuilds (e.g. openshift-enterprise-base-rhel9).Changes
OKD_ARCHESinokd_scan.pyfromokd.py(single source of truth) and pass--archesto doozer_is_image_enabledto includebase_onlyimages for OKD variant (for_payload or base_only)for_payloadfilter in_is_image_enabled_for_scan(now handled by_is_image_enabled)OKD_ARCHESa tuple for immutability (now shared across two consumers)Test plan
pytest doozer/tests/cli/test_scan_sources_konflux.py::TestOkdImageFiltering— 8 passpytest doozer/tests/cli/test_scan_sources_konflux.py::TestOkdArchChanges— 3 passpytest pyartcd/tests/pipelines/test_okd_scan.py— 8 passtest_scan_sources_konflux.pysuite — 49 passartcd okd-scan --image-list=openshift-enterprise-base-rhel9against fork with controlled scenariosResolves: ART-21083
Summary by CodeRabbit
New Features
Bug Fixes
Tests