Skip to content

Handle underscores in use counter method names - #1065

Merged
BenWu merged 1 commit into
mainfrom
benwu/usecounters-underscore
Aug 11, 2026
Merged

Handle underscores in use counter method names#1065
BenWu merged 1 commit into
mainfrom
benwu/usecounters-underscore

Conversation

@BenWu

@BenWu BenWu commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

This is failing with

Traceback (most recent call last):   File "<frozen runpy>", line 198, in _run_module_as_main   File "<frozen runpy>", line 88, in _run_code   File "/app/probe_scraper/runner.py", line 906, in <module>     main(   File "/app/probe_scraper/runner.py", line 707, in main     upload_paths += load_moz_central_probes(
                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/probe_scraper/runner.py", line 319, in load_moz_central_probes
    revision_probes = parse_moz_central_probes(revision_data)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/probe_scraper/runner.py", line 218, in parse_moz_central_probes
    results = PARSERS[probe_type].parse(paths, details["version"], channel)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/probe_scraper/parsers/histograms.py", line 88, in parse
    parsed_probes = list(histogram_tools.from_files(filenames))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/probe_scraper/parsers/third_party/histogram_tools.py", line 666, in from_files
    histograms = parser(filename)
                 ^^^^^^^^^^^^^^^^
  File "/app/probe_scraper/parsers/third_party/histogram_tools.py", line 551, in from_UseCounters_conf
    return usecounters.generate_histograms(filename)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/probe_scraper/parsers/third_party/usecounters.py", line 57, in generate_histograms
    for counter in read_conf(filename):
  File "/app/probe_scraper/parsers/third_party/usecounters.py", line 48, in parse_counters
    raise ValueError("error parsing %s at line %d" % (conf_filename, line_num))
ValueError: error parsing /app/probe_cache/hg/1e704c6738f494b411bce8840fcabc790f704e8b/dom/base/UseCounters.conf at line 543

mozilla-firefox/firefox@546b6eb added methods with underscores and changed the function to allow underscores. The parse_counters function here is being updated to match the one in firefox

@BenWu
BenWu merged commit d5fcdb3 into main Aug 11, 2026
9 checks passed
@BenWu
BenWu deleted the benwu/usecounters-underscore branch August 11, 2026 17:35
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