Visitar URL original
Run generate-clijson cleanup via .codegen.json post_generate by janniklasrose · Pull Request #6924 · databricks/cli · GitHub
Skip to content

Run generate-clijson cleanup via .codegen.json post_generate - #6924

Open
janniklasrose wants to merge 5 commits into
mainfrom
janniklasrose/codegen-post-generate
Open

janniklasrose wants to merge 5 commits into
mainfrom
janniklasrose/codegen-post-generate

Conversation

@janniklasrose

@janniklasrose janniklasrose commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Human TL;DR: move deterministic post cli.json generation steps into .codegen.json. Preparation for SDK auto-bumper which runs genkit instead of task.


Changes

Relocate the post-genkit update-sdk cleanup for generate-clijson out of the
Taskfile.yml steps and into .codegen.json's toolchain.post_generate:
restore .gitattributes, relocate the tagging scripts, rewrite and format
.github/workflows/tagging.yml, remove the unused next-changelog.yml, and
scrub the internal PyPI-proxy URL from the genkit *.py.lock files. The
SDK-version consistency check stays in the Taskfile for faster local feedback.

Why

Running the cleanup through toolchain.post_generate makes genkit update-sdk
perform it for every caller, not just ./task generate-clijson. An automated
SDK updater invokes genkit directly rather than through the Taskfile, so the
cleanup has to travel with the generator. Requires genkit to execute
toolchain.post_generate after writing the generated files.

Tests

Relocation only — the cleanup commands are unchanged (visible in the diff).
.codegen.json is valid JSON; Taskfile.yml parses and is yamlfmt-clean.
These hooks run during genkit update-sdk (exercised locally via
generate-clijson), which is not part of CI, so the generated-artifact checks
are unaffected.

This pull request and its description were written by Isaac.

Relocate the post-`genkit update-sdk` cleanup (restore .gitattributes, relocate
the tagging scripts, rewrite and format tagging.yml, drop the unused
next-changelog.yml, scrub internal proxy URLs from the genkit *.py.lock files)
from the generate-clijson Taskfile steps into .codegen.json's
toolchain.post_generate, so genkit performs it for every update-sdk caller
rather than only `./task generate-clijson`.

The SDK-version consistency check stays in the Taskfile for faster feedback when
running generate-clijson manually.

Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 97d5425

Run: 37955493181

Env 🔄​flaky ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 276 16 4:22
✅​ aws-windows-latest-4core-16gb 278 14 4:00
✅​ azure linux-2core-8gb 275 16 4:14
🔄​ azure-windows-latest-4core-16gb 1 276 14 6:11
✅​ gcp linux-2core-8gb 276 16 4:19
✅​ gcp-windows-latest-4core-16gb 278 14 3:37
Test Name azure-windows-latest-4core-16gb
🔄​ TestAccept 🔄​f
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:58 aws-windows-latest-4core-16gb TestAccept
3:36 gcp-windows-latest-4core-16gb TestAccept
2:46 azure-windows-latest-4core-16gb TestAccept

@janniklasrose
janniklasrose requested a review from pietern October 5, 2026 11:26
@janniklasrose
janniklasrose marked this pull request as ready for review October 5, 2026 11:26
@janniklasrose
janniklasrose requested a review from a team as a code owner October 5, 2026 11:26
Comment thread .codegen.json Outdated
"mv tagging.py.lock internal/genkit/tagging.py.lock",
"if [ \"$(uname)\" = \"Darwin\" ]; then sed -i '' 's|tagging.py|internal/genkit/tagging.py|g' .github/workflows/tagging.yml; else sed -i 's|tagging.py|internal/genkit/tagging.py|g' .github/workflows/tagging.yml; fi",
"if [ \"$(uname)\" = \"Darwin\" ]; then sed -i '' 's|https://pypi-proxy.cloud.databricks.com/simple/\\{0,1\\}|https://pypi.org/simple|g' internal/genkit/*.py.lock; else sed -i 's|https://pypi-proxy.cloud.databricks.com/simple/\\{0,1\\}|https://pypi.org/simple|g' internal/genkit/*.py.lock; fi",
"go tool -modfile=tools/go.mod yamlfmt .github/workflows/tagging.yml"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had it here before and moved it to Taskfile. I'd rather we keep using taskfile, because here you can reference other tasks.

Can we teach SDK auto-bumper to call task or recursively call ./task post-generate here?

janniklasrose and others added 3 commits October 9, 2026 15:06
Instead of running the post-`genkit update-sdk` cleanup from .codegen.json's toolchain.post_generate, keep it in the Taskfile as a dedicated generate-clijson-post task that generate-clijson references at the end. The SDK bumper can then invoke the same cleanup after its own update-sdk run.

The cleanup steps (restore .gitattributes, drop next-changelog.yml, relocate the tagging scripts, rewrite and format tagging.yml, scrub internal proxy URLs from the genkit *.py.lock files) and the trailing 'ws' whitespace step all move into the new task. The SDK-version consistency check stays inline in generate-clijson for faster feedback when run manually.

Co-authored-by: Isaac <no-reply@databricks.com>
…ate' into janniklasrose/codegen-post-generate
@janniklasrose
janniklasrose requested a review from denik October 9, 2026 16:09

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants