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

viewer: ignore UTF-8 errors #74

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Conversation

thrix
Copy link
Contributor

@thrix thrix commented Dec 17, 2024

Due to a bug in dnf invalid UTF-8, make sure the viewer does not choke on them.

See:

rpm-software-management/dnf5#1865

for details.

Example of the failure from
https://artifacts.dev.testing-farm.io/c7a1bbdd-1c91-44a9-87ba-f2b9f6fe7dc3/:

18:24:51                 out: Running transaction
18:24:51                 out: [1/2] Prepare transaction               100% |  62.0   B/s |   1.0   B |  00m00s
18:24:51                 out: [2/2] Removing spamassassin-debugsource 100% | 147.0   B/s |   9.0   B |  00m00s
18:24:51                 out: Complete!
18:24:51                 out: remove result: fail (status code: 1)
18:24:51                 out: Traceback (most recent call last):
18:24:51                 out:   File "/usr/libexec/mini-tps/viewer/generate-result-json", line 53, in <module>
18:24:51                 out:     "details": log.read_text(),
18:24:51                 out:                ~~~~~~~~~~~~~^^
18:24:51                 out:   File "/usr/lib64/python3.13/pathlib/_local.py", line 546, in read_text
18:24:51                 out:     return PathBase.read_text(self, encoding, errors, newline)
18:24:51                 out:            ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18:24:51                 out:   File "/usr/lib64/python3.13/pathlib/_abc.py", line 633, in read_text
18:24:51                 out:     return f.read()
18:24:51                 out:            ~~~~~~^^
18:24:51                 out:   File "<frozen codecs>", line 325, in decode
18:24:51                 out: UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 19977-19978: invalid continuation byte
18:24:51                 out: running in TMT, wrote /var/ARTIFACTS/work-installability513gxf67/installability/execute/data/guest/default-0/installability-2/data/results.yaml
18:24:51                 out: mtps-run-tests overall result: fail (status code: 1)
18:24:51                 out: Shared connection to 18.221.80.14 closed.

Due to a bug in dnf invalid UTF-8, make sure the viewer does not choke
on them.

See:

rpm-software-management/dnf5#1865

for details.

Example of the failure from
https://artifacts.dev.testing-farm.io/c7a1bbdd-1c91-44a9-87ba-f2b9f6fe7dc3/:

```
18:24:51                 out: Running transaction
18:24:51                 out: [1/2] Prepare transaction               100% |  62.0   B/s |   1.0   B |  00m00s
18:24:51                 out: [2/2] Removing spamassassin-debugsource 100% | 147.0   B/s |   9.0   B |  00m00s
18:24:51                 out: Complete!
18:24:51                 out: remove result: fail (status code: 1)
18:24:51                 out: Traceback (most recent call last):
18:24:51                 out:   File "/usr/libexec/mini-tps/viewer/generate-result-json", line 53, in <module>
18:24:51                 out:     "details": log.read_text(),
18:24:51                 out:                ~~~~~~~~~~~~~^^
18:24:51                 out:   File "/usr/lib64/python3.13/pathlib/_local.py", line 546, in read_text
18:24:51                 out:     return PathBase.read_text(self, encoding, errors, newline)
18:24:51                 out:            ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18:24:51                 out:   File "/usr/lib64/python3.13/pathlib/_abc.py", line 633, in read_text
18:24:51                 out:     return f.read()
18:24:51                 out:            ~~~~~~^^
18:24:51                 out:   File "<frozen codecs>", line 325, in decode
18:24:51                 out: UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 19977-19978: invalid continuation byte
18:24:51                 out: running in TMT, wrote /var/ARTIFACTS/work-installability513gxf67/installability/execute/data/guest/default-0/installability-2/data/results.yaml
18:24:51                 out: mtps-run-tests overall result: fail (status code: 1)
18:24:51                 out: Shared connection to 18.221.80.14 closed.
```

Signed-off-by: Miroslav Vadkerti <[email protected]>
@thrix thrix requested review from jpopelka and msrb December 17, 2024 19:12
Copy link
Member

@msrb msrb left a comment

Choose a reason for hiding this comment

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

Thanks ;)

@msrb msrb merged commit fe78943 into main Dec 18, 2024
8 checks passed
@jpopelka jpopelka deleted the ignore-errors-generate-result-json branch December 18, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants