Skip to content

Extend features request with amp mode #11643

@aaemnnosttv

Description

@aaemnnosttv

Feature Description


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The features request (/site-management/features/) body should be extended to include amp_mode as a string: primary, secondary, or (blank) for none

Implementation Brief

  • Update Google_Proxy::get_features to include amp_mode from Context::get_amp_mode in the request body as a string

Test Coverage

  • Update test coverage for Google_Proxy

QA Brief

  • Configure HTTP proxy on your local machine following instructions in the engineering workflow doc and use mitmproxy or an equivalent tool to inspect requests.
  • To force a new features request, delete the cached transient features data by running:
    wp option delete _transient_googlesitekit_remote_features
  • Then go to the SiteKit Dashboard to trigger the request.
  • Review requests made to the service /site-management/features/, in the body amp_mode should be present.
  • Test the following scenarios:
    • No AMP plugin installed: amp_mode should be an empty string ""
    • AMP plugin in Standard mode: amp_mode should be "primary"
    • AMP plugin in Transitional or Reader mode: amp_mode should be "secondary"

Changelog entry

  • Include the current AMP mode in the request to get enabled features.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Medium priorityPHPQA: EngRequires specialized QA by an engineerTeam MIssues for Squad 2Type: EnhancementImprovement of an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions