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

poller: add Created as inprogress status for fabric managed #871

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

wuxu92
Copy link
Contributor

@wuxu92 wuxu92 commented Feb 2, 2024

This PR is to fix the issue caused by upgrading fabric managed service sdk to new base layer: hashicorp/terraform-provider-azurerm#24654 (comment).

Acctest failure message:

    testcase.go:113: Step 5/5 error: Error running apply: exit status 1
        Error: adding/updating Node Type (Subscription: "*******"
        Resource Group Name: "acctestRG-sfmc-240131010138563091"
        Managed Cluster Name: "testacc-sfmc-xyszh"
        Node Type Name: "test1"): polling after CreateOrUpdate: `result.Status` was nil/empty - `op.Status` was "Created" / `op.Properties.ProvisioningState` was ""
          with azurerm_service_fabric_managed_cluster.test,
          on terraform_plugin_test.tf line 26, in resource "azurerm_service_fabric_managed_cluster" "test":
          26: resource "azurerm_service_fabric_managed_cluster" "test" {
        adding/updating Node Type (Subscription:
        "*******"
        Resource Group Name: "acctestRG-sfmc-240131010138563091"
        Managed Cluster Name: "testacc-sfmc-xyszh"
        Node Type Name: "test1"): polling after CreateOrUpdate: `result.Status` was
        nil/empty - `op.Status` was "Created" / `op.Properties.ProvisioningState` was
        ""
--- FAIL: TestAccServiceFabricManagedCluster_full (4313.13s)

Local test passed:

=== RUN   TestAccServiceFabricManagedCluster_full
=== PAUSE TestAccServiceFabricManagedCluster_full
=== CONT  TestAccServiceFabricManagedCluster_full
--- PASS: TestAccServiceFabricManagedCluster_full (4478.90s)
PASS

@wuxu92 wuxu92 requested a review from a team as a code owner February 2, 2024 04:27
@github-actions github-actions bot added the release-once-merged The SDK should be released once this PR is merged label Feb 2, 2024
@@ -203,6 +203,8 @@ func (p *longRunningOperationPoller) Poll(ctx context.Context) (result *pollers.
"Scaling": pollers.PollingStatusInProgress,
// HealthBot @ 2022-08-08 (HealthBots CreateOrUpdate) returns `Working` during Creation
"Working": pollers.PollingStatusInProgress,
// ServiceFabricManaged @ 2021-05-01 (NodeTypes CreateOrUpdate) returns `Created` rather than `InProgress` during Creation
"Created": pollers.PollingStatusInProgress,
Copy link
Contributor

Choose a reason for hiding this comment

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

just to double-check, Created is used to mean InProgress rather than Succeeded?

Copy link
Contributor

Choose a reason for hiding this comment

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

(minor, but could we also move this up, since the other keys are sorted alphabetically)

Copy link
Contributor Author

@wuxu92 wuxu92 Feb 2, 2024

Choose a reason for hiding this comment

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

Yes, Created means InProgress which I have verified locally. The poller will stop with a Succeeded response:
image

also moved up.

@tombuildsstuff tombuildsstuff merged commit 7f0cbe9 into hashicorp:main Feb 2, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-once-merged The SDK should be released once this PR is merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants