Skip to content
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

Catch xml.etree.ElementTree ParseError exception from an invalid XML file #153

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

oharan2
Copy link
Collaborator

@oharan2 oharan2 commented Feb 14, 2024

Context:
If the test results file contains a broken XML content, the junitparser command will fail with a:
xml.etree.ElementTree.ParseError: syntax error: .. failure.

See job failure example: https://prow.ci.openshift.org/view/gs/test-platform-results/logs/periodic-ci-mtc-qe-mtc-e2e-qev2-master-mtc1.8-ocp4.15-lp-interop-mtc-interop-aws/1756921885850865664#1:build-log.txt%3A93

This happens especially when we modify the test results with replacing it's content with a string contains:
"This file contained potentially sensitive information and has been removed.\\n"

REF:
https://redhat-internal.slack.com/archives/C04PK4QPSR1/p1707747454327419

rh-pre-commit.version: 2.0.3
rh-pre-commit.check-secrets: ENABLED
@redhat-qe-bot
Copy link
Collaborator

Report bugs in Issues

The following are automatically added:

  • Add reviewers from OWNER file (in the root of the repository) under reviewers section.
  • Set PR size label.
  • New issue is created for the PR. (Closed when PR is merged/closed)
  • Run pre-commit if .pre-commit-config.yaml exists in the repo.

Available user actions:

  • To mark PR as WIP comment /wip to the PR, To remove it from the PR comment /wip cancel to the PR.
  • To block merging of PR comment /hold, To un-block merging of PR comment /hold cancel.
  • To mark PR as verified comment /verified to the PR, to un-verify comment /verified cancel to the PR.
    verified label removed on each new commit push.
  • To cherry pick a merged PR comment /cherry-pick <target branch to cherry-pick to> in the PR.
    • Multiple target branches can be cherry-picked, separated by spaces. (/cherry-pick branch1 branch2)
    • Cherry-pick will be started when PR is merged
  • To build and push container image command /build-and-push-container in the PR (tag will be the PR number).
  • To add a label by comment use /<label name>, to remove, use /<label name> cancel
Supported /retest check runs
Supported labels
  • hold
  • verified
  • wip
  • lgtm

@calebevans
Copy link
Collaborator

@oharan2 if you run "make pre-commit" in the root of the repo, it should fix the errors or tell you what to fix :)

rh-pre-commit.version: 2.0.3
rh-pre-commit.check-secrets: ENABLED
@calebevans calebevans enabled auto-merge (squash) February 14, 2024 23:49
Copy link
Collaborator

@calebevans calebevans left a comment

Choose a reason for hiding this comment

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

/lgtm

@oharan2
Copy link
Collaborator Author

oharan2 commented Feb 15, 2024

/verified

@calebevans calebevans merged commit c634753 into RedHatQE:main Feb 15, 2024
6 checks passed
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.

5 participants