Skip to content

Commit 2ad43b6

Browse files
authored
Merge branch 'main' into handle-windows-commonpath
2 parents 7652321 + 18cab43 commit 2ad43b6

File tree

146 files changed

+5288
-426
lines changed

Some content is hidden

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

146 files changed

+5288
-426
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "weekly"
7+
- package-ecosystem: "gomod"
8+
directory: "/tools"
9+
schedule:
10+
interval: "weekly"
711
- package-ecosystem: "github-actions"
812
directory: "/"
913
schedule:

.github/workflows/push.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
deployment-type.txt
6363
6464
- name: Setup Python
65-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
65+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
6666
with:
6767
python-version: '3.9'
6868

@@ -116,12 +116,9 @@ jobs:
116116
# Exit with status code 1 if there are differences (i.e. unformatted files)
117117
git diff --exit-code
118118
- name: Run Go lint checks (does not include formatting checks)
119-
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
120-
with:
121-
version: v2.4.0
122-
args: --timeout=15m
119+
run: go tool -modfile=tools/go.mod golangci-lint run --timeout=15m
123120
- name: Run ruff (Python linter and formatter)
124-
uses: astral-sh/ruff-action@0c50076f12c38c3d0115b7b519b54a91cb9cf0ad # v3.5.0
121+
uses: astral-sh/ruff-action@57714a7c8a2e59f32539362ba31877a1957dded1 # v3.5.1
125122
with:
126123
version: "0.9.1"
127124
args: "format --check"

.github/workflows/release-snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848

4949
- name: Run GoReleaser
5050
id: releaser
51-
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
51+
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
5252
with:
5353
version: ~> v2
5454
args: release --snapshot --skip docker

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
3838
# Log into the GitHub Container Registry. The goreleaser action will create
3939
# the docker images and push them to the GitHub Container Registry.
40-
- uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
40+
- uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
4141
with:
4242
registry: "ghcr.io"
4343
username: "${{ github.actor }}"
@@ -50,7 +50,7 @@ jobs:
5050

5151
- name: Run GoReleaser
5252
id: releaser
53-
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
53+
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
5454
with:
5555
version: ~> v2
5656
args: release
@@ -71,7 +71,7 @@ jobs:
7171
echo "VERSION=${VERSION:1}" >> $GITHUB_ENV
7272
7373
- name: Update setup-cli
74-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
74+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
7575
with:
7676
github-token: ${{ secrets.DECO_GITHUB_TOKEN }}
7777
script: |
@@ -99,7 +99,7 @@ jobs:
9999
echo "VERSION=${VERSION:1}" >> $GITHUB_ENV
100100
101101
- name: Update homebrew-tap
102-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
102+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
103103
with:
104104
github-token: ${{ secrets.DECO_GITHUB_TOKEN }}
105105
script: |
@@ -140,7 +140,7 @@ jobs:
140140
echo "VERSION=${VERSION:1}" >> $GITHUB_ENV
141141
142142
- name: Update CLI version in the VSCode extension
143-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
143+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
144144
with:
145145
github-token: ${{ secrets.DECO_GITHUB_TOKEN }}
146146
script: |

Makefile

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,45 @@ default: checks fmt lint
22

33
PACKAGES=./acceptance/... ./libs/... ./internal/... ./cmd/... ./bundle/... ./experimental/ssh/... .
44

5+
GO_TOOL ?= go tool -modfile=tools/go.mod
56
GOTESTSUM_FORMAT ?= pkgname-and-test-fails
6-
GOTESTSUM_CMD ?= go tool gotestsum --format ${GOTESTSUM_FORMAT} --no-summary=skipped --jsonfile test-output.json
7+
GOTESTSUM_CMD ?= ${GO_TOOL} gotestsum --format ${GOTESTSUM_FORMAT} --no-summary=skipped --jsonfile test-output.json
78
LOCAL_TIMEOUT ?= 30m
89

910

10-
lintfull:
11-
golangci-lint run --fix
11+
lintfull: ./tools/golangci-lint
12+
./tools/golangci-lint run --fix
1213

13-
lint:
14-
./tools/lintdiff.py run --fix
14+
lint: ./tools/golangci-lint
15+
./tools/lintdiff.py ./tools/golangci-lint run --fix
1516

1617
tidy:
1718
@# not part of golangci-lint, apparently
1819
go mod tidy
1920

20-
lintcheck:
21-
golangci-lint run ./...
21+
lintcheck: ./tools/golangci-lint
22+
./tools/golangci-lint run ./...
2223

23-
fmtfull: tools/yamlfmt
24+
fmtfull: ./tools/golangci-lint ./tools/yamlfmt
2425
ruff format -n
25-
golangci-lint fmt
26+
./tools/golangci-lint fmt
2627
./tools/yamlfmt .
2728

28-
fmt: tools/yamlfmt
29+
fmt: ./tools/golangci-lint ./tools/yamlfmt
2930
ruff format -n
30-
./tools/lintdiff.py fmt
31+
./tools/lintdiff.py ./tools/golangci-lint fmt
3132
./tools/yamlfmt .
3233

33-
# pre-building yamlfmt because I also want to call it from tests
34-
tools/yamlfmt: go.mod
35-
go build -o tools/yamlfmt github.com/google/yamlfmt/cmd/yamlfmt
34+
# pre-building yamlfmt because it is invoked from tests and scripts
35+
tools/yamlfmt: tools/go.mod tools/go.sum
36+
go build -modfile=tools/go.mod -o tools/yamlfmt github.com/google/yamlfmt/cmd/yamlfmt
3637

37-
tools/yamlfmt.exe: go.mod
38-
go build -o tools/yamlfmt.exe github.com/google/yamlfmt/cmd/yamlfmt
38+
tools/yamlfmt.exe: tools/go.mod tools/go.sum
39+
go build -modfile=tools/go.mod -o tools/yamlfmt.exe github.com/google/yamlfmt/cmd/yamlfmt
40+
41+
# pre-building golangci-lint because it's faster to run pre-built version
42+
tools/golangci-lint: tools/go.mod tools/go.sum
43+
go build -modfile=tools/go.mod -o tools/golangci-lint github.com/golangci/golangci-lint/v2/cmd/golangci-lint
3944

4045
ws:
4146
./tools/validate_whitespace.py
@@ -65,7 +70,7 @@ test-update-aws:
6570
test-update-all: test-update test-update-aws
6671

6772
slowest:
68-
go tool gotestsum tool slowest --jsonfile test-output.json --threshold 1s --num 50
73+
${GO_TOOL} gotestsum tool slowest --jsonfile test-output.json --threshold 1s --num 50
6974

7075
cover:
7176
rm -fr ./acceptance/build/cover/
@@ -102,7 +107,7 @@ schema:
102107
docs:
103108
go run ./bundle/docsgen ./bundle/internal/schema ./bundle/docsgen
104109

105-
INTEGRATION = go tool gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./acceptance ./integration/..." -- -parallel 4 -timeout=2h
110+
INTEGRATION = go run -modfile=tools/go.mod ./tools/testrunner/main.go ${GO_TOOL} gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./acceptance ./integration/..." -- -parallel 4 -timeout=2h
106111

107112
integration:
108113
$(INTEGRATION)

NEXT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
### Bundles
1212
* Fix processing short pip flags in environment dependencies ([#3708](https://github.com/databricks/cli/pull/3708))
1313
* Add support for referencing local files in -e pip flag for environment dependencies ([#3708](https://github.com/databricks/cli/pull/3708))
14+
* Fix PIP flag processing in pipeline environment dependencies ([#3734](https://github.com/databricks/cli/pull/3734))
1415

1516
### API Changes

acceptance/acceptance_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func testAccept(t *testing.T, inprocessMode bool, singleTest string) int {
228228
cloudEnv := os.Getenv("CLOUD_ENV")
229229

230230
if cloudEnv == "" {
231-
internal.StartDefaultServer(t)
231+
internal.StartDefaultServer(t, LogRequests)
232232
if os.Getenv("TEST_DEFAULT_WAREHOUSE_ID") == "" {
233233
t.Setenv("TEST_DEFAULT_WAREHOUSE_ID", "8ec9edc1-db0c-40df-af8d-7580020fe61e")
234234
}

acceptance/bin/browser.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env python3
2+
"""
3+
This script fetches a URL.
4+
It follows redirects if applicable.
5+
6+
Usage: browser.py <url>
7+
"""
8+
9+
import urllib.request
10+
import sys
11+
12+
if len(sys.argv) < 2:
13+
sys.stderr.write("Usage: browser.py <url>\n")
14+
sys.exit(1)
15+
16+
url = sys.argv[1]
17+
try:
18+
response = urllib.request.urlopen(url)
19+
if response.status != 200:
20+
sys.stderr.write(f"Failed to fetch URL: {url} (status {response.status})\n")
21+
sys.exit(1)
22+
except Exception as e:
23+
sys.stderr.write(f"Failed to fetch URL: {url} ({e})\n")
24+
sys.exit(1)
25+
26+
sys.exit(0)
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
Local = true
22
Cloud = false
33
RecordRequests = true
4-
5-
[[Server]]
6-
Pattern = "PUT /api/2.0/permissions/directories/{objectId}"

acceptance/bundle/environments/dependencies/databricks.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ resources:
3838
name: "Test Pipeline"
3939
environment:
4040
dependencies:
41+
- "-r ./requirements.txt"
42+
- "-e ./file.py"
43+
- "-i http://myindexurl.com"
44+
- "--index-url http://myindexurl.com"
4145
- "dist/*.whl"
4246
- "/Workspace/Users/[email protected]/test-package.whl"
4347
- "test_package"

0 commit comments

Comments
 (0)