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 PNPM issues with private registries #8330

Merged
merged 8 commits into from
Nov 15, 2023

Conversation

deivid-rodriguez
Copy link
Contributor

@deivid-rodriguez deivid-rodriguez commented Nov 3, 2023

This PR fixes two issues:

  • Dependabot can't infer the proper registry for each dependency by looking at registry urls in pnpm-lock.yaml.

This is handy because developers don't need to commit a .npmrc file and matches what we already support for NPM and Yarn.

  • Dependabot incorrectly tries to infer the proper registry for each dependency by looking at presence in the registry, even when registries & scopes are explicitly configured in .npmrc.

This is a good last resort fallback, but it should not be used if registries & scopes have been explicitly configured.

Fixes #8242.
Fixes performance issues introduced by #8094.
Likely to fix #8008.

@yeikel
Copy link
Contributor

yeikel commented Nov 3, 2023

Thank you for tagging me!

I am not too familiar with the ecosystem but I understand the problem. Any chance you can add a spec?

@deivid-rodriguez
Copy link
Contributor Author

Actually I meant to ping @mburumaxwell 🤦‍♂️, sorry about that. Thanks for chiming in though! Yes, this is a draft because I plan to add some specs 👍.

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/private-registry-issues branch 2 times, most recently from 0228de9 to 1eef40f Compare November 7, 2023 13:17
@deivid-rodriguez
Copy link
Contributor Author

@dancallaghan This is now ready, I'll deploy it next week!

@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review November 7, 2023 13:18
@deivid-rodriguez deivid-rodriguez requested a review from a team as a code owner November 7, 2023 13:18
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/private-registry-issues branch from 1eef40f to e7bffce Compare November 9, 2023 12:39
@deivid-rodriguez
Copy link
Contributor Author

Thanks for reviewing @yeikel, hopefully I addressed your comments.

@dancallaghan If you're able to try this again, I appreciate. I introduced a few refactoring so it'd be good to know I did not break anything!

@dancallaghan
Copy link
Contributor

Thanks @deivid-rodriguez

I've tested locally with the latest changes on our use case and it's working as expected 👍

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/private-registry-issues branch from e7bffce to 7c0354a Compare November 15, 2023 18:30
@deivid-rodriguez deivid-rodriguez merged commit f00f0f9 into main Nov 15, 2023
81 checks passed
@deivid-rodriguez deivid-rodriguez deleted the deivid-rodriguez/private-registry-issues branch November 15, 2023 20:12
@BPScott
Copy link

BPScott commented Sep 3, 2024

@deivid-rodriguez, It seems like the changes to the lockfile in pnpm v9 mean these improvements no longer apply.

The performance issues caused by dependabot checking non-standard repositories for all packages rather than the ones within configured namespaces have resurfaced when using pnpm v9

Dependabot seems to want to check all packages against my private repository rather than only once in the given namespace - the same as #8242 (comment)

@deivid-rodriguez
Copy link
Contributor Author

I no longer actively contribute to this repo, so I won't be able to help right now, but thanks for letting me know!

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.

PNPM dependabot timeout Can't specify which registry pnpm should use
5 participants