Skip to content

Unable to parse NON-UTF junit artifacts #1002

@5u623l20

Description

@5u623l20

Expected Behavior

I am trying to upload an xml file which is properly formatted in JUNIT the only exception is it's encoding is non-UTF8 and as usual it's encoding is a very common one "ISO-8859-1". The expected behavior is it should be able to parse in any encoding.

Real Behavior

I have something like this in my config:

always:
    junit_artifacts:
      path: "artifact/**.xml"
      format: junit

And once executed it threw an error like this:

Uploading 1 artifacts for /tmp/cirrus-ci-build/artifact/**.xml
Uploaded /tmp/cirrus-ci-build/artifact/test-report.xml
Trying to parse annotations for junit format
Failed to upload artifacts: failed to create annotations from /tmp/cirrus-ci-build/artifact/test-report.xml: xml: encoding "iso-8859-1" declared but Decoder.CharsetReader is nil
Re-trying to upload artifacts...Uploading 1 artifacts for /tmp/cirrus-ci-build/artifact/**.xml
Uploaded /tmp/cirrus-ci-build/artifact/test-report.xml
Trying to parse annotations for junit format
Failed to upload artifacts: failed to create annotations from /tmp/cirrus-ci-build/artifact/test-report.xml: xml: encoding "iso-8859-1" declared but Decoder.CharsetReader is nil
Re-trying to upload artifacts...
Failed to upload artifacts after multiple tries: failed to create annotations from /tmp/cirrus-ci-build/artifact/test-report.xml: xml: encoding "iso-8859-1" declared but Decoder.CharsetReader is nil

Related Info

This is a (tick one of the following):

  • Website issue
    • Link to page:
  • Task issue
    • OS: linux
    • Task name: jarvisTEST
    • Script/cache name (if applies):

If you need the XML I can go for another run without format and share it later.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions