Closed Bug 1673303 Opened 6 months ago Closed 6 months ago

All commands broken with "ValueError: Didn't find any metrics [...]" in latest release 0.1.91

Categories

(Conduit :: moz-phab, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nhnt11, Assigned: glob)

References

(Blocks 1 open bug)

Details

I'm on MacOS. All commands fail with this trace:

Traceback (most recent call last):
  File "/usr/local/bin/moz-phab", line 5, in <module>
    from mozphab.mozphab import run
  File "/usr/local/lib/python3.8/site-packages/mozphab/mozphab.py", line 20, in <module>
    from .args import parse_args
  File "/usr/local/lib/python3.8/site-packages/mozphab/args.py", line 14, in <module>
    from .detect_repository import find_repo_root
  File "/usr/local/lib/python3.8/site-packages/mozphab/detect_repository.py", line 8, in <module>
    from .git import Git
  File "/usr/local/lib/python3.8/site-packages/mozphab/git.py", line 24, in <module>
    from .telemetry import telemetry
  File "/usr/local/lib/python3.8/site-packages/mozphab/telemetry.py", line 174, in <module>
    telemetry = Telemetry()
  File "/usr/local/lib/python3.8/site-packages/mozphab/telemetry.py", line 46, in __init__
    self.pings = load_pings(environment.MOZPHAB_MAIN_DIR / "pings.yaml")
  File "/usr/local/lib/python3.8/site-packages/glean/_loader.py", line 195, in load_pings
    metrics = load_metrics(filepath, config)
  File "/usr/local/lib/python3.8/site-packages/glean/_loader.py", line 160, in load_metrics
    raise ValueError(f"Didn't find any metrics in '{filepath}'")
ValueError: Didn't find any metrics in '[PosixPath('/usr/local/lib/python3.8/site-packages/mozphab/pings.yaml')]'

I have worked around this for now by downgrading to 0.1.90:

$pip uninstall MozPhab
$pip install MozPhab==0.1.90

And then disabling self update in ~/.moz-phab-config

FWIW I first tried to work around this by disabling telemetry and error reporting in ~/.moz-phab-config, but that didn't work

This is broken on Windows as well.

Under Ubuntu, slightly different error message:

Traceback (most recent call last):
  File "/home/yoric/.local/bin/moz-phab", line 5, in <module>
    from mozphab.mozphab import run
  File "/home/yoric/.local/lib/python3.8/site-packages/mozphab/mozphab.py", line 20, in <module>
    from .args import parse_args
  File "/home/yoric/.local/lib/python3.8/site-packages/mozphab/args.py", line 14, in <module>
    from .detect_repository import find_repo_root
  File "/home/yoric/.local/lib/python3.8/site-packages/mozphab/detect_repository.py", line 8, in <module>
    from .git import Git
  File "/home/yoric/.local/lib/python3.8/site-packages/mozphab/git.py", line 24, in <module>
    from .telemetry import telemetry
  File "/home/yoric/.local/lib/python3.8/site-packages/mozphab/telemetry.py", line 174, in <module>
    telemetry = Telemetry()
  File "/home/yoric/.local/lib/python3.8/site-packages/mozphab/telemetry.py", line 46, in __init__
    self.pings = load_pings(environment.MOZPHAB_MAIN_DIR / "pings.yaml")
  File "/home/yoric/.local/lib/python3.8/site-packages/glean/_loader.py", line 195, in load_pings
    metrics = load_metrics(filepath, config)
  File "/home/yoric/.local/lib/python3.8/site-packages/glean/_loader.py", line 149, in load_metrics
    if glean_parser.lint.glinter(filepath, config, file=glinter_warnings):
  File "/home/yoric/.local/lib/python3.8/site-packages/glean_parser/lint.py", line 387, in glinter
    if lint_yaml_files(input_filepaths, file=file):
  File "/home/yoric/.local/lib/python3.8/site-packages/glean_parser/lint.py", line 359, in lint_yaml_files
    with path.open("r", encoding="utf-8") as fd:
  File "/usr/lib/python3.8/pathlib.py", line 1218, in open
    return io.open(self, mode, buffering, encoding, errors, newline,
  File "/usr/lib/python3.8/pathlib.py", line 1074, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/yoric/.local/lib/python3.8/site-packages/mozphab/pings.yaml'
Assignee: nobody → glob

I've yanked 0.1.91 from pypy.

Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Duplicate of this bug: 1673361
You need to log in before you can comment on or make changes to this bug.