Closed Bug 1943977 Opened 28 days ago Closed 24 days ago

`setEnabled` doesn't work as expected for pings with `follows_collection_enabled: false`

Categories

(Toolkit :: Telemetry, defect, P1)

defect

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: chutten, Assigned: janerik)

References

Details

Attachments

(1 file)

:adw writes with problems he's been encountering testing his "quick-suggest" ping change from bug 1940808 on artefact builds. His tests just fail.

Lucky for us, he did some digging and has a theory of the problem:

I did some debugging. There are at least two problems. First, set_ping_enabled_by_id needs to look up the ping in the JOG ping map like submit_ping_by_id does. As is, PingType::submit_sync thinks that the ping is disabled and enters this if-branch here.

With that fixed, PingType::submit_sync properly sees that the ping is enabled, but a little later it thinks that the ping has no content, here. That’s because Database::record thinks that the ping is disabled because its glean.is_ping_enabled call here returns false. And AFAICT that’s because Glean::register_ping_type adds a clone of the ping to its ping_registry map. And of course, I’m calling setEnabled(true) on my ping after it’s registered.

So it seems to me that setEnabled doesn’t work as expected for pings with follows_collection_enabled: false, or any ping that’s disabled when it’s registered.

Flags: needinfo?(tlong)
Flags: needinfo?(jrediger)

Do I read this right that it's a problem only in artifact builds?

Flags: needinfo?(jrediger) → needinfo?(chutten)
Flags: needinfo?(tlong)

Answered in chat: it seems the tests are only failing in artifact builds. But there might be more hiding so I'm taking a closer look.

Assignee: nobody → jrediger
Status: NEW → ASSIGNED
Priority: -- → P1
Flags: needinfo?(chutten)
Pushed by jrediger@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/82457719faa7 Ensure collection-disabled pings work as expected for JOG pings. r=chutten
See Also: → 1940808
Status: ASSIGNED → RESOLVED
Closed: 24 days ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
Blocks: 1945663
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: