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

Ess terraform + run integration tests on BK agents (backport #5113) #6321

Draft
wants to merge 6 commits into
base: 8.16
Choose a base branch
from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 13, 2024

What does this PR do?

A dedicated pipeline that runs Ubuntu integration tests directly on Buildkite runners without OGC. Currently it's not triggered by any of Github events.
Sudo tests build example

  • Improves groupping transparency. We can now immediately see long-running groups;
  • Adds the ability to rerun failed groups instead of the entire pipeline build;
  • Introduces a simple terraform configuration for ESS stack instead of a complex stack provisioner;
  • Uses prebuilt VM images platform-ingest-elastic-agent-ubuntu-2204. All required packages are pre-installed and we don't need to install them in runtime;
  • Adds the ability to use all the gobld-supported CSPs and VMs incl. ARM64 and MacOS.

Shared ESS stack and test reruns

The Start ESS stack for integration tests spins up an ESS stack that is used by following integration tests. When the tests are complete, the stack will be destroyed regardless of the test results. When we restart a single test group, it will start a dedicated stack and destroy it when the tests are complete.

Screenshot 2024-10-07 at 11 53 03

This type of pipeline is supposed to replace the existing single-step approach. Further upcoming changes a listed in the the meta-issue.

Why is it important?

Checklist

  • 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

How to test this PR locally

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

This is an automatic backport of pull request #5113 done by [Mergify](https://mergify.com).

Copy link
Contributor Author

mergify bot commented Dec 13, 2024

Cherry-pick of 7aa8bb2 has failed:

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

You are currently cherry-picking commit 7aa8bb222f.
  (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)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both added:      .buildkite/bk.integration.pipeline.yml
	both added:      .buildkite/scripts/steps/ess.sh
	both added:      .buildkite/scripts/sudo-integration-tests.sh

no changes added to commit (use "git add" and/or "git commit -a")

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 conflicts There is a conflict in the backported pull request label Dec 13, 2024
@mergify mergify bot requested a review from a team as a code owner December 13, 2024 06:56
@oakrizan oakrizan self-assigned this Dec 13, 2024
@oakrizan oakrizan marked this pull request as draft December 13, 2024 07:48
@oakrizan oakrizan added backport skip-changelog ci Team:Ingest-EngProd and removed conflicts There is a conflict in the backported pull request labels Dec 13, 2024
Copy link
Contributor Author

mergify bot commented Dec 16, 2024

This pull request has not been merged yet. Could you please review and merge it @oakrizan? 🙏

pazone and others added 5 commits December 17, 2024 14:22
* ESS by terraforms

* Use bk runners

* added state to artifacts

* Add common.sh to scripts

* Add depends_on

* Inlined paclage variables

* tmp disbale unit tests

* tmp disbale unit tests

* install tf

* install tf

* install tf

* install tf

* fix ec creds

* Added auto-approve

* Test run

* package again

* package again

* package again

* package again

* package

* package

* added mage build:testBinaries

* Install mage

* Install mage

* Install mage

* Install mage

* Install mage

* fix go

* Merged

* Merged

* fix

* fix

* Fix tests

* Debug

* Use custom image

* New suod tests

* Test run

* Test run

* Test run

* Debug

* Debug

* Debug

* Debug

* Debug

* Cleanup

* Using subshell in newgrp

* Using subshell in newgrp

* Test new custom VM image

* Test new custom VM image

* Set terraform version

* Cleanup

* terraform 1.9.3

* terraform 1.9.3

* Debug

* Explicit image version

* Explicit image version

* Explicit image version

* Sudo tests

* +x

* Try mage integration:local

* Use gotestsum

* Use gotestsum

* Run sudo tests

* Run sudo tests

* Debug

* Debug

* Debug

* Debug

* Debug

* Debug

* Debug

* Debug

* Increased test timeout

* Groupped sudo tests

* Quoted regexps

* BK steps by groups

* BK steps by groups

* BK steps by groups

* BK steps by groups

* fix param propagation

* Debug

* Big run

* reuse EC_API_KEY

* Debug test

* Debug a test

* Revert debug

* Debug

* Html report

* groupping, auto-retry, packaging

* removed reruns

* Reuse the initial ESS stack. Start a new stack for retries

* Fix ess start path

* Fix ess start path

* Fix ess start path

* Fix ess start path

* Debug

* Debug

* Debug

* Fix EC_KEY recovery

* Added lock to artifacts

* Fix artifacts download path

* Fix artifacts download path

* Fix artifacts download path

* Removed unnecessaru build dependencies

* Added build id

* Separated BK integration tests to a dedicated pipeline

* CLeanup

* Applied proposed changes

* Applied proposed changes

* Applied proposed changes

(cherry picked from commit 7aa8bb2)

# Conflicts:
#	.buildkite/bk.integration.pipeline.yml
#	.buildkite/scripts/steps/ess.sh
#	.buildkite/scripts/sudo-integration-tests.sh
* ESS by terraforms

* Use bk runners

* added state to artifacts

* Add common.sh to scripts

* Add depends_on

* Inlined paclage variables

* tmp disbale unit tests

* tmp disbale unit tests

* install tf

* install tf

* install tf

* install tf

* fix ec creds

* Added auto-approve

* Test run

* package again

* package again

* package again

* package again

* package

* package

* added mage build:testBinaries

* Install mage

* Install mage

* Install mage

* Install mage

* Install mage

* fix go

* Merged

* Merged

* fix

* fix

* Fix tests

* Debug

* Use custom image

* New suod tests

* Test run

* Test run

* Test run

* Debug

* Debug

* Debug

* Debug

* Debug

* Cleanup

* Using subshell in newgrp

* Using subshell in newgrp

* Test new custom VM image

* Test new custom VM image

* Set terraform version

* Cleanup

* terraform 1.9.3

* terraform 1.9.3

* Debug

* Explicit image version

* Explicit image version

* Explicit image version

* Sudo tests

* +x

* Try mage integration:local

* Use gotestsum

* Use gotestsum

* Run sudo tests

* Run sudo tests

* Debug

* Debug

* Debug

* Debug

* Debug

* Debug

* Debug

* Debug

* Increased test timeout

* Groupped sudo tests

* Quoted regexps

* BK steps by groups

* BK steps by groups

* BK steps by groups

* BK steps by groups

* fix param propagation

* Debug

* Big run

* reuse EC_API_KEY

* Debug test

* Debug a test

* Revert debug

* Debug

* Html report

* groupping, auto-retry, packaging

* removed reruns

* Reuse the initial ESS stack. Start a new stack for retries

* Fix ess start path

* Fix ess start path

* Fix ess start path

* Fix ess start path

* Debug

* Debug

* Debug

* Fix EC_KEY recovery

* Added lock to artifacts

* Fix artifacts download path

* Fix artifacts download path

* Fix artifacts download path

* Removed unnecessaru build dependencies

* Added build id

* Separated BK integration tests to a dedicated pipeline

* CLeanup

* Applied proposed changes

* Applied proposed changes

* Applied proposed changes

(cherry picked from commit 7aa8bb2)
@oakrizan oakrizan force-pushed the mergify/bp/8.16/pr-5113 branch from 85d629b to aab7766 Compare December 17, 2024 12:29
@oakrizan oakrizan force-pushed the mergify/bp/8.16/pr-5113 branch from aab7766 to 2665037 Compare December 18, 2024 08:29
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

Copy link
Contributor Author

mergify bot commented Dec 23, 2024

This pull request has not been merged yet. Could you please review and merge it @oakrizan? 🙏

1 similar comment
Copy link
Contributor Author

mergify bot commented Dec 30, 2024

This pull request has not been merged yet. Could you please review and merge it @oakrizan? 🙏

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.

2 participants