GeezerVison is showing github.com — Fixes registry used to check for deprecation settings by arcanis · Pull Request #5534 · yarnpkg/berry
Conversation
arcanis
commented
Jun 26, 2023
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
What's the problem this PR addresses?
The new yarn npm audit implementation checks the packages' metadata on the audit server rather than the server configured to serve their metadata.
Closes #5533
How did you fix it?
Updated the code to use the new getPackageMetadata function, which should use the proper server while also leveraging the cache if possible.
Checklist
- I have set the packages that need to be released for my changes to be effective.
- I will check that all automated PR checks pass before the PR gets reviewed.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Needs a test and getPackageMetadata doesn't include the deprecated field.
#5491 (comment)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Deprecations shouldn't use getPackageMetadata - even if we cached the deprecated field, it could be stale for exact versions since it can change at any time.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
even if we cached the deprecated field, it could be stale for exact versions since it can change at any time
In which case I'd expect the registry to fail the etag / last modified check and return the updated metadata. I don't pass a version number, so we should never return straight from the cache.
I didn't notice that the deprecated field wasn't cached though - I'm thinking of adding it, as having a working cache on audit should make it much faster - the deprecation check is currently the slower part.
|
paul-soporan reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
merceyz
Awaiting requested review from merceyz
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.