Skip to content

Reject cached package 404s before installation and builds - #1412

Merged
ije merged 1 commit into
mainfrom
ije/cached-package-404
Sep 17, 2026
Merged

ije merged 1 commit into
mainfrom
ije/cached-package-404

Conversation

@ije

@ije ije commented Sep 17, 2026

Copy link
Copy Markdown
Member

Cached package-not-found errors were checked during installation, so requests could still wait for installation locks or build slots. Raw and types routes also returned 500 for these errors. Check the existing negative records before routing into installation or queuing builds, and return 404 with a 10-minute cache header for package-not-found errors across those routes.

The shared lookup covers npm package/version metadata, npm tarballs, and GitHub/pkg.pr.new installation misses. Existing expiry and permanent missing-path/size records keep their current behavior. This follows up on #1411.

Validation:

  • go test ./server/...
  • Targeted race tests covering negative caches, routes, and build queues.
  • Regression tests reproduce blocked installation locks, an occupied build queue, and incorrect raw/types status codes; all pass with the fix.

@ije
ije merged commit b46939b into main Sep 17, 2026
16 of 20 checks passed
@ije
ije deleted the ije/cached-package-404 branch September 17, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant