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

Synapse: enable user assigned managed identity for Synapse workspace #16429

Closed

Conversation

zhcli
Copy link
Contributor

@zhcli zhcli commented Apr 18, 2022

#13752 - enable user assigned managed identity

TF_ACC=1 go test -v ./internal/services/synapse -run=TestAccSynapseWorkspace_basic -timeout 60m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccSynapseWorkspace_basic
=== PAUSE TestAccSynapseWorkspace_basic
=== CONT  TestAccSynapseWorkspace_basic
--- PASS: TestAccSynapseWorkspace_basic (450.18s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/synapse       451.774s
TF_ACC=1 go test -v ./internal/services/synapse -run=TestAccDataSourceSynapseWorkspace_basic -timeout 60m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccDataSourceSynapseWorkspace_basic
=== PAUSE TestAccDataSourceSynapseWorkspace_basic
=== CONT  TestAccDataSourceSynapseWorkspace_basic
--- PASS: TestAccDataSourceSynapseWorkspace_basic (440.70s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/synapse       (cached)
TF_ACC=1 go test -v ./internal/services/synapse -run=TestAccSynapseSparkPool_complete -timeout 60m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccSynapseSparkPool_complete
=== PAUSE TestAccSynapseSparkPool_complete
=== CONT  TestAccSynapseSparkPool_complete
--- PASS: TestAccSynapseSparkPool_complete (1023.16s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/synapse       1024.642s

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hi @zhcli

Thanks for this PR - I've taken a look and left some comments inline, but if we can fix those up then we should be able to take another look and get this merged 👍

Thanks!

internal/services/synapse/synapse_workspace_data_source.go Outdated Show resolved Hide resolved
internal/services/synapse/synapse_workspace_resource.go Outdated Show resolved Hide resolved
internal/services/synapse/synapse_workspace_resource.go Outdated Show resolved Hide resolved
website/docs/r/synapse_workspace.html.markdown Outdated Show resolved Hide resolved
website/docs/r/synapse_workspace.html.markdown Outdated Show resolved Hide resolved
@zhcli
Copy link
Contributor Author

zhcli commented Apr 20, 2022

hey @tombuildsstuff , thank you for reviewing. :) I have pushed changes as per suggestions.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Running tests for this and looks like we have an failure:

------- Stdout: -------
=== RUN   TestAccSynapseWorkspace_update
=== PAUSE TestAccSynapseWorkspace_update
=== CONT  TestAccSynapseWorkspace_update
    testcase.go:110: Step 9/9 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
        
        Terraform will perform the following actions:
        
          # azurerm_synapse_workspace.test will be updated in-place
          ~ resource "azurerm_synapse_workspace" "test" {
                id                                   = "/subscriptions/*******/resourceGroups/acctestRG-synapse-220518043143578606/providers/Microsoft.Synapse/workspaces/acctestsw220518043143578606"
                name                                 = "acctestsw220518043143578606"
                tags                                 = {}
                # (12 unchanged attributes hidden)
        
              ~ identity {
                  ~ type         = "SystemAssigned" -> "SystemAssigned, UserAssigned"
                    # (3 unchanged attributes hidden)
                }
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccSynapseWorkspace_update (1081.36s)
FAIL

@zhcli
Copy link
Contributor Author

zhcli commented May 21, 2022

@katbyte thanks for checking, test case updated:

TF_ACC=1 go test -v ./internal/services/synapse -run=TestAccSynapseWorkspace_update -timeout 60m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccSynapseWorkspace_update
=== PAUSE TestAccSynapseWorkspace_update
=== CONT  TestAccSynapseWorkspace_update
--- PASS: TestAccSynapseWorkspace_update (1067.74s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/synapse       1069.302s

TF_ACC=1 go test -v ./internal/services/synapse -run=TestAccSynapseWorkspace_basic -timeout 60m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccSynapseWorkspace_basic
=== PAUSE TestAccSynapseWorkspace_basic
=== CONT  TestAccSynapseWorkspace_basic
--- PASS: TestAccSynapseWorkspace_basic (536.59s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/synapse       538.039s

TF_ACC=1 go test -v ./internal/services/synapse -run=TestAccDataSourceSynapseWorkspace_basic -timeout 60m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccDataSourceSynapseWorkspace_basic
=== PAUSE TestAccDataSourceSynapseWorkspace_basic
=== CONT  TestAccDataSourceSynapseWorkspace_basic
--- PASS: TestAccDataSourceSynapseWorkspace_basic (529.30s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/synapse       530.830s

@zhcli zhcli requested a review from katbyte May 21, 2022 07:23
@katbyte
Copy link
Collaborator

katbyte commented Jul 11, 2022

this test is still failing?
image

@zhcli
Copy link
Contributor Author

zhcli commented Jul 11, 2022

this test is still failing? image

Re-run the test locally, and it passed. I wondered if there was a git cache issue on the CI/CD tool.
Screen Shot 2022-07-11 at 2 01 55 pm

@katbyte
Copy link
Collaborator

katbyte commented Jul 14, 2022

regardless of what you se locally in tc we still see

------- Stdout: -------
=== RUN   TestAccSynapseWorkspace_update
=== PAUSE TestAccSynapseWorkspace_update
=== CONT  TestAccSynapseWorkspace_update
    testcase.go:110: Step 3/9 error: Error running apply: exit status 1
        
        Error: updating Synapse Workspace "acctestsw220711050638995923" (Resource Group "acctestRG-synapse-220711050638995923"): synapse.WorkspacesClient#Update: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="WorkspaceUnupdatable" Message="The workspace: acctestsw220711050638995923 is not in succeeded state, and hence, cannot be updated. CurrentState = Provisioning."
        
          with azurerm_synapse_workspace.test,
          on terraform_plugin_test.tf line 35, in resource "azurerm_synapse_workspace" "test":
          35: resource "azurerm_synapse_workspace" "test" {
        
--- FAIL: TestAccSynapseWorkspace_update (637.80s)
FAIL

which does seem to indicate that there is a state wait that needs to be placed somewhere that waits for provisioning to finish

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

test failures
image

* fixing spark_pool dynamic_executor_allocation_enabled error
* adjust StateChangeConf function in synapse work space resource
@zhcli zhcli requested review from katbyte and tombuildsstuff and removed request for tombuildsstuff and katbyte August 22, 2022 14:02
@zhcli zhcli requested a review from katbyte August 23, 2022 01:49
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

still have test failures:
image

@mafis-hh
Copy link

Hello, do you have a status on this pull request when this feature can be expected to be merged? I would like to use it in the context of our customer's environment, as we need to use user assigned managed identities in that context.
Thank you in advance.

@katbyte
Copy link
Collaborator

katbyte commented Oct 27, 2022

closing in favour of #19007

@katbyte katbyte closed this Oct 27, 2022
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants