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

feat: Add ListBaselineStatusCounts to retrieve cumulative baseline feature counts in spanner #1132

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

jcscottiii
Copy link
Collaborator

@jcscottiii jcscottiii commented Feb 5, 2025

This is from today's discussion with @atopal. (There will be more parts to add the API and frontend parts into the global feature support chart)

This PR introduces the ListBaselineStatusCounts function and its associated helper functions to retrieve a cumulative count of baseline features over time.

The ListBaselineStatusCounts function works similarly to ListBrowserFeatureCountMetric by:

  1. Calculating an initial cumulative count of baseline features up to the specified startAt date.
  2. Retrieving subsequent baseline feature counts within the specified date range (startAt to endAt).
  3. Accumulating these counts to provide a cumulative view of baseline feature adoption over time.

Currently, the function only supports retrieving counts based on the LowDate field in the FeatureBaselineStatus table. However, support for HighDate can be easily added in the future by expanding the BaselineDateType enum and updating the query construction logic.

This functionality is useful for tracking the overall adoption of baseline features and understanding how the baseline status of features changes over time.

@jcscottiii
Copy link
Collaborator Author

I just realized something is a little off with my tests. Converting to draft for now. Sorry about that.

@jcscottiii jcscottiii force-pushed the jcscottiii/baseline_count branch from 89fe016 to 6ec6807 Compare February 5, 2025 22:32
@jcscottiii
Copy link
Collaborator Author

@DanielRyanSmith @jrobbins This is ready now.

@jcscottiii jcscottiii marked this pull request as ready for review February 5, 2025 22:33
…ture counts

This PR introduces the `ListBaselineStatusCount` function and its associated helper functions to retrieve a cumulative count of baseline features over time.

The `ListBaselineStatusCount` function works similarly to `ListBrowserFeatureCountMetric` by:

1. Calculating an initial cumulative count of baseline features up to the specified `startAt` date.
2. Retrieving subsequent baseline feature counts within the specified date range (`startAt` to `endAt`).
3. Accumulating these counts to provide a cumulative view of baseline feature adoption over time.

Currently, the function only supports retrieving counts based on the `LowDate` field in the `FeatureBaselineStatus` table. However, support for `HighDate` can be easily added in the future by expanding the `BaselineDateType` enum and updating the query construction logic.

This functionality is useful for tracking the overall adoption of baseline features and understanding how the baseline status of features changes over time.
@jcscottiii jcscottiii force-pushed the jcscottiii/baseline_count branch from 6ec6807 to c344a7d Compare February 6, 2025 19:01
@jcscottiii jcscottiii changed the title feat: Add ListBaselineStatusCount to retrieve cumulative baseline feature counts in spanner feat: Add ListBaselineStatusCounts to retrieve cumulative baseline feature counts in spanner Feb 6, 2025
@jcscottiii jcscottiii added this pull request to the merge queue Feb 10, 2025
Merged via the queue into main with commit 23d9f02 Feb 10, 2025
6 checks passed
@jcscottiii jcscottiii deleted the jcscottiii/baseline_count branch February 10, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants