Skip to content

ci: vendor lakebase in PR template artifact only#335

Merged
MarioCadenas merged 3 commits intomainfrom
mario/pr-template-local-lakebase
Apr 30, 2026
Merged

ci: vendor lakebase in PR template artifact only#335
MarioCadenas merged 3 commits intomainfrom
mario/pr-template-local-lakebase

Conversation

@MarioCadenas
Copy link
Copy Markdown
Collaborator

Summary

The PR template artifact job installs @databricks/lakebase from npm because dist-appkit replaces workspace:* with a semver inside the packed appkit tarball. This change keeps release / pack:sdk behavior unchanged and only vendors lakebase for the PR template flow.

Changes

  • tools/dist-appkit.ts: When APPKIT_VENDOR_LAKEBASE=1, copy the lakebase .tgz from packages/lakebase/tmp into appkit tmp/, depend on file:./…, and add the filename to files so npm pack includes it. Otherwise (default), keep the existing semver dependency for releases.
  • package.json: Add pack:pr-template — same as pack:sdk prelude, then lakebase tarball, then APPKIT_VENDOR_LAKEBASE=1 for appkit tarball only, then appkit-ui tarball.
  • .github/workflows/ci.yml: pr-template-artifact uses pnpm pack:pr-template instead of pnpm pack:sdk.
  • tools/prepare-template-artifact.ts: Document pack:pr-template vs pack:sdk.

Release impact

None: prepare-release, pack:sdk, and any dist/pack without the env var still emit semver @databricks/lakebase as before.

PR template installs pulled @databricks/lakebase from npm because dist-appkit
replaces workspace:* with a semver for the packed appkit tarball.

Add APPKIT_VENDOR_LAKEBASE=1 path in dist-appkit that embeds the lakebase
.tgz from packages/lakebase/tmp and uses a file: dependency; release and
pack:sdk leave the variable unset so behavior stays semver-only.

Introduce pnpm pack:pr-template (lakebase tarball, then vendored appkit pack)
and use it from the pr-template-artifact job instead of pack:sdk.
npm pack on packages/appkit/tmp honors parent .gitignore; tmp/ is ignored so
root-level databricks-lakebase-*.tgz was dropped from the tarball. Install then
failed to resolve file:./… next to package.json.

Stage the lakebase .tgz under dist/vendor/ (already included via files dist/)
and point the file: dependency there.
npm pack on packages/appkit/tmp still drops vendored .tgz under dist/ because the
staging tree lives under a gitignored tmp path.

Revert APPKIT_VENDOR_LAKEBASE / pack:pr-template. prepare-template-artifact copies
packages/lakebase/tmp/*.tgz into the staging dir when present and sets overrides so
npm install resolves @databricks/lakebase from the template root. Release template
jobs without a local lakebase pack keep registry resolution.
@MarioCadenas MarioCadenas merged commit b239fe0 into main Apr 30, 2026
8 checks passed
@MarioCadenas MarioCadenas deleted the mario/pr-template-local-lakebase branch April 30, 2026 14:58
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.

2 participants