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(example/vmseries_standalone): Resolve problem with unstable VM-Series standalone example tests #69

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

sebastianczech
Copy link
Contributor

@sebastianczech sebastianczech commented Aug 12, 2024

Description

From time to time VM-Series standalone example tests are failing during release e.g. https://github.com/PaloAltoNetworks/terraform-aws-swfw-modules/actions/runs/10294382059/job/28492474494

In order to solve the problem with S3, additional retry was configured.

Motivation and Context

From time to time release workflows fails.

How Has This Been Tested?

Code was tested via ChatOps.

In execution https://github.com/PaloAltoNetworks/terraform-aws-swfw-modules/actions/runs/10364614423/job/28690221035 there was a problem with S3 objects, but workflow didn't fail - it just retried once again after 5 seconds (by default there are max 3 retries):

  TestIdempotence 2024-08-13T06:19:15Z retry.go:144: 'terraform [apply -input=false -auto-approve -var-file example.tfvars -var name_prefix=p69-421c- -var ssh_key_name=test-ssh-key -lock=true]' failed with the error 'error while running command: exit status 1; ╷
  │ Error: reading S3 Object (config/): couldn't find resource
  │ 
  │   with module.bootstrap["vmseries-01"].aws_s3_object.bootstrap_dirs["config/"],
  │   on ../../modules/bootstrap/main.tf line 65, in resource "aws_s3_object" "bootstrap_dirs":
  │   65: resource "aws_s3_object" "bootstrap_dirs" {
  │ 
  ╵' but this error was expected and warrants a retry. Further details: Solution for problem with reading objects from S3 - couldn't find resource while reading S3 object
  TestIdempotence 2024-08-13T06:19:15Z retry.go:103: terraform [apply -input=false -auto-approve -var-file example.tfvars -var name_prefix=p69-421c- -var ssh_key_name=test-ssh-key -lock=true] returned an error: error while running command: exit status 1; ╷
  │ Error: reading S3 Object (config/): couldn't find resource
  │ 
  │   with module.bootstrap["vmseries-01"].aws_s3_object.bootstrap_dirs["config/"],
  │   on ../../modules/bootstrap/main.tf line 65, in resource "aws_s3_object" "bootstrap_dirs":
  │   65: resource "aws_s3_object" "bootstrap_dirs" {
  │ 
  ╵. Sleeping for 5s and will try again.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

@sebastianczech
Copy link
Contributor Author

sebastianczech commented Aug 12, 2024

/idempotence paths="examples/vmseries_standalone"

Testing job ID: 10351544675
Job result: SUCCESS

@sebastianczech
Copy link
Contributor Author

sebastianczech commented Aug 12, 2024

/idempotence paths="examples/vmseries_standalone"

Testing job ID: 10352029080
Job result: FAILURE
Job result: SUCCESS

@sebastianczech
Copy link
Contributor Author

sebastianczech commented Aug 12, 2024

/idempotence paths="examples/vmseries_standalone"

Testing job ID: 10352343908
Job result: FAILURE

@sebastianczech
Copy link
Contributor Author

sebastianczech commented Aug 12, 2024

/idempotence paths="examples/vmseries_standalone"

Testing job ID: 10352635306
Job result: SUCCESS

@sebastianczech
Copy link
Contributor Author

sebastianczech commented Aug 12, 2024

/idempotence paths="examples/vmseries_standalone"

Testing job ID: 10352895998
Job result: SUCCESS

@sebastianczech
Copy link
Contributor Author

sebastianczech commented Aug 12, 2024

/idempotence paths="examples/vmseries_standalone"

Testing job ID: 10353240407
Job result: FAILURE
Job result: SUCCESS

@sebastianczech
Copy link
Contributor Author

sebastianczech commented Aug 13, 2024

/idempotence paths="examples/vmseries_standalone"

Testing job ID: 10364614423
Job result: SUCCESS

@sebastianczech
Copy link
Contributor Author

In execution https://github.com/PaloAltoNetworks/terraform-aws-swfw-modules/actions/runs/10364614423/job/28690221035 there was a problem with S3 objects, but workflow didn't fail - it just retried once again after 5 seconds (by default there are max 3 retries):

  TestIdempotence 2024-08-13T06:19:15Z retry.go:144: 'terraform [apply -input=false -auto-approve -var-file example.tfvars -var name_prefix=p69-421c- -var ssh_key_name=test-ssh-key -lock=true]' failed with the error 'error while running command: exit status 1; ╷
  │ Error: reading S3 Object (config/): couldn't find resource
  │ 
  │   with module.bootstrap["vmseries-01"].aws_s3_object.bootstrap_dirs["config/"],
  │   on ../../modules/bootstrap/main.tf line 65, in resource "aws_s3_object" "bootstrap_dirs":
  │   65: resource "aws_s3_object" "bootstrap_dirs" {
  │ 
  ╵' but this error was expected and warrants a retry. Further details: Solution for problem with reading objects from S3 - couldn't find resource while reading S3 object
  TestIdempotence 2024-08-13T06:19:15Z retry.go:103: terraform [apply -input=false -auto-approve -var-file example.tfvars -var name_prefix=p69-421c- -var ssh_key_name=test-ssh-key -lock=true] returned an error: error while running command: exit status 1; ╷
  │ Error: reading S3 Object (config/): couldn't find resource
  │ 
  │   with module.bootstrap["vmseries-01"].aws_s3_object.bootstrap_dirs["config/"],
  │   on ../../modules/bootstrap/main.tf line 65, in resource "aws_s3_object" "bootstrap_dirs":
  │   65: resource "aws_s3_object" "bootstrap_dirs" {
  │ 
  ╵. Sleeping for 5s and will try again.

@sebastianczech sebastianczech marked this pull request as ready for review August 13, 2024 06:34
@sebastianczech sebastianczech requested a review from a team as a code owner August 13, 2024 06:34
@sebastianczech sebastianczech changed the title fix: Resolve problem with unstable VM-Series standalone example tests fix(example/vmseries_standalone): Resolve problem with unstable VM-Series standalone example tests Aug 13, 2024
@migara migara requested a review from michalbil August 29, 2024 09:19
@michalbil michalbil merged commit 60593ca into main Aug 29, 2024
13 checks passed
@michalbil michalbil deleted the retry-vmseries-s3-problem branch August 29, 2024 11:18
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.

2 participants