Skip to content

Commit f8ce0f1

Browse files
authored
Merge branch 'main' into cluster-id-config-1897
2 parents 6eb8f6f + 64da4dd commit f8ce0f1

44 files changed

Lines changed: 343 additions & 43 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.wsignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ experimental/python/docs/images/databricks-logo.svg
1717
# In order to prevent that difference, hello.txt does not have a trailing newline.
1818
acceptance/selftest/record_cloud/volume-io/hello.txt
1919

20+
# error output when artifact build fails contains trailing whitespace:
21+
acceptance/bundle/artifacts/shell/err-bash/output.txt
22+
acceptance/bundle/artifacts/shell/err-sh/output.txt
23+
2024
# "bundle init" has trailing whitespace:
2125
acceptance/bundle/templates-machinery/helpers-error/output.txt
2226

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ checks: tidy ws links
4848
test:
4949
${GOTESTSUM_CMD} -- ${PACKAGES}
5050

51+
# Updates acceptance test output (local tests)
52+
test-update:
53+
-go test ./acceptance -run '^TestAccept$$' -update
54+
@# at the moment second pass is required because some tests show diff against output of another test for easier review
55+
-go test ./acceptance -run '^TestAccept$$' -update
56+
57+
# Updates acceptance test output (integration tests, requires access)
58+
test-update-aws:
59+
deco env run -i -n aws-prod-ucws -- go test ./acceptance -run ^TestAccept$$ -update -timeout=1h -skiplocal -v
60+
61+
test-update-all: test-update test-update-aws
62+
5163
slowest:
5264
go tool gotestsum tool slowest --jsonfile test-output.json --threshold 1s --num 50
5365

@@ -94,4 +106,4 @@ generate:
94106
[ ! -f .github/workflows/next-changelog.yml ] || rm .github/workflows/next-changelog.yml
95107
pushd experimental/python && make codegen
96108

97-
.PHONY: lint lintfull tidy lintcheck fmt fmtfull test cover showcover build snapshot schema integration integration-short acc-cover acc-showcover docs ws links checks
109+
.PHONY: lint lintfull tidy lintcheck fmt fmtfull test cover showcover build snapshot schema integration integration-short acc-cover acc-showcover docs ws links checks test-update test-update-aws test-update-all

acceptance/acceptance_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ var (
4343
Forcerun bool
4444
LogRequests bool
4545
LogConfig bool
46+
SkipLocal bool
4647
)
4748

4849
// In order to debug CLI running under acceptance test, search for TestInprocessMode and update
@@ -65,6 +66,7 @@ func init() {
6566
flag.BoolVar(&Forcerun, "forcerun", false, "Force running the specified tests, ignore all reasons to skip")
6667
flag.BoolVar(&LogRequests, "logrequests", false, "Log request and responses from testserver")
6768
flag.BoolVar(&LogConfig, "logconfig", false, "Log merged for each test case")
69+
flag.BoolVar(&SkipLocal, "skiplocal", false, "Skip tests that are enabled to run on Local")
6870
}
6971

7072
const (
@@ -330,6 +332,10 @@ func getTests(t *testing.T) []string {
330332

331333
// Return a reason to skip the test. Empty string means "don't skip".
332334
func getSkipReason(config *internal.TestConfig, configPath string) string {
335+
if SkipLocal && isTruePtr(config.Local) {
336+
return "Disabled via SkipLocal setting in " + configPath
337+
}
338+
333339
if Forcerun {
334340
return ""
335341
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
artifacts:
2+
my_artifact:
3+
executable: bash
4+
build: |-
5+
echo "hello" > out.shell.txt
6+
echo "world" >> out.shell.txt
7+
false
8+
echo "this should not be printed since bash is run with -e" >> out.shell.txt
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
hello
2+
world
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
>>> [CLI] bundle deploy
3+
Building my_artifact...
4+
Error: build failed my_artifact, error: exit status 1, output:
5+
6+
7+
Exit code: 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
trace $CLI bundle deploy
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
artifacts:
2+
my_artifact:
3+
executable: sh
4+
build: |-
5+
echo "hello" > out.shell.txt
6+
echo "world" >> out.shell.txt
7+
false
8+
echo "this should not be printed since sh is run with -e" >> out.shell.txt
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
hello
2+
world
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
>>> [CLI] bundle deploy
3+
Building my_artifact...
4+
Error: build failed my_artifact, error: exit status 1, output:
5+
6+
7+
Exit code: 1

0 commit comments

Comments
 (0)