Skip to content

Commit 3c622e9

Browse files
authored
Replace Makefile with Taskfile.yml and move all generation-related logic there (#5050)
Each task describes inputs (sources) and outputs as precise as possible. The tasks mostly match what we had in Makefile but slightly more consistent approach: - All go related tasks (tidy, lint, test) now have 3 subtasks for each submodule (root, tools, codegen) which are aggregated into main one. Previously we did not run tests & linters for tools and codegen modules. - The targets that use lintdiff.py to do incremental run have -q suffix (old fmtfull -> new fmt, old fmt -> new fmt-q). - generate:genkit is task that runs genkit + follow ups. “generate” is aggregate over all generation work. This also consolidates all knowledge about generation in one place: - tools/post-process.sh is removed, the followup commands are now part of generate:genkit task - testmask no longer contains of dependencies of CI targets, it reads those from Taskfile.yml The runner ([go-task](https://github.com/go-task/task)) is packaged as a go tool, no installation need. Shortcut ./task is available to run it. Makefile is temporarily a wrapper that calls ./task. This enables caching - go-task will only re-run if sources changed. This helps when checking after agent work - if they did run linters / tests already, then running ./task is very quick. ``` ~/work/cli-trees/task-file % time ./task … ./task 612.63s user 310.22s system 726% cpu 2:06.95 total ``` ``` ~/work/cli-trees/task-file % time ./task … ./task 2.43s user 10.58s system 133% cpu 9.727 total ``` Additionally, all golangci-lint tasks are fixed to use per-worktree & per-submodule tmp directory, which enables parallel runs within worktree and across worktrees.
1 parent 4ad6ba3 commit 3c622e9

30 files changed

Lines changed: 1772 additions & 569 deletions

File tree

.agent/rules/auto-generated-files.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,33 +64,34 @@ Files matching this rule's glob pattern are most likely generated artifacts. Aut
6464

6565
### Core generation commands
6666

67+
- Everything, in one shot:
68+
- `./task generate` — aggregator that runs all generators below
6769
- OpenAPI SDK/CLI command stubs and related generated artifacts:
68-
- `make generate`
69-
- Includes generated `cmd/account/**`, `cmd/workspace/**`, `.gitattributes`, `internal/genkit/tagging.py`, and direct engine refresh.
70+
- `./task generate-genkit`
71+
- Includes generated `cmd/account/**`, `cmd/workspace/**`, `.gitattributes`, `internal/genkit/tagging.py`.
7072
- Direct engine generated YAML:
71-
- `make generate-direct` (or `make generate-direct-apitypes`, `make generate-direct-resources`)
73+
- `./task generate-direct` (or `./task generate-direct-apitypes`, `./task generate-direct-resources`)
7274
- Bundle schemas:
73-
- `make schema`
74-
- `make schema-for-docs`
75+
- `./task generate-schema`
76+
- `./task generate-schema-docs`
7577
- This can also refresh `bundle/internal/schema/annotations_openapi.yml` when OpenAPI annotation extraction is enabled.
7678
- Bundle docs:
77-
- `make docs`
79+
- `./task generate-docs`
7880
- Validation generated code:
79-
- `make generate-validation`
81+
- `./task generate-validation`
8082
- Mock files:
8183
- `go run github.com/vektra/mockery/v2@b9df18e0f7b94f0bc11af3f379c8a9aea1e1e8da`
8284
- Python bundle codegen:
83-
- `make -C python codegen`
85+
- `./task pydabs-codegen`
8486

8587
### Acceptance and test generated outputs
8688

8789
**RULE: Do not hand-edit acceptance outputs.** Exception: rare, intentional mass replacement when explicitly justified by repo guidance.
8890

8991
Regeneration commands:
9092

91-
- `make test-update`
92-
- `make test-update-templates` (templates only)
93-
- `make generate-out-test-toml` (only `out.test.toml`)
93+
- `./task test-update`
94+
- `./task test-update-templates` (templates only)
9495

9596
Typical generated files:
9697

.agent/rules/testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ Available on `PATH` during test execution (from `acceptance/bin/`):
134134

135135
### Update workflow
136136

137-
**RULE: Run `make test-update` to regenerate outputs, then `make fmt` and `make lint`.** If fmt or lint modify files in `acceptance/`, there's an issue in the source files. Fix the source, regenerate, and verify fmt/lint pass cleanly.
137+
**RULE: Run `./task test-update` to regenerate outputs, then `./task fmt` and `./task lint`.** If fmt or lint modify files in `acceptance/`, there's an issue in the source files. Fix the source, regenerate, and verify fmt/lint pass cleanly.
138138

139139
### Template tests
140140

141141
Tests in `acceptance/bundle/templates` include materialized templates in output directories. These directories follow the same `out` convention: everything starting with `out` is generated output. Sources are in `libs/template/templates/`.
142142

143-
**RULE: Use `make test-update-templates` to regenerate materialized templates.** If linters or formatters find issues in materialized templates, do not fix the output files; fix the source in `libs/template/templates/` and regenerate.
143+
**RULE: Use `./task test-update-templates` to regenerate materialized templates.** If linters or formatters find issues in materialized templates, do not fix the output files; fix the source in `libs/template/templates/` and regenerate.

.agent/skills/pr-checklist/SKILL.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@ name: pr-checklist
33
description: Checklist to run before submitting a PR
44
---
55

6-
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.
6+
Before submitting a PR, run these commands to match what CI checks. CI uses the full variants (not the `-q` diff-only wrappers), so `./task lint-q` alone is insufficient.
77

88
```bash
9-
# 1. Formatting and checks (CI runs fmtfull, not fmt)
10-
make fmtfull
11-
make checks
9+
# 1. Formatting and checks (CI runs fmt, not fmt-q)
10+
./task fmt
11+
./task checks
1212

13-
# 2. Linting (CI runs full golangci-lint, not the diff-only wrapper)
14-
make lintfull
13+
# 2. Linting (CI runs full golangci-lint across all modules, not the diff-only wrapper)
14+
./task lint
1515

1616
# 3. Tests (CI runs with both deployment engines)
17-
make test
17+
./task test
1818

1919
# 4. If you changed bundle config structs or schema-related code:
20-
make schema
20+
./task generate-schema
2121

2222
# 5. If you changed files in python/:
23-
cd python && make codegen && make test && make lint && make docs
23+
./task pydabs-codegen pydabs-test pydabs-lint pydabs-docs
2424

2525
# 6. If you changed experimental/aitools or experimental/ssh:
26-
make test-exp-aitools # only if aitools code changed
27-
make test-exp-ssh # only if ssh code changed
26+
./task test-exp-aitools # only if aitools code changed
27+
./task test-exp-ssh # only if ssh code changed
2828
```
2929

3030
## Final cleanup scan

.claude/settings.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
{
22
"permissions": {
33
"allow": [
4-
"Bash(make lint:*)",
5-
"Bash(make lintfull:*)",
6-
"Bash(make fmt:*)",
7-
"Bash(make test:*)",
8-
"Bash(make checks:*)",
9-
"Bash(make build:*)",
10-
"Bash(make cover:*)",
11-
"Bash(make schema:*)",
12-
"Bash(make docs:*)",
13-
"Bash(make test-update:*)",
14-
"Bash(make test-update-templates:*)",
15-
"Bash(make ws:*)",
4+
"Bash(./task *)",
165
"Bash(go test:*)",
176
"Bash(go build:*)",
187
"Bash(go vet:*)",

.codegen.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
"toolchain": {
1313
"required": [
1414
"go"
15-
],
16-
"post_generate": [
17-
"./tools/post-generate.sh"
1815
]
1916
}
2017
}

.github/actions/setup-build-environment/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ runs:
3838
version: "0.8.9"
3939

4040
- name: Install Python versions for tests
41-
run: make install-pythons
41+
run: ./task install-pythons
4242
shell: bash
4343

4444
- name: Install ruff (Python linter and formatter)

.github/workflows/check.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,26 @@ jobs:
3636
run: git diff --exit-code
3737

3838
- name: Run Go lint checks (does not include formatting checks)
39-
run: go tool -modfile=tools/go.mod golangci-lint run --timeout=15m
39+
run: ./task lint
4040

4141
- name: Run ruff (Python linter and formatter)
4242
uses: astral-sh/ruff-action@0ce1b0bf8b818ef400413f810f8a11cdbda0034b # v4.0.0
4343
with:
4444
version: "0.9.1"
4545
args: "format --check"
4646

47-
- name: "make fmtfull: Python and Go formatting"
47+
- name: Install uv
48+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
49+
with:
50+
version: "0.8.9"
51+
52+
- name: "task fmt: Python and Go formatting"
4853
# Python formatting is already checked above, but this also checks Go and YAML formatting
49-
# and verifies that the make command works correctly
5054
run: |
51-
make fmtfull
55+
./task fmt
5256
git diff --exit-code
5357
54-
- name: "make checks: custom checks outside of fmt and lint"
58+
- name: "task checks: custom checks outside of fmt and lint"
5559
run: |-
56-
make checks
60+
./task checks
5761
git diff --exit-code

.github/workflows/push.yml

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777

7878
# Only run if the target is in the list of targets from testmask
7979
if: ${{ contains(fromJSON(needs.testmask.outputs.targets), 'test') }}
80-
name: "make test (${{matrix.os.name}}, ${{matrix.deployment}})"
80+
name: "task test (${{matrix.os.name}}, ${{matrix.deployment}})"
8181
runs-on: ${{ matrix.os.runner }}
8282

8383
permissions:
@@ -137,23 +137,23 @@ jobs:
137137
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' || github.event_name == 'schedule' }}
138138
env:
139139
ENVFILTER: DATABRICKS_BUNDLE_ENGINE=${{ matrix.deployment }}
140-
run: make test
140+
run: ./task test
141141

142142
- name: Run tests with coverage
143-
# Only run 'make cover' on push to main to make sure it does not get broken.
143+
# Only run 'task cover' on push to main to make sure it does not get broken.
144144
if: ${{ github.event_name == 'push' }}
145145
env:
146146
ENVFILTER: DATABRICKS_BUNDLE_ENGINE=${{ matrix.deployment }}
147-
run: make cover
147+
run: ./task cover
148148

149149
- name: Analyze slow tests
150-
run: make slowest
150+
run: ./task slowest
151151

152152
- name: Check out.test.toml files are up to date
153153
shell: bash
154154
run: |
155155
if ! git diff --exit-code; then
156-
echo "ERROR: detected changed files in the repository; Most likely you have out.test.toml files that are out of date. Run 'make generate-out-test-toml' to update."
156+
echo "ERROR: detected changed files in the repository; Most likely you have out.test.toml files that are out of date. Run 'go test ./acceptance -run \"^TestAccept$\" -only-out-test-toml' to update."
157157
exit 1
158158
fi
159159
@@ -164,7 +164,7 @@ jobs:
164164

165165
# Only run if the target is in the list of targets from testmask
166166
if: ${{ contains(fromJSON(needs.testmask.outputs.targets), 'test-exp-aitools') }}
167-
name: "make test-exp-aitools (${{matrix.os.name}})"
167+
name: "task test-exp-aitools (${{matrix.os.name}})"
168168
runs-on: ${{ matrix.os.runner }}
169169

170170
permissions:
@@ -201,7 +201,7 @@ jobs:
201201

202202
- name: Run tests
203203
run: |
204-
make test-exp-aitools
204+
./task test-exp-aitools
205205
206206
test-exp-ssh:
207207
needs:
@@ -210,7 +210,7 @@ jobs:
210210

211211
# Only run if the target is in the list of targets from testmask
212212
if: ${{ contains(fromJSON(needs.testmask.outputs.targets), 'test-exp-ssh') }}
213-
name: "make test-exp-ssh (${{matrix.os.name}})"
213+
name: "task test-exp-ssh (${{matrix.os.name}})"
214214
runs-on: ${{ matrix.os.runner }}
215215

216216
permissions:
@@ -246,7 +246,7 @@ jobs:
246246

247247
- name: Run tests
248248
run: |
249-
make test-exp-ssh
249+
./task test-exp-ssh
250250
251251
test-pipelines:
252252
needs:
@@ -255,7 +255,7 @@ jobs:
255255

256256
# Only run if the target is in the list of targets from testmask
257257
if: ${{ contains(fromJSON(needs.testmask.outputs.targets), 'test-pipelines') }}
258-
name: "make test-pipelines (${{matrix.os.name}})"
258+
name: "task test-pipelines (${{matrix.os.name}})"
259259
runs-on: ${{ matrix.os.runner }}
260260

261261
permissions:
@@ -291,7 +291,7 @@ jobs:
291291

292292
- name: Run tests
293293
run: |
294-
make test-pipelines
294+
./task test-pipelines
295295
296296
# This job groups the result of all the above test jobs.
297297
# It is a required check, so it blocks auto-merge and the merge queue.
@@ -340,15 +340,15 @@ jobs:
340340
341341
- name: Verify that the schema is up to date
342342
run: |
343-
if ! ( make schema && git diff --exit-code ); then
344-
echo "The schema is not up to date. Please run 'make schema' and commit the changes."
343+
if ! ( ./task --force generate-schema && git diff --exit-code ); then
344+
echo "The schema is not up to date. Please run './task generate-schema' and commit the changes."
345345
exit 1
346346
fi
347347
348348
- name: Verify that the generated enum and required fields are up to date
349349
run: |
350-
if ! ( make generate-validation && git diff --exit-code ); then
351-
echo "The generated enum and required fields are not up to date. Please run 'make generate-validation' and commit the changes."
350+
if ! ( ./task --force generate-validation && git diff --exit-code ); then
351+
echo "The generated enum and required fields are not up to date. Please run './task generate-validation' and commit the changes."
352352
exit 1
353353
fi
354354
@@ -360,18 +360,22 @@ jobs:
360360
- name: Checkout
361361
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
362362

363+
- name: Setup Go
364+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
365+
with:
366+
go-version-file: go.mod
367+
363368
- name: Install uv
364369
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
365370
with:
366371
version: "0.6.5"
367372

368373
- name: Verify that python/codegen is up to date
369-
working-directory: python
370374
run: |-
371-
make codegen
375+
./task pydabs-codegen
372376
373377
if ! ( git diff --exit-code ); then
374-
echo "Generated Python code is not up-to-date. Please run 'pushd python && make codegen' and commit the changes."
378+
echo "Generated Python code is not up-to-date. Please run './task pydabs-codegen' and commit the changes."
375379
376380
exit 1
377381
fi

.github/workflows/python_push.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,19 @@ jobs:
3232
- name: Checkout repository and submodules
3333
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3434

35+
- name: Setup Go
36+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
37+
with:
38+
go-version-file: go.mod
39+
3540
- name: Install uv
3641
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
3742
with:
3843
python-version: ${{ matrix.pyVersion }}
3944
version: "0.6.5"
4045

4146
- name: Run tests
42-
working-directory: python
43-
run: make test
47+
run: ./task pydabs-test
4448

4549
python_linters:
4650
name: lint
@@ -50,14 +54,18 @@ jobs:
5054
- name: Checkout repository and submodules
5155
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5256

57+
- name: Setup Go
58+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
59+
with:
60+
go-version-file: go.mod
61+
5362
- name: Install uv
5463
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
5564
with:
5665
version: "0.6.5"
5766

5867
- name: Run lint
59-
working-directory: python
60-
run: make lint
68+
run: ./task pydabs-lint
6169

6270
python_docs:
6371
name: docs
@@ -67,11 +75,15 @@ jobs:
6775
- name: Checkout repository and submodules
6876
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6977

78+
- name: Setup Go
79+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
80+
with:
81+
go-version-file: go.mod
82+
7083
- name: Install uv
7184
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
7285
with:
7386
version: "0.6.5"
7487

7588
- name: Run docs
76-
working-directory: python
77-
run: make docs
89+
run: ./task pydabs-docs

.github/workflows/release-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ jobs:
172172

173173
- name: Build wheel
174174
working-directory: python
175-
run: make build
175+
run: |
176+
rm -rf build dist
177+
uv build .
176178
177179
- name: Upload Python wheel
178180
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0

0 commit comments

Comments
 (0)