Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .codegen/_openapi_sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2cee201b2e8d656f7306b2f9ec98edfa721e9829
a8f547d3728fba835fbdda301e846829c5cbbef5
6 changes: 3 additions & 3 deletions .codegen/service.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ func new{{.PascalName}}() *cobra.Command {
{{- end -}}

cmd.Use = "{{.KebabName}}{{if $hasPosArgs}}{{range .RequiredPositionalArguments}} {{.ConstantName}}{{end}}{{end}}"
{{- if .Description }}
{{- if .CliComment " " 80 }}
cmd.Short = `{{.Summary | without "`"}}`
cmd.Long = `{{.Comment " " 80 | without "`"}}
cmd.Long = `{{.CliComment " " 80 | without "`"}}
{{- if $atleastOneArgumentWithDescription }}

Arguments:
Expand Down Expand Up @@ -412,7 +412,7 @@ func new{{.PascalName}}() *cobra.Command {
{{- if $optionalIfJsonIsUsed }}
if !cmd.Flags().Changed("json") {
{{- end }}
{{if and (not $field.Entity.IsString) (not $field.Entity.IsFieldMask) (not $field.Entity.IsTimestamp) (not $field.Entity.IsDuration) -}} {{/* TODO: add support for well known types */}}
{{if and (not $field.Entity.IsString) (not $field.Entity.IsFieldMask) (not $field.Entity.IsTimestamp) (not $field.Entity.IsDuration) -}} {{/* TODO: add support for well known types */ -}}
_, err = fmt.Sscan(args[{{$arg}}], &{{- template "request-body-obj" (dict "Method" $method "Field" $field)}})
if err != nil {
return fmt.Errorf("invalid {{$field.ConstantName}}: %s", args[{{$arg}}])
Expand Down
Binary file added .databricks/databricks
Binary file not shown.
Binary file added .databricks/dlt
Binary file not shown.
7 changes: 5 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ cmd/workspace/consumer-providers/consumer-providers.go linguist-generated=true
cmd/workspace/credentials-manager/credentials-manager.go linguist-generated=true
cmd/workspace/credentials/credentials.go linguist-generated=true
cmd/workspace/current-user/current-user.go linguist-generated=true
cmd/workspace/custom-llms/custom-llms.go linguist-generated=true
cmd/workspace/dashboard-email-subscriptions/dashboard-email-subscriptions.go linguist-generated=true
cmd/workspace/dashboard-widgets/dashboard-widgets.go linguist-generated=true
cmd/workspace/dashboards/dashboards.go linguist-generated=true
cmd/workspace/data-sources/data-sources.go linguist-generated=true
cmd/workspace/database-instances/database-instances.go linguist-generated=true
cmd/workspace/database/database.go linguist-generated=true
cmd/workspace/default-namespace/default-namespace.go linguist-generated=true
cmd/workspace/disable-legacy-access/disable-legacy-access.go linguist-generated=true
cmd/workspace/disable-legacy-dbfs/disable-legacy-dbfs.go linguist-generated=true
Expand Down Expand Up @@ -110,10 +112,10 @@ cmd/workspace/provider-personalization-requests/provider-personalization-request
cmd/workspace/provider-provider-analytics-dashboards/provider-provider-analytics-dashboards.go linguist-generated=true
cmd/workspace/provider-providers/provider-providers.go linguist-generated=true
cmd/workspace/providers/providers.go linguist-generated=true
cmd/workspace/quality-monitor-v2/quality-monitor-v2.go linguist-generated=true
cmd/workspace/quality-monitors/quality-monitors.go linguist-generated=true
cmd/workspace/queries-legacy/queries-legacy.go linguist-generated=true
cmd/workspace/queries/queries.go linguist-generated=true
cmd/workspace/query-execution/query-execution.go linguist-generated=true
cmd/workspace/query-history/query-history.go linguist-generated=true
cmd/workspace/query-visualizations-legacy/query-visualizations-legacy.go linguist-generated=true
cmd/workspace/query-visualizations/query-visualizations.go linguist-generated=true
Expand All @@ -131,6 +133,7 @@ cmd/workspace/service-principals/service-principals.go linguist-generated=true
cmd/workspace/serving-endpoints/serving-endpoints.go linguist-generated=true
cmd/workspace/settings/settings.go linguist-generated=true
cmd/workspace/shares/shares.go linguist-generated=true
cmd/workspace/sql-results-download/sql-results-download.go linguist-generated=true
cmd/workspace/storage-credentials/storage-credentials.go linguist-generated=true
cmd/workspace/system-schemas/system-schemas.go linguist-generated=true
cmd/workspace/table-constraints/table-constraints.go linguist-generated=true
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/external-message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,25 @@ jobs:

- name: Delete old comments
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Delete previous comment if it exists
previous_comment_ids=$(gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \
--jq '.[] | select(.body | startswith("<!-- INTEGRATION_TESTS_MANUAL -->")) | .id')
echo "Previous comment IDs: $previous_comment_ids"
# Iterate over each comment ID and delete the comment
if [ ! -z "$previous_comment_ids" ]; then
echo "$previous_comment_ids" | while read -r comment_id; do
echo "Deleting comment with ID: $comment_id"
gh api "repos/${{ github.repository }}/issues/comments/$comment_id" -X DELETE
done
fi
# Delete previous comment if it exists
previous_comment_ids=$(gh api "repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \
--jq '.[] | select(.body | startswith("<!-- INTEGRATION_TESTS_MANUAL -->")) | .id')
echo "Previous comment IDs: $previous_comment_ids"
# Iterate over each comment ID and delete the comment
if [ ! -z "$previous_comment_ids" ]; then
echo "$previous_comment_ids" | while read -r comment_id; do
echo "Deleting comment with ID: $comment_id"
gh api "repos/${{ github.repository }}/issues/comments/$comment_id" -X DELETE
done
fi

- name: Comment on PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
run: |
run: |-
gh pr comment ${{ github.event.pull_request.number }} --body \
"<!-- INTEGRATION_TESTS_MANUAL -->
An authorized user can trigger integration tests manually by following the instructions below:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
run: |-
gh api -X POST -H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/statuses/${{ github.sha }} \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Trigger Workflow in Another Repo
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
run: |-
gh workflow run cli-isolated-nightly.yml -R ${{ secrets.ORG_NAME }}/${{secrets.REPO_NAME}} \
--ref main \
-f commit_sha=${{ github.event.after }}
2 changes: 1 addition & 1 deletion .github/workflows/integration-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Trigger Workflow in Another Repo
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
run: |-
gh workflow run cli-isolated-pr.yml -R ${{ secrets.ORG_NAME }}/${{secrets.REPO_NAME}} \
--ref main \
-f pull_request_number=${{ github.event.pull_request.number }} \
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
branches:
- main
schedule:
- cron: '0 0,12 * * *' # Runs at 00:00 and 12:00 UTC daily
- cron: '0 0,12 * * *' # Runs at 00:00 and 12:00 UTC daily

env:
GOTESTSUM_FORMAT: github-actions
Expand Down Expand Up @@ -112,10 +112,10 @@ jobs:
with:
version: "0.9.1"
args: "format --check"
- name: "make fmt: Python and Go formatting"
- name: "make fmtfull: Python and Go formatting"
# This is already done by actions, but good to check that make command is working
run: |
make fmt
make fmtfull
git diff --exit-code
- name: "make checks: custom checks outside of fmt and lint"
run: |
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:

- name: Verify that python/codegen is up to date
working-directory: experimental/python
run: |
run: |-
make codegen

if ! ( git diff --exit-code ); then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pyVersion: [ '3.10', '3.11', '3.12', '3.13' ]
pyVersion: ['3.10', '3.11', '3.12', '3.13']

steps:
- name: Checkout repository and submodules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ jobs:
prerelease: true
tag_name: snapshot
token: ${{ secrets.GITHUB_TOKEN }}
files: |
files: |-
dist/databricks_cli_*.zip
dist/databricks_cli_*.tar.gz
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ jobs:

needs: goreleaser


# IMPORTANT:
# - 'id-token: write' is mandatory for OIDC and trusted publishing to PyPi
# - 'environment: release' is a part of OIDC assertion done by PyPi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/start-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ jobs:
- name: Run start_integration_tests.py
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
run: |-
python3 ./start_integration_tests.py -R ${{ secrets.ORG_NAME }}/${{secrets.REPO_NAME}} --yes
3 changes: 1 addition & 2 deletions .github/workflows/tagging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
concurrency:
group: "tagging"


jobs:
tag:
environment: "release-is"
Expand Down Expand Up @@ -47,5 +46,5 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
run: |-
python internal/genkit/tagging.py
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ __pycache__

# Test results from 'make test'
test-output.json

# Built by make for 'make fmt' and yamlcheck.py in acceptance tests
tools/yamlfmt
tools/yamlfmt.exe
67 changes: 33 additions & 34 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,40 @@ before:
- go mod download

builds:
- env:
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- '-s -w'
- -X github.com/databricks/cli/internal/build.buildProjectName={{ .ProjectName }}
- -X github.com/databricks/cli/internal/build.buildVersion={{ .Version }}
- env:
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- '-s -w'
- -X github.com/databricks/cli/internal/build.buildProjectName={{ .ProjectName }}
- -X github.com/databricks/cli/internal/build.buildVersion={{ .Version }}

# Git information
- -X github.com/databricks/cli/internal/build.buildBranch={{ .Branch }}
- -X github.com/databricks/cli/internal/build.buildTag={{ .Tag }}
- -X github.com/databricks/cli/internal/build.buildShortCommit={{ .ShortCommit }}
- -X github.com/databricks/cli/internal/build.buildFullCommit={{ .FullCommit }}
- -X github.com/databricks/cli/internal/build.buildCommitTimestamp={{ .CommitTimestamp }}
- -X github.com/databricks/cli/internal/build.buildSummary={{ .Summary }}
# Git information
- -X github.com/databricks/cli/internal/build.buildBranch={{ .Branch }}
- -X github.com/databricks/cli/internal/build.buildTag={{ .Tag }}
- -X github.com/databricks/cli/internal/build.buildShortCommit={{ .ShortCommit }}
- -X github.com/databricks/cli/internal/build.buildFullCommit={{ .FullCommit }}
- -X github.com/databricks/cli/internal/build.buildCommitTimestamp={{ .CommitTimestamp }}
- -X github.com/databricks/cli/internal/build.buildSummary={{ .Summary }}

# Version information
- -X github.com/databricks/cli/internal/build.buildMajor={{ .Major }}
- -X github.com/databricks/cli/internal/build.buildMinor={{ .Minor }}
- -X github.com/databricks/cli/internal/build.buildPatch={{ .Patch }}
- -X github.com/databricks/cli/internal/build.buildPrerelease={{ .Prerelease }}
- -X github.com/databricks/cli/internal/build.buildIsSnapshot={{ .IsSnapshot }}
- -X github.com/databricks/cli/internal/build.buildTimestamp={{ .Timestamp }}
# Version information
- -X github.com/databricks/cli/internal/build.buildMajor={{ .Major }}
- -X github.com/databricks/cli/internal/build.buildMinor={{ .Minor }}
- -X github.com/databricks/cli/internal/build.buildPatch={{ .Patch }}
- -X github.com/databricks/cli/internal/build.buildPrerelease={{ .Prerelease }}
- -X github.com/databricks/cli/internal/build.buildIsSnapshot={{ .IsSnapshot }}
- -X github.com/databricks/cli/internal/build.buildTimestamp={{ .Timestamp }}

goos:
- windows
- linux
- darwin
goarch:
- amd64
- arm64
binary: databricks
goos:
- windows
- linux
- darwin
goarch:
- amd64
- arm64
binary: databricks

archives:
- formats: ["zip", "tar.gz"]
Expand Down Expand Up @@ -89,7 +89,6 @@ docker_manifests:
- ghcr.io/databricks/cli:latest-amd64
- ghcr.io/databricks/cli:latest-arm64


checksum:
name_template: 'databricks_cli_{{ .Version }}_SHA256SUMS'
algorithm: sha256
Expand All @@ -101,5 +100,5 @@ changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^docs:'
- '^test:'
2 changes: 1 addition & 1 deletion .release_metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"timestamp": "2025-06-03 13:30:49+0000"
"timestamp": "2025-06-11 14:09:54+0000"
}
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Version changelog

## Release v0.255.0

### Notable Changes

* Fix `databricks auth login` to tolerate URLs copied from the browser ([#3001](https://github.com/databricks/cli/pull/3001)).

### CLI
* Use OS aware runner instead of bash for run-local command ([#2996](https://github.com/databricks/cli/pull/2996))

### Bundles
* Fix "bundle summary -o json" to render null values properly ([#2990](https://github.com/databricks/cli/pull/2990))
* Fix dashboard generation for already imported dashboard ([#3016](https://github.com/databricks/cli/pull/3016))
* Fixed null pointer de-reference if artifacts missing fields ([#3022](https://github.com/databricks/cli/pull/3022))
* Update bundle templates to also include `resources/*/*.yml` ([#3024](https://github.com/databricks/cli/pull/3024))
* Apply YAML formatter on default-python and dbt-sql templates ([#3026](https://github.com/databricks/cli/pull/3026))


## Release v0.254.0

### Bundles
Expand Down
25 changes: 20 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,35 @@ GOTESTSUM_FORMAT ?= pkgname-and-test-fails
GOTESTSUM_CMD ?= go tool gotestsum --format ${GOTESTSUM_FORMAT} --no-summary=skipped --jsonfile test-output.json


lint:
lintfull:
golangci-lint run --fix

lint:
./tools/lintdiff.py run --fix

tidy:
@# not part of golangci-lint, apparently
go mod tidy

lintcheck:
golangci-lint run ./...

fmt:
ruff format -qn
fmtfull: tools/yamlfmt
ruff format -n
golangci-lint fmt
./tools/yamlfmt .

fmt: tools/yamlfmt
ruff format -n
./tools/lintdiff.py fmt
./tools/yamlfmt .

# pre-building yamlfmt because I also want to call it from tests
tools/yamlfmt: go.mod
go build -o tools/yamlfmt github.com/google/yamlfmt/cmd/yamlfmt

tools/yamlfmt.exe: go.mod
go build -o tools/yamlfmt.exe github.com/google/yamlfmt/cmd/yamlfmt

ws:
./tools/validate_whitespace.py
Expand Down Expand Up @@ -54,7 +70,6 @@ build: tidy

snapshot:
go build -o .databricks/databricks
go build -o .databricks/dlt

schema:
go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema.json
Expand All @@ -79,4 +94,4 @@ generate:
[ ! -f .github/workflows/next-changelog.yml ] || rm .github/workflows/next-changelog.yml
pushd experimental/python && make codegen

.PHONY: lint tidy lintcheck fmt test cover showcover build snapshot schema integration integration-short acc-cover acc-showcover docs ws links checks
.PHONY: lint lintfull tidy lintcheck fmt fmtfull test cover showcover build snapshot schema integration integration-short acc-cover acc-showcover docs ws links checks
Loading