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

fix: Reverted changes for skip client cache #37782

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

sagar-qa007
Copy link
Contributor

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

Description

Added command for migration

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
    • Enhanced the client build workflow for improved detection of modified files.
    • Streamlined conditions for executing build steps based on file changes.
    • Refined caching mechanisms for Yarn and build artifacts.
    • Improved handling of Git LFS commands in the build process.

Copy link
Contributor

coderabbitai bot commented Nov 27, 2024

Walkthrough

The pull request includes significant updates to the client build workflow configuration in GitHub Actions. Key changes involve the adoption of the tj-actions/changed-files@v41 action for improved detection of modified files in the app/client directory. The workflow steps have been restructured to ensure conditional execution based on detected changes, enhancing the efficiency of compliance checks and caching mechanisms. Additionally, modifications have been made to ensure proper execution of Git LFS commands, streamlining the overall build process.

Changes

File Path Change Summary
.github/workflows/client-build.yml Updated to use tj-actions/changed-files@v41 for detecting changes, restructured conditional steps, refined caching mechanisms, and improved Git LFS command execution.

Possibly related PRs

Suggested labels

Bug, ok-to-test, Task

Suggested reviewers

  • sharat87
  • yatinappsmith
  • ApekshaBhosale

🎉 In the workflow's dance, changes take flight,
With tj-actions now shining so bright.
Compliance checks, oh what a delight,
Caching refined, everything feels right!
Git LFS commands, no longer a fright,
Build process streamlined, ready for the night! 🌟


🪧 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.

@sagar-qa007 sagar-qa007 requested review from yatinappsmith and removed request for sharat87 November 27, 2024 11:16
@github-actions github-actions bot added the Bug Something isn't working label Nov 27, 2024
@yatinappsmith yatinappsmith merged commit 94768bd into release Nov 27, 2024
16 of 17 checks passed
@yatinappsmith yatinappsmith deleted the ci/revertedclientcache branch November 27, 2024 11:17
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: 2

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 62724e9 and ed9ed7f.

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

Comment on lines +215 to +216
git lfs install
git lfs migrate import --everything --yes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Remove redundant Git LFS installation

The git lfs install command at line 215 is redundant as it's already executed earlier in the step. This duplication may cause unnecessary processing.

Remove the redundant command:

-          git lfs install
           git lfs migrate import --everything --yes
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
git lfs install
git lfs migrate import --everything --yes
git lfs migrate import --everything --yes

Comment on lines +69 to +85
- name: Get changed files in the client folder
id: changed-files-specific
run: echo "any_changed=true" >> "$GITHUB_OUTPUT"
uses: tj-actions/changed-files@v41
with:
files: "app/client/**"

#- name: Run step if any file(s) in the client folder change
# if: steps.changed-files-specific.outputs.any_changed == 'true'
# env:
# ALL_CHANGED_FILES: ${{ steps.changed-files-specific.outputs.all_changed_files }}
# run: |
# echo "One or more files in the server folder has changed."
# echo "List all the files that have changed: $ALL_CHANGED_FILES"
# - name: Updating the client changed file variable
# id: changed-files-specific
# run: echo "any_changed=true" >> "$GITHUB_OUTPUT"

- name: Run step if any file(s) in the client folder change
if: steps.changed-files-specific.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-files-specific.outputs.all_changed_files }}
run: |
echo "One or more files in the server folder has changed."
echo "List all the files that have changed: $ALL_CHANGED_FILES"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Version inconsistency detected in tj-actions/changed-files usage

The action is used with different versions across workflows:

  • client-build.yml: v41
  • server-build.yml: v44
  • ci-client-cyclic-deps-check.yml: v41

Please update all workflows to use the latest version (v44) for consistency and to benefit from the latest features and bug fixes.

Locations that need updates:

  • .github/workflows/client-build.yml:71
  • .github/workflows/ci-client-cyclic-deps-check.yml:32
🔗 Analysis chain

LGTM: Improved file change detection implementation

The switch to tj-actions/changed-files@v41 is a good improvement over the manual echo approach. The implementation correctly uses the action's outputs for conditional execution.

Let's verify the action's configuration:


Let me analyze the configuration details of the changed-files action across different workflows to ensure consistency and identify any potential version mismatches.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify tj-actions/changed-files configuration
# Check if the action is properly configured in other workflows
rg -p "tj-actions/changed-files" .github/workflows/

Length of output: 312


Script:

#!/bin/bash
# Check the configuration details of changed-files action across workflows
cat .github/workflows/client-build.yml .github/workflows/server-build.yml .github/workflows/ci-client-cyclic-deps-check.yml | awk '/tj-actions\/changed-files/,/with:/ { p=1 } p; /^[^ ]/ { p=0 }'

Length of output: 26401

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants