-
Notifications
You must be signed in to change notification settings - Fork 592
HDDS-9171. Resolve dependabot build issues when updating npm packages #5538
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
Conversation
…bot auto PR changes
…write to content for PR
errose28
left a comment
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.
Thanks for working on this @devabhishekpal. I'm not very familiar with javascript dependency management or dependabot, so I have some questions about the changes in addition to the inline comments:
- In the image you shared, why was the pnpm lock file updated as part of a change to pom.xml?
- Is there a way to configure dependabot to work correctly without needing a custom action? I don't totally understand the current error before this PR or if there is a config to fix this:
[INFO] --- frontend-maven-plugin:1.12.0:npx (install frontend dependencies) @ ozone-recon ---
[INFO] npm not inheriting proxy config from Maven
[INFO] Running 'npx [email protected] install --frozen-lockfile' in /home/runner/work/ozone/ozone/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web
[INFO] ERR_PNPM_LOCKFILE_CONFIG_MISMATCH Cannot proceed with the frozen installation. The current "settings.autoInstallPeers" configuration doesn't match the value found in the lockfile
[INFO]
[INFO] Update your lockfile using "pnpm install --no-frozen-lockfile"
Maybe something like these could fix it?
pnpm/pnpm#6649
https://github.com/orgs/pnpm/discussions/6633
adoroszlai
left a comment
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.
Thanks @devabhishekpal for working on this.
|
@errose28 Thanks for asking this, it is actually a good question. So actually the main lockfile for Recon does not have this parameter. Now coming to the two questions: In the image you shared, why was the pnpm lock file updated as part of a change to pom.xml?This is because I had actually run out of dependabot dependency PRs, so dependabot won't raise further PRs once opens an upgrade PR. So in order to test the scenario, I had manually removed the Is there a way to configure dependabot to work correctly without needing a custom action? I don't totally understand the current error before this PR or if there is a config to fix thisSo the current dependabot.yml change will actually properly bump the versions on the package.json, but it will also generate the pnpm-lock.yaml file, we cannot change this behaviour, and the lockfile which is generated by dependabot often times have issues, like it sets the |
…t action to run for PR open and synchronize
|
Thanks @devabhishekpal for updating the patch. Can you please also update the PR to reference new test runs from your fork using the updated workflow? |
|
Thanks @adoroszlai for the review. The following are the screenshots after the changes. Java Package upgrades automatically raised by dependabot after change.
Java upgrade has the dependabot-check skipped
A dummy test PR raised with the prefix [Recon] Dependabot Package Upgrade, where the check runs
|
|
@devabhishekpal Merge from |
|
Thanks @devabhishekpal for the patch, I'm fine with the latest version. @errose28 please take another look. |
errose28
left a comment
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.
LGTM
|
Thanks @devabhishekpal for the patch, @errose28 for the review. |



What changes were proposed in this pull request?
pnpm-lock.yamlfile which is an incorrect behaviour and would cause build failures.Even after we properly define the dependabot behaviour, it would properly update the versions on the dependencies. But it would also create a pnpm-lock.yaml file automatically which might not be accurate. So the github actions delete this bot generated lockfile, re-creates this file using pnpm to ensure proper generation and re-commits this proper lockfile back into the PR, ensuring the generation is properly done and there are no build issues with such an upgrade.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9171
How was this patch tested?
This patch was tested manually.
Dummy PR was raised against the branch with the changes in the private forked repo, and then the validations were made.
package.jsonfile.dependabot-checkaction ran on a dummy PR raised against the branch with the changes for testing.