-
Notifications
You must be signed in to change notification settings - Fork 126
[CI] Review output in CI builds #2639
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
Conversation
/test |
1 similar comment
/test |
202d0c3
to
a5ca34a
Compare
test serverless |
Triggered serverless pipeline: https://buildkite.com/elastic/elastic-package-test-serverless/builds/473 |
test serverless |
Triggered serverless pipeline: https://buildkite.com/elastic/elastic-package-test-serverless/builds/474 |
test serverless |
Triggered serverless pipeline: https://buildkite.com/elastic/elastic-package-test-serverless/builds/476 |
test serverless |
Triggered serverless pipeline: https://buildkite.com/elastic/elastic-package-test-serverless/builds/477 |
test serverless |
Triggered serverless pipeline: https://buildkite.com/elastic/elastic-package-test-serverless/builds/481 |
/test |
if [[ "${TARGET}" == "${TEST_BUILD_INSTALL_ZIP_TARGET}" || "${TARGET}" == "${FALSE_POSITIVES_TARGET}" ]]; then | ||
echo "--- Install yq" | ||
with_yq | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to install yq
in other targets for now.
@@ -1,17 +1,22 @@ | |||
#!/bin/bash | |||
|
|||
set -euxo pipefail | |||
set -euo pipefail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed set -x
from scripts/test-build*.sh
shell scripts.
It looks to me that it is not needed at least in these targets.
I'm not totally sure if this flag should be kept in the other scripts (e.g. scripts/test-check-packages.sh
).
WDYT ? Should we remove set -x
in all these scripts ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm, I find these useful when debugging, there would be some way to optionally add them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue in these scripts is that there are some commands that are inside nested loops or nested ifs. That causes that set -x
adds three dashes to show the command executed and Buildkite interprets that as a Collapsed group.
I've applied a workaround where it was affected via running the commands in a sub-shell and disabling that flag set +x
. After that command, it continues with the previous value (
set -x`).
61a3f54
to
9a048e1
Compare
test serverless |
Triggered serverless pipeline: https://buildkite.com/elastic/elastic-package-test-serverless/builds/482 |
is_stack_created() { | ||
local files=0 | ||
files=$(find ~/.elastic-package -type f -name "docker-compose.yml" | wc -l) | ||
if [ "${files}" -gt 0 ]; then | ||
return 0 | ||
fi | ||
return 1 | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Helper function to know if elastic-package stack up
command has been performed or not.
There could be packages that fail in elastic-package check
command and if so, the Elastic stack has not been created.
This is helpful to avoid running commands like elastic-package stack <dump|down>
that are going to fail.
# Required containers could not be running, so ignore the error | ||
elastic-package stack dump -v --output build/elastic-stack-dump/build-zip || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example of the error to try to avoid:
https://buildkite.com/elastic/elastic-package/builds/5786#01983b8a-52f4-4906-a5fe-7379469778ed/350-608
This will help to continue running the other commands in the cleanup function.
💔 Build Failed
Failed CI StepsHistory
cc @mrodm |
test serverless |
Triggered serverless pipeline: https://buildkite.com/elastic/elastic-package-test-serverless/builds/490 |
The error/issue of self-monitor step could be related to this elastic/integrations#14674 |
Tested with elastic-package Tested by changing the version of the --- internal/stack/_static/kibana.yml.tmpl
+++ internal/stack/_static/kibana.yml.tmpl
@@ -56,7 +56,7 @@ xpack.cloudSecurityPosture.enabled: true
xpack.fleet.packages:
{{ if eq $self_monitor_enabled "true" }}
- name: system
- version: latest
+ version: 2.4.0
{{ end }}
- name: elastic_agent
version: latest So, I think this failure in the CI is unrelated to the changes in this PR. |
Make easier to read Buidkite output:
Author's checklist