Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move bundle schema update to an internal module #1012

Merged
merged 15 commits into from
Dec 6, 2023

Conversation

shreyas-goenka
Copy link
Contributor

@shreyas-goenka shreyas-goenka commented Nov 27, 2023

Changes

This PR:

  1. Move code to load bundle JSON Schema descriptions from the OpenAPI spec to an internal Go module
  2. Remove command line flags from the bundle schema command. These flags were meant for internal processes and at no point were meant for customer use.
  3. Regenerate bundle_descriptions.json
  4. Add support for bundle: "deprecated". The environments field is tagged as deprecated in this PR and consequently will no longer be a part of the bundle schema.

Tests

Tested by regenerating the CLI against its current OpenAPI spec (as defined in __openapi_sha). The bundle_descriptions.json in this PR was generated from the code generator.

Manually checked that the autocompletion / descriptions from the new bundle schema are correct.

@shreyas-goenka shreyas-goenka marked this pull request as ready for review November 27, 2023 13:33
@shreyas-goenka shreyas-goenka changed the title Make command for bundle descriptions update an internal module Move bundle schema update to an internal module Nov 27, 2023
.codegen.json Show resolved Hide resolved
.gitattributes Show resolved Hide resolved
bundle/internal/bundle/schema/go.mod Outdated Show resolved Hide resolved
@@ -36,30 +51,45 @@
}
}
},
"targets": {
"environments": {
Copy link
Contributor

Choose a reason for hiding this comment

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

What happened here? It looks like the environments block got reinstated with empty docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is expected. enviroments was renamed to -> targets here manually https://github.com/databricks/cli/pull/670/files#diff-2b39aa846db6105db22d39143a8474f599cd77a4085521636c97f0949a82f73a

Generating the docs manually from the bundle Go struct also generated docs for for enviroments. However this does not make a difference for the final generated enviroments schema.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please mask it out. I'd rather have a squiggly line on environments than valid autocompletion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. I have marked enviroments as "deprecated". From this point onwards it will not generated as part of the bundle schema.

github-merge-queue bot pushed a commit that referenced this pull request Nov 29, 2023
## Changes

Introduced in #1007 but doesn't work well yet. This will be automated
again as part of #1012.
github-merge-queue bot pushed a commit that referenced this pull request Nov 30, 2023
…Databricks OpenAPI specification (#1033)

## Changes
This PR adds documentation for positional arguments in commands that are
generated from the openapi spec.

Note: the changes to `.gitattributes` will be revert / properly fixed in
#1012
Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

Please TAL at the comment in the environments thread.

@shreyas-goenka shreyas-goenka added this pull request to the merge queue Dec 6, 2023
Merged via the queue into main with commit 6002f49 Dec 6, 2023
4 checks passed
@shreyas-goenka shreyas-goenka deleted the make-docs-internal branch December 6, 2023 10:51
andrewnester added a commit that referenced this pull request Dec 6, 2023
CLI:
 * Add documentation for positional args in commands generated from the Databricks OpenAPI specification ([#1033](#1033)).
 * Ask for host when .databrickscfg doesn't exist ([#1041](#1041)).
 * Add list of supported values for flags that represent an enum field ([#1036](#1036)).

Bundles:
 * Fix panic when bundle auth resolution fails ([#1002](#1002)).
 * Add versioning for bundle templates ([#972](#972)).
 * Add support for conditional prompting in bundle init ([#971](#971)).
 * Pass parameters to task when run with `--python-params` and `python_wheel_wrapper` is true ([#1037](#1037)).
 * Change default_python template to auto-update version on each wheel build ([#1034](#1034)).

Internal:
 * Rewrite the friendly log handler ([#1038](#1038)).
 * Move bundle schema update to an internal module ([#1012](#1012)).

Dependency updates:
 * Bump github.com/databricks/databricks-sdk-go from 0.26.0 to 0.26.1 ([#1040](#1040)).
@andrewnester andrewnester mentioned this pull request Dec 6, 2023
github-merge-queue bot pushed a commit that referenced this pull request Dec 6, 2023
CLI:
* Add documentation for positional args in commands generated from the
Databricks OpenAPI specification
([#1033](#1033)).
* Ask for host when .databrickscfg doesn't exist
([#1041](#1041)).
* Add list of supported values for flags that represent an enum field
([#1036](#1036)).

Bundles:
* Fix panic when bundle auth resolution fails
([#1002](#1002)).
* Add versioning for bundle templates
([#972](#972)).
* Add support for conditional prompting in bundle init
([#971](#971)).
* Pass parameters to task when run with `--python-params` and
`python_wheel_wrapper` is true
([#1037](#1037)).
* Change default_python template to auto-update version on each wheel
build ([#1034](#1034)).

Internal:
* Rewrite the friendly log handler
([#1038](#1038)).
* Move bundle schema update to an internal module
([#1012](#1012)).


Dependency updates:
* Bump github.com/databricks/databricks-sdk-go from 0.26.0 to 0.26.1
([#1040](#1040)).
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.

2 participants