Test for workflow attribution#37593
Test for workflow attribution#37593joestringer wants to merge 21 commits intopr/joe/test-attributionfrom
Conversation
ScenarioBase provides common functionality for all scenarios, such as the upcoming feature to correlate test files with GitHub codeowners. Compose all existing scenarios with this new structure so we can minimize the amount of boilerplate code required to identify such codeowners. Signed-off-by: Joe Stringer <[email protected]>
This library parses GitHub CODEOWNERS syntax and makes the owners available within the code for programmatic usage. Signed-off-by: Joe Stringer <[email protected]>
Correlate the test scenarios with the GitHub teams that own these test scenarios, so that we can pretty-print some helpful assistance to developers in CI when a test fails. The intent here is that this makes the developer experience easier by connecting developers who are struggling with a CI failure with the owners of those tests. Signed-off-by: Joe Stringer <[email protected]>
When reporting owners of test files as part of the --log-codeowners parameter, autodetect the workflow file from the environment variable GITHUB_WORKFLOW_REF which GitHub sets in the environment in order to list the owners for the workflow itself while listing owners for a failed test. Signed-off-by: Joe Stringer <[email protected]>
This tool takes JSON output as presented by 'go test -json ...' on stdin and outputs a table with the failed tests and any corresponding owners. Example usage: $ go test -json ./test/fail/ | go run ./tools/testowners/ ⛑️ The following owners are responsible for reliability of the failing test(s): Package Owner github.com/cilium/cilium/test/fail @cilium/ci-structure Signed-off-by: Joe Stringer <[email protected]>
LOG_CODEOWNERS=1 will log the codeowners corresponding to a unit test
failure when the Makefile hands unit test output to its GOTEST
formatters.
Example (with tparse installed):
$ LOG_CODEOWNERS=1 TESTPKGS=./pkg/policy make tests-privileged
CHECK running privileged tests...
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ PANIC package: github.com/cilium/cilium/pkg/datapath/linux/ipsec • TestInvalidLoadKeys ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
panic: localNode already set [recovered]
panic: localNode already set
goroutine 11 [running]:
testing.tRunner.func1.2({0x2bbea80, 0x36d57a0})
/snap/go/10826/src/testing/testing.go:1632 +0x230
testing.tRunner.func1()
/snap/go/10826/src/testing/testing.go:1635 +0x35e
panic({0x2bbea80?, 0x36d57a0?})
/snap/go/10826/src/runtime/panic.go:785 +0x132
github.com/cilium/cilium/pkg/node.SetTestLocalNodeStore(...)
/var/git/cilium/pkg/node/address.go:552
github.com/cilium/cilium/pkg/datapath/linux/ipsec.setupIPSecSuitePrivileged({0x3742670, 0xc0000ebd40})
/var/git/cilium/pkg/datapath/linux/ipsec/ipsec_linux_test.go:27 +0x1eb
github.com/cilium/cilium/pkg/datapath/linux/ipsec.TestInvalidLoadKeys(0xc0000ebd40)
/var/git/cilium/pkg/datapath/linux/ipsec/ipsec_linux_test.go:66 +0x31
testing.tRunner(0xc0000ebd40, 0x3445310)
/snap/go/10826/src/testing/testing.go:1690 +0xf4
created by testing.(*T).Run in goroutine 1
/snap/go/10826/src/testing/testing.go:1743 +0x390
FAIL github.com/cilium/cilium/pkg/datapath/linux/ipsec 0.032s
make: *** [Makefile:89: tests-privileged] Error 1
┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ STATUS │ ELAPSED │ PACKAGE │ COVER │ PASS │ FAIL │ SKIP │
│─────────┼─────────┼───────────────────────────────────────────────────┼───────┼──────┼──────┼───────│
│ PANIC │ 0.00s │ github.com/cilium/cilium/pkg/datapath/linux/ipsec │ -- │ -- │ -- │ -- │
│ PASS │ 0.84s │ github.com/cilium/cilium/pkg/policy │ 76.9% │ 518 │ 0 │ 0 │
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
⛑️ The following owners are responsible for reliability of the failing test(s):
Package Owner
github.com/cilium/cilium/pkg/datapath/linux/ipsec @cilium/ipsec
Signed-off-by: Joe Stringer <[email protected]>
Signed-off-by: Joe Stringer <[email protected]>
Signed-off-by: Joe Stringer <[email protected]>
|
Commit 3e69a1f does not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
|
Commits 3e69a1f, 2f59168, c271b63 do not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
|
Commits 3e69a1f, 2f59168, c271b63, c41388c do not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
|
Commits 3e69a1f, 2f59168, c271b63, c41388c, e92a47f do not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
|
Commits 3e69a1f, 2f59168, c271b63, c41388c, e92a47f, 653f190 do not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
653f190 to
5c06e2c
Compare
|
Commit 5c06e2c does not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
5c06e2c to
208b73e
Compare
|
Commits 9e97c75, c39d4fa, 208b73e do not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
208b73e to
db98249
Compare
|
Commits 9e97c75, c39d4fa, 16c7927, db98249 do not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
|
Commits 9e97c75, c39d4fa, 16c7927, db98249, 3db7b81, 703215a do not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
|
Commits 9e97c75, c39d4fa, 16c7927, db98249, 3db7b81, 703215a, d156fed, 8020efc do not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
|
Commits 9e97c75, c39d4fa, 16c7927, db98249, 3db7b81, 703215a, d156fed, 8020efc, d7c9317 do not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
|
Commits 9e97c75, c39d4fa, 16c7927, db98249, 3db7b81, 703215a, d156fed, 8020efc, d7c9317, 35f70b7, 92a4c3b do not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
|
Commits 9e97c75, c39d4fa, 16c7927, db98249, 3db7b81, 703215a, d156fed, 8020efc, d7c9317, 35f70b7, 92a4c3b, 3a9e849 do not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
|
Commits 9e97c75, c39d4fa, 16c7927, db98249, 3db7b81, 703215a, d156fed, 8020efc, d7c9317, 35f70b7, 92a4c3b, 3a9e849, 0f95060 do not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
4eed807 to
98d04cd
Compare
This PR is just testing that workflow attribution via GH env vars is working
as expected.