confluentinc / terraform-provider-confluent

Terraform Provider for Confluent
Apache License 2.0
31 stars 64 forks source link

Fix "error waiting for Flink Statement: ... : is an unexpected state "STOPPING" #456

Closed linouk23 closed 1 month ago

linouk23 commented 1 month ago

What

When working on a relevant task, I ran into an issue with stopping Flink statements:

  ~ update in-place

Terraform will perform the following actions:

  # confluent_flink_statement.insert-into-table will be updated in-place
  ~ resource "confluent_flink_statement" "insert-into-table" {
        id                       = "env-devcg1gy1r/lfcp-devc2g87dm/tf-2024-10-14-175011-47aef93e-a292-446e-9970-21e5d47805af"
      ~ stopped                  = false -> true
        # (5 unchanged attributes hidden)
    }

confluent_flink_statement.insert-into-table: Refreshing state... [id=env-devcg1gy1r/lfcp-devc2g87dm/tf-2024-10-14-175011-47aef93e-a292-446e-9970-21e5d47805af]
confluent_flink_statement.insert-into-table: Modifying... [id=env-devcg1gy1r/lfcp-devc2g87dm/tf-2024-10-14-175011-47aef93e-a292-446e-9970-21e5d47805af]

Error: error waiting for Flink Statement "tf-2024-10-14-175011-47aef93e-a292-446e-9970-21e5d47805af" to update: flink Statement "tf-2024-10-14-175011-47aef93e-a292-446e-9970-21e5d47805af" is an unexpected state "STOPPING"

It seems like there was a typo where we didn't process all pending / target states in flinkStatementUpdatingStatus from waitForFlinkStatementToBeUpdated.

Testing

confluent-cla-assistant[bot] commented 1 month ago

:tada: All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.