fix: close realtime initialization visibility gaps
This commit is contained in:
@@ -29,7 +29,7 @@ const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../
|
||||
const migrationPaths = CLOUD_CORE_MIGRATIONS.map((migration) => migration.path);
|
||||
const latestMigrationPath = migrationPaths.at(-1);
|
||||
const defaultReportPath = tempReportPath("dev-runtime-migration-report.json");
|
||||
const issue = "pikasTech/HWLAB#164";
|
||||
const issue = "pikasTech/HWLAB#2464";
|
||||
|
||||
export async function runDevRuntimeMigrationCli(argv = process.argv.slice(2), options = {}) {
|
||||
const args = parseArgs(argv);
|
||||
@@ -495,6 +495,12 @@ function summarizeDbEnv(env = {}) {
|
||||
}
|
||||
|
||||
function buildApplyBoundary(args) {
|
||||
const schemaWriteScope = migrationPaths.map((migrationPath) =>
|
||||
`DEV Postgres schema objects declared by ${migrationPath}`
|
||||
);
|
||||
const ledgerWriteScope = CLOUD_CORE_MIGRATIONS.map((migration) =>
|
||||
`DEV ${CLOUD_RUNTIME_DURABLE_MIGRATION_TABLE} ledger row ${migration.id}`
|
||||
);
|
||||
return {
|
||||
defaultMode: "check",
|
||||
mode: args.mode,
|
||||
@@ -503,10 +509,7 @@ function buildApplyBoundary(args) {
|
||||
requiresForLiveDbRead: ["--confirm-dev", "HWLAB_CLOUD_DB_URL from hwlab-cloud-api-dev-db/database-url"],
|
||||
requiresForApply: ["--apply", "--confirm-dev", "--confirmed-non-production", "HWLAB_CLOUD_DB_URL from hwlab-cloud-api-dev-db/database-url"],
|
||||
writeScope: args.mode === "apply"
|
||||
? [
|
||||
"DEV Postgres schema objects declared by internal/db/migrations/0001_cloud_core_skeleton.sql",
|
||||
"DEV hwlab_schema_migrations ledger row 0001_cloud_core_skeleton"
|
||||
]
|
||||
? [...schemaWriteScope, ...ledgerWriteScope]
|
||||
: [],
|
||||
noWriteScope: [
|
||||
"Kubernetes Secret resources",
|
||||
|
||||
Reference in New Issue
Block a user