-
Notifications
You must be signed in to change notification settings - Fork 154
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
Add JUnit annotate BK plugin #5473
Add JUnit annotate BK plugin #5473
Conversation
This pull request does not have a backport label. Could you fix it @alexsapran? 🙏
NOTE: |
agents: | ||
provider: "gcp" | ||
depends_on: | ||
- step: "unit-tests-2204" |
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.
I noticed something that might cause a problem.
Some steps produce the same artifact for reporting the test files, for example, unit-tests-2204
produce the same xml
files as unit-tests-2204-arm64
dev-tools/mage/gotest.go
Outdated
fileName := fmt.Sprintf("build/TEST-go-%s", strings.Replace(strings.ToLower(name), " ", "_", -1)) | ||
fileName := "" | ||
_, isCI := os.LookupEnv("CI") | ||
if isCI { |
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.
When running inside CI, the BK plugin will try to link the failure to the step if the generated file has this pattern.
|
|
967b239
to
c77020b
Compare
This is goint to help with easier triaging what failed on each build. Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Because some steps are producing the same artifact names, when uploaded and re-downloaed they overwrite each other. This is why we are attempting to split the annotate after each step to make it easier to deferentiate between the artifacts from each step Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
When running inside BK, we are running the same commands but in different enviroments, this PR changes this and differentiate each resulting artifact of JUnit to have a unique name for the step that was generated. This in combination with the JUnit annotate plugin provide better understanding on what failed on which step in the build. Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
c77020b
to
98bfbfd
Compare
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Since we are renaming the cov file for each step to use the same name, lets move it instead and spare the traffic of one more file Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
source .buildkite/scripts/common.sh | ||
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.
We set pipefail in the common.sh
so the script was never run and performed the proper coverage files.
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.
What script was never run?
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.
Because of the order in which we set the bash flags, the' pipe failwas overridden inside the
common.sh`, so the exit code's wrapping was never run.
So if the mage
command failed, the script would exit, not producing any coverage.out
but only a Test-go-unit.cov
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.
coincidently, this failure is seen in this unrelated build https://buildkite.com/elastic/elastic-agent/builds/12911#_
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
This reverts commit 982d626.
|
* Add JUnit annotate BK plugin Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co> (cherry picked from commit 0d5b335)
What does this PR do?
This PR adds the JUnit annotate Buildkite plugin
Why is it important?
This is goint to help with easier triaging what failed on each build.
I pushed a temp commit to cause some errors. See the screenshot

Now, when a test fails, you see the failure at the top with an additional link to the step that caused that error.
Example build with a failure to show this in action https://buildkite.com/elastic/elastic-agent/builds/12866
How to test this PR locally
This is a Buildkite change, only testable on BK.
Related issues
Related: https://github.com/elastic/ingest-dev/issues/3773