-
Notifications
You must be signed in to change notification settings - Fork 4.2k
fix: Improve error handling in GitHub Actions build process #39688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Improve error handling in GitHub Actions build process #39688
Conversation
WalkthroughThe pull request updates the GitHub Actions workflow to improve error handling during the build process. It captures the exit code from the Changes
Sequence Diagram(s)sequenceDiagram
participant Workflow as GitHub Workflow
participant Build as Yarn Build
Workflow->>Build: Execute `yarn build`
Build-->>Workflow: Return exit code (EXIT_CODE)
Workflow->>Workflow: Check if EXIT_CODE > 1
alt Exit condition met
Workflow->>Workflow: Exit with captured EXIT_CODE
else
Workflow->>Workflow: Continue workflow execution
end
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/github-release.yml (1)
86-90
: Refactor Exit Code Capture in Yarn Build CommandConsider capturing the exit code immediately after running
yarn build
rather than using the|| EXIT_CODE=$?
inline construct. Capturing the exit code explicitly (usingEXIT_CODE=$?
on the next line) improves clarity and avoids any potential issues with bash’s implicitset -e
behavior—which might cause the step to exit before the conditional is reached. Also, please verify that treating an exit code of 1 as a non-critical warning (allowing the build to continue) is indeed the desired behavior.- yarn build || EXIT_CODE=$? - if [ -n "$EXIT_CODE" ] && [ "$EXIT_CODE" -gt 1 ]; then - exit $EXIT_CODE - fi + yarn build + EXIT_CODE=$? + if [ "$EXIT_CODE" -gt 1 ]; then + exit $EXIT_CODE + fi
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/github-release.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: perform-test / client-build / client-build
- GitHub Check: perform-test / rts-build / build
- GitHub Check: perform-test / server-build / server-unit-tests
Description
Refactor release client build step so that it does not fail on warnings.
Automation
/ok-to-test tags="@tag.Sanity"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13810276720
Commit: 1e7aeae
Cypress dashboard.
Tags:
@tag.Sanity
Spec:
Wed, 12 Mar 2025 12:06:24 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit