Project

General

Profile

Bug #42892

mgr/dashboard: check_grafana_uids.py might raise exception in some environments

Added by Kiefer Chang 10 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
dashboard/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:

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.


Related issues

Copied to mgr - Backport #42947: nautilus: mgr/dashboard: check_grafana_uids.py might raise exception in some environments Resolved

History

#1 Updated by Kiefer Chang 10 months ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 31750

#2 Updated by Lenz Grimmer 10 months ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to nautilus

#3 Updated by Lenz Grimmer 10 months ago

  • Status changed from Pending Backport to Resolved
  • Target version set to v15.0.0
  • Backport deleted (nautilus)

#4 Updated by Kiefer Chang 10 months ago

  • Status changed from Resolved to Pending Backport
  • Backport set to nautilus

#5 Updated by Nathan Cutler 10 months ago

  • Copied to Backport #42947: nautilus: mgr/dashboard: check_grafana_uids.py might raise exception in some environments added

#6 Updated by Nathan Cutler 8 months ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Also available in: Atom PDF