@databricks-solutions/lakebase-scm-utils 0.3.10 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{pr-e-E4aP4j.d.cts → pr-D-eayWyJ.d.cts} +59 -1
- package/dist/{pr-e-E4aP4j.d.ts → pr-D-eayWyJ.d.ts} +59 -1
- package/dist/scripts/git/index.cjs +30 -14
- package/dist/scripts/git/index.d.cts +32 -1
- package/dist/scripts/git/index.d.ts +32 -1
- package/dist/scripts/git/index.js +28 -14
- package/dist/scripts/github/index.d.cts +2 -60
- package/dist/scripts/github/index.d.ts +2 -60
- package/dist/scripts/index.cjs +244 -76
- package/dist/scripts/index.d.cts +4 -4
- package/dist/scripts/index.d.ts +4 -4
- package/dist/scripts/index.js +239 -76
- package/dist/scripts/lakebase/ci-resolve-branch.cli.cjs +2 -2
- package/dist/scripts/lakebase/ci-resolve-branch.cli.js +2 -2
- package/dist/scripts/lakebase/collapse-heads.cli.cjs +2 -2
- package/dist/scripts/lakebase/collapse-heads.cli.js +2 -2
- package/dist/scripts/lakebase/detect-language.cli.cjs +2 -2
- package/dist/scripts/lakebase/detect-language.cli.js +2 -2
- package/dist/scripts/lakebase/doctor.cli.cjs +2 -2
- package/dist/scripts/lakebase/doctor.cli.js +2 -2
- package/dist/scripts/lakebase/get-connection.cli.cjs +2 -2
- package/dist/scripts/lakebase/get-connection.cli.js +2 -2
- package/dist/scripts/lakebase/index.cjs +256 -77
- package/dist/scripts/lakebase/index.d.cts +74 -2
- package/dist/scripts/lakebase/index.d.ts +74 -2
- package/dist/scripts/lakebase/index.js +253 -77
- package/dist/scripts/lakebase/infra-runner.cli.cjs +2 -2
- package/dist/scripts/lakebase/infra-runner.cli.js +2 -2
- package/dist/scripts/lakebase/new-migration.cli.cjs +2 -2
- package/dist/scripts/lakebase/new-migration.cli.js +2 -2
- package/dist/scripts/lakebase/schema-diff.cli.cjs +2 -2
- package/dist/scripts/lakebase/schema-diff.cli.js +2 -2
- package/dist/scripts/lakebase/schema-migrate.cli.cjs +2 -2
- package/dist/scripts/lakebase/schema-migrate.cli.js +2 -2
- package/dist/scripts/lakebase/scm-claim-feature.cli.cjs +2 -2
- package/dist/scripts/lakebase/scm-claim-feature.cli.js +2 -2
- package/dist/scripts/lakebase/scm-doctor.cli.cjs +2 -2
- package/dist/scripts/lakebase/scm-doctor.cli.js +2 -2
- package/dist/scripts/lakebase/scm-merge.cli.cjs +2 -2
- package/dist/scripts/lakebase/scm-merge.cli.js +2 -2
- package/dist/scripts/lakebase/scm-reconcile-tier.cli.cjs +2 -2
- package/dist/scripts/lakebase/scm-reconcile-tier.cli.js +2 -2
- package/dist/scripts/util/index.cjs +2 -2
- package/dist/scripts/util/index.js +2 -2
- package/package.json +1 -1
- package/scripts/git/commit-push.ts +60 -14
- package/scripts/lakebase/create-preflight.ts +213 -1
- package/scripts/lakebase/create-project.ts +98 -30
package/dist/scripts/index.js
CHANGED
|
@@ -9770,8 +9770,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
9770
9770
|
var cached;
|
|
9771
9771
|
function substrateSelfVersion() {
|
|
9772
9772
|
if (cached !== void 0) return cached;
|
|
9773
|
-
if ("0.3.
|
|
9774
|
-
cached = "0.3.
|
|
9773
|
+
if ("0.3.11".length > 0) {
|
|
9774
|
+
cached = "0.3.11";
|
|
9775
9775
|
return cached;
|
|
9776
9776
|
}
|
|
9777
9777
|
cached = "unknown";
|
|
@@ -11478,6 +11478,70 @@ async function checkGitHubWorkflowScope(probe = () => checkGitHubScopes(["workfl
|
|
|
11478
11478
|
return { ok: true };
|
|
11479
11479
|
}
|
|
11480
11480
|
}
|
|
11481
|
+
async function checkGitHubPreflight(input) {
|
|
11482
|
+
const warnings = [];
|
|
11483
|
+
const hard = input.hardScopes ?? ["repo", "workflow"];
|
|
11484
|
+
const advisory = input.advisoryScopes ?? ["delete_repo"];
|
|
11485
|
+
const currentUserProbe = input.currentUser ?? getCurrentUser;
|
|
11486
|
+
const scopesProbe = input.scopes ?? ((req) => checkGitHubScopes(req));
|
|
11487
|
+
const repoExistsProbe = input.repoExists ?? repoExists;
|
|
11488
|
+
let activeUser;
|
|
11489
|
+
try {
|
|
11490
|
+
activeUser = await currentUserProbe();
|
|
11491
|
+
} catch (err) {
|
|
11492
|
+
return {
|
|
11493
|
+
ok: false,
|
|
11494
|
+
warnings,
|
|
11495
|
+
reason: `GitHub authentication failed: ${err instanceof Error ? err.message : String(err)}. Sign in with \`gh auth login\`, or set GITHUB_TOKEN to a valid token, then re-run.`
|
|
11496
|
+
};
|
|
11497
|
+
}
|
|
11498
|
+
if (activeUser.toLowerCase() !== input.owner.toLowerCase()) {
|
|
11499
|
+
warnings.push(
|
|
11500
|
+
`Signed in to GitHub as "${activeUser}" but creating under "${input.owner}" (an org or another account); ensure "${activeUser}" can create repositories there.`
|
|
11501
|
+
);
|
|
11502
|
+
}
|
|
11503
|
+
try {
|
|
11504
|
+
const { granted, missing } = await scopesProbe([...hard, ...advisory]);
|
|
11505
|
+
if (granted !== null) {
|
|
11506
|
+
const missingHard = missing.filter((s) => hard.includes(s));
|
|
11507
|
+
const missingAdvisory = missing.filter((s) => advisory.includes(s));
|
|
11508
|
+
if (missingHard.length > 0) {
|
|
11509
|
+
return {
|
|
11510
|
+
ok: false,
|
|
11511
|
+
warnings,
|
|
11512
|
+
activeUser,
|
|
11513
|
+
reason: `GitHub token missing required scope(s): ${missingHard.join(", ")} (grants [${granted.join(", ") || "none"}]). Fix: gh auth refresh -h github.com -s ${[...hard].join(",")}`
|
|
11514
|
+
};
|
|
11515
|
+
}
|
|
11516
|
+
if (missingAdvisory.length > 0) {
|
|
11517
|
+
warnings.push(
|
|
11518
|
+
`GitHub token missing the ${missingAdvisory.join(", ")} scope \u2014 automatic rollback of the repo on a failed create is unavailable (you would delete it by hand). Grant it with: gh auth refresh -h github.com -s delete_repo`
|
|
11519
|
+
);
|
|
11520
|
+
}
|
|
11521
|
+
} else {
|
|
11522
|
+
warnings.push(
|
|
11523
|
+
"GitHub token scopes are not visible (fine-grained PAT or App token); cannot pre-verify repo/workflow access , the create will surface any gap when it pushes."
|
|
11524
|
+
);
|
|
11525
|
+
}
|
|
11526
|
+
} catch {
|
|
11527
|
+
warnings.push("Could not read GitHub token scopes (probe error); skipping the scope pre-check.");
|
|
11528
|
+
}
|
|
11529
|
+
try {
|
|
11530
|
+
if (await repoExistsProbe(`${input.owner}/${input.repoName}`)) {
|
|
11531
|
+
return {
|
|
11532
|
+
ok: false,
|
|
11533
|
+
warnings,
|
|
11534
|
+
activeUser,
|
|
11535
|
+
reason: `GitHub repo "${input.owner}/${input.repoName}" already exists. Pick a different project name, or delete the existing repo first.`
|
|
11536
|
+
};
|
|
11537
|
+
}
|
|
11538
|
+
} catch {
|
|
11539
|
+
warnings.push(
|
|
11540
|
+
`Could not check whether "${input.owner}/${input.repoName}" already exists (probe error); the create will fail clearly if it does.`
|
|
11541
|
+
);
|
|
11542
|
+
}
|
|
11543
|
+
return { ok: true, warnings, activeUser };
|
|
11544
|
+
}
|
|
11481
11545
|
function githubWorkflowScopePrereqMessage(reason) {
|
|
11482
11546
|
return "The GitHub token lacks the `workflow` OAuth scope, required to push the project's `.github/workflows/*` CI files. (Without this check, scaffolding runs all the way to the final push, is rejected, and rolls back.) Grant the scope, then re-run:\n - gh CLI: gh auth refresh -h github.com -s workflow\n - VS Code: re-sign in to GitHub and approve the workflow scope\n - token: set GITHUB_TOKEN to a PAT that includes the `workflow` scope" + (reason ? `
|
|
11483
11547
|
(${reason})` : "");
|
|
@@ -11543,6 +11607,53 @@ async function withLakebaseRollback(opts, fn) {
|
|
|
11543
11607
|
throw wrapped;
|
|
11544
11608
|
}
|
|
11545
11609
|
}
|
|
11610
|
+
function createRollbackLedger() {
|
|
11611
|
+
const steps = [];
|
|
11612
|
+
return {
|
|
11613
|
+
register: (label, undo) => {
|
|
11614
|
+
steps.push({ label, undo });
|
|
11615
|
+
},
|
|
11616
|
+
steps: () => steps
|
|
11617
|
+
};
|
|
11618
|
+
}
|
|
11619
|
+
async function withCreateRollback(ledger, opts, fn) {
|
|
11620
|
+
try {
|
|
11621
|
+
return await fn();
|
|
11622
|
+
} catch (err) {
|
|
11623
|
+
const report = opts.report ?? (() => {
|
|
11624
|
+
});
|
|
11625
|
+
const steps = [...ledger.steps()].reverse();
|
|
11626
|
+
const rolledBack = [];
|
|
11627
|
+
const failed = [];
|
|
11628
|
+
if (steps.length > 0) report(`Create failed; rolling back ${steps.length} created resource(s)...`);
|
|
11629
|
+
for (const s of steps) {
|
|
11630
|
+
try {
|
|
11631
|
+
report(` rolling back: ${s.label}`);
|
|
11632
|
+
await s.undo();
|
|
11633
|
+
rolledBack.push(s.label);
|
|
11634
|
+
} catch (e) {
|
|
11635
|
+
const m = e instanceof Error ? e.message : String(e);
|
|
11636
|
+
if (/not.?found/i.test(m)) {
|
|
11637
|
+
rolledBack.push(s.label);
|
|
11638
|
+
continue;
|
|
11639
|
+
}
|
|
11640
|
+
failed.push(`${s.label} (${m})`);
|
|
11641
|
+
}
|
|
11642
|
+
}
|
|
11643
|
+
const base = err instanceof Error ? err.message : String(err);
|
|
11644
|
+
const parts = [];
|
|
11645
|
+
if (rolledBack.length) parts.push(`rolled back: ${rolledBack.join(", ")}`);
|
|
11646
|
+
if (failed.length) {
|
|
11647
|
+
parts.push(
|
|
11648
|
+
`COULD NOT roll back: ${failed.join("; ")} , clean these up by hand before retrying the same name`
|
|
11649
|
+
);
|
|
11650
|
+
}
|
|
11651
|
+
const suffix = parts.length ? ` (${parts.join("; ")})` : "";
|
|
11652
|
+
const wrapped = err instanceof Error ? err : new Error(base);
|
|
11653
|
+
wrapped.message = `${base}${suffix}`;
|
|
11654
|
+
throw wrapped;
|
|
11655
|
+
}
|
|
11656
|
+
}
|
|
11546
11657
|
|
|
11547
11658
|
// scripts/lakebase/create-project.ts
|
|
11548
11659
|
init_esm_shims();
|
|
@@ -11611,26 +11722,38 @@ To finish:
|
|
|
11611
11722
|
}
|
|
11612
11723
|
};
|
|
11613
11724
|
async function commitAndPush(args) {
|
|
11614
|
-
await
|
|
11615
|
-
|
|
11616
|
-
|
|
11725
|
+
await commitInitial(args.projectDir, args.message);
|
|
11726
|
+
if (args.push === false) return;
|
|
11727
|
+
await pushInitial({ projectDir: args.projectDir, remote: args.remote, branch: args.branch });
|
|
11728
|
+
}
|
|
11729
|
+
async function commitInitial(projectDir, message) {
|
|
11730
|
+
await exec2("git add -A", { cwd: projectDir });
|
|
11731
|
+
await exec2(`git commit -m ${JSON.stringify(message)}`, {
|
|
11732
|
+
cwd: projectDir,
|
|
11617
11733
|
timeout: 3e4
|
|
11618
11734
|
});
|
|
11619
|
-
|
|
11735
|
+
}
|
|
11736
|
+
async function pushInitial(args) {
|
|
11620
11737
|
const remote = args.remote ?? "origin";
|
|
11621
11738
|
const branch = args.branch ?? "main";
|
|
11622
|
-
|
|
11623
|
-
|
|
11624
|
-
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
|
|
11628
|
-
|
|
11629
|
-
|
|
11630
|
-
|
|
11739
|
+
const attempts = Math.max(1, args.attempts ?? 1);
|
|
11740
|
+
const sleep2 = args.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
|
|
11741
|
+
const run = args.run ?? ((cmd, cwd) => exec2(cmd, { cwd, timeout: 3e4 }).then(() => void 0));
|
|
11742
|
+
let lastErr;
|
|
11743
|
+
for (let i = 1; i <= attempts; i++) {
|
|
11744
|
+
try {
|
|
11745
|
+
await run(`git push -u ${remote} ${branch}`, args.projectDir);
|
|
11746
|
+
return;
|
|
11747
|
+
} catch (err) {
|
|
11748
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
11749
|
+
if (/without `?workflow`? scope|workflow scope/i.test(msg)) {
|
|
11750
|
+
throw new WorkflowScopeError(args.projectDir);
|
|
11751
|
+
}
|
|
11752
|
+
lastErr = err;
|
|
11753
|
+
if (i < attempts) await sleep2(args.delayMs ?? 1500);
|
|
11631
11754
|
}
|
|
11632
|
-
throw err;
|
|
11633
11755
|
}
|
|
11756
|
+
throw lastErr instanceof Error ? lastErr : new Error(String(lastErr));
|
|
11634
11757
|
}
|
|
11635
11758
|
|
|
11636
11759
|
// scripts/lakebase/scaffold.ts
|
|
@@ -13813,64 +13936,72 @@ async function createProject(input, progress) {
|
|
|
13813
13936
|
throw new Error(databricksAuthPrereqMessage(host, auth7.reason));
|
|
13814
13937
|
}
|
|
13815
13938
|
if (useGithub) {
|
|
13816
|
-
report("Checking GitHub token
|
|
13817
|
-
const
|
|
13818
|
-
|
|
13819
|
-
|
|
13820
|
-
|
|
13821
|
-
|
|
13822
|
-
|
|
13823
|
-
|
|
13824
|
-
|
|
13825
|
-
|
|
13826
|
-
|
|
13827
|
-
}
|
|
13828
|
-
|
|
13829
|
-
|
|
13830
|
-
|
|
13831
|
-
|
|
13832
|
-
|
|
13833
|
-
|
|
13834
|
-
|
|
13835
|
-
|
|
13836
|
-
|
|
13837
|
-
|
|
13838
|
-
probeErr =
|
|
13839
|
-
|
|
13840
|
-
|
|
13841
|
-
|
|
13842
|
-
|
|
13843
|
-
|
|
13844
|
-
|
|
13845
|
-
|
|
13846
|
-
|
|
13847
|
-
|
|
13848
|
-
|
|
13849
|
-
|
|
13939
|
+
report("Checking GitHub account + token requisites...");
|
|
13940
|
+
const gh = await checkGitHubPreflight({ owner: input.githubOwner, repoName: input.projectName });
|
|
13941
|
+
for (const w of gh.warnings) {
|
|
13942
|
+
warnings.push(w);
|
|
13943
|
+
report(`Note: ${w}`);
|
|
13944
|
+
}
|
|
13945
|
+
if (!gh.ok) throw new Error(gh.reason);
|
|
13946
|
+
}
|
|
13947
|
+
const rollback = createRollbackLedger();
|
|
13948
|
+
return await withCreateRollback(
|
|
13949
|
+
rollback,
|
|
13950
|
+
{ report },
|
|
13951
|
+
async () => {
|
|
13952
|
+
if (useGithub) {
|
|
13953
|
+
report("Creating GitHub repository...", fullRepoName);
|
|
13954
|
+
await createRepo(fullRepoName, {
|
|
13955
|
+
private: input.privateRepo !== false,
|
|
13956
|
+
description: `Lakebase project: ${input.projectName}`
|
|
13957
|
+
});
|
|
13958
|
+
rollback.register(`GitHub repo ${fullRepoName}`, () => deleteRepo(fullRepoName));
|
|
13959
|
+
report("Waiting for GitHub repo to be visible...", fullRepoName);
|
|
13960
|
+
const probeDelays = [1e3, 2e3, 3e3, 5e3, 8e3];
|
|
13961
|
+
let probeErr = "";
|
|
13962
|
+
let visible = false;
|
|
13963
|
+
for (const waitMs of probeDelays) {
|
|
13964
|
+
try {
|
|
13965
|
+
await getRepoFullName(fullRepoName);
|
|
13966
|
+
visible = true;
|
|
13967
|
+
break;
|
|
13968
|
+
} catch (err) {
|
|
13969
|
+
probeErr = err instanceof Error ? err.message : String(err);
|
|
13970
|
+
await delay(waitMs);
|
|
13971
|
+
}
|
|
13972
|
+
}
|
|
13973
|
+
if (!visible) {
|
|
13974
|
+
let activeUser = "";
|
|
13975
|
+
try {
|
|
13976
|
+
activeUser = await getCurrentUser();
|
|
13977
|
+
} catch {
|
|
13978
|
+
}
|
|
13979
|
+
const samlHint = /SAML|scope does not match|sso/i.test(probeErr) ? "\n\nThe error mentions SAML \u2013 re-sign in to GitHub and authorize SSO for this org." : "";
|
|
13980
|
+
const userHint = activeUser && activeUser !== input.githubOwner ? `
|
|
13850
13981
|
|
|
13851
13982
|
Note: signed in as "${activeUser}", but the repo was created under "${input.githubOwner}".` : "";
|
|
13852
|
-
|
|
13853
|
-
|
|
13983
|
+
throw new Error(
|
|
13984
|
+
`GitHub repo "${fullRepoName}" was created but isn't visible after ~19s of polling.${samlHint}${userHint}
|
|
13854
13985
|
|
|
13855
13986
|
Last probe error:
|
|
13856
13987
|
${probeErr.split("\n")[0].slice(0, 200)}`
|
|
13857
|
-
|
|
13858
|
-
|
|
13859
|
-
|
|
13860
|
-
|
|
13861
|
-
|
|
13862
|
-
|
|
13863
|
-
|
|
13864
|
-
|
|
13865
|
-
|
|
13866
|
-
|
|
13867
|
-
|
|
13868
|
-
|
|
13869
|
-
|
|
13870
|
-
|
|
13871
|
-
|
|
13872
|
-
|
|
13873
|
-
|
|
13988
|
+
);
|
|
13989
|
+
}
|
|
13990
|
+
report("Cloning repository...", projectDir);
|
|
13991
|
+
await cloneRepo({
|
|
13992
|
+
repoUrl: `https://github.com/${fullRepoName}.git`,
|
|
13993
|
+
parentDir: input.parentDir
|
|
13994
|
+
});
|
|
13995
|
+
rollback.register(`local project dir ${projectDir}`, () => fs19.rmSync(projectDir, { recursive: true, force: true }));
|
|
13996
|
+
} else {
|
|
13997
|
+
report("Creating local project directory...", projectDir);
|
|
13998
|
+
fs19.mkdirSync(projectDir, { recursive: true });
|
|
13999
|
+
await gitInit(projectDir);
|
|
14000
|
+
rollback.register(`local project dir ${projectDir}`, () => fs19.rmSync(projectDir, { recursive: true, force: true }));
|
|
14001
|
+
}
|
|
14002
|
+
report("Creating Lakebase database (provisioning Postgres)...", lakebaseProjectId);
|
|
14003
|
+
await createLakebaseProject({ projectId: lakebaseProjectId, host });
|
|
14004
|
+
rollback.register(`Lakebase project ${lakebaseProjectId}`, () => deleteLakebaseProject({ projectId: lakebaseProjectId, host }));
|
|
13874
14005
|
report("Resolving database endpoint...");
|
|
13875
14006
|
const defaultBranchId = await getDefaultBranchId({
|
|
13876
14007
|
projectId: lakebaseProjectId,
|
|
@@ -13954,6 +14085,10 @@ Last probe error:
|
|
|
13954
14085
|
projectName: input.projectName,
|
|
13955
14086
|
report: (m) => report(m)
|
|
13956
14087
|
});
|
|
14088
|
+
rollback.register(
|
|
14089
|
+
`self-hosted runner ${input.projectName}`,
|
|
14090
|
+
() => removeRunner({ fullRepoName, projectName: input.projectName })
|
|
14091
|
+
);
|
|
13957
14092
|
} catch (err) {
|
|
13958
14093
|
const msg = err instanceof Error ? err.message : String(err);
|
|
13959
14094
|
warnings.push(`Runner setup failed: ${msg}`);
|
|
@@ -14022,6 +14157,16 @@ Last probe error:
|
|
|
14022
14157
|
"The Consort toolkit downloads on first use , run `./scripts/lk --refresh`, or just your first `./scripts/lk` command, and it installs then."
|
|
14023
14158
|
);
|
|
14024
14159
|
}
|
|
14160
|
+
if (enableSftdd && useGithub) {
|
|
14161
|
+
report("Warming the Consort toolkit (so the first push doesn't cold-download mid-hook)...");
|
|
14162
|
+
let warm = warmAndVerifyKit(projectDir);
|
|
14163
|
+
if (!warm.ok) warm = warmAndVerifyKit(projectDir);
|
|
14164
|
+
if (!warm.ok) {
|
|
14165
|
+
const m = kitWarmWarning(projectDir, warm.reason);
|
|
14166
|
+
warnings.push(m);
|
|
14167
|
+
report(`Note: ${m}`);
|
|
14168
|
+
}
|
|
14169
|
+
}
|
|
14025
14170
|
const langLabels = {
|
|
14026
14171
|
java: "Java/Spring Boot",
|
|
14027
14172
|
kotlin: "Kotlin/Spring Boot",
|
|
@@ -14042,12 +14187,25 @@ Last probe error:
|
|
|
14042
14187
|
}
|
|
14043
14188
|
}
|
|
14044
14189
|
report("Creating initial commit...");
|
|
14045
|
-
await
|
|
14046
|
-
|
|
14047
|
-
|
|
14048
|
-
|
|
14049
|
-
|
|
14050
|
-
|
|
14190
|
+
await commitInitial(projectDir, `Initial project scaffold (${langLabel} + Lakebase)`);
|
|
14191
|
+
let pushLanded = !useGithub;
|
|
14192
|
+
if (useGithub) {
|
|
14193
|
+
try {
|
|
14194
|
+
await pushInitial({ projectDir, attempts: 2 });
|
|
14195
|
+
pushLanded = true;
|
|
14196
|
+
} catch (err) {
|
|
14197
|
+
if (err instanceof WorkflowScopeError) throw err;
|
|
14198
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
14199
|
+
const m = `Provisioning is complete, but the initial push did not land after a retry: ${msg}. The project on disk is fine , finish it with: cd ${projectDir} && git push -u origin main`;
|
|
14200
|
+
warnings.push(m);
|
|
14201
|
+
report(`WARNING: ${m}`);
|
|
14202
|
+
}
|
|
14203
|
+
}
|
|
14204
|
+
if ((tiers === 2 || tiers === 3) && !pushLanded) {
|
|
14205
|
+
const m = `INCOMPLETE TIERS: you requested ${tiers} tiers, but the initial push hasn't landed, so the tier branches can't fork off origin yet. After you finish the push (above), cut them with \`./scripts/lk lakebase-cut-tier --name staging --fork-from main\`${tiers === 3 ? " and `--name dev --fork-from staging`" : ""}.`;
|
|
14206
|
+
warnings.push(m);
|
|
14207
|
+
report(`WARNING: ${m}`);
|
|
14208
|
+
} else if (tiers === 2 || tiers === 3) {
|
|
14051
14209
|
report(`Cutting staging tier (tiers=${tiers}) via createLongRunningBranch...`);
|
|
14052
14210
|
try {
|
|
14053
14211
|
await createLongRunningBranch({
|
|
@@ -14098,7 +14256,7 @@ Last probe error:
|
|
|
14098
14256
|
warnings
|
|
14099
14257
|
};
|
|
14100
14258
|
}
|
|
14101
|
-
// end
|
|
14259
|
+
// end withCreateRollback closure
|
|
14102
14260
|
);
|
|
14103
14261
|
}
|
|
14104
14262
|
|
|
@@ -19487,6 +19645,7 @@ export {
|
|
|
19487
19645
|
catalogExists,
|
|
19488
19646
|
catalogExplorerUrl,
|
|
19489
19647
|
checkDatabricksAuth,
|
|
19648
|
+
checkGitHubPreflight,
|
|
19490
19649
|
checkGitHubScopes,
|
|
19491
19650
|
checkGitHubWorkflowScope,
|
|
19492
19651
|
checkoutBranch,
|
|
@@ -19504,6 +19663,7 @@ export {
|
|
|
19504
19663
|
commitAllSignedOff,
|
|
19505
19664
|
commitAmend,
|
|
19506
19665
|
commitAndPush,
|
|
19666
|
+
commitInitial,
|
|
19507
19667
|
commitSignedOff,
|
|
19508
19668
|
compileMigrationPattern,
|
|
19509
19669
|
connectionApplicationName,
|
|
@@ -19518,6 +19678,7 @@ export {
|
|
|
19518
19678
|
createPullRequest,
|
|
19519
19679
|
createRegistrationToken,
|
|
19520
19680
|
createRepo,
|
|
19681
|
+
createRollbackLedger,
|
|
19521
19682
|
createTag,
|
|
19522
19683
|
createTestPairedBranch,
|
|
19523
19684
|
createUatPairedBranch,
|
|
@@ -19701,6 +19862,7 @@ export {
|
|
|
19701
19862
|
push,
|
|
19702
19863
|
pushCurrentBranchForPr,
|
|
19703
19864
|
pushFailureHint,
|
|
19865
|
+
pushInitial,
|
|
19704
19866
|
pushTo,
|
|
19705
19867
|
queryBranchSchema,
|
|
19706
19868
|
queryBranchTables,
|
|
@@ -19790,6 +19952,7 @@ export {
|
|
|
19790
19952
|
waitForBranchReady,
|
|
19791
19953
|
waitForCi,
|
|
19792
19954
|
warmAndVerifyKit,
|
|
19955
|
+
withCreateRollback,
|
|
19793
19956
|
withLakebaseRollback,
|
|
19794
19957
|
withProxyEnv,
|
|
19795
19958
|
workflowStateFileExists,
|
|
@@ -79662,8 +79662,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79662
79662
|
var cached;
|
|
79663
79663
|
function substrateSelfVersion() {
|
|
79664
79664
|
if (cached !== void 0) return cached;
|
|
79665
|
-
if ("0.3.
|
|
79666
|
-
cached = "0.3.
|
|
79665
|
+
if ("0.3.11".length > 0) {
|
|
79666
|
+
cached = "0.3.11";
|
|
79667
79667
|
return cached;
|
|
79668
79668
|
}
|
|
79669
79669
|
cached = "unknown";
|
|
@@ -754,8 +754,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
754
754
|
var cached;
|
|
755
755
|
function substrateSelfVersion() {
|
|
756
756
|
if (cached !== void 0) return cached;
|
|
757
|
-
if ("0.3.
|
|
758
|
-
cached = "0.3.
|
|
757
|
+
if ("0.3.11".length > 0) {
|
|
758
|
+
cached = "0.3.11";
|
|
759
759
|
return cached;
|
|
760
760
|
}
|
|
761
761
|
cached = "unknown";
|
|
@@ -79290,8 +79290,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79290
79290
|
var cached;
|
|
79291
79291
|
function substrateSelfVersion() {
|
|
79292
79292
|
if (cached !== void 0) return cached;
|
|
79293
|
-
if ("0.3.
|
|
79294
|
-
cached = "0.3.
|
|
79293
|
+
if ("0.3.11".length > 0) {
|
|
79294
|
+
cached = "0.3.11";
|
|
79295
79295
|
return cached;
|
|
79296
79296
|
}
|
|
79297
79297
|
cached = "unknown";
|
|
@@ -393,8 +393,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
393
393
|
var cached;
|
|
394
394
|
function substrateSelfVersion() {
|
|
395
395
|
if (cached !== void 0) return cached;
|
|
396
|
-
if ("0.3.
|
|
397
|
-
cached = "0.3.
|
|
396
|
+
if ("0.3.11".length > 0) {
|
|
397
|
+
cached = "0.3.11";
|
|
398
398
|
return cached;
|
|
399
399
|
}
|
|
400
400
|
cached = "unknown";
|
|
@@ -79290,8 +79290,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79290
79290
|
var cached;
|
|
79291
79291
|
function substrateSelfVersion() {
|
|
79292
79292
|
if (cached !== void 0) return cached;
|
|
79293
|
-
if ("0.3.
|
|
79294
|
-
cached = "0.3.
|
|
79293
|
+
if ("0.3.11".length > 0) {
|
|
79294
|
+
cached = "0.3.11";
|
|
79295
79295
|
return cached;
|
|
79296
79296
|
}
|
|
79297
79297
|
cached = "unknown";
|
|
@@ -393,8 +393,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
393
393
|
var cached;
|
|
394
394
|
function substrateSelfVersion() {
|
|
395
395
|
if (cached !== void 0) return cached;
|
|
396
|
-
if ("0.3.
|
|
397
|
-
cached = "0.3.
|
|
396
|
+
if ("0.3.11".length > 0) {
|
|
397
|
+
cached = "0.3.11";
|
|
398
398
|
return cached;
|
|
399
399
|
}
|
|
400
400
|
cached = "unknown";
|
|
@@ -80800,8 +80800,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
80800
80800
|
var cached;
|
|
80801
80801
|
function substrateSelfVersion() {
|
|
80802
80802
|
if (cached !== void 0) return cached;
|
|
80803
|
-
if ("0.3.
|
|
80804
|
-
cached = "0.3.
|
|
80803
|
+
if ("0.3.11".length > 0) {
|
|
80804
|
+
cached = "0.3.11";
|
|
80805
80805
|
return cached;
|
|
80806
80806
|
}
|
|
80807
80807
|
cached = "unknown";
|
|
@@ -1959,8 +1959,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
1959
1959
|
var cached;
|
|
1960
1960
|
function substrateSelfVersion() {
|
|
1961
1961
|
if (cached !== void 0) return cached;
|
|
1962
|
-
if ("0.3.
|
|
1963
|
-
cached = "0.3.
|
|
1962
|
+
if ("0.3.11".length > 0) {
|
|
1963
|
+
cached = "0.3.11";
|
|
1964
1964
|
return cached;
|
|
1965
1965
|
}
|
|
1966
1966
|
cached = "unknown";
|
|
@@ -79285,8 +79285,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79285
79285
|
var cached;
|
|
79286
79286
|
function substrateSelfVersion() {
|
|
79287
79287
|
if (cached !== void 0) return cached;
|
|
79288
|
-
if ("0.3.
|
|
79289
|
-
cached = "0.3.
|
|
79288
|
+
if ("0.3.11".length > 0) {
|
|
79289
|
+
cached = "0.3.11";
|
|
79290
79290
|
return cached;
|
|
79291
79291
|
}
|
|
79292
79292
|
cached = "unknown";
|
|
@@ -389,8 +389,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
389
389
|
var cached;
|
|
390
390
|
function substrateSelfVersion() {
|
|
391
391
|
if (cached !== void 0) return cached;
|
|
392
|
-
if ("0.3.
|
|
393
|
-
cached = "0.3.
|
|
392
|
+
if ("0.3.11".length > 0) {
|
|
393
|
+
cached = "0.3.11";
|
|
394
394
|
return cached;
|
|
395
395
|
}
|
|
396
396
|
cached = "unknown";
|