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 terraform cleanup error #33216

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

kaiyan-sheng
Copy link
Contributor

What does this PR do?

I'm seeing this terraform clean up error in 2 different PRs:
#33105 and #33143

[2022-09-28T17:52:04.645Z] + .ci/scripts/terraform-cleanup.sh x-pack/filebeat
[2022-09-28T17:52:04.645Z] + DIRECTORY=x-pack/filebeat
[2022-09-28T17:52:04.645Z] + FAILED=0
[2022-09-28T17:52:04.645Z] ++ find x-pack/filebeat -name terraform.tfstate
[2022-09-28T17:52:04.747Z] + for tfstate in $(find $DIRECTORY -name terraform.tfstate)
[2022-09-28T17:52:04.747Z] ++ dirname x-pack/filebeat/input/awss3/_meta/terraform/terraform.tfstate
[2022-09-28T17:52:04.747Z] + cd x-pack/filebeat/input/awss3/_meta/terraform
[2022-09-28T17:52:04.747Z] + terraform destroy -auto-approve
[2022-09-28T17:52:05.550Z] �[31m╷�[0m�[0m
[2022-09-28T17:52:05.550Z] �[31m│�[0m �[0m�[1m�[31mError: �[0m�[0m�[1mCould not load plugin�[0m
[2022-09-28T17:52:05.550Z] �[31m│�[0m �[0m
[2022-09-28T17:52:05.550Z] �[31m│�[0m �[0m�[0m
[2022-09-28T17:52:05.550Z] �[31m│�[0m �[0mPlugin reinitialization required. Please run "terraform init".
[2022-09-28T17:52:05.550Z] �[31m│�[0m �[0m
[2022-09-28T17:52:05.550Z] �[31m│�[0m �[0mPlugins are external binaries that Terraform uses to access and manipulate
[2022-09-28T17:52:05.550Z] �[31m│�[0m �[0mresources. The configuration provided requires plugins which can't be
[2022-09-28T17:52:05.550Z] �[31m│�[0m �[0mlocated,
[2022-09-28T17:52:05.550Z] �[31m│�[0m �[0mdon't satisfy the version constraints, or are otherwise incompatible.
[2022-09-28T17:52:05.550Z] �[31m│�[0m �[0m
[2022-09-28T17:52:05.550Z] �[31m│�[0m �[0mTerraform automatically discovers provider requirements from your
[2022-09-28T17:52:05.550Z] �[31m│�[0m �[0mconfiguration, including providers used in child modules. To see the
[2022-09-28T17:52:05.550Z] �[31m│�[0m �[0mrequirements and constraints, run "terraform providers".
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0m
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0m3 problems:
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0m
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0m- failed to instantiate provider "registry.terraform.io/hashicorp/aws" to
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0mobtain schema: the cached package for registry.terraform.io/hashicorp/aws
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0m3.52.0 (in .terraform/providers) does not match any of the checksums
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0mrecorded in the dependency lock file
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0m- failed to instantiate provider "registry.terraform.io/hashicorp/local" to
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0mobtain schema: the cached package for registry.terraform.io/hashicorp/local
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0m2.1.0 (in .terraform/providers) does not match any of the checksums
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0mrecorded in the dependency lock file
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0m- failed to instantiate provider "registry.terraform.io/hashicorp/random"
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0mto obtain schema: the cached package for
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0mregistry.terraform.io/hashicorp/random 3.1.0 (in .terraform/providers) does
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0mnot match any of the checksums recorded in the dependency lock file
[2022-09-28T17:52:05.551Z] �[31m│�[0m �[0m
[2022-09-28T17:52:05.551Z] �[31m╵�[0m�[0m
[2022-09-28T17:52:05.551Z] + FAILED=1
[2022-09-28T17:52:05.551Z] + cd -
[2022-09-28T17:52:05.551Z] /var/lib/jenkins/workspace/PR-33143-3-ee38bf65-a63d-4871-be8a-7d2e58e71adc/src/github.com/elastic/beats
[2022-09-28T17:52:05.551Z] + exit 1
script returned exit code 1

I added this change into my PR and CI passed. Since I don't know when my PR will get merged, I would like to get this line of change out into its own PR so I can unblock other PRs from failing CI.

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 28, 2022
@mergify
Copy link
Contributor

mergify bot commented Sep 28, 2022

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @kaiyan-sheng? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@kaiyan-sheng kaiyan-sheng marked this pull request as ready for review September 28, 2022 18:07
@kaiyan-sheng kaiyan-sheng requested a review from a team as a code owner September 28, 2022 18:07
@kaiyan-sheng kaiyan-sheng requested review from cmacknz and fearful-symmetry and removed request for a team September 28, 2022 18:07
@kaiyan-sheng kaiyan-sheng added backport-v8.4.0 Automated backport with mergify backport-v8.5.0 Automated backport with mergify Team:Cloud-Monitoring Label for the Cloud Monitoring team labels Sep 28, 2022
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 28, 2022
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-09-28T18:08:05.705+0000

  • Duration: 77 min 10 sec

Test stats 🧪

Test Results
Failed 0
Passed 23634
Skipped 1950
Total 25584

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@botelastic botelastic bot added the Team:Automation Label for the Observability productivity team label Sep 28, 2022
@kaiyan-sheng kaiyan-sheng merged commit 77e4e30 into elastic:main Sep 28, 2022
@kaiyan-sheng kaiyan-sheng deleted the fix_terraform_cleanup branch September 28, 2022 19:47
mergify bot pushed a commit that referenced this pull request Sep 28, 2022
mergify bot pushed a commit that referenced this pull request Sep 28, 2022
@cmacknz cmacknz requested a review from v1v September 28, 2022 20:59
kaiyan-sheng added a commit that referenced this pull request Sep 29, 2022
(cherry picked from commit 77e4e30)

Co-authored-by: kaiyan-sheng <[email protected]>
kaiyan-sheng added a commit that referenced this pull request Sep 30, 2022
(cherry picked from commit 77e4e30)

Co-authored-by: kaiyan-sheng <[email protected]>
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.4.0 Automated backport with mergify backport-v8.5.0 Automated backport with mergify Team:Automation Label for the Observability productivity team Team:Cloud-Monitoring Label for the Cloud Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants