Skip to content

fix(template): apply a 7-day release cooldown to template lockfiles - #726

Merged
pkosiec merged 3 commits into
mainfrom
pkosiec/template-sync-cooldown
Nov 10, 2026
Merged

pkosiec merged 3 commits into
mainfrom
pkosiec/template-sync-cooldown

Conversation

@pkosiec

@pkosiec pkosiec commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Summary

The template sync resolves the template lockfiles against public npm with no cooldown. On 2026-11-09 it locked versions published about an hour earlier: OTel 2.12.1 / 0.223.1, import-in-the-middle 3.6.0, semantic-conventions 1.45.0 and ansi-regex 6.6.0. CI installs through a registry with a 7-day cooldown, so every PR's template jobs now fail with 403. The sync commit is [skip ci], so nothing caught it.

Changes

  • tools/publish-template-tag.ts: npm and pnpm resolve only versions that are at least 7 days old. npm gets --min-release-age. pnpm ignores minimumReleaseAge CLI flags, so the script passes it with pnpm_config_* env vars. The exclude must be a JSON array, because a plain string silently drops the cooldown. @databricks/* is exempt, so the appkit version that was just published still resolves.
  • The script fails if npm doesn't support min-release-age-exclude, because npm silently ignores unknown flags.
  • Both template lockfiles are re-resolved once under the cooldown. npm and pnpm keep versions that are already locked, so the flags alone would not remove the fresh ones.

Effect on the template

Testing

  • Every locked version in both lockfiles (796) was checked against its npm publish date. None is newer than 7 days, apart from the exempt @databricks/*.
  • npm ci and pnpm install --frozen-lockfile pass locally.
  • tools/smoke-test-template.ts --run passes for npm and pnpm (build, health check, client serving).
  • check-template-lock-registry.ts and check-template-deps.ts pass.
  • Ran publish-template-tag.ts in a scratch repo: the installs succeed, and a fresh resolve produces the same pnpm-lock.yaml.

This pull request and its description were written by Isaac.

pkosiec and others added 3 commits November 10, 2026 12:16
The template sync resolved against public npm with no cooldown, so it
locked versions published hours earlier (OTel 2.12.1/0.223.1,
import-in-the-middle 3.6.0, semantic-conventions 1.45.0, ansi-regex
6.6.0). CI installs through a registry with a 7-day cooldown, so every
PR's template jobs failed with 403.

The sync now passes min-release-age / minimumReleaseAge (7 days) to npm
and pnpm, exempting @databricks/*. npm and pnpm keep already-locked
versions, so both template lockfiles are re-resolved once here.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Pawel Kosiec <pawel.kosiec@databricks.com>
pnpm 11 ignores minimumReleaseAge passed on the CLI, so the pnpm lock still
got @swc/helpers 0.5.24 (6 days old), which CI's registry refuses. The sync
now writes the setting into template/pnpm-workspace.yaml for its install
and restores the file after. pnpm-lock.yaml is re-resolved the same way.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Pawel Kosiec <pawel.kosiec@databricks.com>
pnpm reads minimumReleaseAge from pnpm_config_* env vars, so the sync no
longer edits template/pnpm-workspace.yaml. The exclude must be a JSON array:
a plain string silently drops the cooldown. Same pnpm-lock.yaml output.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Pawel Kosiec <pawel.kosiec@databricks.com>
@pkosiec
pkosiec marked this pull request as ready for review November 10, 2026 11:36
@pkosiec
pkosiec requested a review from a team as a code owner November 10, 2026 11:36
@pkosiec
pkosiec requested review from MarioCadenas and calvarjorge and removed request for calvarjorge November 10, 2026 11:36
@github-actions

github-actions Bot commented Nov 10, 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 42808676581 -R databricks/appkit -n appkit-template-0.91.2-pr.cd2fbef-pkosiec-template-sync-cooldown-726 -D appkit-pr-726 \
  && unzip -o "appkit-pr-726/appkit-template-0.91.2-pr.cd2fbef-pkosiec-template-sync-cooldown-726.zip" -d "appkit-pr-726" \
  && databricks apps init --template "appkit-pr-726"

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.

@pkosiec
pkosiec merged commit 21e70c3 into main Nov 10, 2026
11 of 13 checks passed
@pkosiec
pkosiec deleted the pkosiec/template-sync-cooldown branch November 10, 2026 11:47
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