TRT-2562: Add architecture filtering to extension binary registry#30817
TRT-2562: Add architecture filtering to extension binary registry#30817stbenjam wants to merge 1 commit intoopenshift:mainfrom
Conversation
Some extension binaries (like aws-cloud-controller-manager) are only available on specific architectures. Add an optional architectures field to TestBinary that, when specified, limits extraction to only those architectures. This prevents extraction failures on s390x and ppc64le where the binary doesn't exist in the image. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
WalkthroughIntroduces architecture-specific filtering for extension binaries in the test framework. Adds a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/test/extensions/binary.go (1)
984-998: Add focused unit coverage for architecture filtering.Consider table-driven tests for:
- empty
architectures(allow all),- matching current arch (allow),
- non-matching arch (skip).
This would make future binary-registry edits safer.
Also applies to: 1014-1027
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pkg/test/extensions/binary.go` around lines 984 - 998, Add focused table-driven unit tests for architecture filtering to cover empty architectures (should allow all), a matching current architecture (should include), and a non-matching architecture (should skip). Create tests that construct TestBinary values exercising supportsCurrentArchitecture() and call filterExtensionBinariesByArchitecture(), asserting the returned slice contains or omits the binary as expected; do the same for the similar logic referenced around lines 1014-1027. Use test helpers to set or simulate runtime.GOARCH where needed and name cases clearly (e.g., "empty-architectures", "matching-arch", "non-matching-arch") so future registry edits are validated.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@pkg/test/extensions/binary.go`:
- Around line 984-998: Add focused table-driven unit tests for architecture
filtering to cover empty architectures (should allow all), a matching current
architecture (should include), and a non-matching architecture (should skip).
Create tests that construct TestBinary values exercising
supportsCurrentArchitecture() and call filterExtensionBinariesByArchitecture(),
asserting the returned slice contains or omits the binary as expected; do the
same for the similar logic referenced around lines 1014-1027. Use test helpers
to set or simulate runtime.GOARCH where needed and name cases clearly (e.g.,
"empty-architectures", "matching-arch", "non-matching-arch") so future registry
edits are validated.
ℹ️ Review info
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
pkg/test/extensions/binary.go
|
/test images |
|
@stbenjam: This pull request references TRT-2562 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/test unit |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: locriandev, stbenjam 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 |
|
Scheduling required tests: |
|
@stbenjam: The following tests 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. |
Some extension binaries (like aws-cloud-controller-manager) are only available on specific architectures. Add an optional architectures field to TestBinary that, when specified, limits extraction to only those architectures. This prevents extraction failures on s390x and ppc64le where the binary doesn't exist in the image.
Summary by CodeRabbit
Release Notes