You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+50-2Lines changed: 50 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,9 @@ Use modern idiomatic Golang features (version 1.24+). Specifically:
94
94
- Use for-range for integer iteration where possible. Instead of for i:=0; i < X; i++ {} you must write for i := range X{}.
95
95
- Use builtin min() and max() where possible (works on any type and any number of values).
96
96
- Do not capture the for-range variable, since go 1.22 a new copy of the variable is created for each loop iteration.
97
+
- Use empty struct types for context keys: `type myKeyType struct{}` (not `int`).
98
+
- Define magic strings as named constants at the top of the file.
99
+
- When integrating external tools or detecting environment variables, include source reference URLs as comments so they can be traced later.
97
100
98
101
### Configuration Patterns
99
102
- Bundle config uses `dyn.Value` for dynamic typing
@@ -147,6 +150,8 @@ Notice that:
147
150
When writing tests, please don't include an explanation in each
148
151
test case in your responses. I am just interested in the tests.
149
152
153
+
Use table-driven tests when testing multiple similar cases (e.g., different inputs producing different outputs). Reviewers prefer this pattern over repeating near-identical test functions.
154
+
150
155
### Acceptance Tests
151
156
152
157
- Located in `acceptance/` with nested directory structure.
@@ -176,6 +181,7 @@ test case in your responses. I am just interested in the tests.
176
181
-`diff.py DIR1 DIR2` or `diff.py FILE1 FILE2` — recursive diff with test replacements applied.
177
182
-`print_state.py [-t TARGET] [--backup]` — print deployment state (terraform or direct).
178
183
-`edit_resource.py TYPE ID < script.py` — fetch resource by ID, execute Python on it (resource in `r`), then update it. TYPE is `jobs` or `pipelines`.
184
+
-`gron.py` — flatten JSON into greppable discrete assignments (simpler than `jq` for searching JSON).
179
185
-`jq` is also available for JSON processing.
180
186
181
187
**Update workflow**: Run `make test-update` to regenerate outputs. Then run `make fmt` and `make lint` — if these modify files in `acceptance/`, there's an issue in source files. Fix the source, regenerate, and verify lint/fmt pass cleanly.
Always output file path with forward slashes, even on Windows, so that acceptance test output is stable between OSes. Use filepath.ToSlash for this.
216
+
209
217
# Specific File Guides
210
218
211
219
## databricks_template_schema.json
@@ -279,7 +287,47 @@ Notice that:
279
287
280
288
# Development Tips
281
289
282
-
- Run `make checks fmt lint` before committing
283
290
- Use `make test-update` to regenerate acceptance test outputs after changes
284
291
- The CLI binary supports both `databricks` and `pipelines` command modes based on executable name
285
-
- Resource definitions in `bundle/config/resources/` are auto-generated from OpenAPI specs
292
+
- Comments should explain "why", not "what" — reviewers consistently reject comments that merely restate the code
293
+
294
+
# Pre-PR Checklist
295
+
296
+
Before submitting a PR, run these commands to match what CI checks. CI uses the **full** variants (not the diff-only wrappers), so `make lint` alone is insufficient.
297
+
298
+
```bash
299
+
# 1. Formatting and checks (CI runs fmtfull, not fmt)
300
+
make fmtfull
301
+
make checks
302
+
303
+
# 2. Linting (CI runs full golangci-lint, not the diff-only wrapper)
304
+
make lintfull
305
+
306
+
# 3. Tests (CI runs with both deployment engines)
307
+
make test
308
+
309
+
# 4. If you changed bundle config structs or schema-related code:
310
+
make schema
311
+
312
+
# 5. If you changed files in python/:
313
+
cd python && make codegen && make test&& make lint && make docs
314
+
315
+
# 6. If you changed experimental/aitools or experimental/ssh:
316
+
make test-exp-aitools # only if aitools code changed
317
+
make test-exp-ssh # only if ssh code changed
318
+
```
319
+
320
+
321
+
# Common Mistakes
322
+
323
+
- Do NOT add dependencies without checking license compatibility.
324
+
- Do NOT use `os.Exit()` outside of `main.go`.
325
+
- Do NOT remove or skip failing tests to fix CI — fix the underlying issue.
326
+
- Do NOT leave debug print statements (`fmt.Println`, `log.Printf` for debugging) in committed code — always scrub before committing.
327
+
328
+
# Error Handling
329
+
330
+
- Wrap errors with context: `fmt.Errorf("failed to deploy %s: %w", name, err)`
331
+
- Use `logdiag.LogDiag` / `logdiag.LogError` for logging diagnostics.
332
+
- Return early on errors; avoid deeply nested if-else chains.
333
+
- Use `diag.Errorf` / `diag.Warningf` to create diagnostics with severity.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,15 @@
1
1
# Version changelog
2
2
3
+
## Release v0.288.0 (2026-02-12)
4
+
5
+
### Bundles
6
+
7
+
* Add support for task-level `compute` configuration with hardware accelerators (GPU_1xA10, GPU_8xH100) ([#4457](https://github.com/databricks/cli/pull/4457))
8
+
9
+
### Dependency updates
10
+
* Upgrade Go SDK to 0.104.0 and Terraform provider to 1.105.0 ([#4457](https://github.com/databricks/cli/pull/4457))
* Added support for UC external locations (direct mode only) ([#4484](https://github.com/databricks/cli/pull/4484))
7
+
* Log artifact build output in debug mode ([#4208](https://github.com/databricks/cli/pull/4208))
8
+
* Fix bundle init not working in Azure Government ([#4286](https://github.com/databricks/cli/pull/4286))
9
+
* engine/direct: Replace server_side_default with more precise backend_default rule in bundle plan ([#4490](https://github.com/databricks/cli/pull/4490))
10
10
11
11
### Dependency updates
12
-
13
-
### API Changes
12
+
* Upgrade Go SDK to v0.106.0 (([#4486](https://github.com/databricks/cli/pull/4486)))
13
+
* Upgrade Terraform provider to v1.106.0 (([#4542](https://github.com/databricks/cli/pull/4542)))
0 commit comments