OCPQE-31468: verify images command log pollution#1262
OCPQE-31468: verify images command log pollution#1262openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
Conversation
|
@kuiwang02: This pull request explicitly references no jira issue. 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughAdds a new script to validate that the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests-extension/hack/verify-images-json.sh (1)
35-35: Use single quotes intrapto defer variable expansion.While this works correctly because
tmpdiris already set, single quotes are the idiomatic pattern and prevent issues if the trap is ever moved before the variable assignment.Suggested fix
-trap "rm -rf ${tmpdir}" EXIT +trap 'rm -rf "${tmpdir}"' EXIT🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests-extension/hack/verify-images-json.sh` at line 35, Change the trap invocation so it uses single quotes to defer expansion of the tmpdir variable (replace trap "rm -rf ${tmpdir}" EXIT with a single-quoted version) so the removal command references tmpdir at EXIT time rather than at parse time; look for the trap line that references tmpdir and update the quoting around the rm -rf ${tmpdir} argument accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@tests-extension/hack/verify-images-json.sh`:
- Line 35: Change the trap invocation so it uses single quotes to defer
expansion of the tmpdir variable (replace trap "rm -rf ${tmpdir}" EXIT with a
single-quoted version) so the removal command references tmpdir at EXIT time
rather than at parse time; look for the trap line that references tmpdir and
update the quoting around the rm -rf ${tmpdir} argument accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bd88bf5a-fed1-48ac-941a-77ba6c42b00d
📒 Files selected for processing (2)
tests-extension/Makefiletests-extension/hack/verify-images-json.sh
07583c8 to
0403d02
Compare
|
/test e2e-aws-upgrade-ovn-single-node |
|
/test e2e-upgrade |
|
/retitle OCPQE-31468: verify images command log pollution |
|
@kuiwang02: This pull request references OCPQE-31468 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 story 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. |
|
@kuiwang02: all tests passed! 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. |
|
/verified by @kuiwang02 |
|
@kuiwang02: This PR has been marked as verified by 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. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jianzhangbjz, kuiwang02 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 |
/cc @jianzhangbjz @Xia-Zhao-rh @bandrade
Problem
The
imagescommand outputs logs instead of pure JSON, causing parsing failures in openshift-tests:I0319 16:12:15.325526 26159 client.go:1222] Found admin context: admin
I0319 16:12:15.325676 26159 client.go:1237] Cached admin context for all test suites: admin
null
This caused PR #1256 to be reverted by PR #1258.
Root Cause
admContextNameinitialization inNewCLI()executes during test tree construction (when runningimages/listcommands), triggeringe2e.Logf()calls that pollute the output.Solution
admContextNameon firstAsAdmin()call instead of in constructor (done by OCPBUGS-78557: Re-Apply Fix admin context race condition in parallel tests #1259 )verbose booltoduplicateFileToTempOrEmpty()to control logging (done by OCPBUGS-78557: Re-Apply Fix admin context race condition in parallel tests #1259 )hack/verify-images-json.shand CI integration to prevent future regressionsAssisted-By: Claude Code