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

Allow custom tags on AWS customer managed VPC workspaces #3114

Merged
merged 8 commits into from
Jan 16, 2024

Conversation

antonsmit30
Copy link
Contributor

@antonsmit30 antonsmit30 commented Jan 14, 2024

Changes

This will also solve issue #2938

At my company we want to try keep as much in terraform code as possible. We have a temporarily call once workspace is created to update the tags for billing purposes but keeping in terraform code would be more suitable!

Tests

Manually tested with Company Databricks account and workspace on AWS environment. Note tested via GCP / Azure as currently do not have access.

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • relevant acceptance tests are passing
  • using Go SDK
  • On a side note:
    This is my first attempted open source contribution. I am also learning golang and tried to attempt this as a real problem to solve in my workplace. So feel free to scrutinize fully.

@antonsmit30 antonsmit30 requested review from a team as code owners January 14, 2024 12:37
@antonsmit30 antonsmit30 requested review from tanmay-db and removed request for a team January 14, 2024 12:37
@antonsmit30 antonsmit30 changed the title Workspace custom tags Allow custom tags on AWS customer managed VPC workspaces Jan 14, 2024
Copy link
Contributor

@alexott alexott left a comment

Choose a reason for hiding this comment

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

overall looks good. Let's run integration tests

docs/resources/mws_workspaces.md Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jan 14, 2024

Codecov Report

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

Comparison is base (e021b55) 83.99% compared to head (c85591e) 84.30%.
Report is 66 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3114      +/-   ##
==========================================
+ Coverage   83.99%   84.30%   +0.31%     
==========================================
  Files         155      162       +7     
  Lines       13669    14414     +745     
==========================================
+ Hits        11481    12152     +671     
- Misses       1538     1565      +27     
- Partials      650      697      +47     
Files Coverage Δ
mws/resource_mws_workspaces.go 87.10% <63.63%> (-0.51%) ⬇️

... and 50 files with indirect coverage changes

@antonsmit30 antonsmit30 requested a review from alexott January 15, 2024 09:07
Copy link
Contributor

@tanmay-db tanmay-db left a comment

Choose a reason for hiding this comment

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

LGTM


// UpdateRunning will update running workspace with couple of possible fields
func (a WorkspacesAPI) UpdateRunning(ws Workspace, timeout time.Duration) error {
workspacesAPIPath := fmt.Sprintf("/accounts/%s/workspaces/%d", ws.AccountID, ws.WorkspaceID)
request := map[string]string{}
request := map[string]any{}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this change?

Copy link
Contributor

Choose a reason for hiding this comment

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

custom tags are map of string to string right?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes it's a map, but this change is required because we need to nest custom tags inside the map that will be sent to Workspace API

@tanmay-db tanmay-db added this pull request to the merge queue Jan 16, 2024
Merged via the queue into databricks:master with commit acc1cea Jan 16, 2024
5 checks passed
@hectorcast-db hectorcast-db mentioned this pull request Jan 25, 2024
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.

4 participants