@databricks-solutions/lakebase-scm-utils 0.3.8 → 0.3.9
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/scripts/index.cjs +2 -2
- package/dist/scripts/index.js +2 -2
- 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 +2 -2
- package/dist/scripts/lakebase/index.js +2 -2
- 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/templates/project/common/tests/e2e/__pycache__/conftest.cpython-314.pyc +0 -0
- package/templates/project/common/tests/e2e/conftest.py +5 -1
- package/templates/project/python/tests/__pycache__/conftest.cpython-314.pyc +0 -0
- package/templates/project/python/tests/conftest.py +38 -4
package/dist/scripts/index.cjs
CHANGED
|
@@ -88959,8 +88959,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
88959
88959
|
var cached;
|
|
88960
88960
|
function substrateSelfVersion() {
|
|
88961
88961
|
if (cached !== void 0) return cached;
|
|
88962
|
-
if ("0.3.
|
|
88963
|
-
cached = "0.3.
|
|
88962
|
+
if ("0.3.9".length > 0) {
|
|
88963
|
+
cached = "0.3.9";
|
|
88964
88964
|
return cached;
|
|
88965
88965
|
}
|
|
88966
88966
|
cached = "unknown";
|
package/dist/scripts/index.js
CHANGED
|
@@ -9737,8 +9737,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
9737
9737
|
var cached;
|
|
9738
9738
|
function substrateSelfVersion() {
|
|
9739
9739
|
if (cached !== void 0) return cached;
|
|
9740
|
-
if ("0.3.
|
|
9741
|
-
cached = "0.3.
|
|
9740
|
+
if ("0.3.9".length > 0) {
|
|
9741
|
+
cached = "0.3.9";
|
|
9742
9742
|
return cached;
|
|
9743
9743
|
}
|
|
9744
9744
|
cached = "unknown";
|
|
@@ -79629,8 +79629,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79629
79629
|
var cached;
|
|
79630
79630
|
function substrateSelfVersion() {
|
|
79631
79631
|
if (cached !== void 0) return cached;
|
|
79632
|
-
if ("0.3.
|
|
79633
|
-
cached = "0.3.
|
|
79632
|
+
if ("0.3.9".length > 0) {
|
|
79633
|
+
cached = "0.3.9";
|
|
79634
79634
|
return cached;
|
|
79635
79635
|
}
|
|
79636
79636
|
cached = "unknown";
|
|
@@ -721,8 +721,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
721
721
|
var cached;
|
|
722
722
|
function substrateSelfVersion() {
|
|
723
723
|
if (cached !== void 0) return cached;
|
|
724
|
-
if ("0.3.
|
|
725
|
-
cached = "0.3.
|
|
724
|
+
if ("0.3.9".length > 0) {
|
|
725
|
+
cached = "0.3.9";
|
|
726
726
|
return cached;
|
|
727
727
|
}
|
|
728
728
|
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.9".length > 0) {
|
|
79294
|
+
cached = "0.3.9";
|
|
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.9".length > 0) {
|
|
397
|
+
cached = "0.3.9";
|
|
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.9".length > 0) {
|
|
79294
|
+
cached = "0.3.9";
|
|
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.9".length > 0) {
|
|
397
|
+
cached = "0.3.9";
|
|
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.9".length > 0) {
|
|
80804
|
+
cached = "0.3.9";
|
|
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.9".length > 0) {
|
|
1963
|
+
cached = "0.3.9";
|
|
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.9".length > 0) {
|
|
79289
|
+
cached = "0.3.9";
|
|
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.9".length > 0) {
|
|
393
|
+
cached = "0.3.9";
|
|
394
394
|
return cached;
|
|
395
395
|
}
|
|
396
396
|
cached = "unknown";
|
|
@@ -81607,8 +81607,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
81607
81607
|
var cached;
|
|
81608
81608
|
function substrateSelfVersion() {
|
|
81609
81609
|
if (cached !== void 0) return cached;
|
|
81610
|
-
if ("0.3.
|
|
81611
|
-
cached = "0.3.
|
|
81610
|
+
if ("0.3.9".length > 0) {
|
|
81611
|
+
cached = "0.3.9";
|
|
81612
81612
|
return cached;
|
|
81613
81613
|
}
|
|
81614
81614
|
cached = "unknown";
|
|
@@ -2521,8 +2521,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
2521
2521
|
var cached;
|
|
2522
2522
|
function substrateSelfVersion() {
|
|
2523
2523
|
if (cached !== void 0) return cached;
|
|
2524
|
-
if ("0.3.
|
|
2525
|
-
cached = "0.3.
|
|
2524
|
+
if ("0.3.9".length > 0) {
|
|
2525
|
+
cached = "0.3.9";
|
|
2526
2526
|
return cached;
|
|
2527
2527
|
}
|
|
2528
2528
|
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.9".length > 0) {
|
|
79294
|
+
cached = "0.3.9";
|
|
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.9".length > 0) {
|
|
397
|
+
cached = "0.3.9";
|
|
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.9".length > 0) {
|
|
79294
|
+
cached = "0.3.9";
|
|
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.9".length > 0) {
|
|
397
|
+
cached = "0.3.9";
|
|
398
398
|
return cached;
|
|
399
399
|
}
|
|
400
400
|
cached = "unknown";
|
|
@@ -79288,8 +79288,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79288
79288
|
var cached;
|
|
79289
79289
|
function substrateSelfVersion() {
|
|
79290
79290
|
if (cached !== void 0) return cached;
|
|
79291
|
-
if ("0.3.
|
|
79292
|
-
cached = "0.3.
|
|
79291
|
+
if ("0.3.9".length > 0) {
|
|
79292
|
+
cached = "0.3.9";
|
|
79293
79293
|
return cached;
|
|
79294
79294
|
}
|
|
79295
79295
|
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.9".length > 0) {
|
|
393
|
+
cached = "0.3.9";
|
|
394
394
|
return cached;
|
|
395
395
|
}
|
|
396
396
|
cached = "unknown";
|
|
@@ -79324,8 +79324,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79324
79324
|
var cached;
|
|
79325
79325
|
function substrateSelfVersion() {
|
|
79326
79326
|
if (cached !== void 0) return cached;
|
|
79327
|
-
if ("0.3.
|
|
79328
|
-
cached = "0.3.
|
|
79327
|
+
if ("0.3.9".length > 0) {
|
|
79328
|
+
cached = "0.3.9";
|
|
79329
79329
|
return cached;
|
|
79330
79330
|
}
|
|
79331
79331
|
cached = "unknown";
|
|
@@ -427,8 +427,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
427
427
|
var cached;
|
|
428
428
|
function substrateSelfVersion() {
|
|
429
429
|
if (cached !== void 0) return cached;
|
|
430
|
-
if ("0.3.
|
|
431
|
-
cached = "0.3.
|
|
430
|
+
if ("0.3.9".length > 0) {
|
|
431
|
+
cached = "0.3.9";
|
|
432
432
|
return cached;
|
|
433
433
|
}
|
|
434
434
|
cached = "unknown";
|
|
@@ -79783,8 +79783,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79783
79783
|
var cached;
|
|
79784
79784
|
function substrateSelfVersion() {
|
|
79785
79785
|
if (cached !== void 0) return cached;
|
|
79786
|
-
if ("0.3.
|
|
79787
|
-
cached = "0.3.
|
|
79786
|
+
if ("0.3.9".length > 0) {
|
|
79787
|
+
cached = "0.3.9";
|
|
79788
79788
|
return cached;
|
|
79789
79789
|
}
|
|
79790
79790
|
cached = "unknown";
|
|
@@ -864,8 +864,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
864
864
|
var cached;
|
|
865
865
|
function substrateSelfVersion() {
|
|
866
866
|
if (cached !== void 0) return cached;
|
|
867
|
-
if ("0.3.
|
|
868
|
-
cached = "0.3.
|
|
867
|
+
if ("0.3.9".length > 0) {
|
|
868
|
+
cached = "0.3.9";
|
|
869
869
|
return cached;
|
|
870
870
|
}
|
|
871
871
|
cached = "unknown";
|
|
@@ -88240,8 +88240,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
88240
88240
|
var cached;
|
|
88241
88241
|
function substrateSelfVersion() {
|
|
88242
88242
|
if (cached !== void 0) return cached;
|
|
88243
|
-
if ("0.3.
|
|
88244
|
-
cached = "0.3.
|
|
88243
|
+
if ("0.3.9".length > 0) {
|
|
88244
|
+
cached = "0.3.9";
|
|
88245
88245
|
return cached;
|
|
88246
88246
|
}
|
|
88247
88247
|
cached = "unknown";
|
|
@@ -9393,8 +9393,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
9393
9393
|
var cached;
|
|
9394
9394
|
function substrateSelfVersion() {
|
|
9395
9395
|
if (cached !== void 0) return cached;
|
|
9396
|
-
if ("0.3.
|
|
9397
|
-
cached = "0.3.
|
|
9396
|
+
if ("0.3.9".length > 0) {
|
|
9397
|
+
cached = "0.3.9";
|
|
9398
9398
|
return cached;
|
|
9399
9399
|
}
|
|
9400
9400
|
cached = "unknown";
|
|
@@ -88825,8 +88825,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
88825
88825
|
var cached;
|
|
88826
88826
|
function substrateSelfVersion() {
|
|
88827
88827
|
if (cached !== void 0) return cached;
|
|
88828
|
-
if ("0.3.
|
|
88829
|
-
cached = "0.3.
|
|
88828
|
+
if ("0.3.9".length > 0) {
|
|
88829
|
+
cached = "0.3.9";
|
|
88830
88830
|
return cached;
|
|
88831
88831
|
}
|
|
88832
88832
|
cached = "unknown";
|
|
@@ -9978,8 +9978,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
9978
9978
|
var cached;
|
|
9979
9979
|
function substrateSelfVersion() {
|
|
9980
9980
|
if (cached !== void 0) return cached;
|
|
9981
|
-
if ("0.3.
|
|
9982
|
-
cached = "0.3.
|
|
9981
|
+
if ("0.3.9".length > 0) {
|
|
9982
|
+
cached = "0.3.9";
|
|
9983
9983
|
return cached;
|
|
9984
9984
|
}
|
|
9985
9985
|
cached = "unknown";
|
|
@@ -79288,8 +79288,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
79288
79288
|
var cached;
|
|
79289
79289
|
function substrateSelfVersion() {
|
|
79290
79290
|
if (cached !== void 0) return cached;
|
|
79291
|
-
if ("0.3.
|
|
79292
|
-
cached = "0.3.
|
|
79291
|
+
if ("0.3.9".length > 0) {
|
|
79292
|
+
cached = "0.3.9";
|
|
79293
79293
|
return cached;
|
|
79294
79294
|
}
|
|
79295
79295
|
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.9".length > 0) {
|
|
393
|
+
cached = "0.3.9";
|
|
394
394
|
return cached;
|
|
395
395
|
}
|
|
396
396
|
cached = "unknown";
|
|
@@ -1667,8 +1667,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
1667
1667
|
var cached;
|
|
1668
1668
|
function substrateSelfVersion() {
|
|
1669
1669
|
if (cached !== void 0) return cached;
|
|
1670
|
-
if ("0.3.
|
|
1671
|
-
cached = "0.3.
|
|
1670
|
+
if ("0.3.9".length > 0) {
|
|
1671
|
+
cached = "0.3.9";
|
|
1672
1672
|
return cached;
|
|
1673
1673
|
}
|
|
1674
1674
|
cached = "unknown";
|
|
@@ -1630,8 +1630,8 @@ var PKG_NAME = "@databricks-solutions/lakebase-scm-utils";
|
|
|
1630
1630
|
var cached;
|
|
1631
1631
|
function substrateSelfVersion() {
|
|
1632
1632
|
if (cached !== void 0) return cached;
|
|
1633
|
-
if ("0.3.
|
|
1634
|
-
cached = "0.3.
|
|
1633
|
+
if ("0.3.9".length > 0) {
|
|
1634
|
+
cached = "0.3.9";
|
|
1635
1635
|
return cached;
|
|
1636
1636
|
}
|
|
1637
1637
|
cached = "unknown";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databricks-solutions/lakebase-scm-utils",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "Lakebase SCM + substrate engine: database branching, paired-branch SCM workflows, connection/credential minting, schema migration, project scaffold + deploy primitives, and the git/github utility layer. Extracted from consort for portable, standalone consumption by lakebase-scm-extension and the SFTDD orchestration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -25,6 +25,7 @@ import os
|
|
|
25
25
|
import subprocess
|
|
26
26
|
import tempfile
|
|
27
27
|
import time
|
|
28
|
+
import urllib.error
|
|
28
29
|
import urllib.request
|
|
29
30
|
|
|
30
31
|
import pytest
|
|
@@ -41,7 +42,10 @@ def _is_up(url: str) -> bool:
|
|
|
41
42
|
return resp.status < 500
|
|
42
43
|
except urllib.error.HTTPError as exc: # noqa: PERF203 - a 4xx still means it's up
|
|
43
44
|
return exc.code < 500
|
|
44
|
-
except
|
|
45
|
+
except (urllib.error.URLError, OSError):
|
|
46
|
+
# NOT a broad-integrity swallow: a readiness poll returns False on the server
|
|
47
|
+
# not-yet-listening (connection refused / DNS / socket timeout — all URLError/OSError),
|
|
48
|
+
# never masks a DB-integrity violation. Narrow so the smell gate does not false-positive.
|
|
45
49
|
return False
|
|
46
50
|
|
|
47
51
|
|
|
Binary file
|
|
@@ -34,7 +34,7 @@ def db_session():
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
@pytest.fixture(autouse=True)
|
|
37
|
-
def _restore_migration_head_after_each_test():
|
|
37
|
+
def _restore_migration_head_after_each_test(request):
|
|
38
38
|
"""Within-run test isolation for migration up/down fixtures.
|
|
39
39
|
|
|
40
40
|
Some tests drive Alembic up/down against the shared verify database (a
|
|
@@ -42,10 +42,18 @@ def _restore_migration_head_after_each_test():
|
|
|
42
42
|
`upgrade head`). Run sequentially against ONE database, those fixtures can
|
|
43
43
|
leave it half-migrated , or, if a downgrade overshoots, below a table a later
|
|
44
44
|
test needs , so the next test fails with `relation ... does not exist`. This
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
teardown brings the DB back to `head` after a schema-mutating test.
|
|
46
|
+
|
|
47
|
+
SCOPED to ``@pytest.mark.migration`` tests only (perf): ONLY a migration test
|
|
48
|
+
downgrades/alters the schema , and the ``migration-marker-presence`` smell
|
|
49
|
+
GUARANTEES every schema-mutating test carries that marker , so a NON-migration
|
|
50
|
+
test cannot have changed the schema and needs no restore. Restoring after every
|
|
51
|
+
test ran a full alembic env-load + DB round-trip (~1-2s) after each of the many
|
|
52
|
+
non-migration tests to 'restore' a schema they never touched , the dominant cost
|
|
53
|
+
of the non-migration pass. Skipping it there is safe by construction."""
|
|
48
54
|
yield
|
|
55
|
+
if request.node.get_closest_marker("migration") is None:
|
|
56
|
+
return # a non-migration test cannot have altered the schema (marker smell enforces it)
|
|
49
57
|
try:
|
|
50
58
|
from pathlib import Path
|
|
51
59
|
|
|
@@ -251,6 +259,32 @@ def _consort_capture_tables(test_id, item):
|
|
|
251
259
|
pass
|
|
252
260
|
|
|
253
261
|
|
|
262
|
+
def pytest_collection_modifyitems(config, items):
|
|
263
|
+
"""Build-lane SCOPE (per-cycle waste elimination): when ``SFTDD_TEST_IDS`` is set (a space/comma
|
|
264
|
+
list of test ids), run ONLY the tests whose ``@pytest.mark.testid`` is in that set and DESELECT the
|
|
265
|
+
rest. The build's per-cycle GREEN verify sets it to the CURRENT STORY's ids, so a cycle re-runs
|
|
266
|
+
only its own story instead of every feature's suite (intra-story regressions still caught); the
|
|
267
|
+
story-close REFACTOR + feature-deploy gates leave it UNSET and run the FULL cross-story suite (that
|
|
268
|
+
is where a cross-story regression is caught, before merge). UNTAGGED items (no testid — shared
|
|
269
|
+
fixtures / infra) are always KEPT, never deselected. Unset/empty => no-op (full collection)."""
|
|
270
|
+
import os
|
|
271
|
+
import re
|
|
272
|
+
|
|
273
|
+
raw = (os.environ.get("SFTDD_TEST_IDS") or "").strip()
|
|
274
|
+
if not raw:
|
|
275
|
+
return
|
|
276
|
+
wanted = {t for t in re.split(r"[,\s]+", raw) if t}
|
|
277
|
+
if not wanted:
|
|
278
|
+
return
|
|
279
|
+
selected, deselected = [], []
|
|
280
|
+
for item in items:
|
|
281
|
+
tid = _consort_testid(item)
|
|
282
|
+
(selected if (tid is None or tid in wanted) else deselected).append(item)
|
|
283
|
+
if deselected:
|
|
284
|
+
config.hook.pytest_deselected(items=deselected)
|
|
285
|
+
items[:] = selected
|
|
286
|
+
|
|
287
|
+
|
|
254
288
|
def pytest_runtest_setup(item):
|
|
255
289
|
"""Emit ``running`` the moment a tagged test starts, so the dashboard shows it in-flight."""
|
|
256
290
|
test_id = _consort_testid(item)
|