Skip to content

Commit .codegen/cli.json gzipped to keep it under 1MB - #7250

Open
janniklasrose wants to merge 3 commits into
mainfrom
janniklasrose/gzip-cli-json
Open

janniklasrose wants to merge 3 commits into
mainfrom
janniklasrose/gzip-cli-json

Conversation

@janniklasrose

Copy link
Copy Markdown
Member

Changes

  • generate-clijson-post gzips genkit's .codegen/cli.json in place (gzip -9 -n), so both generate-clijson and the SDK bumper produce .codegen/cli.json.gz.
  • Readers decompress in memory: new clijson.ReadFile (used by clijson.Parse and the cligen test) and gzip.decompress in generate_apitypes.py / generate_resources.py.
  • Paths updated in Taskfile.yml, update-schema-docs.yml, the cligen default --input, tests, .codegen/.gitattributes and agent docs.

Why

cli.json is 9.7MB; gzipped it is 864KB. Nobody reviews its diff, so committing it as an opaque blob costs nothing in review. Trade-off: gzip blobs don't delta in git, so each spec bump adds ~0.85MB to history instead of a small text delta.

Tests

  • go test ./internal/cligen/... ./internal/clijson/... pass.
  • task generate-cligen and task generate-direct against the .gz produce byte-identical output.
  • Not run locally: bundle/internal/schema tests and task checks, because the Databricks Go proxy currently blocks golang.org/x/net v0.62.0 (published 1 day ago). Relying on CI for these.

This pull request and its description were written by Isaac.

genkit writes plain .codegen/cli.json; generate-clijson-post now gzips it
in place. The Go (clijson.ReadFile) and Python readers decompress it in
memory.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added the DABs DABs related issues label Oct 29, 2026
janniklasrose and others added 2 commits October 29, 2026 15:40
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@janniklasrose
janniklasrose requested a review from denik October 29, 2026 14:45
@janniklasrose
janniklasrose marked this pull request as ready for review October 29, 2026 14:45
@janniklasrose
janniklasrose requested review from a team as code owners October 29, 2026 14:46
@denik

denik commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

just an idea, what if we broken it down instead?

schemas/agentbricks.json
schemas/agentkit.json
....
commands/agentbricks.json
commands/agentkit.json

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: e26e7c6

Run: 40894383735

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 281 15 5:27
✅​ aws-windows-latest-4core-16gb 283 13 3:47
✅​ azure linux-2core-8gb 280 15 5:17
✅​ azure-windows-latest-4core-16gb 282 13 5:16
✅​ gcp linux-2core-8gb 281 15 5:53
✅​ gcp-windows-latest-4core-16gb 283 13 3:36
Top 6 slowest tests (at least 2 minutes):
duration env testname
5:08 azure-windows-latest-4core-16gb TestAccept
4:05 gcp linux-2core-8gb TestAccept
3:53 azure linux-2core-8gb TestAccept
3:48 aws linux-2core-8gb TestAccept
3:42 aws-windows-latest-4core-16gb TestAccept
3:32 gcp-windows-latest-4core-16gb TestAccept

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

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants