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

fix: Resolve Terratest Failure During Instance Deletion (21 Retries) | [DEVOP-4525] #44

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

bibek4699
Copy link
Contributor

@bibek4699 bibek4699 commented Jun 17, 2024

Pull Request Submission Checklist

Please confirm that you have done the following before requesting reviews:

  • I have confirmed that the PR type is appropriate for the change I am making according to the Honest Pull Request and Commit Message Naming Conventions.
  • I have typed an adequate description that explains why I am making this change.
  • I have installed and run standard pre-commit hooks that lints and validates my code.

Description

  • Terrtest is continuously failing with below error, full logs here
│ Error: Error, failed to delete instance sql-rr-7e3cc80c-read-replica: Error waiting for Delete Instance: couldn't find resource (21 retries)
│ 
│ 
╵***
=== CONT  TestTerraformCreateGCPSQL/create_mysql_with_read_replica
    destroy.go:11: 
        	Error Trace:	/home/runner/work/terraform-gcp-sql/terraform-gcp-sql/test/destroy.go:11
        	            				/home/runner/work/terraform-gcp-sql/terraform-gcp-sql/test/gcp_sql_test.go:71
        	Error:      	Received unexpected error:
        	            	FatalError***Underlying: error while running command: exit status 1; ╷
        	            	│ Error: Error, failed to delete instance sql-rr-7e3cc80c-read-replica: Error waiting for Delete Instance: couldn't find resource (21 retries)
        	            	│ 
        	            	│ 
        	            	╵***
        	Test:       	TestTerraformCreateGCPSQL/create_mysql_with_read_replica

It appears there is a bug in the terraform-google-provider. After reviewing the comments, I discovered that auto retry logic could resolve the issue. Since this functionality is not available in Terratest, I implemented a workaround logic.

Additionally, I updated GitHub Actions and upgraded the Go version to the latest. The Go version update was necessary due to deprecated dependencies.


This change is Reviewable

@bibek4699 bibek4699 requested a review from a team as a code owner June 17, 2024 16:34
@bibek4699 bibek4699 requested a review from jai June 17, 2024 16:34
@bibek4699 bibek4699 marked this pull request as draft June 17, 2024 16:34
@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@bibek4699 bibek4699 removed the request for review from jai June 17, 2024 16:34
@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Pusher: @bibek4699, Action: pull_request, Working Directory: ``, Workflow: terraform

@bibek4699 bibek4699 changed the title fix: terratest fix: Resolve Terratest Failure During Instance Deletion (21 Retries) | DEVOP-4525 Jun 18, 2024
@bibek4699 bibek4699 marked this pull request as ready for review June 18, 2024 07:29
@bibek4699 bibek4699 changed the title fix: Resolve Terratest Failure During Instance Deletion (21 Retries) | DEVOP-4525 fix: Resolve Terratest Failure During Instance Deletion (21 Retries) | [DEVOP-4525] Jun 18, 2024
@bibek4699 bibek4699 merged commit 2e73d11 into main Jun 18, 2024
11 of 12 checks passed
@bibek4699 bibek4699 deleted the bibek/hot-fix branch June 18, 2024 08:31
Copy link

🎉 This PR is included in version 1.13.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

4 participants