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

Set metadata fields required to enable break-glass UI for jobs #880

Merged
merged 46 commits into from
Dec 19, 2023

Conversation

shreyas-goenka
Copy link
Contributor

@shreyas-goenka shreyas-goenka commented Oct 17, 2023

Changes

This PR sets the following fields for all jobs that are deployed from a DAB

  1. deployment: This provides the platform with the path to a file to read the metadata from.
  2. edit_mode: This tells the platform to display the break-glass UI for jobs deployed from a DAB. Setting this is required to re-lock the UI after a user clicks "disconnect from source".
  3. format = MULTI_TASK. This makes the Terraform provider always use jobs API 2.1 for creating/updating the job. Required because deployment and edit_mode are only available in API 2.1.

Tests

Unit test and manually. Manually verified that deployments trigger the break glass UI. Manually verified there is no Terraform drift when all three fields are set.

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.

LGTM, please confirm this API is available everywhere before merging.

@shreyas-goenka
Copy link
Contributor Author

shreyas-goenka commented Oct 27, 2023

We will wait on prod rollout for the API changes before merging this. Otherwise this would be a regression for existing customers due to terraform drift.

update: terraform drift is not an issue and is not triggered in regions where the API is not rolled out.

@shreyas-goenka
Copy link
Contributor Author

shreyas-goenka commented Dec 6, 2023

TODO: Also add edit_mode

update: done

@shreyas-goenka shreyas-goenka changed the title Add metadata path in jobs Set metadata fields required to enable break-glass UI for jobs Dec 19, 2023
@shreyas-goenka shreyas-goenka added this pull request to the merge queue Dec 19, 2023
Merged via the queue into main with commit 2d93f62 Dec 19, 2023
4 checks passed
@shreyas-goenka shreyas-goenka deleted the add-metadata-path-in-job branch December 19, 2023 07:43
shreyas-goenka added a commit that referenced this pull request Dec 20, 2023
CLI:
 * Upgrade Go SDK to 0.27.0 ([#1064](#1064)).
 * Skip profile resolution if `DATABRICKS_AUTH_TYPE` is set ([#1068](#1068)).
 * Test existing behavior when loading non-string spark conf values ([#1071](#1071)).
 * Do not allow input prompts in Git Bash terminal ([#1069](#1069)).
 * Added output template for list-secrets command ([#1074](#1074)).
 * Set metadata fields required to enable break-glass UI for jobs ([#880](#880)).
 * Revert using IsPromptSupported from promptOrAssignDefaultValues ([#1077](#1077)).
 * Do not prompt for template values in Git Bash ([#1082](#1082)).

Bundles:
 * **FILL THIS IN MANUALLY BY MOVING RELEVANT ITEMS FROM ABOVE LIST**

Internal:
 * **FILL THIS IN MANUALLY BY MOVING RELEVANT ITEMS FROM ABOVE LIST**

API Changes:
 * Changed `databricks connections update` command with new required argument order.
 * Changed `databricks serving-endpoints update-config` command with new required argument order.
 * Added `databricks serving-endpoints put` command.
 * Removed `databricks account network-policy` command group.

OpenAPI commit 63caa3cb0c05045e81d3dcf2451fa990d8670f36 (2023-12-12)
Dependency updates:
 * Bump github.com/google/uuid from 1.4.0 to 1.5.0 ([#1073](#1073)).
 * Bump golang.org/x/crypto from 0.16.0 to 0.17.0 ([#1076](#1076)).
@shreyas-goenka shreyas-goenka mentioned this pull request Dec 20, 2023
github-merge-queue bot pushed a commit that referenced this pull request Dec 21, 2023
CLI:
* Upgrade Go SDK to 0.27.0
([#1064](#1064)).
* Skip profile resolution if `DATABRICKS_AUTH_TYPE` is set
([#1068](#1068)).
* Do not allow input prompts in Git Bash terminal
([#1069](#1069)).
* Added output template for list-secrets command
([#1074](#1074)).

Bundles:
* Set metadata fields required to enable break-glass UI for jobs
([#880](#880)).
* Do not prompt for template values in Git Bash
([#1082](#1082)).
* Tune output of bundle deploy command
([#1047](#1047)).

API Changes:
* Changed `databricks connections update` command with new required
argument order.
* Changed `databricks serving-endpoints update-config` command with new
required argument order.
 * Added `databricks serving-endpoints put` command.
 * Removed `databricks account network-policy` command group.

OpenAPI commit 63caa3cb0c05045e81d3dcf2451fa990d8670f36 (2023-12-12)

Dependency updates:
* Bump github.com/google/uuid from 1.4.0 to 1.5.0
([#1073](#1073)).
* Bump golang.org/x/crypto from 0.16.0 to 0.17.0
([#1076](#1076)).
github-merge-queue bot pushed a commit that referenced this pull request May 1, 2024
## Changes
This PR annotates any pipelines that were deployed using DABs to have
`deployment.kind` set to "BUNDLE", mirroring the annotation for Jobs
(similar PR for jobs FYI: #880).

Breakglass UI is not yet available for pipelines, so this annotation
will just be used for revenue attribution ATM.

Note: The API field has been deployed in all regions including GovCloud.

## Tests
Unit tests and manually.

Manually verified that the kind and metadata_file_path are being set by
DABs, and are returned by a GET API to a pipeline deployed using a DAB.
Example:
```
    "deployment": {
      "kind":"BUNDLE",
      "metadata_file_path":"/Users/[email protected]/.bundle/bundle-playground/default/state/metadata.json"
    },
```
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