OCPBUGS-83624: Embed credentials_request.yaml template in test binary - #1072
OCPBUGS-83624: Embed credentials_request.yaml template in test binary#1072jrangelramos wants to merge 1 commit into
Conversation
The conformance test for CCO-based OLM flow fails in CI because oc process references test/extend/testdata/credentials_request.yaml by relative path, which does not exist when the compiled test binary runs outside the source tree. Use go:embed to compile the template into the binary so it is available regardless of working directory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@jrangelramos: This pull request references Jira Issue OCPBUGS-83624, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jrangelramos 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 |
WalkthroughThe test utility now embeds the credentials request template and writes it to a temporary YAML file during resource creation. Tests no longer provide a file-based template path for the invalid request. ChangesCredentials request template handling
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1072 +/- ##
=======================================
Coverage 47.21% 47.21%
=======================================
Files 97 97
Lines 12650 12650
=======================================
Hits 5973 5973
Misses 6017 6017
Partials 660 660 🚀 New features to boost your workflow:
|
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 `@test/extend/cloudcredential_util.go`:
- Line 269: Update the deferred cleanup around tmpFile in the surrounding test
helper to capture the error returned by os.Remove and report unexpected failures
through the test’s existing error-reporting mechanism, while preserving cleanup
execution on all exit paths.
🪄 Autofix
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: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 99312581-2c23-4e22-bb06-61ec28dc2d94
📒 Files selected for processing (2)
test/extend/cloudcredential.gotest/extend/cloudcredential_util.go
💤 Files with no reviewable changes (1)
- test/extend/cloudcredential.go
|
@jrangelramos: This pull request references Jira Issue OCPBUGS-83624, which is valid. 3 validation(s) were run on this bug
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. |
|
@jrangelramos: 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. |
|
Hello @jstuever greetings! Would you mind reviewing this PR? Thanks! |
|
/cc @huangmingxia |
|
@jrangelramos: GitHub didn't allow me to request PR reviews from the following users: huangmingxia. Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs. 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 kubernetes-sigs/prow repository. |
Summary
oc processcan't findtest/extend/testdata/credentials_request.yamlwhen the test binary runs outside the source tree in CIgo:embedto compile the template into the test binary so it's available regardless of working directoryTest plan
go build ./cmd/cloud-credential-tests-ext/compiles cleanlyCritical-CCO-based flow for olm managed operators and AWS STSin CI🤖 Generated with Claude Code
Summary by CodeRabbit