Commit Graph

12 Commits

Author SHA1 Message Date
Ilya Kuznetsov 042c8d88c6
Custom annotations for bundle-specific JSON schema fields (#1957)
## Changes

Adds annotations to json-schema for fields which are not covered by
OpenAPI spec.

Custom descriptions were copy-pasted from documentation PR which is
still WIP so descriptions for some fields are missing

Further improvements:
* documentation autogen based on json-schema
* fix missing descriptions

## Tests

This script is not part of CLI package so I didn't test all corner
cases. Few high-level tests were added to be sure that schema
annotations is in sync with actual config

---------

Co-authored-by: Pieter Noordhuis <pieter.noordhuis@databricks.com>
2024-12-18 10:19:14 +00:00
Pieter Noordhuis 23ddee8023
Skip job runs during integration testing for PRs (#2024)
## Changes

A small subset of tests trigger cluster creation to run jobs. These
tests comprise a substantial amount of the total integration test
runtime. We can skip them on PRs and only run them on the main branch.

## Tests

Confirmed the short runtime is ~20 mins.
2024-12-17 17:16:58 +00:00
Denis Bilenko 2fa3b48083
Remove 'make fmt' and 'fmt' workflow (#2026)
Remove unnecessary make command and github workflow - it's a subset of
"lint" now. However, keep "mod tidy" separately, don't think the linter
does that.
2024-12-17 16:34:54 +01:00
Pieter Noordhuis c958702097
Move integration tests to `integration` package (#2009)
## Changes

Objectives:
* A dedicated directory for integration tests
* It is not picked up by `go test ./...`
* No need for a `TestAcc` test name prefix
* More granular packages to improve test selection (future)

The tree structure generally mirrors the source code tree structure.

Requirements for new files in this directory:
* Every package **must** be named after its directory with `_test` appended
* Requiring a different package name for integration tests avoids
aliasing with the main package.
* Every integration test package **must** include a `main_test.go` file.

These requirements are enforced by a unit test in the `integration` package.

## Tests

Integration tests pass.

The total run time regresses by about 10%. A follow-up change that
increases the degree of test parallelism will address this.
2024-12-13 15:38:58 +01:00
Denis Bilenko e39e94b12f
Make 'make lint' apply --fix (#1995)
Add 'make lintcheck' to lint without fixing. Fixing is what you usually
want.

No changes to github workflow since that does not call our Makefile.
2024-12-11 13:53:57 +01:00
Pieter Noordhuis 227a13556b
Add build rule for running integration tests (#1965)
## Changes

Make it possible to change what/how we run our integration tests from
within this repository.

## Tests

Integration tests all pass when run with this command.
2024-12-09 09:52:08 +00:00
Denis Bilenko 0a36681bef
Add golangci-lint v1.62.2 (#1953) 2024-12-04 17:40:19 +00:00
Serge Smertin 905fe10e62
`make snapshot` to build file in `.databricks/databricks` (#927)
Goreleaser builds binary in 10-15 seconds, but go build does it just in
3-5 seconds. Target is `.databricks` folder in the current checkout,
which is already in `.gitignore`. Make sure you have the following
$PATH:

```
PATH="/path/to/cli/checkout/.databricks:$PATH"
```
2023-10-27 10:50:41 +00:00
Arpit Jasapara 24cc67563e
Support Unity Catalog Registered Models in bundles (#846)
## Changes
<!-- Summary of your changes that are easy to understand -->
Add UC Registered Models support to Databricks Asset Bundles as new
resource `registered_model`. Also added UC Permission support via new
resource `grant`.

## Tests
<!-- How is this tested? -->
Tested via unit tests and manual testing with [example
PR](https://github.com/databricks/bundle-examples-internal/pull/80) and
[custom Terraform
provider](https://github.com/databricks/terraform-provider-databricks/pull/2771).
<img width="698" alt="Screenshot 2023-10-08 at 4 57 23 PM"
src="https://github.com/databricks/cli/assets/87999496/bcf605a9-7894-443b-865a-f7e240037815">
<img width="1109" alt="Screenshot 2023-10-08 at 4 56 47 PM"
src="https://github.com/databricks/cli/assets/87999496/e4d6e424-cd70-4809-8843-6939ed2e172f">
<img width="1091" alt="Screenshot 2023-10-08 at 4 56 57 PM"
src="https://github.com/databricks/cli/assets/87999496/88ebaabb-67db-4a11-88a5-df087e2e41c0">

---------

Signed-off-by: Arpit Jasapara <arpit.jasapara@databricks.com>
Co-authored-by: Andrew Nester <andrew.nester.dev@gmail.com>
Co-authored-by: Pieter Noordhuis <pieter.noordhuis@databricks.com>
2023-10-16 15:32:49 +00:00
Pieter Noordhuis 82e733d32f
goreleaser deprecated --rm-dist in favor of --clean (#349)
See https://goreleaser.com/deprecations#-rm-dist.

Observed in goreleaser step in
https://github.com/databricks/bricks/actions/runs/4752794591/jobs/8443579583.
2023-04-20 11:59:34 +02:00
Serge Smertin 3d3b722eda updated dependencies 2022-05-14 19:56:09 +02:00
Serge Smertin 15fd93a012 Initial commit 2022-05-13 15:30:22 +02:00