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

Added bundle generate pipeline command #1139

Merged
merged 5 commits into from
Jan 25, 2024
Merged

Added bundle generate pipeline command #1139

merged 5 commits into from
Jan 25, 2024

Conversation

andrewnester
Copy link
Contributor

@andrewnester andrewnester commented Jan 22, 2024

Changes

Added bundle generate pipeline command

Usage as the following

databricks bundle generate pipeline --existing-pipeline-id f3b8c580-0a88-4b55-xxxx-yyyyyyyyyy

Tests

Manually + added E2E test

bundle/config/generate/pipeline.go Outdated Show resolved Hide resolved
bundle/config/generate/pipeline.go Outdated Show resolved Hide resolved
cmd/bundle/generate/utils.go Outdated Show resolved Hide resolved
cmd/bundle/generate/utils.go Outdated Show resolved Hide resolved
@andrewnester andrewnester requested a review from pietern January 23, 2024 13:11
@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2024

Codecov Report

Attention: 30 lines in your changes are missing coverage. Please review.

Comparison is base (1b62417) 49.50% compared to head (b280b5f) 51.23%.
Report is 9 commits behind head on main.

Files Patch % Lines
cmd/bundle/generate/pipeline.go 71.42% 12 Missing and 6 partials ⚠️
cmd/bundle/generate/utils.go 77.50% 7 Missing and 2 partials ⚠️
cmd/bundle/generate/job.go 0.00% 2 Missing ⚠️
cmd/bundle/generate.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1139      +/-   ##
==========================================
+ Coverage   49.50%   51.23%   +1.73%     
==========================================
  Files         281      291      +10     
  Lines       10713    16218    +5505     
==========================================
+ Hits         5303     8310    +3007     
- Misses       4846     7303    +2457     
- Partials      564      605      +41     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Nice work!

Aside from the e2e test, could you see if it is possible to also use the mocks for these commands? Would be easier to test and confirm everything still works.

cmd/bundle/generate/utils.go Show resolved Hide resolved
@andrewnester andrewnester requested a review from pietern January 24, 2024 12:04
@andrewnester andrewnester added this pull request to the merge queue Jan 25, 2024
Merged via the queue into main with commit f269f80 Jan 25, 2024
4 checks passed
@andrewnester andrewnester deleted the generate-pipeline branch January 25, 2024 11:39
pietern added a commit that referenced this pull request Jan 25, 2024
CLI:
 * Prompt for account profile only for account-level command execution instead of during `databricks labs install` flow ([#1128](#1128)).
 * Bring back `--json` flag for workspace-conf set-status command ([#1151](#1151)).

Bundles:
 * Set `run_as` permissions after variable interpolation ([#1141](#1141)).
 * Add functionality to visit values in `dyn.Value` tree ([#1142](#1142)).
 * Add `dynvar` package for variable resolution with a `dyn.Value` tree ([#1143](#1143)).
 * Add support for `anyOf` to `skip_prompt_if` ([#1133](#1133)).
 * Added `bundle generate pipeline` command ([#1139](#1139)).

Internal:
 * Use MockWorkspaceClient from SDK instead of WithImpl mocking ([#1134](#1134)).

Dependency updates:
 * Bump github.com/databricks/databricks-sdk-go from 0.29.0 to 0.29.1 ([#1137](#1137)).
 * Bump github.com/hashicorp/terraform-json from 0.20.0 to 0.21.0 ([#1138](#1138)).
 * Update actions/setup-go to v5 ([#1148](#1148)).
 * Update codecov/codecov-action to v3 ([#1149](#1149)).
 * Use latest patch release of Go toolchain ([#1152](#1152)).
@pietern pietern mentioned this pull request Jan 25, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jan 25, 2024
CLI:
* Prompt for account profile only for account-level command execution
instead of during `databricks labs install` flow
([#1128](#1128)).
* Bring back `--json` flag for workspace-conf set-status command
([#1151](#1151)).

Bundles:
* Set `run_as` permissions after variable interpolation
([#1141](#1141)).
* Add functionality to visit values in `dyn.Value` tree
([#1142](#1142)).
* Add `dynvar` package for variable resolution with a `dyn.Value` tree
([#1143](#1143)).
* Add support for `anyOf` to `skip_prompt_if`
([#1133](#1133)).
* Added `bundle generate pipeline` command
([#1139](#1139)).

Internal:
* Use MockWorkspaceClient from SDK instead of WithImpl mocking
([#1134](#1134)).

Dependency updates:
* Bump github.com/databricks/databricks-sdk-go from 0.29.0 to 0.29.1
([#1137](#1137)).
* Bump github.com/hashicorp/terraform-json from 0.20.0 to 0.21.0
([#1138](#1138)).
* Update actions/setup-go to v5
([#1148](#1148)).
* Update codecov/codecov-action to v3
([#1149](#1149)).
* Use latest patch release of Go toolchain
([#1152](#1152)).
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