Page MenuHomePhabricator

Section-level images: Create tooling to mock API
Closed, ResolvedPublic

Description

The production API may not be ready for us to use until a few weeks before the deadline. Until the API is ready, we'll want to use whatever we know about the expected response to create a static provider for testing with. After the API is ready, we'll still want to use the static provider in CI.

Acceptance Criteria

  1. Should be able to ....
  2. ....
Completion checklist

Functionality

  • The patches have been code reviewed and merged
  • The task passes its acceptance criteria

Engineering

  • There are existing and passing unit/integration tests
  • Tests for every involved patch should pass
  • Coverage for every involved project should have improved or stayed the same

Design & QA

  • If the task is UX/Design related: it must be reviewed and approved by the UX/Design team
  • Must be reviewed and approved by Quality Assurance.

Documentation

  • Related and updated documentation done where necessary

Event Timeline

The new API is the same as the old API; we will just be using a different suggestion type (kind will be istype-section-topics-p18). I don't think we really need to change our mocking code, but we could use this task to write the actual API handler, which will just be a fairly trivial filtering change. We'll also need to update the filtering for the old API client.

Change 914028 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Section images: Do not invalidate cache when using subpage recs

https://gerrit.wikimedia.org/r/914028

Change 914028 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Section images: Do not invalidate cache when using subpage recs

https://gerrit.wikimedia.org/r/914028

Change 916811 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Section images: Update API handler

https://gerrit.wikimedia.org/r/916811

Change 916880 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Add ActionApiImageRecommendationApiHandler

https://gerrit.wikimedia.org/r/916880

I don't think we really need to change our mocking code

Static/subpage mocks didn't need much change, and the production API provides section recommendations, but the MVP API we use on beta doesn't. Solved that via T335641: Use the prop=growthimagesuggestiondata API as an image recommendation source.

Change 916811 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Section images: Update API handler

https://gerrit.wikimedia.org/r/916811

Change 918602 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] [WIP] Section images: update growthinvalidateimagerecommendation

https://gerrit.wikimedia.org/r/918602

Change 918603 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] [WIP] Section images: Add image recommendation task type base class

https://gerrit.wikimedia.org/r/918603

Change 919458 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Section images: Log unexpected 'kind' values from API

https://gerrit.wikimedia.org/r/919458

Change 919812 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Allow some interactions with disabled task types

https://gerrit.wikimedia.org/r/919812

Change 916880 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add ActionApiImageRecommendationApiHandler

https://gerrit.wikimedia.org/r/916880

Change 918602 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Section images: update growthinvalidateimagerecommendation

https://gerrit.wikimedia.org/r/918602

Change 918603 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Section images: Add image recommendation task type base class

https://gerrit.wikimedia.org/r/918603

Change 919458 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Section images: Log unexpected 'kind' values from API

https://gerrit.wikimedia.org/r/919458

Change 919812 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Allow some interactions with disabled task types

https://gerrit.wikimedia.org/r/919812

Change 919938 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Section images: Handle section parameters in actionapi API handler

https://gerrit.wikimedia.org/r/919938

Change 919938 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Section images: Handle section parameters in actionapi API handler

https://gerrit.wikimedia.org/r/919938

Change 924169 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Section images: Accept all API response 'kind' fields

https://gerrit.wikimedia.org/r/924169

Change 924169 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Section images: Accept all API response 'kind' fields

https://gerrit.wikimedia.org/r/924169