GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fixes registry used to check for deprecation settings by arcanis · Pull Request #5534 · yarnpkg/berry

Conversation

@arcanis

@arcanis arcanis commented Jun 26, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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 read the Contributing Guide.
  • 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.

All reactions
@arcanis
Fixes registry used to check for deprecation settings
932390b
merceyz
merceyz requested changes Jun 26, 2023
View reviewed changes

@merceyz merceyz left a comment

Copy link
Copy Markdown
Member

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.

All reactions
paul-soporan
paul-soporan requested changes Jun 26, 2023
View reviewed changes

@paul-soporan paul-soporan left a comment

Copy link
Copy Markdown
Member

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.

All reactions
@arcanis

arcanis commented Jun 26, 2023

Copy link
Copy Markdown
Member Author

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
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@arcanis
Adds a test
cc24890
@arcanis
arcanis requested review from merceyz and paul-soporan June 27, 2023 15:34
arcanis added 3 commits June 27, 2023 17:40
@arcanis
Versions
81a5d5a
@arcanis
Fixes tests
4e3c3f5
@arcanis
Fixes tests
07ef4e9
@arcanis
arcanis merged commit b39e673 into master Jun 29, 2023
@arcanis
arcanis deleted the mael/audit-deprecated-registry branch June 29, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@merceyz merceyz Awaiting requested review from merceyz
@paul-soporan paul-soporan Awaiting requested review from paul-soporan

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

yarn npm audit cannot find packages from custom registry server

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@arcanis @merceyz @paul-soporan
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.