NO-JIRA: Enforce no yarn.lock changes at build time#16107
NO-JIRA: Enforce no yarn.lock changes at build time#16107logonoff wants to merge 2 commits intoopenshift:mainfrom
Conversation
|
@logonoff: 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. |
This will cause builds to fail if yarnlock has changes
📝 WalkthroughWalkthroughThis pull request modifies five shell scripts to enforce stricter dependency management and preflight validation. The build scripts add the 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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)
test-frontend.sh (1)
9-9: Balancepushdwith guaranteed cleanup for explicit directory-stack handling.Line 9 introduces
pushd frontendwithout a matchingpopd. While this script executes standalone (never sourced), adding an explicitEXITtrap clarifies intent and improves robustness if this pattern is ever reused elsewhere.♻️ Suggested refactor
-pushd frontend +pushd frontend >/dev/null +trap 'popd >/dev/null' EXIT🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@test-frontend.sh` at line 9, The script uses pushd frontend without a matching popd; add a guaranteed cleanup by registering a trap on EXIT that performs popd to restore the directory stack. Locate the pushd frontend invocation and add an EXIT trap (e.g., trap 'popd >/dev/null || true' EXIT) before or immediately after pushd so popd always runs even on errors or early exits; ensure the trap is idempotent and does not error if the directory stack is empty.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@test-frontend.sh`:
- Line 9: The script uses pushd frontend without a matching popd; add a
guaranteed cleanup by registering a trap on EXIT that performs popd to restore
the directory stack. Locate the pushd frontend invocation and add an EXIT trap
(e.g., trap 'popd >/dev/null || true' EXIT) before or immediately after pushd so
popd always runs even on errors or early exits; ensure the trap is idempotent
and does not error if the directory stack is empty.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4aaab250-b7d2-49c8-96c8-aca7023f8bec
📒 Files selected for processing (5)
build-demos.shbuild-frontend.shtest-demos.shtest-frontend.shtest.sh
💤 Files with no reviewable changes (2)
- test.sh
- test-demos.sh
|
/label px-approved |
|
/label docs-approved Tested locally that build will fail if yarn lock would have uncommitted changes |
|
@logonoff: 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. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhadvig, logonoff, vojtechszocs 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 |
|
@logonoff: 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. |
Replaces openshift/release#75680
--immutableflag which breaks at build time (instead of test time). The output is a lot prettierbuild-demoswhich means we will finally check for yarn.lock changes in demo pluginSummary by CodeRabbit