microsoft / terraform-provider-fabric

Terraform Provider for Microsoft Fabric
https://registry.terraform.io/providers/microsoft/fabric
Mozilla Public License 2.0
26 stars 5 forks source link

[bug] Workspace Capacity Assignment not terminating after creation #76

Closed bossenti closed 1 week ago

bossenti commented 2 weeks ago

πŸ› What happened?

After creating a workspace via the Fabric TF provider, which completed successfully, all subsequent plan executions run into a time out to the following reason:

2024-11-05T15:29:11.929+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: 

However, the workspace itself is accessible and the Fabric UI shows the correct capacity assignment

πŸ”¬ How to reproduce?

  1. Create a workspace via the terraform provider
  2. Creation completes successfully
  3. Run plan command on same terraform state

πŸ—οΈ Code Sample / Log

2024-11-05T15:20:38.533+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 @module=fabric tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_provider_addr=registry.terraform.io/microsoft/fabric tf_resource_type=fabric_workspace tf_rpc=ReadResource timestamp="2024-11-05T15:20:38.533+0100"
2024-11-05T15:21:08.682+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: @module=fabric tf_provider_addr=registry.terraform.io/microsoft/fabric tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 tf_resource_type=fabric_workspace tf_rpc=ReadResource timestamp="2024-11-05T15:21:08.682+0100"
2024-11-05T15:21:38.846+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 @module=fabric tf_provider_addr=registry.terraform.io/microsoft/fabric tf_resource_type=fabric_workspace tf_rpc=ReadResource @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 timestamp="2024-11-05T15:21:38.845+0100"
2024-11-05T15:22:09.108+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 @module=fabric tf_provider_addr=registry.terraform.io/microsoft/fabric tf_rpc=ReadResource tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_resource_type=fabric_workspace timestamp="2024-11-05T15:22:09.108+0100"
2024-11-05T15:22:39.264+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 @module=fabric @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 tf_provider_addr=registry.terraform.io/microsoft/fabric tf_resource_type=fabric_workspace tf_rpc=ReadResource timestamp="2024-11-05T15:22:39.263+0100"
2024-11-05T15:23:09.533+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: @module=fabric tf_provider_addr=registry.terraform.io/microsoft/fabric tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_resource_type=fabric_workspace tf_rpc=ReadResource @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 timestamp="2024-11-05T15:23:09.533+0100"
2024-11-05T15:23:39.694+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: tf_resource_type=fabric_workspace tf_rpc=ReadResource @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 tf_provider_addr=registry.terraform.io/microsoft/fabric tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 @module=fabric timestamp="2024-11-05T15:23:39.694+0100"
2024-11-05T15:24:09.959+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: @module=fabric @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 tf_provider_addr=registry.terraform.io/microsoft/fabric tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_resource_type=fabric_workspace tf_rpc=ReadResource timestamp="2024-11-05T15:24:09.959+0100"
2024-11-05T15:24:40.107+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: @module=fabric tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 tf_provider_addr=registry.terraform.io/microsoft/fabric tf_resource_type=fabric_workspace tf_rpc=ReadResource timestamp="2024-11-05T15:24:40.107+0100"
2024-11-05T15:25:10.276+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_resource_type=fabric_workspace tf_rpc=ReadResource @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 @module=fabric tf_provider_addr=registry.terraform.io/microsoft/fabric timestamp="2024-11-05T15:25:10.276+0100"
2024-11-05T15:25:40.530+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 @module=fabric tf_provider_addr=registry.terraform.io/microsoft/fabric tf_resource_type=fabric_workspace tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_rpc=ReadResource timestamp="2024-11-05T15:25:40.530+0100"
2024-11-05T15:26:10.787+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: tf_rpc=ReadResource tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_resource_type=fabric_workspace @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 @module=fabric tf_provider_addr=registry.terraform.io/microsoft/fabric timestamp="2024-11-05T15:26:10.787+0100"
2024-11-05T15:26:40.944+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_resource_type=fabric_workspace @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 @module=fabric tf_provider_addr=registry.terraform.io/microsoft/fabric tf_rpc=ReadResource timestamp="2024-11-05T15:26:40.944+0100"
2024-11-05T15:27:11.091+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: tf_resource_type=fabric_workspace tf_rpc=ReadResource @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 @module=fabric tf_provider_addr=registry.terraform.io/microsoft/fabric tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 timestamp="2024-11-05T15:27:11.091+0100"
2024-11-05T15:27:41.300+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_rpc=ReadResource @module=fabric tf_provider_addr=registry.terraform.io/microsoft/fabric tf_resource_type=fabric_workspace timestamp="2024-11-05T15:27:41.300+0100"
2024-11-05T15:28:11.560+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: tf_provider_addr=registry.terraform.io/microsoft/fabric tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_resource_type=fabric_workspace tf_rpc=ReadResource @module=fabric @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 timestamp="2024-11-05T15:28:11.560+0100"
2024-11-05T15:28:41.724+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_rpc=ReadResource @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 @module=fabric tf_provider_addr=registry.terraform.io/microsoft/fabric tf_resource_type=fabric_workspace timestamp="2024-11-05T15:28:41.724+0100"
2024-11-05T15:29:11.929+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: @module=fabric tf_provider_addr=registry.terraform.io/microsoft/fabric tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_rpc=ReadResource @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 tf_resource_type=fabric_workspace timestamp="2024-11-05T15:29:11.929+0100"
2024-11-05T15:29:42.137+0100 [INFO]  provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Workspace capacity assignment in progress, waiting 30 seconds before retrying: @caller=github.com/microsoft/terraform-provider-fabric/internal/services/workspace/resource_workspace.go:531 @module=fabric tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_resource_type=fabric_workspace tf_rpc=ReadResource tf_provider_addr=registry.terraform.io/microsoft/fabric timestamp="2024-11-05T15:29:42.136+0100"
2024-11-05T15:30:12.138+0100 [DEBUG] provider.terraform-provider-fabric_v0.1.0-beta.4.exe: UNKNOWN ERROR: Error="context deadline exceeded" tf_provider_addr=registry.terraform.io/microsoft/fabric tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_rpc=ReadResource @caller=github.com/microsoft/terraform-provider-fabric/internal/pkg/utils/errors.go:156 @module=fabric tf_resource_type=fabric_workspace timestamp="2024-11-05T15:30:12.137+0100"
2024-11-05T15:30:12.139+0100 [DEBUG] provider.terraform-provider-fabric_v0.1.0-beta.4.exe: context deadline exceeded: tf_resource_type=fabric_workspace @caller=github.com/microsoft/terraform-provider-fabric/internal/pkg/utils/errors.go:171 @module=fabric tf_provider_addr=registry.terraform.io/microsoft/fabric tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_rpc=ReadResource timestamp="2024-11-05T15:30:12.137+0100"
2024-11-05T15:30:12.140+0100 [ERROR] provider.terraform-provider-fabric_v0.1.0-beta.4.exe: Response contains error diagnostic: @module=sdk.proto diagnostic_detail="context deadline exceeded" diagnostic_severity=ERROR diagnostic_summary="unknown error" tf_proto_version=6.6 tf_req_id=8c5af139-60cf-674c-b194-a09f68750cf2 tf_rpc=ReadResource @caller=github.com/hashicorp/terraform-plugin-go@v0.24.0/tfprotov6/internal/diag/diagnostics.go:58 tf_provider_addr=registry.terraform.io/microsoft/fabric tf_resource_type=fabric_workspace timestamp="2024-11-05T15:30:12.139+0100"
2024-11-05T15:30:12.140+0100 [ERROR] vertex "fabric_workspace.tz_metrics" error: unknown error
2024-11-05T15:30:12.140+0100 [ERROR] vertex "fabric_workspace.tz_metrics (expand)" error: unknown error
2024-11-05T15:30:12.142+0100 [WARN]  Planning encountered errors, so plan is not applyable
2024-11-05T15:30:12.142+0100 [INFO]  backend/local: plan operation completed

πŸ“· Screenshots

No response

πŸ“ˆ Expected behavior

plan argument on same tf state should run flawlessly

🌌 Environment (Provider Version)

0.1.0-beta4

🌌 Environment (Terraform Version)

1.9.5

🌌 Environment (OS)

Windows

πŸ“Ž Additional context

Issue still persists 3 hours after workspace creation

πŸ”° Code of Conduct

bossenti commented 2 weeks ago

Hm, in the meantime the plan command is successfully executed again Is this the expected behaviour?

DariuszPorowski commented 1 week ago

Hi @bossenti

I cannot repo this issue. Is the problem still happening on your end? Maybe there were some network issues at the time?

bossenti commented 1 week ago

Thanks for trying to reproduce it @DariuszPorowski

I'm assuming that it's not related to network issues, as we faced the problem in an Azure DevOps pipeline. Anyway, as I wrote above, everything is working fine at the moment. So I'll close this issue and see if the problem is gone for good.