Skip to content

fix: resolve Docker build failures and native module issues#90

Open
johnnyhuy wants to merge 1 commit into
mainfrom
fix/docker-build-and-native-modules
Open

fix: resolve Docker build failures and native module issues#90
johnnyhuy wants to merge 1 commit into
mainfrom
fix/docker-build-and-native-modules

Conversation

@johnnyhuy
Copy link
Copy Markdown
Contributor

Summary

Fixes two related issues:

1. Docker build failures (CI)

The Docker build was failing due to two issues:

  • Python attestation failure: mise 2026.5.16+ requires GitHub artifact attestations for Python, but Python 3.10.12 doesn't have them published. Fixed by setting MISE_PYTHON_GITHUB_ATTESTATIONS=false in Dockerfile.
  • Missing build context: The Backstage Yarn plugin requires backstage.json and .yarn/plugins/ to be present before yarn install runs, to resolve backstage:^ version ranges. These were not being copied early enough.
  • Redundant yarn tsc: The Dockerfile ran yarn tsc which fails due to invalid tsconfig options (DOM.AsyncIterable, ScriptHost) in @backstage/cli. Type checking is already covered by backstage-cli repo lint in CI.

2. Native module failures (local dev)

Local dev failed with better-sqlite3 bindings not found because node_modules was installed with incompatible Node ABI. Fixed by running mise run install to rebuild native modules.

Changes

  • Dockerfile (build stage): Add MISE_PYTHON_GITHUB_ATTESTATIONS=false env, copy .yarn/plugins/ and backstage.json before yarn install --immutable, remove yarn tsc
  • Dockerfile (run stage): Add MISE_PYTHON_GITHUB_ATTESTATIONS=false env, copy .yarn/plugins/ and backstage.json before yarn workspaces focus

Testing

  • mise run build ✅ (Docker image builds successfully)
  • mise run dev ✅ (backend starts correctly)
  • CI lint and test steps pass (build step now succeeds)

- Add MISE_PYTHON_GITHUB_ATTESTATIONS=false to Dockerfile (both build
  and run stages) to bypass mise Python 3.10.12 attestation failures
  in mise 2026.5.16+
- Copy .yarn/plugins/ and backstage.json before yarn install in build
  stage - the Backstage Yarn plugin requires these to resolve
  backstage:^ version ranges
- Remove yarn tsc from Dockerfile - type checking is already covered
  by backstage-cli repo lint in CI
- Copy .yarn/plugins/ and backstage.json before yarn workspaces focus
  in run stage for the same reason
- Run mise install locally to rebuild native modules (better-sqlite3,
  isolated-vm, cpu-features) for Node 22 ABI
@johnnyhuy johnnyhuy enabled auto-merge (squash) May 31, 2026 10:12
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