-
Notifications
You must be signed in to change notification settings - Fork 260
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
junit: fix xml.Name for testsuite properties #2888
Conversation
/retest-required |
1 similar comment
/retest-required |
is it stranger that this happens or that it happens so often there's a way to handle it... /approve someone on TRT should own lgtm |
/test e2e |
@stbenjam, our |
/lgtm /override ci/prow/e2e |
@smg247: Overrode contexts on behalf of smg247: ci/prow/e2e In response to this:
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. |
/override ci/prow/e2e |
@smg247: Overrode contexts on behalf of smg247: ci/prow/e2e In response to this:
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. |
/hold Revision cd1526f was retested 9 times: holding |
/retest |
/lgtm |
/lgtm |
@@ -1,5 +1,6 @@ | |||
<testsuites> | |||
<testsuite name="step graph" tests="8" skipped="0" failures="0" time="whatever"> | |||
<properties></properties> |
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 golang/go#57938 golang/go#7233
Observer test seems to be a known failure /test e2e |
1 similar comment
Observer test seems to be a known failure /test e2e |
/test e2e |
/lgtm |
/test e2e |
TestSuite properties should be `properties` not `property`, we can't unmarshal some junits in the job run uploader currently, it errors out like this: ``` time="2022-07-06T08:01:16Z" level=fatal msg="Command failed" error="[jobrun/release-openshift-ocp-osd-aws-nightly-4.11/1544457393197289472 failed to upload to bigquery: error parsing junit for jobrun/release-openshift-ocp-osd-aws-nightly-4.11/1544457393197289472 \"logs/release-openshift-ocp-osd-aws-nightly-4.11/1544457393197289472/artifacts/install/junit_0zg9j.xml\": testsuiteError=expected element type <testsuite> but have <testsuites> testsuitesError=expected element type <property> but have <properties>, jobrun/release-openshift-ocp-osd-aws-nightly-4.10/1544448209282142208 failed to upload to bigquery: error parsing junit for jobrun/release-openshift-ocp-osd-aws-nightly-4.10/1544448209282142208 \"logs/release-openshift-ocp-osd-aws-nightly-4.10/1544448209282142208/artifacts/install/junit_a75tc.xml\": testsuiteError=expected element type <testsuite> but have <testsuites> testsuitesError=expected element type <property> but have <properties>, jobrun/release-openshift-ocp-osd-gcp-nightly-4.10/154444821514... ``` Per the confusing xml docs[1], we can use the `>` operator to indicate sub-elements: ``` If the XML element contains a sub-element whose name matches the prefix of a tag formatted as "a" or "a>b>c", unmarshal will descend into the XML structure looking for elements with the given names, and will map the innermost elements to that struct field. A tag starting with ">" is equivalent to one starting with the field name followed by ">". ``` [1] https://pkg.go.dev/encoding/xml
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, dgoodwin, smg247, stbenjam The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@stbenjam: all tests passed! Full PR test history. Your PR dashboard. 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. |
TRT-789
TestSuite properties should be
properties
notproperty
, we can'tunmarshal some junits in the job run uploader currently, it errors out
like this:
Per the xml docs[1], we can use the
>
operator to indicatesub-elements:
Note: omitempty doesn't work correctly for nested tags (golang/go#7233),
so there's some empty tags now, but at least it's otherwise
working so we should be able to correctly marshal all the junit xml files.
[1] https://pkg.go.dev/encoding/xml