Repository navigation
Commit .codegen/cli.json gzipped to keep it under 1MB - #7250
Open
janniklasrose wants to merge 3 commits into
Open
janniklasrose wants to merge 3 commits into
janniklasrose wants to merge 3 commits into
Conversation
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>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
|
just an idea, what if we broken it down instead? schemas/agentbricks.json |
Collaborator
Integration test reportCommit: e26e7c6
Top 6 slowest tests (at least 2 minutes):
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
generate-clijson-postgzips genkit's.codegen/cli.jsonin place (gzip -9 -n), so bothgenerate-clijsonand the SDK bumper produce.codegen/cli.json.gz.clijson.ReadFile(used byclijson.Parseand the cligen test) andgzip.decompressingenerate_apitypes.py/generate_resources.py.Taskfile.yml,update-schema-docs.yml, the cligen default--input, tests,.codegen/.gitattributesand 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-cligenandtask generate-directagainst the.gzproduce byte-identical output.bundle/internal/schematests andtask checks, because the Databricks Go proxy currently blocksgolang.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.