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 sdk version for batch from 2020-03-01 to 2021-06-01 #13718

Merged
merged 1 commit into from
Oct 13, 2021

Conversation

magodo
Copy link
Collaborator

@magodo magodo commented Oct 13, 2021

This PR update the Go SDK version for batch from 2020-03-01 to 2021-06-01. This is mainly for #8532.

Test

terraform-provider-azurerm on  main via 🐹 v1.16.2
💤 TF_ACC=1 go test -parallel 2 -v -timeout=20h ./internal/services/batch -run="TestAcc"
=== RUN   TestAccBatchAccountDataSource_basic
=== PAUSE TestAccBatchAccountDataSource_basic
=== RUN   TestAccBatchAccountDataSource_complete
=== PAUSE TestAccBatchAccountDataSource_complete
=== RUN   TestAccBatchAccountDataSource_userSubscription
=== PAUSE TestAccBatchAccountDataSource_userSubscription
=== RUN   TestAccBatchAccount_basic
=== PAUSE TestAccBatchAccount_basic
=== RUN   TestAccBatchAccount_requiresImport
=== PAUSE TestAccBatchAccount_requiresImport
=== RUN   TestAccBatchAccount_complete
=== PAUSE TestAccBatchAccount_complete
=== RUN   TestAccBatchAccount_userSubscription
=== PAUSE TestAccBatchAccount_userSubscription
=== RUN   TestAccBatchApplication_basic
=== PAUSE TestAccBatchApplication_basic
=== RUN   TestAccBatchApplication_update
=== PAUSE TestAccBatchApplication_update
=== RUN   TestAccBatchCertificateDataSource_basic
=== PAUSE TestAccBatchCertificateDataSource_basic
=== RUN   TestAccBatchCertificate_PfxWithPassword
=== PAUSE TestAccBatchCertificate_PfxWithPassword
=== RUN   TestAccBatchCertificate_PfxWithoutPassword
=== PAUSE TestAccBatchCertificate_PfxWithoutPassword
=== RUN   TestAccBatchCertificate_Cer
=== PAUSE TestAccBatchCertificate_Cer
=== RUN   TestAccBatchCertificate_CerWithPassword
=== PAUSE TestAccBatchCertificate_CerWithPassword
=== RUN   TestAccBatchJob_basic
=== PAUSE TestAccBatchJob_basic
=== RUN   TestAccBatchJob_complete
=== PAUSE TestAccBatchJob_complete
=== RUN   TestAccBatchJob_update
=== PAUSE TestAccBatchJob_update
=== RUN   TestAccBatchJob_requiresImport
=== PAUSE TestAccBatchJob_requiresImport
=== RUN   TestAccBatchPoolDataSource_complete
=== PAUSE TestAccBatchPoolDataSource_complete
=== RUN   TestAccBatchPool_basic
=== PAUSE TestAccBatchPool_basic
=== RUN   TestAccBatchPool_requiresImport
=== PAUSE TestAccBatchPool_requiresImport
=== RUN   TestAccBatchPool_fixedScale_complete
=== PAUSE TestAccBatchPool_fixedScale_complete
=== RUN   TestAccBatchPool_autoScale_complete
=== PAUSE TestAccBatchPool_autoScale_complete
=== RUN   TestAccBatchPool_completeUpdated
=== PAUSE TestAccBatchPool_completeUpdated
=== RUN   TestAccBatchPool_startTask_basic
=== PAUSE TestAccBatchPool_startTask_basic
=== RUN   TestAccBatchPool_certificates
=== PAUSE TestAccBatchPool_certificates
=== RUN   TestAccBatchPool_validateResourceFileWithoutSource
=== PAUSE TestAccBatchPool_validateResourceFileWithoutSource
=== RUN   TestAccBatchPool_container
=== PAUSE TestAccBatchPool_container
=== RUN   TestAccBatchPool_validateResourceFileWithMultipleSources
=== PAUSE TestAccBatchPool_validateResourceFileWithMultipleSources
=== RUN   TestAccBatchPool_validateResourceFileBlobPrefixWithoutAutoStorageContainerUrl
=== PAUSE TestAccBatchPool_validateResourceFileBlobPrefixWithoutAutoStorageContainerUrl
=== RUN   TestAccBatchPool_validateResourceFileHttpURLWithoutFilePath
=== PAUSE TestAccBatchPool_validateResourceFileHttpURLWithoutFilePath
=== RUN   TestAccBatchPool_customImage
=== PAUSE TestAccBatchPool_customImage
=== RUN   TestAccBatchPool_frontEndPortRanges
=== PAUSE TestAccBatchPool_frontEndPortRanges
=== RUN   TestAccBatchPool_fixedScaleUpdate
=== PAUSE TestAccBatchPool_fixedScaleUpdate
=== CONT  TestAccBatchAccountDataSource_basic
=== CONT  TestAccBatchPoolDataSource_complete
--- PASS: TestAccBatchAccountDataSource_basic (201.21s)
=== CONT  TestAccBatchCertificateDataSource_basic
--- PASS: TestAccBatchPoolDataSource_complete (699.44s)
=== CONT  TestAccBatchJob_requiresImport
--- PASS: TestAccBatchCertificateDataSource_basic (587.29s)
=== CONT  TestAccBatchJob_update
--- PASS: TestAccBatchJob_requiresImport (617.96s)
=== CONT  TestAccBatchJob_complete
--- PASS: TestAccBatchJob_update (806.66s)
=== CONT  TestAccBatchJob_basic
--- PASS: TestAccBatchJob_complete (633.57s)
=== CONT  TestAccBatchCertificate_CerWithPassword
--- PASS: TestAccBatchCertificate_CerWithPassword (167.35s)
=== CONT  TestAccBatchCertificate_Cer
--- PASS: TestAccBatchJob_basic (591.21s)
=== CONT  TestAccBatchCertificate_PfxWithoutPassword
--- PASS: TestAccBatchCertificate_Cer (595.83s)
=== CONT  TestAccBatchCertificate_PfxWithPassword
--- PASS: TestAccBatchCertificate_PfxWithoutPassword (594.72s)
=== CONT  TestAccBatchPool_container
--- PASS: TestAccBatchPool_container (517.78s)
=== CONT  TestAccBatchPool_fixedScaleUpdate
--- PASS: TestAccBatchCertificate_PfxWithPassword (597.38s)
=== CONT  TestAccBatchPool_frontEndPortRanges
--- PASS: TestAccBatchPool_frontEndPortRanges (575.36s)
=== CONT  TestAccBatchPool_customImage
--- PASS: TestAccBatchPool_fixedScaleUpdate (677.20s)
=== CONT  TestAccBatchPool_validateResourceFileHttpURLWithoutFilePath
--- PASS: TestAccBatchPool_validateResourceFileHttpURLWithoutFilePath (165.06s)
=== CONT  TestAccBatchPool_validateResourceFileBlobPrefixWithoutAutoStorageContainerUrl
--- PASS: TestAccBatchPool_validateResourceFileBlobPrefixWithoutAutoStorageContainerUrl (164.29s)
=== CONT  TestAccBatchPool_validateResourceFileWithMultipleSources
--- PASS: TestAccBatchPool_validateResourceFileWithMultipleSources (163.54s)
=== CONT  TestAccBatchPool_completeUpdated
--- PASS: TestAccBatchPool_customImage (661.01s)
=== CONT  TestAccBatchPool_validateResourceFileWithoutSource
--- PASS: TestAccBatchPool_validateResourceFileWithoutSource (163.00s)
=== CONT  TestAccBatchPool_certificates
--- PASS: TestAccBatchPool_completeUpdated (702.43s)
=== CONT  TestAccBatchPool_startTask_basic
--- PASS: TestAccBatchPool_certificates (636.45s)
=== CONT  TestAccBatchPool_fixedScale_complete
--- PASS: TestAccBatchPool_startTask_basic (580.82s)
=== CONT  TestAccBatchPool_autoScale_complete
--- PASS: TestAccBatchPool_fixedScale_complete (628.55s)
=== CONT  TestAccBatchPool_requiresImport
--- PASS: TestAccBatchPool_autoScale_complete (605.26s)
=== CONT  TestAccBatchAccount_complete
--- PASS: TestAccBatchPool_requiresImport (601.18s)
=== CONT  TestAccBatchApplication_update
--- PASS: TestAccBatchAccount_complete (369.63s)
=== CONT  TestAccBatchApplication_basic
--- PASS: TestAccBatchApplication_update (326.13s)
=== CONT  TestAccBatchAccount_userSubscription
    testcase.go:88: Step 1/1 error: Error running pre-apply refresh: exit status 1

        Error: Listing service principals for filter "displayName eq 'Microsoft Azure Batch'"

          with data.azuread_service_principal.test,
          on terraform_plugin_test.tf line 8, in data "azuread_service_principal" "test":
           8: data "azuread_service_principal" "test" {

        graphrbac.ServicePrincipalsClient#List: Failure responding to request:
        StatusCode=403 -- Original Error: autorest/azure: Service returned an error.
        Status=403 Code="Unknown" Message="Unknown service error"
        Details=[{"odata.error":{"code":"Authorization_RequestDenied","date":"2021-10-13T04:28:48","message":{"lang":"en","value":"Insufficient
        privileges to complete the
        operation."},"requestId":"97675aa6-82ae-42a3-836d-d181cedc849a"}}]
--- FAIL: TestAccBatchAccount_userSubscription (10.18s)
=== CONT  TestAccBatchAccount_basic
--- PASS: TestAccBatchApplication_basic (260.38s)
=== CONT  TestAccBatchAccount_requiresImport
--- PASS: TestAccBatchAccount_basic (125.25s)
=== CONT  TestAccBatchAccountDataSource_userSubscription
    testcase.go:88: Step 1/1 error: Error running pre-apply refresh: exit status 1

        Error: Listing service principals for filter "displayName eq 'Microsoft Azure Batch'"

          with data.azuread_service_principal.test,
          on terraform_plugin_test.tf line 8, in data "azuread_service_principal" "test":
           8: data "azuread_service_principal" "test" {

        graphrbac.ServicePrincipalsClient#List: Failure responding to request:
        StatusCode=403 -- Original Error: autorest/azure: Service returned an error.
        Status=403 Code="Unknown" Message="Unknown service error"
        Details=[{"odata.error":{"code":"Authorization_RequestDenied","date":"2021-10-13T04:31:04","message":{"lang":"en","value":"Insufficient
        privileges to complete the
        operation."},"requestId":"3f67846e-03ef-4387-b6da-06bcc4e03b39"}}]
--- FAIL: TestAccBatchAccountDataSource_userSubscription (10.13s)
=== CONT  TestAccBatchPool_basic
--- PASS: TestAccBatchAccount_requiresImport (221.89s)
=== CONT  TestAccBatchAccountDataSource_complete
--- PASS: TestAccBatchAccountDataSource_complete (189.02s)
--- PASS: TestAccBatchPool_basic (575.29s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-azurerm/internal/services/batch 7624.102s
FAIL

(The failures are due to permission issues, should be OK if running on TC)

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 for this PR @magodo. I ran the tests in TC but there is still one test failure:

------- Stdout: -------
=== RUN   TestAccBatchAccountDataSource_userSubscription
=== PAUSE TestAccBatchAccountDataSource_userSubscription
=== CONT  TestAccBatchAccountDataSource_userSubscription
testcase.go:88: Step 1/1 error: Error running apply: exit status 1
Error: authorization.RoleAssignmentsClient#Create: Failure responding to request: StatusCode=409 -- Original Error: autorest/azure: Service returned an error. Status=409 Code="RoleAssignmentExists" Message="The role assignment already exists."
with azurerm_role_assignment.contribrole,
on terraform_plugin_test.tf line 43, in resource "azurerm_role_assignment" "contribrole":
43: resource "azurerm_role_assignment" "contribrole" {
--- FAIL: TestAccBatchAccountDataSource_userSubscription (280.82s)
FAIL

@magodo
Copy link
Collaborator Author

magodo commented Oct 13, 2021

@stephybun This issue exists in current main branch, should be unrelated to this PR. The reason is as stated in the error message: The role assignment already exists.

@stephybun stephybun added this to the v2.81.0 milestone Oct 13, 2021
@stephybun
Copy link
Member

Noted, thanks @magodo. LGTM!

@stephybun stephybun merged commit bbddf0e into hashicorp:main Oct 13, 2021
stephybun added a commit that referenced this pull request Oct 13, 2021
@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.

2 participants