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

Revert "add a DEB integration test" #4419

Merged
merged 1 commit into from
Mar 15, 2024
Merged

Conversation

rdner
Copy link
Member

@rdner rdner commented Mar 15, 2024

Reverts #4301

The Serverless Beats Tests step in our daily builds started failing with:

Error: error running test: missing required Elastic Agent package builds for integration runner to execute: /tmp/beats-build/beats/x-pack/metricbeat/build/distributions/elastic-agent-8.14.0-SNAPSHOT-linux-x86_64.tar.gz, /tmp/beats-build/beats/x-pack/metricbeat/build/distributions/elastic-agent-8.14.0-SNAPSHOT-linux-x86_64.tar.gz.sha512, /tmp/beats-build/beats/x-pack/metricbeat/build/distributions/elastic-agent-8.14.0-SNAPSHOT-x86_64.rpm, /tmp/beats-build/beats/x-pack/metricbeat/build/distributions/elastic-agent-8.14.0-SNAPSHOT-x86_64.rpm.sha512, /tmp/beats-build/beats/x-pack/metricbeat/build/distributions/elastic-agent-8.14.0-SNAPSHOT-amd64.deb, /tmp/beats-build/beats/x-pack/metricbeat/build/distributions/elastic-agent-8.14.0-SNAPSHOT-amd64.deb.sha512
~/builds/bk-agent-prod-gcp-1710406561496364062/elastic/elastic-agent

The last successful build is https://buildkite.com/elastic/elastic-agent/builds/7707
The first failure is https://buildkite.com/elastic/elastic-agent/builds/7735

There were only 2 changes made between these, this change is one of them. Let's try to revert this first because it has the least impact.

@rdner rdner self-assigned this Mar 15, 2024
@rdner rdner requested a review from a team as a code owner March 15, 2024 08:34
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@rdner rdner enabled auto-merge (squash) March 15, 2024 08:35
Copy link

Quality Gate passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No Coverage information No data about Coverage
0.0% 0.0% Duplication on New Code

See analysis details on SonarQube

@rdner rdner merged commit a7034ef into main Mar 15, 2024
12 checks passed
@rdner rdner deleted the revert-4301-4086_integration_deb_rpm branch March 15, 2024 10:42
@leehinman
Copy link
Contributor

Fix is easy. Line 23 in .buildkit/scripts/steps/beats_tests.sh should be:

    SNAPSHOT=true PLATFORMS=linux/amd64 PACKAGES=tar.gz,zip,deb,rpm mage package

it adds the deb & rpm packages.

My question is why did we pass all the tests when #4301 was merged?

@rdner
Copy link
Member Author

rdner commented Mar 16, 2024

The next daily build passed https://buildkite.com/elastic/elastic-agent/builds/7791
This confirms that the change was the cause of the failure.

@rdner
Copy link
Member Author

rdner commented Mar 16, 2024

@leehinman we run serverless tests only on daily builds, therefore it was not caught before.

@leehinman
Copy link
Contributor

@leehinman we run serverless tests only on daily builds, therefore it was not caught before.

Well I opened up #4424 to restore this, with the potential fix. But given that the serverless tests won't run, do we just merge and hope for the best? @pierrehilbert @jlind23 this seems like a gap we will want to close in the near future.

@rdner
Copy link
Member Author

rdner commented Mar 18, 2024

@leehinman one can temporarily set the CRON environment variable to yes. This will trigger the Serverless Beats Tests step you need.

if: "build.env('CRON') == 'yes'"

@cmacknz
Copy link
Member

cmacknz commented Mar 18, 2024

You could also just run the script the beats tests use to check that you can past the broken step manually:

run_test_for_beat(){
export GOFLAGS='-buildvcs=false'
local beat_name=$1
#build
export WORKSPACE="/tmp/beats-build/beats/x-pack/${beat_name}"
pushd $WORKSPACE
whoami
ls -la
SNAPSHOT=true PLATFORMS=linux/amd64 PACKAGES=tar.gz,zip mage package
popd
#run
export AGENT_BUILD_DIR="/tmp/beats-build/beats/x-pack/${beat_name}/build/distributions"
export WORKSPACE=$(pwd)
set +e
TEST_INTEG_CLEAN_ON_EXIT=true TEST_PLATFORMS="linux/amd64" STACK_PROVISIONER="$STACK_PROVISIONER" SNAPSHOT=true mage integration:testBeatServerless $beat_name
TESTS_EXIT_STATUS=$?
set -e
return $TESTS_EXIT_STATUS
}

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.

5 participants