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

Added retry for when module lookup fails from app.terraform.io #1342

Merged
merged 2 commits into from
Sep 15, 2020
Merged

Added retry for when module lookup fails from app.terraform.io #1342

merged 2 commits into from
Sep 15, 2020

Conversation

robbruce
Copy link
Contributor

Similar to #1332 however, the output can also appear from terraform as

Error: Error accessing remote module registry

Failed to retrieve available versions for module "x" (main.tf:123) from
app.terraform.io: error looking up module versions: 429 Too Many Requests.

which is a subtly different message to pattern match

@robbruce
Copy link
Contributor Author

And just to show this patch detects the retry, this appears when using

Error: Error accessing remote module registry

Failed to retrieve available versions for module "x" (main.tf:123) from
app.terraform.io: error looking up module versions: 429 Too Many Requests.

[terragrunt] [/path/to/module] 2020/09/13 22:05:19 Encountered an error eligible for retrying. Sleeping 5s before retrying.

@kwilczynski
Copy link
Contributor

Hi @robbruce, thank you for the Pull Request!

Do you think that, given how similar the errors are, the regular expression introduced in Pull Request #1332 could be made to match all of the similarly looking messages? The end-result is to recover (retry) from the 429 status code sent back from the Terraform Registry.

Copy link
Member

@brikis98 brikis98 left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM! I'll kick off tests now.

@brikis98
Copy link
Member

Hm, I think we're hitting some sort of CircleCi bug. All the tests ran and passed, but CircleCi shows the build as "queued":

Screen Shot 2020-09-15 at 1 07 29 PM

I think I'll cancel and re-run just in case.

Copy link
Member

@brikis98 brikis98 left a comment

Choose a reason for hiding this comment

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

OK, tests passed! Merging now.

@brikis98 brikis98 merged commit 293d58b into gruntwork-io:master Sep 15, 2020
@brikis98
Copy link
Member

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

Successfully merging this pull request may close these issues.

3 participants