Skip to content

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Sep 10, 2025

What does this PR do?

This PR fixes issues with ESS stack cleanup in CI by:

  • Moving the ASDF_TERRAFORM_VERSION definition to the global pipeline environment so it is available to all steps, ensuring asdf provides the required terraform binary.
  • Passing the ess_region variable explicitly to terraform destroy in both Bash and PowerShell scripts, since it is required to properly clean up FIPS ESS stacks that do not use the default region specified in Terraform files.
  • Ensuring the correct set of Terraform environment variables is consistently provided during ESS stack cleanup.

Why is it important?

Without these changes, ESS stacks are not be cleaned up correctly after CI runs due to missing terraform binaries, unset environment variables, or incorrect region handling. This results in orphaned cloud resources, higher costs, and hitting stack quotas, which can block new CI runs from provisioning fresh environments.

Before this PR link. With this PR link.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

None expected. These changes affect only CI pipelines and cleanup scripts.

How to test this PR locally

Open a draft PR and see that ESS cleanup steps are actually cleaning up the stacks.

Related issues

N/A


This is an automatic backport of pull request #9832 done by Mergify.

* fix: specify terraform env var everywhere

* fix: proper env vars for ESS Stack clean up

* fix: error when terraform fails to destroy ESS stack

* fix: pass ess_region in terraform destroy

(cherry picked from commit 6918b7b)

# Conflicts:
#	.buildkite/bk.integration-fips.pipeline.yml
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Sep 10, 2025
@mergify mergify bot requested a review from a team as a code owner September 10, 2025 12:18
@mergify mergify bot added the conflicts There is a conflict in the backported pull request label Sep 10, 2025
Copy link
Contributor Author

mergify bot commented Sep 10, 2025

Cherry-pick of 6918b7b has failed:

On branch mergify/bp/9.0/pr-9832
Your branch is up to date with 'origin/9.0'.

You are currently cherry-picking commit 6918b7b07.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   .buildkite/bk.integration.pipeline.yml
	modified:   .buildkite/scripts/steps/ess.ps1
	modified:   .buildkite/scripts/steps/ess.sh
	modified:   .buildkite/scripts/steps/ess_down.sh

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   .buildkite/bk.integration-fips.pipeline.yml

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot added the backport label Sep 10, 2025
@mergify mergify bot mentioned this pull request Sep 10, 2025
8 tasks
@pkoutsovasilis pkoutsovasilis removed the conflicts There is a conflict in the backported pull request label Sep 10, 2025
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@elasticmachine
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

cc @pkoutsovasilis

@pkoutsovasilis pkoutsovasilis merged commit 2ae3ccf into 9.0 Sep 10, 2025
20 checks passed
@pkoutsovasilis pkoutsovasilis deleted the mergify/bp/9.0/pr-9832 branch September 10, 2025 16:27
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.

3 participants