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

Update mssql SDK version to preview/v5.0 #13622

Merged
merged 6 commits into from
Oct 13, 2021

Conversation

aristosvo
Copy link
Collaborator

Required for #13617

Only questionmark thus far is the change of props.ReadReplicaCount to props.HighAvailabilityReplicaCount and whether this should reflect in field names

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.

hey @aristosvo

Thanks for this PR.

Taking a look through this LGTM - there's a couple of changes to the API Versions here we'll want to check specifically:

Databases / Elastic Pool -> 2020-08-01-preview
Managed Instance -> 2020-02-02-preview

So we'll want to run those tests specifically - but otherwise we should be good 👍

Thanks!

@tombuildsstuff tombuildsstuff added this to the v2.80.0 milestone Oct 5, 2021
@tombuildsstuff tombuildsstuff added the service/mssql Microsoft SQL Server label Oct 5, 2021
@tombuildsstuff
Copy link
Contributor

cc @mbfrahry since there's SQL MI in here

@aristosvo
Copy link
Collaborator Author

@tombuildsstuff Maybe we should hold this one, v4.0 is not complete enough to implement the feature I wanted. v5.0 has the ability to define UserAssigned Identities, but has more changes..

I'll see what I can do!

@katbyte katbyte modified the milestones: v2.80.0, v2.81.0 Oct 6, 2021
@aristosvo aristosvo changed the title Update mssql API to preview/v4.0 Update mssql API to preview/v5.0 Oct 6, 2021
@aristosvo
Copy link
Collaborator Author

aristosvo commented Oct 6, 2021

@tombuildsstuff Another try, but with a few more obstacles. I'm curious about the test runs, as a lot has changed unfortunately.

A few issues:

  • I deprecated and unimplemented use_server_defaultfor now from azurerm_mssql_database as it is not specified in the API anymore. I'm very unfamiliar with this flag, so cannot see the impact here. See also this comment
  • ThreadDetectionClientis replaced withSecurityAlertsClient`, I applied minimal refactoring, but it might need a bit more to give a better understanding
  • Other than that a few enums which have a different value now, I worked around it but am uncertain how this is resolved usually.

@katbyte
Copy link
Collaborator

katbyte commented Oct 7, 2021

looks like there are a lot of test failures @aristosvo 😞
image

@aristosvo
Copy link
Collaborator Author

aristosvo commented Oct 8, 2021

Ouch!:hurtrealbad: I'll dive into it!

@aristosvo
Copy link
Collaborator Author

aristosvo commented Oct 8, 2021

@katbyte Tests seem to be okay again!

❯ go install && make acctests SERVICE='mssql' TESTARGS='-run=TestAccMsSqlDatabase_elasticPool'
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -v ./internal/services/mssql -run=TestAccMsSqlDatabase_elasticPool -timeout 180m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccMsSqlDatabase_elasticPool
=== PAUSE TestAccMsSqlDatabase_elasticPool
=== CONT  TestAccMsSqlDatabase_elasticPool
--- PASS: TestAccMsSqlDatabase_elasticPool (688.86s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql 690.637s

Edit: Oops, still some tests failing over there, I'll have to debug that logic in more detail! And fixed again!

❯ go install && make acctests SERVICE='mssql' TESTARGS='-run=TestAccMsSqlDatabase_scaleReplicaSetWithFailovergroup'
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -v ./internal/services/mssql -run=TestAccMsSqlDatabase_scaleReplicaSetWithFailovergroup -timeout 180m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccMsSqlDatabase_scaleReplicaSetWithFailovergroup
=== PAUSE TestAccMsSqlDatabase_scaleReplicaSetWithFailovergroup
=== CONT  TestAccMsSqlDatabase_scaleReplicaSetWithFailovergroup
--- PASS: TestAccMsSqlDatabase_scaleReplicaSetWithFailovergroup (1324.41s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/mssql 1326.994s

@aristosvo aristosvo changed the title Update mssql API to preview/v5.0 Update mssql SDK version to preview/v5.0 Oct 13, 2021
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.

Thanks @aristosvo! LGTM now only failing tests are also failing in main 🚀

@katbyte katbyte merged commit 05180d4 into hashicorp:main Oct 13, 2021
katbyte added a commit that referenced this pull request Oct 13, 2021
katbyte pushed a commit that referenced this pull request Oct 14, 2021
…ssigned_identity_id (#13683)

 Requires Update mssql SDK version to preview/v5.0 #13622 to be merged
Fixes #13617
@github-actions
Copy link

This functionality has been released in v2.81.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@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 14, 2021
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.

3 participants