Closed Bug 1851609 Opened 1 year ago Closed 1 year ago

Add API endpoint to trigger analysis

Categories

(Firefox :: Shopping, task, P1)

task

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: jhirsch, Assigned: fchasen)

References

Details

(Whiteboard: [fidefe-shopping])

Attachments

(1 file)

We've just heard that the fakespot API will support triggering analysis quite soon (within the next week or so).

Let's get the API design details and build the client-side integration in parallel, so this is ready for QA as soon as possible.

Severity: -- → S2
Priority: -- → P1
Whiteboard: [fidefe-shopping]
Blocks: 1851629
Assignee: nobody → fchasen

Marking 119 ship-blockers as P1s for easier tracking

  • Adds the API endpoint and schema for analyze and analysis status.
  • Adds requestAnalyze and requestAnalysisStatus methods for products.
  • Updated pollForAnalysisCompleted to poll the analysis status api instead of analysis.
  • After testing with the production api, polling now has an initial wait of 60s and will poll every 1s after that for 2 more minutes.
  • Removed exponential backoff as the new api gives updated progress with the status, so better to get it consistently.
  • Removed links to external analysis triggers.
  • Update ShoppingSidebarChild updateContent to check if there is an analysis in progress and if so wait for it to finish before requesting the analysis.

NOTE: Now that pollForAnalysisCompleted has a status api to poll, it returns a status result. The analysis data will now need to be requested with requestAnalysis after the polling has finished.

Attachment #9352310 - Attachment description: WIP: Bug 1851609 - Add Analyze and Analysis Status Product APIs → Bug 1851609 - Add Analyze and Analysis Status Product APIs. r=#shopping-reviewers
Blocks: 1852804
Pushed by fchasen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c74fb301e2f4 Add Analyze and Analysis Status Product APIs. r=shopping-reviewers,jhirsch
Pushed by fchasen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/797c9afc3d0a Add Analyze and Analysis Status Product APIs. r=shopping-reviewers,jhirsch
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
Flags: needinfo?(fchasen)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: