Closed Bug 1386248 Opened 8 years ago Closed 8 years ago

Create an unauthenticated endpoint to retrieve recommendations

Categories

(Data Platform and Tools :: General, enhancement, P1)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mdoglio, Assigned: mdoglio)

References

Details

The new endpoint will take a telemetry client_id as input and return a list of addons guid in json format.
Assignee: nobody → mdoglio
Priority: -- → P1
The repository at https://github.com/mozilla/taar-api contains a dockerflow-friendly implementation. This code needs to be tested against a real hbase server, so it's not production-ready yet.
The service is now deployed and working in a dockerflow environment create as part of bug 1386258.
The dev service is deployed at https://taar.dev.mozaws.net. The api is very simple, it accepts requests in the format /api/recommendations/<telemetry-client-id>/ and returns a json payload in the format { "results": [ "<addon id 1>", "<addon id 2>", .... "<addon id 10>", ] } :scolville please let me know if you have any question
Flags: needinfo?(scolville)
Thanks I'll pass this info on to the developer working on implementing our end of things.
Flags: needinfo?(scolville)
(In reply to Mauro Doglio [:mdoglio] from comment #3) > The dev service is deployed at https://taar.dev.mozaws.net. > The api is very simple, it accepts requests in the format > /api/recommendations/<telemetry-client-id>/ > and returns a json payload in the format > { > "results": [ > "<addon id 1>", > "<addon id 2>", > .... > "<addon id 10>", > ] > } > > :scolville please let me know if you have any question Is there a quick way to get a client-id? I tried looking it up from about:config (toolkit.telemetry.cachedClientID) but I'm not sure if that's the right value - I didn't get a result.
Flags: needinfo?(mdoglio)
It's the value of `clientId` in about:telemetry#general-data-tab. The taar-api dev environment is acting crazy at the moment and I'm working on it. It should be fixed soon.
Flags: needinfo?(mdoglio)
Is there an alternate url we should be using for AMO dev and stage? I'm assuming https://taar.dev.mozaws.net/ is the one to use for production amo.
Flags: needinfo?(mdoglio)
https://taar.dev.mozaws.net/ is for dev and stage. The prod endpoint has not been setup but most likely be https://taar.prod.mozaws.net/ or https://taar.data.mozaws.net/
Flags: needinfo?(mdoglio)
Are the recommendations returned already filtered for correct platform and OS? I.e. could one of the guids relate to a MacOS-only addon and we'd be offering it to a Windows telemetry id?
Flags: needinfo?(mdoglio)
Depends on: 1396545
(In reply to Andrew Williamson [:eviljeff] from comment #9) > Are the recommendations returned already filtered for correct platform and > OS? I.e. could one of the guids relate to a MacOS-only addon and we'd be > offering it to a Windows telemetry id? Hey Andrew, there are a bunch of edge cases that can trigger incompatible recommendations: - Individual TAAR recommendation strategies can recommend incompatible addons for the current platform. We filed bug 1396545 to address that. - No information is available for the user on our servers (e.g. user disabled Telemetry, new user not yet on our servers, ...). I'm afraid this edge case cannot be solved.
Flags: needinfo?(mdoglio)
> - Individual TAAR recommendation strategies can recommend incompatible addons for the current platform. We filed bug 1396545 to address that. okay, we won't need to handle that edge case then. - No information is available for the user on our servers (e.g. user disabled Telemetry, new user not yet on our servers, ...). I'm afraid this edge case cannot be solved. What would be sent back in that case? An empty response/error? I've written the patch currently to be fairly tolerant of getting empty results, or guids not public on AMO - it just ignores anything we can't use and swaps out up to four extensions from the existing curated list. (no results would mean no substitutions)
(In reply to Andrew Williamson [:eviljeff] from comment #11) > > - Individual TAAR recommendation strategies can recommend incompatible addons for the current platform. We filed bug 1396545 to address that. > > okay, we won't need to handle that edge case then. > > - No information is available for the user on our servers (e.g. user > disabled Telemetry, new user not yet on our servers, ...). I'm afraid this > edge case cannot be solved. Sorry for the delay, I forgot to come back to this. We currently send an empty list every time we were not able to make useful recommendations, so you should be fine.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Moved to new component, per bug 1425844.
Component: General → Add-on Recommender
Component: Add-on Recommender → General
You need to log in before you can comment on or make changes to this bug.