Closed Bug 1736587 Opened 4 years ago Closed 2 years ago

Add applyTargeting param to about:studies preview URLS

Categories

(Firefox :: Nimbus Desktop Client, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: k88hudson, Assigned: beth)

References

Details

Attachments

(1 file, 1 obsolete file)

If a nimbus preview URL includes applyTargeting, when force-enrolling, we should also check targeting.

This should NOT include bucketing.

Blocks: 1780037
No longer blocks: 1728989

about:studies URLs allow us to QA recipes in preview mode. However, this force enrolls you in the experiment without checking any targeting. We would like to be able to use aabout:studies to validate targeting by appending ?applyTargeting to a preview URL.

The code for opting in to experiments begins in AboutPages.jsm, goes through RemoteSettingsExperimentLoader.optInToExperiment, and ends up in ExperimentManager.forceEnroll.

We'll want to add an extra param to optInToExperiment specifying if we should validate the targeting. An example of where we check targeting is in RemoteSettingsExperimentLoader.updateRecipes. If targeting fails, we'll want to include a useful message (via an exception) that targeting was the reason we could not enroll.

Mentor: brennie
No longer blocks: 1780037
Blocks: 1785140

I am an outreachy applicant. Can I contribute to this bug?

Pushpanjali, yes. The instructions above are a bit out of date due to refactoring, so here are some updated ones:

  1. Update about-studies.js to also capture the applyTargeting query parameter.
  2. Update RemoteSettingsExperimentLoader to grab the applyTargeting parameter, defaulting to false.
  3. Update the EnrollmentsCtx constructor call to set shouldCheckTargeting: applyTargeting

Yes, sir.
I am working on it.

Assignee: nobody → nemanaina9
Status: NEW → ASSIGNED

Sir, Can you help me in writing the unit test.

Flags: needinfo?(brennie)
Flags: needinfo?(brennie)
Assignee: nemanaina9 → brennie
Mentor: brennie
Attachment #9324213 - Attachment is obsolete: true
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/53e8e97bbe4e Optionally apply targeting when opting in to experiments r=emcminn
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: