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

mssql - upgrade to 2023-08-01-preview and hashicorp/go-azure-sdk #27073

Merged
merged 9 commits into from
Aug 21, 2024

Conversation

catriona-m
Copy link
Member

@catriona-m catriona-m commented Aug 16, 2024

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

  • Upgrades remaining mssql resources to go-azure-sdk and upgrades all resources to API verison 2023-08-01-preview
  • Removes long_term_retention_policy.immutable_backups_enabled which has been removed in version 2023-08-01-preview

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

Tests passing aside from tests also failing in main

@catriona-m catriona-m marked this pull request as ready for review August 21, 2024 12:38
@catriona-m catriona-m requested a review from a team August 21, 2024 12:38
Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Thanks @catriona-m other than the comment around the potential panic LGTM 🌈


d.Set("database_id", resp.DatabaseID)
if model := resp.Model; model != nil {
d.Set("location", azure.NormalizeLocation(model.Location))
Copy link
Member

Choose a reason for hiding this comment

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

Should probably use

Suggested change
d.Set("location", azure.NormalizeLocation(model.Location))
d.Set("location", location.NormalizeNilable(model.Location))


return tags.FlattenAndSet(d, resp.Tags)
return tags.FlattenAndSet(d, resp.Model.Tags)
Copy link
Member

Choose a reason for hiding this comment

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

If model is nil this will panic since this is being done outside the nil check for model on line 134. Can we move this into the block where we nil check model and then return nil here instead

Suggested change
return tags.FlattenAndSet(d, resp.Model.Tags)
return nil

@stephybun stephybun added this to the v4.0.0 milestone Aug 21, 2024
@stephybun stephybun merged commit 10ac5a0 into main Aug 21, 2024
29 checks passed
@stephybun stephybun deleted the cm/upgrademssql branch August 21, 2024 14:06
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 Sep 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants