Skip to content

fix(selfhost): stop pinning sharp's Dockerfile install, let overrides resolve it#8115

Merged
JSONbored merged 1 commit into
mainfrom
fix/dockerfile-sharp-version-pin
Jul 22, 2026
Merged

fix(selfhost): stop pinning sharp's Dockerfile install, let overrides resolve it#8115
JSONbored merged 1 commit into
mainfrom
fix/dockerfile-sharp-version-pin

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Closes #8112.

Summary

  • release-selfhost.yml's multi-arch build started failing on every release attempt with npm error code EOVERRIDE: Override for sharp@0.34.5 conflicts with direct dependency — currently blocking ALL future ORB beta/stable releases, discovered while cutting the beta release for Same-rule repeat alarm: fast-path detection when one deterministic rule rejects N distinct targets in a short window #7983.
  • Dockerfile hardcodes a standalone npm install sharp@<version> (esbuild marks sharp external in the self-host bundle, so it can't ship inside dist/server.mjs, needing a separate install step). chore(deps): update dependency sharp to ^0.35.0 [security] #7970's dependency bump moved package.json's sharp to ^0.35.0 and added a matching overrides.sharp entry — but a Dependabot-style bump has no mechanism to also update a version hardcoded inside a Dockerfile RUN command, so this line silently drifted out of sync.
  • Re-pinning to the exact resolved version (sharp@0.35.3) still fails identically: recent npm treats an explicit CLI version and an overrides entry for the SAME package as two competing authorities and refuses to pick between them, regardless of whether the versions actually agree.
  • Fix: drop the version entirely, letting npm resolve from package.json's overrides — the real source of truth for this version, already kept current by Dependabot/Renovate — instead of a second, independently-hardcoded pin with no mechanism to stay in sync.

Test plan

  • Verified locally with a standalone npm install sharp --ignore-scripts against the repo's real package.json/package-lock.json: resolves cleanly to 0.35.3, no EOVERRIDE
  • Verified with a full docker build --no-cache --target runtime-base --build-arg INSTALL_VISUAL_REVIEW=true . (the same target + build-arg the release workflow uses): builds cleanly end to end, sharp install step completes with "found 0 vulnerabilities" and no error
  • Confirmed the OLD command (either sharp@0.34.5 or the exact resolved sharp@0.35.3) reproduces the exact CI failure locally, isolating the fix to the version-pin removal specifically

… resolve it

Closes #8112.

release-selfhost.yml's multi-arch build started failing on every
release attempt with "npm error code EOVERRIDE: Override for
sharp@0.34.5 conflicts with direct dependency". The Dockerfile
hardcodes a standalone `npm install sharp@<version>` (esbuild marks
sharp external in the self-host bundle, so it can't ship inside
dist/server.mjs); #7970's dependency bump moved package.json's
sharp to ^0.35.0 and added a matching overrides.sharp entry, but a
Dependabot-style bump has no way to also update a version hardcoded
inside a Dockerfile RUN command, so this line silently drifted.

Re-pinning to the exact resolved version (sharp@0.35.3) still fails
identically: recent npm treats an explicit CLI version and an
`overrides` entry for the SAME package as two competing authorities
and refuses to pick between them, regardless of whether the versions
actually agree. Verified locally (both a standalone `npm install`
and a full `docker build --no-cache --target runtime-base`) that
dropping the version entirely and letting npm resolve from
package.json's overrides — the real source of truth for this
version, already kept current by Dependabot/Renovate — builds
cleanly to the same 0.35.3.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored JSONbored self-assigned this Jul 22, 2026
@JSONbored
JSONbored merged commit c52d862 into main Jul 22, 2026
11 checks passed
@JSONbored
JSONbored deleted the fix/dockerfile-sharp-version-pin branch July 22, 2026 23:07
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.

fix(selfhost): Dockerfile's pinned sharp version drifted from package.json's overrides, breaking the release build

1 participant