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

Implement Spanner logic to retrieve feature IDs for missing one implementation counts #1109

Open
jcscottiii opened this issue Jan 27, 2025 · 0 comments

Comments

@jcscottiii
Copy link
Collaborator

jcscottiii commented Jan 27, 2025

Description:

This issue focuses on implementing the Spanner logic to retrieve the list of feature IDs that are counted as "missing one implementation" for a given browser and date, as needed for the proposed /v1/stats/features/browsers/{browser}/missing_one_implementation_counts/{date}/features endpoint.

Requirements:

The Spanner query should efficiently retrieve the feature IDs that meet the "missing one implementation" criteria for the specified targetBrowser, otherBrowsers, and date.
The query should be compatible with both the GCP Spanner environment and the local emulator.
The query should handle potential exclusions specified in the ExcludedFeatureKeys table.
The query should support pagination to handle potentially large numbers of feature IDs.
Considerations:

Efficiency: The query should be optimized for performance, especially when dealing with a large number of browsers or features. Consider using appropriate indexes and join strategies.
Testing: Ensure thorough testing of the Spanner logic with the emulator. (You may or may not need to create an emulator query and a GCP query)

Acceptance Criteria:

The Spanner logic correctly retrieves the feature IDs for missing one implementation counts.
The logic is implemented efficiently and handles potential performance bottlenecks.
The code is well-tested and covers various scenarios, including edge cases and excluded features.
The implementation is compatible with both GCP Spanner and the local emulator.
Dependencies:

This issue is needed for the completion of the OpenAPI spec update for the new endpoint #1110 .


Previously:
For the missing one implementation chart, we only show the count per timestamp. It would be great to include the feature keys (and maybe names as metadata)

You will want to try things out in Spanner Studio in GCP.

Some options to try:
1. Modify the spanner query to return an additional column where it is an array of the data we want.
2. Modify the spanner query to not do the aggregation count in spanner but to return the array and we do the counting client side.

@jcscottiii jcscottiii changed the title Modify spanner query to get Feature Keys for each data point [Missing one implementation] Implement Spanner logic to retrieve feature IDs for missing one implementation counts Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant