Closed Bug 1909350 Opened 3 months ago Closed 3 months ago

build error[E0432]: unresolved import `glean::LabeledMetricData` toolkit/crashreporter/client/app/glean_metrics.rs

Categories

(Toolkit :: Crash Reporting, defect)

defect

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox128 --- unaffected
firefox129 --- unaffected
firefox130 --- fixed

People

(Reporter: karlt, Assigned: chutten)

References

(Regression)

Details

(Keywords: regression)

toolkit/crashreporter/client/app/crashreporter
   Compiling crashreporter v1.0.0 (/home/karl/moz/dev/toolkit/crashreporter/client/app)
error[E0432]: unresolved import `glean::LabeledMetricData`
  --> /var/karl/moz/obj/toolkit/crashreporter/client/app/glean_metrics.rs:10:102
   |
10 | ...raKeys, CommonMetricData, HistogramType, LabeledMetricData, Lifetime, TimeUnit, MemoryUnit};
   |                                             ^^^^^^^^^^^^^^^^^ no `LabeledMetricData` in the root
error[E0432]: unresolved import `glean::LabeledMetricData`
   --> /var/karl/moz/obj/toolkit/crashreporter/client/app/glean_metrics.rs:543:102
    |
543 | ...raKeys, CommonMetricData, HistogramType, LabeledMetricData, Lifetime, TimeUnit, MemoryUnit};
    |                                             ^^^^^^^^^^^^^^^^^ no `LabeledMetricData` in the root
error[E0432]: unresolved import `glean::LabeledMetricData`
   --> /var/karl/moz/obj/toolkit/crashreporter/client/app/glean_metrics.rs:588:102
    |
588 | ...raKeys, CommonMetricData, HistogramType, LabeledMetricData, Lifetime, TimeUnit, MemoryUnit};
    |                                             ^^^^^^^^^^^^^^^^^ no `LabeledMetricData` in the root
error[E0432]: unresolved import `glean::LabeledMetricData`
   --> /var/karl/moz/obj/toolkit/crashreporter/client/app/glean_metrics.rs:691:102
    |
691 | ...raKeys, CommonMetricData, HistogramType, LabeledMetricData, Lifetime, TimeUnit, MemoryUnit};
    |                                             ^^^^^^^^^^^^^^^^^ no `LabeledMetricData` in the root
error[E0432]: unresolved import `glean::LabeledMetricData`
   --> /var/karl/moz/obj/toolkit/crashreporter/client/app/glean_metrics.rs:753:102
    |
753 | ...raKeys, CommonMetricData, HistogramType, LabeledMetricData, Lifetime, TimeUnit, MemoryUnit};
    |                                             ^^^^^^^^^^^^^^^^^ no `LabeledMetricData` in the root
error[E0432]: unresolved import `glean::LabeledMetricData`
   --> /var/karl/moz/obj/toolkit/crashreporter/client/app/glean_metrics.rs:816:102
    |
816 | ...raKeys, CommonMetricData, HistogramType, LabeledMetricData, Lifetime, TimeUnit, MemoryUnit};
    |                                             ^^^^^^^^^^^^^^^^^ no `LabeledMetricData` in the root
error[E0432]: unresolved import `glean::LabeledMetricData`
    --> /var/karl/moz/obj/toolkit/crashreporter/client/app/glean_metrics.rs:1050:102
     |
1050 | ...raKeys, CommonMetricData, HistogramType, LabeledMetricData, Lifetime, TimeUnit, MemoryUnit};
     |                                             ^^^^^^^^^^^^^^^^^ no `LabeledMetricData` in the root
For more information about this error, try `rustc --explain E0432`.
error: could not compile `crashreporter` (bin "crashreporter") due to 7 previous errors

Reverting https://hg.mozilla.org/mozilla-central/rev/7fa392ddf838 resolves the error.

Set release status flags based on info from the regressing bug 1821091

:afranchuk, since you are the author of the regressor, bug 1821091, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

I'm hitting the same issue, and been looking into it.

Essentially it looks like the Rust template for glean-parser was updated to include LabeledMetricData in version 14.3.0, which was released about 18h ago (https://github.com/mozilla/glean_parser/commit/d2462138204b9b828b6876ae4ccf49383fdeeaae is the specific commit). The latest publicly available version of the glean crate (60.3.0, which seems to also be the version pinned in m-c, and that the crashreporter uses) does not seem to export LabeledMetricData: https://docs.rs/glean/60.3.0/glean/?search=LabeledMetricData

So likely mach picked it up when it last checked whether its Python virtualenv was up to date, which caused it to start generating bogus Rust files. I'm assuming taskcluster builds have been unimpacted because there's a vendored copy of glean-parser in m-c that's pinned to 14.1.2: https://searchfox.org/mozilla-central/source/third_party/python/glean_parser (though that's very much a guess since I'm not familiar enough with all the ins and outs of Python vendoring in this context)

As a result, I'm changing the regressing bug to bug 1909244 (which introduced this change in glean-parser) and NI'ing :chutten as the author of that change.

Edit: It looks like LabeledMetricData does exist in glean's source tree, just not in a released version: https://github.com/mozilla/glean/blob/1ae14f5718c402ab5c4bc1993a5e985947564da2/glean-core/src/metrics/labeled.rs#L44

Flags: needinfo?(afranchuk) → needinfo?(chutten)
Regressed by: 1909244
No longer regressed by: 1821091

Is this fixed by bug 1907991?

(In reply to Jan Alexander Steffens [:heftig] from comment #3)

Is this fixed by bug 1907991?

Ah yep, that's fixed it - seems like :chutten was already on top of this! Thanks for pointing this one out :)

Status: NEW → RESOLVED
Closed: 3 months ago
Flags: needinfo?(chutten)
Resolution: --- → FIXED
Assignee: nobody → chutten
Depends on: 1907991
Target Milestone: --- → 130 Branch
You need to log in before you can comment on or make changes to this bug.