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

ci: run terraform apply in provider example test with timeout #3482

Merged
merged 3 commits into from
Nov 21, 2024

Conversation

daniel-weisse
Copy link
Member

@daniel-weisse daniel-weisse commented Nov 18, 2024

Context

GitHub actions are run with a 6 hour internal timeout, after which running steps are terminated.
The termination signal is not properly forwarded to the running Terraform process, leading to resources not being cleaned up and state information potentially being lost.
For us, this only happens when there is an internal error during the constellation apply stage of the terraform provider, which is ran without any timeouts.
Since terraform apply does not support any global timeout flags, we may hit the 6 hour mark during this step.

Proposed change(s)

  • Run terraform apply with timeout to stop execution of apply after 1 hour, or 4 hours for upgrades
  • Ignore lock file when running terraform destroy

Related issue

@daniel-weisse daniel-weisse added the no changelog Change won't be listed in release changelog label Nov 18, 2024
Copy link

netlify bot commented Nov 18, 2024

Deploy Preview for constellation-docs canceled.

Name Link
🔨 Latest commit 5cb6129
🔍 Latest deploy log https://app.netlify.com/sites/constellation-docs/deploys/673d96d6e1d4550008c23f8a

Copy link
Member

@3u13r 3u13r left a comment

Choose a reason for hiding this comment

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

this only happens when there is an internal error during the constellation apply stage of the terraform provider, which is ran without any timeouts.

This would also affect other people using our provider in the Terraform CI, right? Moreover, I think the proper fix is to have a default, user editable timeout in the constellation apply step.
Having said that, we can do this as a follow up, since we want to fix CI issues here.

.github/workflows/e2e-test-provider-example.yml Outdated Show resolved Hide resolved
Signed-off-by: Daniel Weiße <[email protected]>
Copy link
Member

@3u13r 3u13r left a comment

Choose a reason for hiding this comment

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

LGTM

@daniel-weisse daniel-weisse merged commit 775ba22 into main Nov 21, 2024
6 checks passed
@daniel-weisse daniel-weisse deleted the dw/fix-ci-cleanup branch November 21, 2024 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Change won't be listed in release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants