Closed Bug 1849401 Opened 3 years ago Closed 3 years ago

Allow switching between shopping prod, stage, and test environments via a pref

Categories

(Firefox Graveyard :: Shopping, task)

Tracking

(firefox120 verified)

VERIFIED FIXED
120 Branch
Tracking Status
firefox120 --- verified

People

(Reporter: jhirsch, Assigned: jhirsch)

References

Details

Attachments

(1 external file)

To avoid hard-coding staging vs prod URLs for the fakespot analysis pages in the product, these values have been moved into ProductConfig over in the toolkit code.

Unfortunately, ProductConfig includes a Cu.isInAutomation check, but when this file is imported from the about-page content context of the web components, Cu is undefined and throws an error.

As an expedient workaround, I've added an "is Cu undefined" check to ProductConfig, but this means we won't be able to use some bits of ProductConfig when actually testing the web components that live in the page.

This bug is a placeholder to see if we can find a better solution.

Assignee: nobody → jhirsch
Status: NEW → ASSIGNED

There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:jhirsch, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(jhirsch)
Flags: needinfo?(gijskruitbosch+bugs)
Flags: needinfo?(gijskruitbosch+bugs)
Flags: needinfo?(jhirsch)

Noting here for future reference, to test the fakespot staging environment:

With this patch, it should be possible for QA to test the staging environment by setting the following prefs:

toolkit.shopping.environment to stage (note: pref name updated in latest commit)
toolkit.shopping.ohttpConfigURL to https://stage.ohttp-gateway.nonprod.webservices.mozgcp.net/ohttp-configs
toolkit.shopping.ohttpRelayURL to https://mozilla-ohttp-dev.fastly-edge.com/
Summary: Revisit `Cu` check inside ProductConfig → Allow switching between shopping prod, stage, and test environments via a pref
Pushed by jhirsch@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/937e2f80edbc Allow switching between shopping prod, stage, and test environments via a pref. r=shopping-reviewers,Gijs
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch

Verified as fixed in our latest Nightly build 120.0a1 (2023-10-12).

Status: RESOLVED → VERIFIED
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: