Skip to content

ROX-11931: Convert junit failure artifacts to Slack attachments#3438

Merged
BradLugo merged 19 commits intomasterfrom
blugo/ROX-11931-junit2slack
Nov 10, 2022
Merged

ROX-11931: Convert junit failure artifacts to Slack attachments#3438
BradLugo merged 19 commits intomasterfrom
blugo/ROX-11931-junit2slack

Conversation

@BradLugo
Copy link
Contributor

@BradLugo BradLugo commented Oct 14, 2022

Description

Converts Junit artifacts that contain failures and failure messages to Slack message attachments.

Related to stackrox/junit-parse#1

Testing Performed

@openshift-ci
Copy link

openshift-ci bot commented Oct 14, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@BradLugo BradLugo force-pushed the blugo/ROX-11931-junit2slack branch from 4f9352a to 4c4fc58 Compare October 17, 2022 19:12
fi

local junit_file_names
junit_file_names=$(find "${ARTIFACT_DIR}" -type f -name 'junit-*.xml' | xargs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually brings up an interesting point (along with your suggestion on how to test these changes); at least from what it seems in the failed job #1582162936795762688, spyglass only looks at junit_operator.xml. In fact, when I tried to parse merge-local-roxctl-tests/stackrox-initial/artifacts/junit-reports/report.xml, it threw an error which leads me to believe we're not properly formatting some of these reports. That said, I haven't dug into that error yet. It could actually be the case that spyglass isn't surfacing useful error messages.

So then, should we only look at report.xml if present for now? Or spend the time to debug these (seemingly) malformed junit reports and try to parse all XML files? Interested in your take on this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So then, should we only look at report.xml if present for now?

Different jobs/tests name the JUnit differently. Sometimes single files, sometimes directories of XML (or maybe a directory with a single file). There is a wrapper script store_test_results to give you an idea of what you are dealing with.

#1582162936795762688 is a special but interesting case. The prow/spyglass Go code must be hitting the same error that you are and that is why it is not displayed in the UI. For errors we should do the same, silently drop them from the slack message. But it would be good to look at fixing the XML when it is dropped and/or fixing the parser in slack2junit and/or prow.

There are quite a few cases where you'll see prow/spyglass parse the Junit we (stackrox tests) create OK:
https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/branch-ci-stackrox-stackrox-master-merge-gke-qa-e2e-tests/1582357585149825024
https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/branch-ci-stackrox-stackrox-master-merge-openshift-penultimate-qa-e2e-tests/1580969317434920960

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, appreciate the feedback. I'll take a look at what's causing the malformed XML after this PR is merged.


Going back to the bash glob:

this might need some extended bash globbing to get to junit xml in sub dirs

I thought find would do this automatically. From the POSIX manual:

The find utility shall recursively descend the directory hierarchy from each file specified by path

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not with GNU find 4.9.0:

$ mkdir -p ttt/junit-crud
$ touch ttt/junit-crud/report.xml
$ find ttt -type f -name 'junit-*.xml'
$

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

** will work though and does not seem to require shopt extglob (at least for my shell which is closer to the CI OS then say MacOS).

$ x=ttt/**/*.xml
$ echo $x
ttt/junit-crud/report-2.xml ttt/junit-crud/report.xml
$

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circling back to this since I ended up going with find; it looks like your example is looking for junit-*.xml but the name of the file is report.xml.

'

local slack_attachments = junit2slack
if [[ "${slack_attachments}" != "" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if [[ "${slack_attachments}" != "" ]]; then
if [[ -n "${slack_attachments}" ]]; then

)

func TestConstructSlackMessage(t *testing.T) {
sample := `<?xml version="1.0" encoding="UTF-8"?>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use //go:embed to make the test portion clearer?
As it happens I was looking at this today: https://github.com/stackrox/stackrox/blob/master/pkg/x509utils/chains_test.go

Copy link
Contributor

@gavin-stackrox gavin-stackrox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, LGTM!, let me know when you are ready for a final review.

@BradLugo BradLugo changed the title Draft: ROX-11931: Convert junit artifacts to Slack attachments Draft: ROX-11931: Convert junit failure artifacts to Slack attachments Oct 18, 2022
@BradLugo BradLugo marked this pull request as ready for review October 18, 2022 19:30
@BradLugo BradLugo changed the title Draft: ROX-11931: Convert junit failure artifacts to Slack attachments ROX-11931: Convert junit failure artifacts to Slack attachments Oct 18, 2022
@ghost
Copy link

ghost commented Oct 18, 2022

Images are ready for the commit at d416a4c.

To use with deploy scripts, first export MAIN_IMAGE_TAG=3.72.x-573-gd416a4ccf0.

@BradLugo BradLugo force-pushed the blugo/ROX-11931-junit2slack branch 3 times, most recently from f832c2a to c669f14 Compare October 19, 2022 07:24
@BradLugo
Copy link
Contributor Author

@gavin-stackrox It seems that the unit test file is causing the CI to break. It seems to be breaking from the | go list pipe in the go-unit-tests make target. I think it's looking for a Go module from the master branch, but it's not there yet. Any thoughts or ideas on how to resolve this? I can ask the other engineers as well

@@ -0,0 +1,16 @@
module junit2slack
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd move this stuff to tools/junit2slack and make the module github.com/stackrox/stackrox/tools/junit2slack similar to https://github.com/stackrox/stackrox/blob/master/tools/linters/go.mod#L1. See https://go.dev/ref/mod#module-path for more about the module path

require (
github.com/GoogleCloudPlatform/testgrid v0.0.147
github.com/slack-go/slack v0.11.3
github.com/stretchr/testify v1.7.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be bumped to v1.8.0

@@ -0,0 +1,152 @@
package main

import (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the imports are out of order, which I think style-checks caught. You can run make style or quickstyle, if you have the https://github.com/stackrox/workflow scripts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I wasn't aware of those workflow scripts.

I have a file watcher to run goimports and the following was returned by quickstyle:

❯ quickstyle
[WARN] No relevant changes found in current directory.

I think the style-checks error is caused by my test XML file

junitFiles = append(junitFiles, junitSuites)

} else if errors.Is(err, os.ErrNotExist) {
log.Printf("%s doesn't exist: %s", fileName, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one annoying thing about Printf if it does not add \n, so we might want to add that ourselves

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like each Logger method will end up using Logger.Output which says:

A newline is appended if the last character of s is not already a newline.

That being said, I'm down to change this if we do something similar elsewhere in the repo

failureMessage := result.Failure.Message

// If there's no failure message, we'll use a different message (this shouldn't be the usual case)
if len(failureMessage) <= 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can just check == 0

Copy link
Contributor

@misberner misberner Oct 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally I would prefer failureMessage == "" in Go. This is most directly expressing what you want to test and has no performance disadvantages over len(...) == 0


local junit_file_names="$ARTIFACT_DIR/**.*.xml"
pushd "$SCRIPTS_ROOT/scripts/ci/junit2slack" || return
go run main.go "$junit_file_names"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of running this directly, I think we can mimic what we do for go-junit-report and turn this into a make target

)

func TestConstructSlackMessage(t *testing.T) {
expected := []byte(`[{"color":"#bb2124","blocks":[{"type":"header","text":{"type":"plain_text","text":"Failed tests"}},{"type":"section","text":{"type":"plain_text","text":"CSVTest: Verify CVE CSV data scoped by entity is correct[2]"}}]},{"color":"#bb2124","blocks":[{"type":"section","text":{"type":"mrkdwn","text":"Junit failure message for *CSVTest: Verify CVE CSV data scoped by entity is correct[2]*"}},{"type":"section","text":{"type":"plain_text","text":"Condition not satisfied:\n\ncsvCVEs.get(i) == graphQLCVEs.get(i)\n| | | | | | |\n| | 41 | | | 41\n| | | | \u003cCSVTest$CVE@5ff1c5e4 id=CVE-2019-12900 cvss=9.8 deploymentCount=1 imageCount=1 componentCount=4 this$0=CSVTest@5d38a487\u003e\n| | | [CSVTest$CVE@ab0b0a83, CSVTest$CVE@49bfa946, CSVTest$CVE@e2b5b6f6, CSVTest$CVE@34c4eb97, CSVTest$CVE@34e11a99, CSVTest$CVE@c7e9a603, CSVTest$CVE@c958091d, CSVTest$CVE@9447532e, CSVTest$CVE@94556ab0, CSVTest$CVE@958b6fc6, CSVTest$CVE@9ccf8e4a, CSVTest$CVE@c51085a4, CSVTest$CVE@41caa49, CSVTest$CVE@a141b245, CSVTest$CVE@711c6105, CSVTest$CVE@712a7886, CSVTest$CVE@3f4d36fc, CSVTest$CVE@683e6e39, CSVTest$CVE@6b9f0ca1, CSVTest$CVE@6bad2422, CSVTest$CVE@6bbb3ba3, CSVTest$CVE@6bc95324, CSVTest$CVE@6bd76aa5, CSVTest$CVE@6be58226, CSVTest$CVE@6d299ebd, CSVTest$CVE@bea6801, CSVTest$CVE@c069703, CSVTest$CVE@d59277db, CSVTest$CVE@d5a08f5c, CSVTest$CVE@dad9b53a, CSVTest$CVE@20186ee4, CSVTest$CVE@2d493efe, CSVTest$CVE@2d57567f, CSVTest$CVE@1f6c0902, CSVTest$CVE@6215383d, CSVTest$CVE@400508c7, CSVTest$CVE@d710f0fb, CSVTest$CVE@fc1cbb1c, CSVTest$CVE@feb1acf5, CSVTest$CVE@ecbda408, CSVTest$CVE@26a6537d, CSVTest$CVE@5ff1c5e4, CSVTest$CVE@eb8a9e66, CSVTest$CVE@c2bc6fb2, CSVTest$CVE@dde6e578, CSVTest$CVE@7c38dfb5, CSVTest$CVE@f7b814ad, CSVTest$CVE@d0053119, CSVTest$CVE@8574866d, CSVTest$CVE@86f10108, CSVTest$CVE@e80ecfed, CSVTest$CVE@e97d3307, CSVTest$CVE@885c184d, CSVTest$CVE@b2753d1f, CSVTest$CVE@190248e6, CSVTest$CVE@f53fa006, CSVTest$CVE@c5ec5080, CSVTest$CVE@c6087f82, CSVTest$CVE@5056cf5d, CSVTest$CVE@212dc659, CSVTest$CVE@2b283e8e, CSVTest$CVE@25d65b57, CSVTest$CVE@fe8dd239, CSVTest$CVE@70945666, CSVTest$CVE@edad99c6, CSVTest$CVE@94a5bfdc, CSVTest$CVE@851d1321, CSVTest$CVE@2c2568fb, CSVTest$CVE@eca16279, CSVTest$CVE@e5511974, CSVTest$CVE@e55f30f5, CSVTest$CVE@32589016, CSVTest$CVE@29b612f9, CSVTest$CVE@74f75429, CSVTest$CVE@54f6a8bb, CSVTest$CVE@f5e08943, CSVTest$CVE@a58c86e5, CSVTest$CVE@6edadf49, CSVTest$CVE@3e277299, CSVTest$CVE@3c8a1e51, CSVTest$CVE@4c136df1, CSVTest$CVE@49def44, CSVTest$CVE@4ac06c5, CSVTest$CVE@4ba1e46, CSVTest$CVE@34ba2dae, CSVTest$CVE@65fe59ad, CSVTest$CVE@69ae8070, CSVTest$CVE@6ae48586, CSVTest$CVE@6af29d07, CSVTest$CVE@6b00b488, CSVTest$CVE@8de64d7d, CSVTest$CVE@cb1352ff, CSVTest$CVE@cc8fcd9a, CSVTest$CVE@30ed073a, CSVTest$CVE@d17ed81f, CSVTest$CVE@d9c09db5, CSVTest$CVE@d9ceb536, CSVTest$CVE@6aa11951, CSVTest$CVE@68c3e72f, CSVTest$CVE@98615211, CSVTest$CVE@39df66b1, CSVTest$CVE@f2bf931a, CSVTest$CVE@27c1992f, CSVTest$CVE@c5c47329, CSVTest$CVE@acf47c90, CSVTest$CVE@d576e4c5, CSVTest$CVE@9a12044e, CSVTest$CVE@9a4a6252, CSVTest$CVE@9a5879d3, CSVTest$CVE@9a669154, CSVTest$CVE@9a74a8d5, CSVTest$CVE@bf8072f6, CSVTest$CVE@bf8e8a77, CSVTest$CVE@bf9ca1f8, CSVTest$CVE@3fa5bdd8, CSVTest$CVE@71b61e0c, CSVTest$CVE@3fdde12d, CSVTest$CVE@3febf8ae, CSVTest$CVE@1a2a6ff7, CSVTest$CVE@a4a453df, CSVTest$CVE@4bc5f8f8, CSVTest$CVE@5423ed90, CSVTest$CVE@579"}}]}]`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use scripts/ci/junit2slack/testdata/expected.json instead unless that was for something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tried embedding the json file, it would add an extra . character to the end causing the unit test to fail. I'm not quite sure what was going on there

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out it was a newline character

func TestConstructSlackMessage(t *testing.T) {
expected := []byte(`[{"color":"#bb2124","blocks":[{"type":"header","text":{"type":"plain_text","text":"Failed tests"}},{"type":"section","text":{"type":"plain_text","text":"CSVTest: Verify CVE CSV data scoped by entity is correct[2]"}}]},{"color":"#bb2124","blocks":[{"type":"section","text":{"type":"mrkdwn","text":"Junit failure message for *CSVTest: Verify CVE CSV data scoped by entity is correct[2]*"}},{"type":"section","text":{"type":"plain_text","text":"Condition not satisfied:\n\ncsvCVEs.get(i) == graphQLCVEs.get(i)\n| | | | | | |\n| | 41 | | | 41\n| | | | \u003cCSVTest$CVE@5ff1c5e4 id=CVE-2019-12900 cvss=9.8 deploymentCount=1 imageCount=1 componentCount=4 this$0=CSVTest@5d38a487\u003e\n| | | [CSVTest$CVE@ab0b0a83, CSVTest$CVE@49bfa946, CSVTest$CVE@e2b5b6f6, CSVTest$CVE@34c4eb97, CSVTest$CVE@34e11a99, CSVTest$CVE@c7e9a603, CSVTest$CVE@c958091d, CSVTest$CVE@9447532e, CSVTest$CVE@94556ab0, CSVTest$CVE@958b6fc6, CSVTest$CVE@9ccf8e4a, CSVTest$CVE@c51085a4, CSVTest$CVE@41caa49, CSVTest$CVE@a141b245, CSVTest$CVE@711c6105, CSVTest$CVE@712a7886, CSVTest$CVE@3f4d36fc, CSVTest$CVE@683e6e39, CSVTest$CVE@6b9f0ca1, CSVTest$CVE@6bad2422, CSVTest$CVE@6bbb3ba3, CSVTest$CVE@6bc95324, CSVTest$CVE@6bd76aa5, CSVTest$CVE@6be58226, CSVTest$CVE@6d299ebd, CSVTest$CVE@bea6801, CSVTest$CVE@c069703, CSVTest$CVE@d59277db, CSVTest$CVE@d5a08f5c, CSVTest$CVE@dad9b53a, CSVTest$CVE@20186ee4, CSVTest$CVE@2d493efe, CSVTest$CVE@2d57567f, CSVTest$CVE@1f6c0902, CSVTest$CVE@6215383d, CSVTest$CVE@400508c7, CSVTest$CVE@d710f0fb, CSVTest$CVE@fc1cbb1c, CSVTest$CVE@feb1acf5, CSVTest$CVE@ecbda408, CSVTest$CVE@26a6537d, CSVTest$CVE@5ff1c5e4, CSVTest$CVE@eb8a9e66, CSVTest$CVE@c2bc6fb2, CSVTest$CVE@dde6e578, CSVTest$CVE@7c38dfb5, CSVTest$CVE@f7b814ad, CSVTest$CVE@d0053119, CSVTest$CVE@8574866d, CSVTest$CVE@86f10108, CSVTest$CVE@e80ecfed, CSVTest$CVE@e97d3307, CSVTest$CVE@885c184d, CSVTest$CVE@b2753d1f, CSVTest$CVE@190248e6, CSVTest$CVE@f53fa006, CSVTest$CVE@c5ec5080, CSVTest$CVE@c6087f82, CSVTest$CVE@5056cf5d, CSVTest$CVE@212dc659, CSVTest$CVE@2b283e8e, CSVTest$CVE@25d65b57, CSVTest$CVE@fe8dd239, CSVTest$CVE@70945666, CSVTest$CVE@edad99c6, CSVTest$CVE@94a5bfdc, CSVTest$CVE@851d1321, CSVTest$CVE@2c2568fb, CSVTest$CVE@eca16279, CSVTest$CVE@e5511974, CSVTest$CVE@e55f30f5, CSVTest$CVE@32589016, CSVTest$CVE@29b612f9, CSVTest$CVE@74f75429, CSVTest$CVE@54f6a8bb, CSVTest$CVE@f5e08943, CSVTest$CVE@a58c86e5, CSVTest$CVE@6edadf49, CSVTest$CVE@3e277299, CSVTest$CVE@3c8a1e51, CSVTest$CVE@4c136df1, CSVTest$CVE@49def44, CSVTest$CVE@4ac06c5, CSVTest$CVE@4ba1e46, CSVTest$CVE@34ba2dae, CSVTest$CVE@65fe59ad, CSVTest$CVE@69ae8070, CSVTest$CVE@6ae48586, CSVTest$CVE@6af29d07, CSVTest$CVE@6b00b488, CSVTest$CVE@8de64d7d, CSVTest$CVE@cb1352ff, CSVTest$CVE@cc8fcd9a, CSVTest$CVE@30ed073a, CSVTest$CVE@d17ed81f, CSVTest$CVE@d9c09db5, CSVTest$CVE@d9ceb536, CSVTest$CVE@6aa11951, CSVTest$CVE@68c3e72f, CSVTest$CVE@98615211, CSVTest$CVE@39df66b1, CSVTest$CVE@f2bf931a, CSVTest$CVE@27c1992f, CSVTest$CVE@c5c47329, CSVTest$CVE@acf47c90, CSVTest$CVE@d576e4c5, CSVTest$CVE@9a12044e, CSVTest$CVE@9a4a6252, CSVTest$CVE@9a5879d3, CSVTest$CVE@9a669154, CSVTest$CVE@9a74a8d5, CSVTest$CVE@bf8072f6, CSVTest$CVE@bf8e8a77, CSVTest$CVE@bf9ca1f8, CSVTest$CVE@3fa5bdd8, CSVTest$CVE@71b61e0c, CSVTest$CVE@3fdde12d, CSVTest$CVE@3febf8ae, CSVTest$CVE@1a2a6ff7, CSVTest$CVE@a4a453df, CSVTest$CVE@4bc5f8f8, CSVTest$CVE@5423ed90, CSVTest$CVE@579"}}]}]`)

var junitFiles []*junit.Suites
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of declaring this here, you can just do junitFiles := []*junit.Suites{suites} below or even just blocks := convertJunitToSlack([]*junit.Suites{suites})

blocks := convertJunitToSlack(junitFiles)
b, err := json.Marshal(blocks)
assert.NoError(t, err)
fmt.Println(string(b))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still needed?


// We should accept all file names at once since we're using `go run` to run this program. No need to recompile
// for each file we want to parse
for _, fileName := range os.Args[1:] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we ensure len(os.Args) > 1 before we get here?

if _, err := os.Stat(fileName); err == nil {
data, err := os.ReadFile(fileName)
if err != nil {
log.Printf("error while reading %s: %s", fileName, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot to mention before, but usually %v is used for error

log.Printf("warning: no slack message set")
return
} else {
slackAttachments = append(slackAttachments)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what's happening here

fmt.Println(string(b))
}

func convertJunitToSlack(junitFiles []*junit.Suites) []slack.Attachment {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also do junitFiles ...*junit.Suites. This way when you test with just one file, you can just do convertJunitToSlack(suites) where suites is of type *junit.Suites

}

pushFinalSlackAttachments:
if failedTestsBlocks == nil || len(failedTestsBlocks) <= 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can just check len(failedTestsBlocks) == 0

@BradLugo BradLugo force-pushed the blugo/ROX-11931-junit2slack branch 9 times, most recently from cf9f340 to 97c7aa3 Compare October 25, 2022 17:38
@BradLugo
Copy link
Contributor Author

Created a new repo to host the go project here: https://github.com/stackrox/junit-parse
Related PR: stackrox/junit-parse#1

@BradLugo BradLugo force-pushed the blugo/ROX-11931-junit2slack branch 2 times, most recently from eff9619 to 62e524a Compare November 9, 2022 04:09
@BradLugo BradLugo force-pushed the blugo/ROX-11931-junit2slack branch from 62e524a to fb278dd Compare November 9, 2022 06:07
Comment on lines +1322 to +1323
get_junit_parse_cli || exitstatus="$?"
if [[ "$exitstatus" == "0" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think to handle the case when junit-parse is already in the test image:

Suggested change
get_junit_parse_cli || exitstatus="$?"
if [[ "$exitstatus" == "0" ]]; then
get_junit_parse_cli || true
fi
if command -v junit-parse >/dev/null 2>&1; then

We'll make a best effort try to get junit-parse and also handle when it is already present and not exit/error in either case.

@openshift-ci
Copy link

openshift-ci bot commented Nov 9, 2022

@BradLugo: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/gke-postgres-upgrade-tests f093162 link false /test gke-postgres-upgrade-tests
ci/prow/gke-upgrade-tests f093162 link false /test gke-upgrade-tests

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Contributor

@gavin-stackrox gavin-stackrox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@BradLugo
Copy link
Contributor Author

Thanks for all the help everyone!

@BradLugo BradLugo merged commit 187ed44 into master Nov 10, 2022
@BradLugo BradLugo deleted the blugo/ROX-11931-junit2slack branch November 10, 2022 18:40
vikin91 added a commit that referenced this pull request Nov 25, 2022
7ffc6be ROX-13368: Skip failing nongroovy tests on PG (#3721)
bbdd7a0 Bump github.com/gofrs/uuid from 4.3.0+incompatible to 4.3.1+incompatible (#3642)
1f253f2 Bump github.com/google/certificate-transparency-go from 1.1.3 to 1.1.4 (#3543)
d434c8d [ROX-13030] : Add delete collection API endpoint and service implementation (#3648)
f062c21 Dashrews/ROX-13253 wait for central-db to come back after bounce and allow FATAL connection lost error (#3537)
edc1174 CI: Fill the gaps for https://testgrid.k8s.io/ (#3715)
86d7c54 ROX-13231: use passed context when non-postgres (#3540)
9093195 Add less specific type for BE collection response string (#3728)
5abb652 Only enable ROX_OBJECT_COLLECTIONS feature flag during gke-postgres-ui-e2e job (#3727)
4f64cd1 Add centralDBOnly mode in render (#3707)
d67bbe5 Dashrews/ROX-13082 UUID searcher and common updates to set allow use of postgres UUID PR 1 of 4 (#3679)
6f829d5 ROX-13259: graphInit called during init time (#3705)
f3bc50d ROX-13380: Conditional rendering edges for deployments and namespaces (#3641)
3764476 ROX-12319: implement smoke test step with groovy test filter (#3220)
f202fd4 ROX-11826: Disable kernel support package uploads for managed central (#3661)
61f03dc ROX-11101: Remove deprecated resources from central (#3115)
e6aa6d7 ROX-11101: Restore Role permission in UI (#3428)
3203e04 ROX-11101: Remove deprecated resources (#3036)
a35f41e Bump golang.org/x/sys from 0.1.0 to 0.2.0 (#3733)
4120524 Bump snakeyaml from 1.29 to 1.33 in /qa-tests-backend (#3732)
e1785c0 Bump github.com/coreos/go-systemd/v22 from 22.4.0 to 22.5.0 (#3724)
870df4a Bump google.golang.org/api from 0.101.0 to 0.102.0 (#3723)
721454c Generalize User-Agent setup (#3672)
6a11bf0 Bumps collector version to 3.11.x-145-gc345f72f5e (#3736)
ec5d343 [ROX-12923] Walk retries - remainder work (#3729)
40f3d43 ROX-13440: Replace ambiguous central with sensor in networkGraph integration test (#3730)
281ed22 Bump groovy-xml from 2.5.18 to 2.5.19 in /qa-tests-backend (#3741)
49d1651 Bump github.com/prometheus/client_golang from 1.13.1 to 1.14.0 (#3742)
b5544aa Bump cloud.google.com/go/storage from 1.27.0 to 1.28.0 (#3743)
9c61e53 ensure CVSS is present for istio vulns (#3706)
ae29d52 ROX-13452: don't always clobber scoped ctx when non-postgres (#3748)
517bf05 ROX-13261: DryRunUpdate on collection datastore (#3687)
baf7654 ROX-13378: Group new resources with deprecated in UI (#3690)
569922f ROX-13421: Enable roxctl netpol generate and add tech-preview messages (#3740)
2465fc5 Dashrews/ROX-13082 UUID generator templates PR 2 of 4 (#3681)
c093c68 Bump slack-api-client from 1.20.2 to 1.27.0 in /qa-tests-backend (#3752)
2c860bb Bump ubi8-micro from 8.6 to 8.7 in /operator (#3751)
80eb04c Make deploy.sh and deploy-local.sh pass shellcheck (#3582)
2182b43 Dashrews/ROX-13082 UUID test updates PR 3 of 4 (#3694)
6dc6ca5 [ROX-13403] : Fix node -> topVuln sub resolver bug when node cves is empty (#3689)
1b21361 Move integration tests for page title from general to specific containers (#3675)
e1a9f31 Bump google.golang.org/api from 0.102.0 to 0.103.0 (#3773)
a05ea31 Bump golang.org/x/crypto from 0.1.0 to 0.2.0 (#3772)
65ddf4f ROX-12824: Add roxctl commands to generate Central DB bundle (#3602)
c3f1e2f Remove obsolete authProviders request for Integrations page (#3759)
7ccd54d Dashrews/ROX-13082 UUID protos generated PR 4 of 4 (#3698)
9ab5c8f cleanup image digest utilities (#3764)
187ed44 ROX-11931: Convert junit failure artifacts to Slack attachments (#3438)
b5d8790 ROX-13432: leaning up unused code copied/pasted from topology demo (#3750)
ab05bfc Refactor collection form page for better composition (#3744)
c5562f7 Remove babel devDependencies in ui-components (#3761)
2b90b3a Extract collection form from drawer wrapper layout (#3745)
a779fc9 [ROX-12625 + ROX-13032] : Add GetCollectionCount and UpdateCollection endpoints and  services (#3749)
e77f0da Upgrade cypress 11.0.0 devDependencies in ui (#3760)
a3fba94 ROX-13068: Use real data for deployment details (#3688)
4c7d90e ROX-12617: Collection to search query converter (#3683)
3e98aec ROX-13067: fill out port configurations section of deployment details (#3714)
a48de36 ROX-12835: Add support for NodeScanV2 to Sensor (#3533)
30c5dc7 ROX-13466: Fix deletion of groups with empty properties (#3756)
5cb2470 Add autocomplete for name selector dropdowns (#3676)
b9a75ad ROX-13464 adding flows dropdown in NG (#3763)
3217a67 [ROX-13500] Perform type check for V1 CronJob (#3787)
af3790d Remove bulk delete from collections table (#3776)
dda123b Add more info in migration log (#3788)
179f0c9 ROX-13502: Remove the circular dependency between cluster datastore init and cscc notifier init (#3790)
029d584 Update SCANNER_VERSION (#3774)
cbca57c Bump github.com/ckaznocha/protoc-gen-lint from 0.2.4 to 0.3.0 (#3783)
3613b56 Bump golang.org/x/tools from 0.2.0 to 0.3.0 (#3782)
5fc0a6a Bump github.com/google/go-containerregistry from 0.12.0 to 0.12.1 (#3781)
1d1c687 Bump controller-gen version to 0.10.0 (#3754)
c3a5290 Untie documentation link from the product version (#3799)
ed822aa use correct package for migration (#3784)
397a0b4 Validate that label keys are valid k8s labels and ensure correct key splitting (#3777)
edd1050 Rename variable ScannerGRPCEndpoint to ScannerSlimGRPCEndpoint (#3657)
6662c9f ROX-13378: Access Control page permissions (#3720)
b0e73c5 fix Operator reconciliation for external Central DB (#3796)
b83bc1f ROX-13505: Fix error log scanning the postgres stat collection (#3795)
ca660cb Prevent the collection being edited from displaying in its own embedded list (#3778)
3f7b3fc [ROX-13441][POSTGRES] Propagate context correctly in retries (#3793)
e0cbc6f ROX-12839: Update changelog to announce removal of in-product docs (#3805)
696e8bc [ROX-12358] Follow up on vulnerability request proto change (#2851)
c4b46d8 Change getCollectionCount endpoint and updateCollection request type
5f2efbc remove make proto-fmt (#3804)
0c75540 Remove os.Std* from roxctl/central (#3758)
25a90de Add ability to view embedded collections in a pop up modal (#3747)
5c1bf81 ROX-13240: fix scanner-slim updates when WebSockets are used (#3704)
1d98577 Add more context to jira notifier logging (#3812)
da2fd28 ROX-13031: DryRun Collection API (#3766)
1c418d5 Test data migration code in postgres tests (#3803)
ed95b37 Update UI Collection requests for BE compatibiltiy (#3762)
09cc188 ROX-11931: Fix junit-parse install in CI (#3811)
d2b01e3 ROX-12814: Disable PolicyFieldsTest on openshift. (#3797)
d10ce27 ROX-13345: disable 'missing required registry' aspect on openshift (#3798)
3d22396 Update collector to 3.12 (#3809)
1eb33fb ROX-13347: Modify scope queries to included quoted cluster and nameace names, to allow exact matches instead of erroneous and unintended prefix matches. (#3767)
3811a69 ROX-12621: list collection selectors api (#3806)
f6d3f9d Add migration for groups with invalid values (#3789)
cc21125 Bugfixes for collection autocomplete (#3816)
7623dec ROX-9350 Use fine-grained host paths for compliance mounts (#2479)
b4bf5c2 Fix collector volumeMounts  (#3826)
0e9be05 ROX-12953: figure out last 4 versions of sensor automatically (#3611)
459c7ae ROX-12814: Add proper todo for reenabling the test (#3817)
9ee40ff ROX-13523: add isEnabled enum to central db spec (#3815)
535bc72 Replace requestConfig with routeMatcherMap in helper functions for integration tests (#3686)
2b75b61 `gosec` G104: Add `ShouldErr(err)` that returns `err` (#3830)
fb1b82f WIP: Introduce nodescan call
35f8a8f WIP: Prepare converter
716144b Moved and renamed fake nodescan tests
4748de7 Introduce real node scanner with conversion functions
5e6d9a8 wip: real scanner
0169868 wip: log results
1438d2c wip: Debug Analyze call
b09894c wip: Debug Analyze call
3ceed72 wip: Update and improve debug logs
d1669fd Remove copied lib, bump scanner version, add debug
14a3f73 Merge branch 'master' into mm/ROX-12967-real-nodescan
fbd0450 Fix style issues
17ccb31 Debug: let both scans finish to see what they return
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.

4 participants