Actions
Bug #42892
closedmgr/dashboard: check_grafana_uids.py might raise exception in some environments
Status:
Resolved
Priority:
Normal
Assignee:
Category:
Testing & QA
Target version:
% Done:
0%
Source:
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
NOTE: This can't be reproduced in upstream CI testing.
This is an exception from downstream make check testing:
(In run-tox-mgr-dashboard test)
check create: /opt/j/ws/mkck/src/pybind/mgr/dashboard/.tox/check check installdeps: six==1.11.0 WARNING: Discarding $PYTHONPATH from environment, to override specify PYTHONPATH in 'passenv' in your configuration. check installed: -f /opt/j/ws/mkck/src/pybind/mgr/dashboard/wheelhouse,six==1.11.0 check run-test-pre: PYTHONHASHSEED='2977883102' check run-test: commands[0] | python ci/check_grafana_uids.py frontend/src/app ../../../../monitoring/grafana/dashboards Traceback (most recent call last): File "ci/check_grafana_uids.py", line 154, in <module> main() File "ci/check_grafana_uids.py", line 116, in main tags = get_tags(args.angular_app_dir) File "ci/check_grafana_uids.py", line 74, in get_tags parser.parse() File "ci/check_grafana_uids.py", line 38, in parse self.feed(f.read()) File "/opt/j/ws/mkck/src/pybind/mgr/dashboard/.tox/check/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4010: ordinal not in range(128) ERROR: InvocationError for command /opt/j/ws/mkck/src/pybind/mgr/dashboard/.tox/check/bin/python ci/check_grafana_uids.py frontend/src/app ../../../../monitoring/grafana/dashboards (exited with code 1)
The error happens when scanning a html file contains `x` non-ascii character.(https://github.com/ceph/ceph/blob/64bd0e2ab46292279dbde5b8e6767991c7829ff2/src/pybind/mgr/dashboard/frontend/src/app/shared/components/notifications-sidebar/notifications-sidebar.component.html#L116).
Looks like somehow open function opened files in ascii encoding even in python3 environment.
Actions