Skip to content

Commit 1165def

Browse files
authored
Merge branch 'main' into feature/prevent-destroy
2 parents 109d453 + dfc36b9 commit 1165def

File tree

109 files changed

+5873
-431
lines changed

Some content is hidden

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

109 files changed

+5873
-431
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ tools/yamlfmt.exe
3636

3737
# Cache for tools/gh_report.py
3838
.gh-logs
39+
40+
# Release artifacts
41+
dist/

.golangci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ linters:
1616
- unused
1717
- exhaustruct
1818
- copyloopvar
19+
- forbidigo
1920
settings:
2021
copyloopvar:
2122
check-alias: true
@@ -72,6 +73,9 @@ linters:
7273
- path: bundle/terranova/tnresources/all_test.go
7374
linters:
7475
- exhaustruct
76+
- path-except: ^cmd
77+
linters:
78+
- forbidigo
7579
issues:
7680
max-issues-per-linter: 1000
7781
max-same-issues: 1000

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ build-vm: tidy
9191
snapshot:
9292
go build -o .databricks/databricks
9393

94+
# Produce release binaries and archives in the dist folder without uploading them anywhere.
95+
# Useful for "databricks ssh" development, as it needs to upload linux releases to the /Workspace.
96+
snapshot-release:
97+
goreleaser release --clean --skip docker --snapshot
98+
9499
schema:
95100
go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema.json
96101

acceptance/acceptance_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const (
8484
EntryPointScript = "script"
8585
CleanupScript = "script.cleanup"
8686
PrepareScript = "script.prepare"
87-
MaxFileSize = 100_000
87+
MaxFileSize = 1_000_000
8888
// Filename to save replacements to (used by diff.py)
8989
ReplsFile = "repls.json"
9090
// Filename for materialized config (used as golden file)

acceptance/bundle/bundle_tag/url_ref/out.deploy.direct-exp.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
2-
Error: schema mismatch for ${resources.jobs.foo.url}: url: field "url" not found in resources.Job
2+
Error: cannot resolve "${resources.jobs.foo.url}": schema mismatch: url: field "url" not found in resources.Job; url: field "url" not found in jobs.Job
33

44
Error: cannot plan jobs.bar: dependency failed: jobs.foo
55

acceptance/bundle/bundle_tag/url_ref/out.plan.direct-exp.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Error: schema mismatch for ${resources.jobs.foo.url}: url: field "url" not found in resources.Job
1+
Error: cannot resolve "${resources.jobs.foo.url}": schema mismatch: url: field "url" not found in resources.Job; url: field "url" not found in jobs.Job
22

33
Error: cannot plan jobs.bar: dependency failed: jobs.foo
44

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
Badness = "Error message in direct is developer-focussed, includes struct names that were checked; could be made more user friendly and point to the right doc and maybe even give a list of allowed fields"
12
RecordRequests = true

acceptance/bundle/debug/output.txt

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1-
Name: test-bundle
2-
Target: default
3-
Workspace:
4-
User: [USERNAME]
5-
Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
1+
Debug information about bundles
62

7-
Validation OK!
3+
Usage:
4+
databricks bundle debug [command]
5+
6+
Available Commands:
7+
refschema Dump all relevant fields all bundle resources
8+
9+
Flags:
10+
-h, --help help for debug
11+
12+
Global Flags:
13+
--debug enable debug logging
14+
-o, --output type output type: text or json (default text)
15+
-p, --profile string ~/.databrickscfg profile
16+
-t, --target string bundle target to use (if applicable)
17+
--var strings set values for variables defined in bundle config. Example: --var="foo=bar"
18+
19+
Use "databricks bundle debug [command] --help" for more information about a command.

acceptance/bundle/debug/script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
$CLI bundle validate --debug 2> out.stderr.$DATABRICKS_CLI_DEPLOYMENT.txt
1+
$CLI bundle debug

0 commit comments

Comments
 (0)