Skip to content

Conversation

alex-golovanov
Copy link
Contributor

@alex-golovanov alex-golovanov commented Mar 12, 2025

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?

  • Yes
  • No

Summary by CodeRabbit

  • Chores
    • Enhanced the build process to better capture and handle errors, ensuring that any issues during the build are flagged promptly.

Copy link
Contributor

coderabbitai bot commented Mar 12, 2025

Walkthrough

The pull request updates the GitHub Actions workflow to improve error handling during the build process. It captures the exit code from the yarn build command by storing it in an EXIT_CODE variable. A conditional check now ensures that if the exit code is greater than 1, the script exits with that code, causing the workflow to fail appropriately. No modifications were made to exported or public entities.

Changes

File Change Summary
.github/workflows/github-release.yml Added error handling for yarn build by capturing the exit code in an EXIT_CODE variable and conditionally exiting when the code is greater than 1.

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
Loading

Possibly related PRs

Suggested labels

Bug, CI, ok-to-test, skip-changelog

Suggested reviewers

  • sharat87
  • sagar-qa007

Poem

In the realm where code does weave,
A build command now learns to leave.
Exit codes told without delay,
Ensuring errors show the way.
With workflows now robust and keen,
Our code shines bright on every scene!
🚀✨


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the Bug Something isn't working label Mar 12, 2025
@alex-golovanov alex-golovanov added ok-to-test Required label for CI and removed Bug Something isn't working labels Mar 12, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 Command

Consider capturing the exit code immediately after running yarn build rather than using the || EXIT_CODE=$? inline construct. Capturing the exit code explicitly (using EXIT_CODE=$? on the next line) improves clarity and avoids any potential issues with bash’s implicit set -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

📥 Commits

Reviewing files that changed from the base of the PR and between b568efa and 1e7aeae.

📒 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

@github-actions github-actions bot added the Bug Something isn't working label Mar 12, 2025
@nerbos nerbos enabled auto-merge (squash) March 12, 2025 11:59
@nerbos nerbos disabled auto-merge March 12, 2025 11:59
@nerbos nerbos merged commit c417c30 into release Mar 12, 2025
47 checks passed
@nerbos nerbos deleted the fix/00000-add-exit-code-validation-to-release-wf branch March 12, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working ok-to-test Required label for CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants