Skip to content

ci: fix devhub-validation by building DevHub with pnpm - #499

Open
pkosiec wants to merge 5 commits into
mainfrom
pkosiec/fix-devhub-build
Open

ci: fix devhub-validation by building DevHub with pnpm#499
pkosiec wants to merge 5 commits into
mainfrom
pkosiec/fix-devhub-build

Conversation

@pkosiec

@pkosiec pkosiec commented Jul 29, 2026

Copy link
Copy Markdown
Member

What

Build DevHub the way DevHub builds itself in the devhub-validation job:

  • npm installpnpm install --frozen-lockfile
  • npm run buildpnpm build
  • add pnpm/action-setup (version read from packageManager, matching the other jobs)

Why

DevHub migrated from npm to pnpm (dropping package-lock.json for pnpm-lock.yaml), but this job kept installing it with npm install:

  • npm ignores a pnpm lockfile, so it did a floating, non-reproducible resolve on every run.
  • A transitive dependency publishing a new version then silently changed the installed tree with no commit on either side — the job passed one run and failed the next.
  • That drift pulled @databricks/appkit-ui/react (a barrel) into Next's react-server (RSC) module graph. React 19's react-server export condition omits createContext, and a barrel-reachable module calls createContext at top level → next build crashed on /_not-found with TypeError: b.createContext is not a function.

pnpm install --frozen-lockfile pins the exact tree DevHub itself ships, so the job is reproducible again and can only go red on a real change — broken AppKit docs (the signal we want) or a genuine DevHub-side change.

Notes

  • JFrog stays: pnpm honors ~/.npmrc, and DevHub's lockfile (v9.0) uses integrity-only resolutions (no baked registry URLs), so --frozen-lockfile is registry-agnostic.
  • Latent, out of scope: appkit-ui's /react barrel re-exports modules that top-level-call createContext without "use client". It only bites under an npm flat-hoist + RSC combo DevHub never uses, and this job compiles the published appkit-ui, not PR code — so fixing it here wouldn't change this job. Track separately.
  • The docs: commit only touches a readme to trigger the docs-gated job; drop before merge.

This pull request and its description were written by Isaac.

pkosiec added 3 commits July 29, 2026 14:25
DevHub is a pnpm-only repo (commits only pnpm-lock.yaml, packageManager
pnpm@10.11.0). The devhub-validation job installed it with `npm install`,
which ignores the committed lock and does a floating, non-reproducible
resolve on every run. A transitive dep publishing overnight was enough to
shift the hoist and pull @databricks/appkit-ui/react into Next's
react-server graph, crashing `next build` with
`TypeError: b.createContext is not a function` on a job that passed the day
before with no source change.

Build DevHub the way DevHub's own CI does: pnpm install --frozen-lockfile
and pnpm build. This makes the job reproducible and stops it silently
mis-testing via a package manager DevHub never uses.

Signed-off-by: Pawel Kosiec <pawel.kosiec@databricks.com>
Temporary docs-path touch so the docs path filter runs devhub-validation
for the CI change in the previous commit. Safe to drop before merge.

Signed-off-by: Pawel Kosiec <pawel.kosiec@databricks.com>
Passing an explicit version: input conflicts with this repo's
packageManager field (pnpm@10.21.0), and action-setup errors out. Match
the other jobs and omit version: so it reads packageManager. pnpm 10.x
reads DevHub's lockfileVersion 9.0 fine.

Signed-off-by: Pawel Kosiec <pawel.kosiec@databricks.com>
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

🤖 AppKit PR bot

🔬 Run evals

Start an eval for this PR from the evals-monitor app: Go to Evals Monitor →

📦 Try this PR's app template

Scaffolds a new app from this PR's SDK build. Run it in any folder (requires the GitHub CLI — gh auth login — and the Databricks CLI):

gh run download 30457270655 -R databricks/appkit -n appkit-template-0.48.0-pr.248ef67-pkosiec-fix-devhub-build-499 -D appkit-pr-499 \
  && unzip -o "appkit-pr-499/appkit-template-0.48.0-pr.248ef67-pkosiec-fix-devhub-build-499.zip" -d "appkit-pr-499" \
  && databricks apps init --template "appkit-pr-499"

The template pins @databricks/appkit and @databricks/appkit-ui to tarballs built from this branch, so the scaffolded app runs against this PR's code.

Signed-off-by: Pawel Kosiec <pawel.kosiec@databricks.com>
@pkosiec pkosiec changed the title ci: build DevHub with pnpm + frozen lockfile in devhub-validation ci: fix devhub-validation by building DevHub with pnpm Jul 29, 2026
@pkosiec
pkosiec marked this pull request as ready for review July 29, 2026 13:41
@pkosiec
pkosiec requested a review from a team as a code owner July 29, 2026 13:41
@pkosiec
pkosiec requested a review from atilafassina July 29, 2026 13:41
Comment thread docs/README.md Outdated
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