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

Add retries to resources #157

Closed
gabcoyne opened this issue Apr 8, 2024 · 4 comments
Closed

Add retries to resources #157

gabcoyne opened this issue Apr 8, 2024 · 4 comments

Comments

@gabcoyne
Copy link
Contributor

gabcoyne commented Apr 8, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Terraform Version

Terraform version – 1.7.5
Prefect provider version – 0.1.2

Affected Resource(s)

  • prefect_*

Terraform Configuration Files

terraform {
  required_providers {
    prefect = {
      source = "prefecthq/prefect"
    }
  }
}
 
provider "prefect" {
  account_id = var.prefect_account_id
  api_key    = data.aws_secretsmanager_secret_version.api_token.secret_string
}

resource "prefect_workspace" "this" {
 name  = var.name
  handle = lower(var.name)
}

Expected Behavior

In the event of failure to create by 429 or 5XX errors, add retries to bring resiliency across the board.

Actual Behavior

In this example a 503 was returned when attempting to create multiple workspaces at once

Steps to Reproduce

  1. terraform apply

Important Factoids

Discussed adding https://github.com/hashicorp/go-retryablehttp

@gabcoyne gabcoyne added the bug Something isn't working label Apr 8, 2024
@taylor-curran
Copy link

I have a plus one on this ticket from customer.

@mitchnielsen
Copy link
Contributor

Received another report of this happening for prefect_variable resources.

@mitchnielsen
Copy link
Contributor

We recently added retries for prefect_workspace resources in #242. We can look into doing this for variables as well.

mitchnielsen added a commit that referenced this issue Aug 22, 2024
Adds retries on the attempt to Create a Variable for resiliency.

Related to #157
@mitchnielsen mitchnielsen self-assigned this Aug 22, 2024
mitchnielsen added a commit that referenced this issue Aug 22, 2024
Adds retries on the attempt to Create a Variable for resiliency.

Related to #157
@jamiezieziula jamiezieziula added the Migrated label Aug 28, 2024 — with Linear
@jamiezieziula jamiezieziula removed Migrated bug Something isn't working labels Aug 28, 2024
@mitchnielsen
Copy link
Contributor

Workspaces and variables seem to be the two resources where this popped up the most. For now, rather than adding retries to all resources, let's stick with what we've added so far. If anyone notices similar problems on other resources, please leave a comment here and we'll reopen to investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants