Provide a pref for spoc endpoint query string
Categories
(Firefox :: New Tab Page, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox86 | --- | verified |
People
(Reporter: thecount, Assigned: thecount)
Details
Attachments
(1 file)
Right now we have a pref for experiments and QA to provide a specialized spoc endpoint. browser.newtabpage.activity-stream.discoverystream.spocs-endpoint
This can be troublesome for QA/testing outside of the US. The way spoc endpoints work is it checks your region, so if you're not in the US you don't get results.
We've solved this up to this point with either adding a query to the url in that pref, or a VPN.
For QAing something, a VPN is fine, but in a lot of cases, we also just want to quickly add a query.
The problem with adding a query is you're providing a completely new pref value, and testing that the code works with the new pref value. It's not really testing the original pref value. So if the original pref value has a typo but your QA modified value does not, you might miss an issue.
I think we can fix this by adding a pref for query itself, that the code can use to add to the endpoint pref. This way, if the original pref has an issue, the code is likely to fail doing the fetch, or fail applying the query, thus we'll notice the issue in QA.
Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
To test:
- Turn on browser.newtabpage.activity-stream.asrouter.devtoolsEnabled
- Set browser.newtabpage.activity-stream.discoverystream.spocs-endpoint to something like "https://spocs.getpocket.com/spocs?site=whatever"
- Set browser.newtabpage.activity-stream.discoverystream.spocs-endpoint-query to something like "?thing=whatever&double=two"
- Go to about:newtab#devtools-ds
- Scroll down to and look at spocs_endpoint
Expected: the spocs endpoint should be "https://spocs.getpocket.com/spocs?site=whatever&thing=whatever&double=two"
This should be pretty robust, and "do the right thing" for cases like this "?thing=whatever&double=two", "&thing=whatever&double=two", and "thing=whatever&double=two". Should also be able to handle an intial endpoint both with and without an existing query.
Pushed by sdowne@getpocket.com: https://hg.mozilla.org/integration/autoland/rev/a41174d41a49 Provide a pref for newtab spoc endpoint query string. r=gvn
Comment 4•3 years ago
|
||
bugherder |
Comment 5•3 years ago
|
||
I have verified that the "spocs_endpoint" is displayed with the "https://spocs.getpocket.com/spocs?site=whatever&thing=whatever&double=two" value in the "about:newtab#devtools-ds" page by following the steps provided in comment 2 using Firefox Nightly 86.0a1 (20210107040715) on Windows 10 x64, macOS 10.15, and Ubuntu Linux 20.04.
I have also verified this enhancement with the values of an older experiment and can confirm that it works.
Updated•3 years ago
|
Description
•