IBM-Cloud / terraform-provider-ibm

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs
Mozilla Public License 2.0
341 stars 669 forks source link

move wait_till logic into function, integrate it into cluster datasource #5540

Closed z0za closed 2 months ago

z0za commented 3 months ago

Community Note

Relates OR Closes #0000

Output from acceptance testing:

=== RUN   TestAccIBMContainerCluster_basic
--- PASS: TestAccIBMContainerCluster_basic (1077.40s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/kubernetes      1080.663s

=== RUN   TestAccIBMContainerClusterDataSource_basic
--- PASS: TestAccIBMContainerClusterDataSource_basic (1220.10s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/kubernetes      1223.629s

// Modified the timeout to 1 minute, to test that out too
=== RUN   TestAccIBMContainerClusterDataSource_basic
    data_source_ibm_container_cluster_test.go:20: Step 2/2 error: Error running pre-apply refresh: exit status 1

        Error: timeout while waiting for state to become 'normal' (last state: 'deploying', timeout: 1m0s)

          with data.ibm_container_cluster.testacc_ds_cluster,
          on terraform_plugin_test.tf line 30, in data "ibm_container_cluster" "testacc_ds_cluster":
          30:   data "ibm_container_cluster" "testacc_ds_cluster" {

        ---
        id: terraform-9ef4459f
        summary: 'timeout while waiting for state to become ''normal'' (last state:
        ''deploying'',
          timeout: 1m0s)'
        severity: error
        resource: (Data) ibm_container_cluster
        operation: read
        component:
          name: github.com/IBM-Cloud/terraform-provider-ibm
          version: 1.67.1
        ---

--- FAIL: TestAccIBMContainerClusterDataSource_basic (1121.72s)
FAIL
FAIL    github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/kubernetes      1125.158s
FAIL
make: *** [testacc] Error 1
...
ocofaigh commented 2 months ago

@hkantare can you help get this PR in for next provider release please?

hkantare commented 2 months ago

@z0za can you review comments

hkantare commented 2 months ago

@z0za one more comment to be looked up

jmulsow commented 2 months ago

@hkantare can you re-review please?