Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove /v1/features/{feature_id}/stats/wpt/browsers/{browser}/channels/{channel}/{metric_view} endpoint #190

Open
jcscottiii opened this issue May 2, 2024 · 0 comments
Labels
go Pull requests that update Go code tech-debt Issues that reduce the technical debt of the project typescript Pull requests that update Typescript code

Comments

@jcscottiii
Copy link
Collaborator

jcscottiii commented May 2, 2024

Background:

  • The endpoint /v1/features/{feature_id}/stats/wpt/browsers/{browser}/channels/{channel}/{metric_view} was created to simplify the database query when looking at a single feature. It removes the unneeded SUM aggregation as well that is used in /v1/stats/wpt/browsers/{browser}/channels/{channel}/{metric_view}. Now with Make subtest_count the default for timeseries data #189, the query building has been reduced to a shared template between the two endpoints and it knows when to add the SUM aggregation function or not. Now it seems the separation at the API layer was a premature optimization and it is no longer needed.

Desired work:

  • Remove /v1/features/{feature_id}/stats/wpt/browsers/{browser}/channels/{channel}/{metric_view} from openapi and any functions associated with it
  • Add a special case to the database call to check if there is a singular feature, then render the template without the SUM aggregate function by toggling IsSingleFeature to true.
  • Have the frontend call /v1/stats/wpt/browsers/{browser}/channels/{channel}/{metric_view} instead and pass in a single feature_key

This will be useful to have before we share the openapi document.

@jcscottiii jcscottiii added the enhancement New feature or request label May 13, 2024
@jcscottiii jcscottiii added tech-debt Issues that reduce the technical debt of the project typescript Pull requests that update Typescript code go Pull requests that update Go code and removed enhancement New feature or request labels May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code tech-debt Issues that reduce the technical debt of the project typescript Pull requests that update Typescript code
Projects
Status: No status
Development

No branches or pull requests

1 participant