Replace Yarn with Bun before hosted deployment #20
Labels
No labels
automerge
bug
dependencies
duplicate
help wanted
invalid
lang
rust
migrations
opencode
question
security
type
documentation
type
enhancement
type
maintenance
type
refactor
vulnerability
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#30 Establish a secure, persistent hosted deployment
Personal/backstage
#21 Establish a reproducible dependency and test baseline
Personal/backstage
#22 Add application quality gates to Woodpecker
Personal/backstage
Reference
Personal/backstage#20
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Make Bun the workspace package manager and script entry point before hosted deployment, while preserving working Backstage development, validation, and packaging.
Scope
Replacing Yarn does not automatically mean replacing Node as the Backstage runtime or Jest with Bun's test runner. Evaluate and document those choices separately; retain supported Node where needed. Do not combine this migration with unrelated dependency majors.
Acceptance criteria
better-sqlite3andnode-gyp; explicitly allow only required install scripts.yarn workspaces focusand prove image startup with the chosen runtime and matching native-module ABI.Sequencing
Complete the dependency/test baseline first. This issue is a mandatory dependency of hosted deployment.
Phase
1 — Trustworthy foundation
Completed in PR #42, merged as
4fb240bf. The merged application-checks pipeline #130 passed every step on Node 22 with Bun 1.4.4, including E2E. A production-install/startup simulation using the Dockerfile skeleton and bundle passed on Node 22: better-sqlite3 ABI 127 loaded and the backend served the frontend with HTTP 200. Renovate's Bun manager detects bun.lock by default, so no repository-specific Renovate rule was needed; the existing shared presets remain in place. Follow-ups are tracked separately in #30 (actual image build/deployment validation) and #47 (move off temporary Node 22 before EOL).Existing implementation references from the context vault
Consult the vault and referenced repositories before making toolchain/packaging decisions:
projects/toolbox/learnings.md: Bun dependencies via bun2nix, Nix-built OCI images, and a production-startup test of the compiled artifact. Reuse the verification boundary, not Astro-specific runtime assumptions.projects/backstage/architecture.md: baseline discovery rationale and the original missing Yarn got-patch workaround; review the override during migration instead of deleting it blindly.projects/nixos/woodpecker-global-workflow-architecture.md: the documentedbun-astrorule matchesbun.lockpluspackage.json, injecting verify/push/deploy workflows.Additional migration gate: verify current marker-file routing and effective Woodpecker configuration before adding/merging
bun.lock. The documented injected validation is Astro/Biome-oriented and publication/promotion workflows have persistent effects; they are not automatically suitable for Backstage. Confirm that migration does not inadvertently activate incompatible validation or premature deployment. Any necessary shared-CI changes require separately agreed infrastructure work.Vault notes are architectural context, not proof of current workflow applicability; verify against actual configuration and observed pipeline runs.
Progress on the Bun migration is in draft PR #42 (branch
build/bun-package-manager, head74081a9).What is validated:
bun.lockis committed and the Yarn files are removed.bun install --frozen-lockfile(2651 packages),tsc,lint:all,prettier:check, Jest, frontend/backend builds, and Playwright E2E (5 passed) all pass.bun install --omit=dev, backend starts, serves the built frontend, and the ABI 137better-sqlite3binary loads.python3andgccremoved fromPATH: install, unit tests, and both builds pass becausebetter-sqlite3uses its prebuilt binary. The CI apt step now installs onlyca-certificates,curl, andunzip.Still open before merge:
bun-astrorule matchesbun.lock+package.jsonand would inject Astro-specific verify/push/deploy workflows. That shared-config exclusion needs separate approval (tracked in the PR body).martin referenced this issue from Personal/nixos-configuration2026-11-19 19:20:05 +00:00
The shared-workflow blocker now waits on a direct per-workflow opt-out: Personal/woodpecker-extension#50 adds
ignored_workflowstowoodpecker.toml.#44 adds the file here and depends on Personal/nixos-configuration#68, which bumps and deploys the extension after #50 ships. The label-based
match_not_labelsapproach is dropped.Validation update: PR #42's pull-request pipeline is green at
f1d6d1f— all repository-owned checks pass, including E2E.The last failure was Playwright's browser channel:
@backstage/e2e-test-utilsdefaults generated projects tochrome, while CI installs Chromium.playwright.config.tsnow useschannel: 'chromium'; the Nix shell still suppliesPLAYWRIGHT_CHROMIUM_EXECUTABLE_PATHlocally.Remaining blocker is unchanged: the branch's push pipeline runs the global
bun-verifyworkflow from the sharedbun-astrorule and fails there. #44 (via Personal/nixos-configuration#68 and Personal/woodpecker-extension#50) is the planned opt-out.The blocker now has a simpler fix. Rather than a repository-local opt-out, the shared
bun-astrorule will require an Astro config file (astro.config.*) in addition tobun.lockandpackage.json; see Personal/nixos-configuration#68.This removes the false positive for Backstage without an extension release or
woodpecker.toml. #44 is closed as superseded, and Personal/woodpecker-extension#50 no longer blocks #42. PR #42 can merge once #68 is deployed.PR #42 is merged into
main(4fb240bf).Done:
bun.lockmigrated with no version drift;patches/@backstage%2Fcli-module-build@0.1.9.patchkeeps Backstage's packager on Bun.application-checkspasses on Node 22 (pipeline #128), including E2E.bun-astrorule requires an Astro config (Personal/nixos-configuration#68), so Backstage no longer receivesbun-verify,bun-push, orbun-deploy.Follow-ups:
backstage-cli versions:bumpremains Yarn-lockfile-only; usebun update(documented in the README).Progress
Completed by PR #42, merged as
4fb240bf.application-checks, including E2E, with Node 22 and Bun 1.4.4.better-sqlite3ABI 127 loaded, the backend started, and the packaged frontend returned HTTP 200.bun.lock; the existing shared presets don't disable it, so no repository-specific Renovate change was needed.All acceptance criteria for the Bun package-manager migration are satisfied; closing #20.