Skip to content

Commit 3fe720c

Browse files
janniklasroseIsaac
andauthored
Run generate-clijson cleanup via dedicated generate-clijson-post task (#6924)
**Human TL;DR:** move deterministic post cli.json generation steps into a separate `generate-clijson-post` Task. Preparation for SDK auto-bumper which runs `genkit` instead of `task generate-clijson`. --- ## Changes Relocate the post-`genkit update-sdk` cleanup for `generate-clijson` out of the step into a separate `generate-clijson-post` step. ## Why SDK bumper will not run `task generate-clijson` but `genkit` directly. The CLI-specific cleanup can be triggered separately. This pull request and its description were written by Isaac. --------- Co-authored-by: Isaac <no-reply@databricks.com>
1 parent ef609ea commit 3fe720c

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

‎Taskfile.yml‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,11 +887,22 @@ tasks:
887887
--dir "{{.ROOT_DIR}}" \
888888
--openapi-spec-file "$BUILD_DIR/universe/bazel-bin/openapi/all-internal.json" \
889889
--openapi-spec-sha "$OPENAPI_SHA"
890+
# The SDK-version consistency check runs here for fast feedback when
891+
# generate-clijson is invoked manually. Cleanup of genkit's output is
892+
# delegated to generate-clijson-post so the SDK bumper can reuse it.
893+
- go test -timeout 240s -run TestConsistentDatabricksSdkVersion github.com/databricks/cli/internal/build
894+
- task: generate-clijson-post
895+
896+
# Post-processing for genkit's `update-sdk` output, factored out of
897+
# generate-clijson so the SDK bumper can run the same cleanup after its own
898+
# update-sdk invocation.
899+
generate-clijson-post:
900+
desc: Clean up genkit update-sdk output (shared by generate-clijson and the SDK bumper)
901+
cmds:
890902
# genkit also writes .gitattributes, but that file is owned by
891903
# generate-cligen (which derives it from .gitattributes.manual plus the
892904
# rendered file list), so discard genkit's copy.
893905
- git checkout -- .gitattributes
894-
- go test -timeout 240s -run TestConsistentDatabricksSdkVersion github.com/databricks/cli/internal/build
895906
- rm .github/workflows/next-changelog.yml
896907
- mv tagging.py internal/genkit/tagging.py
897908
- mv tagging.py.lock internal/genkit/tagging.py.lock

0 commit comments

Comments
 (0)