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

Running yarn install before running the update checkoer #11011

Merged
merged 13 commits into from
Nov 27, 2024

Conversation

thavaahariharangit
Copy link
Contributor

@thavaahariharangit thavaahariharangit commented Nov 25, 2024

What are you trying to accomplish?

Rel : https://github.com/github/dependabot-updates/issues/7169

Root cause of above issue is yarn add/upgrade <package-name>@version is failing

Creating a cache folder under .yarn file fixes this issue.

Anything you want to highlight for special attention from reviewers?

I have ran the cli against the repo where I recreated the error and solved it by this update.

How will you know you've accomplished your goal?

I have ran the cli against the repo where I recreated the error and solved it by this update.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@@ -101,12 +101,21 @@ def npm_files
fetched_npm_files
end

def run_yarn_install
Dir.chdir("repo") do
# --refresh-lockfile Refresh the package metadata stored in the lockfile
Copy link
Member

Choose a reason for hiding this comment

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

Any reason why we are not using the Helper.Subprocess method?

Also, can we add tests?

Copy link
Contributor Author

@thavaahariharangit thavaahariharangit Nov 26, 2024

Choose a reason for hiding this comment

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

Based on the analysis, yarn immutable install is only creating .yarn/cache directory on the repo directory. So I have updated fix and test accordingly.

With this, I ran the cli and ensured, Customer reported issue is fixed

@thavaahariharangit thavaahariharangit force-pushed the harry/run-yarn-install-before-update-checker branch from f6cb157 to bf310e6 Compare November 26, 2024 17:49
@thavaahariharangit
Copy link
Contributor Author

TODO: Junit needs to be added.

@thavaahariharangit thavaahariharangit marked this pull request as draft November 26, 2024 17:53
@thavaahariharangit thavaahariharangit marked this pull request as ready for review November 27, 2024 13:19
@thavaahariharangit thavaahariharangit merged commit c02fdae into main Nov 27, 2024
66 checks passed
@thavaahariharangit thavaahariharangit deleted the harry/run-yarn-install-before-update-checker branch November 27, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants