Skip to content
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

chore: skipping file change #37774

Merged
merged 1 commit into from
Nov 27, 2024
Merged

chore: skipping file change #37774

merged 1 commit into from
Nov 27, 2024

Conversation

sagar-qa007
Copy link
Contributor

@sagar-qa007 sagar-qa007 commented Nov 27, 2024

Description

Skipping file change check for client build.

Fixes https://app.zenhub.com/workspaces/stability-pod-6690c4814e31602e25cab7fd/issues/gh/appsmithorg/appsmith/37768

Automation

/ok-to-test tags=""

🔍 Cypress test results

Caution

If you modify the content in this section, you are likely to disrupt the CI result for your PR.

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • Chores
    • Updated the workflow configuration to simplify the client build process by removing file change detection.
    • Introduced a new variable to streamline subsequent steps in the workflow.

Copy link
Contributor

coderabbitai bot commented Nov 27, 2024

Walkthrough

The changes in the pull request involve modifications to the workflow configuration in .github/workflows/client-build.yml. The previous step for detecting changed files in the client directory has been commented out and replaced with a new step that sets an output variable any_changed to true unconditionally. This adjustment alters the conditional checks for subsequent steps, which now directly use the new variable. The overall structure of the workflow remains, but the mechanism for detecting file changes has been removed.

Changes

File Change Summary
.github/workflows/client-build.yml Commented out the step for detecting changed files; added a new step to set any_changed to true; adjusted subsequent steps to use the new variable.

Possibly related PRs

  • CI: commented files changed step. It is a notification step #35460: This PR modifies the same workflow file (.github/workflows/client-build.yml) by commenting out a step related to file changes, which aligns with the main PR's changes that also involve commenting out similar logic.
  • CI : fix build cache #37712: This PR also addresses the .github/workflows/client-build.yml file, focusing on enhancing the build cache functionality, which is relevant to the overall workflow modifications discussed in the main PR.

Suggested labels

skip-changelog, Task

Suggested reviewers

  • sharat87
  • yatinappsmith

In the workflow's dance, a step's been removed,
Changed files no longer, the logic's improved.
With any_changed set true, the flow carries on,
Simplified and clear, like the light of dawn.
A task now awaits, as we build and deploy,
Cheers to the changes, let’s all share the joy! 🎉


🪧 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 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 skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Nov 27, 2024
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

🧹 Outside diff range and nitpick comments (1)
.github/workflows/client-build.yml (1)

Line range hint 92-93: Simplify conditional checks

Since steps.changed-files-specific.outputs.any_changed is now always true, the conditional checks throughout the workflow can be simplified. This would improve readability and maintenance.

Example simplification for the conditions:

-if: steps.run_result.outputs.run_result != 'success' && (steps.changed-files-specific.outputs.any_changed == 'true' ||  github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
+if: steps.run_result.outputs.run_result != 'success' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || true)

Or even better:

-if: steps.run_result.outputs.run_result != 'success' && (steps.changed-files-specific.outputs.any_changed == 'true' ||  github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
+if: steps.run_result.outputs.run_result != 'success'

Also applies to: 106-107, 121-122, 134-135, 147-148, 159-160, 171-172, 186-187, 199-200

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 9f9a993 and 666f734.

📒 Files selected for processing (1)
  • .github/workflows/client-build.yml (1 hunks)
🔇 Additional comments (1)
.github/workflows/client-build.yml (1)

69-77: Verify the impact of removing change detection

The change to bypass file detection and always run the client build could impact CI performance and resource usage. While this might be intentional for stability (as mentioned in PR #37768), we should verify:

  1. The performance impact on the CI pipeline
  2. Whether this is a temporary fix or permanent solution

Let's analyze the impact:

Consider alternatives if this is a permanent change:

  1. Implement more granular change detection
  2. Add a manual trigger to force builds when needed
  3. Use build caching strategies to minimize the impact
✅ Verification successful

Bypassing change detection is acceptable in this context

The modification to always set any_changed=true is actually well-aligned with the workflow's logic:

  1. The workflow already has explicit conditions for different events (push, workflow_dispatch, schedule)
  2. The cache restoration step for previous builds is properly handled
  3. The change detection bypass is consistently implemented with proper fallback conditions

The performance impact is mitigated by:

  • Caching mechanisms for dependencies and builds
  • Conditional steps that still respect event types
  • Proper artifact handling for build outputs
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check recent workflow runs to compare build times before and after this change
gh run list --workflow=client-build.yml --limit 10 --json durationInMinutes,status,conclusion \
  | jq -r '.[] | "Duration: \(.durationInMinutes)min, Status: \(.status), Conclusion: \(.conclusion)"'

Length of output: 439


Script:

#!/bin/bash
# Let's check the workflow file to understand the dependencies and usage of the changed_files variable
cat .github/workflows/client-build.yml

Length of output: 12261


Script:

#!/bin/bash
# Let's also check for any related workflow files that might be affected
fd ".*\.ya?ml" .github/workflows/ --exec grep -l "changed-files"

Length of output: 184


Script:

#!/bin/bash
# Check if there are any conditional steps that depend on the changed_files output
rg "if: steps.changed-files" .github/workflows/

Length of output: 2443

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Adding this label to a PR prevents it from being listed in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants