From 47b2cfb6e2287f550d9c4e67ccfae3fc52e33238 Mon Sep 17 00:00:00 2001 From: Rada Kamysheva Date: Fri, 7 Aug 2026 11:39:56 +0000 Subject: [PATCH] acc: drop DATABRICKS_TEST_SKIPLOCAL=true After Local was removed, =true skipped every acceptance test, which made test-update-aws a no-op. Keep only withchanged for PR cloud runs. --- Taskfile.yml | 9 --------- acceptance/acceptance_test.go | 9 +++------ acceptance/skiplocal_test.go | 11 +++-------- 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 4c74676d76..0a2030181f 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -584,19 +584,10 @@ tasks: cmds: - "go test ./acceptance -run '^TestAccept/bundle/templates' -update -timeout=${LOCAL_TIMEOUT:-60m}" - test-update-aws: - desc: Update acceptance test output (integration, requires deco access) - sources: *ACC_SOURCES_UPDATE - generates: *ACC_GENERATES_UPDATE - cmds: - - "deco env run -i -n aws-prod-ucws -- env DATABRICKS_TEST_SKIPLOCAL=true go test ./acceptance -run ^TestAccept$ -update -timeout=1h -v" - test-update-all: desc: Update all acceptance test outputs - # Sequential: both tasks overwrite the same acceptance output files. cmds: - task: test-update - - task: test-update-aws # Follows upstream HEAD, so its result changes over time: keep it out of # `generate-check`, which requires byte-for-byte reproducible output. diff --git a/acceptance/acceptance_test.go b/acceptance/acceptance_test.go index 884902b76d..16fd53a478 100644 --- a/acceptance/acceptance_test.go +++ b/acceptance/acceptance_test.go @@ -449,9 +449,9 @@ func testAccept(t *testing.T, inprocessMode bool, singleTest string) int { subset := newSubsetSelector(t, testdiff.OverwriteMode, Forcerun) switch skipLocalMode { - case "", SkipLocalAll, SkipLocalWithChanged: + case "", SkipLocalWithChanged: default: - t.Fatalf("Unsupported %s=%q, expected %q or %q", SkipLocalEnvVar, skipLocalMode, SkipLocalAll, SkipLocalWithChanged) + t.Fatalf("Unsupported %s=%q, expected %q", SkipLocalEnvVar, skipLocalMode, SkipLocalWithChanged) } skipLocalWithChanged := skipLocalMode == SkipLocalWithChanged @@ -657,10 +657,7 @@ func validateTestPhase(phase int) error { // skipLocalMode is the value of DATABRICKS_TEST_SKIPLOCAL read once at startup. // changedTests maps test dirs to extra env filters; nil map means feature is off. func getSkipReason(config *internal.TestConfig, configPath, dir, skipLocalMode string, changedTests map[string][]string) string { - switch skipLocalMode { - case SkipLocalAll: - return "Disabled via DATABRICKS_TEST_SKIPLOCAL=" + SkipLocalAll + " in " + configPath - case SkipLocalWithChanged: + if skipLocalMode == SkipLocalWithChanged { if _, ok := changedTests[dir]; !ok { return "Disabled via DATABRICKS_TEST_SKIPLOCAL=" + SkipLocalWithChanged + " in " + configPath } diff --git a/acceptance/skiplocal_test.go b/acceptance/skiplocal_test.go index bf00b3b145..b9de1ad973 100644 --- a/acceptance/skiplocal_test.go +++ b/acceptance/skiplocal_test.go @@ -9,19 +9,14 @@ import ( "testing" ) -// DATABRICKS_TEST_SKIPLOCAL skips acceptance tests on cloud runs. All tests already -// run locally against the testserver; withchanged re-enables tests this branch touches. +// Cloud PR runs set DATABRICKS_TEST_SKIPLOCAL=withchanged to skip acceptance +// tests that already run locally, except those this branch touches. const ( SkipLocalEnvVar = "DATABRICKS_TEST_SKIPLOCAL" - // SkipLocalAll skips every acceptance test. - SkipLocalAll = "true" - // SkipLocalWithChanged skips acceptance tests except those added or changed - // relative to origin/main. SkipLocalWithChanged = "withchanged" - // maxChangedLocalTests caps how many changed tests SkipLocalWithChanged re-enables, - // keeping the cloud run bounded. Added tests are preferred over modified ones. + // Cap re-enabled tests so cloud PR runs stay bounded; prefer added over modified. maxChangedLocalTests = 50 invariantConfigsPrefix = "acceptance/bundle/invariant/configs/"