feat(ops): firestore indexes for application and event paging queries - #7274
feat(ops): firestore indexes for application and event paging queries#7274srinivasr wants to merge 5 commits into
Conversation
splitting these out of pipe-cd#7234 per reviewer request so operators can let them build in the background before the actual query changes ship. Co-authored-by: areebahmeddd <areebahmeddd@users.noreply.github.com> Signed-off-by: srinivasr <sriniv4sreddy@gmail.com>
✅ Deploy Preview for pipecd-site canceled.
|
There was a problem hiding this comment.
Pull request overview
This PR adds new Firestore composite index definitions to firestoreindexensurer so operators can deploy and let indexes build ahead of the upcoming paginated query changes (notably ListApplications / ListEvents) referenced in #7234.
Changes:
- Added composite indexes for
Applicationto support paging/sorting patterns that includeDisabledand stable ordering byId. - Added composite indexes for
Eventto support cursor paging for both ascending and descendingCreatedAtorderings (includingStatus-filtered queries). - Updated the index parsing test expectations to include the newly added index entries.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/app/ops/firestoreindexensurer/indexes.json | Adds new Application and Event composite index definitions needed by upcoming paginated query shapes. |
| pkg/app/ops/firestoreindexensurer/indexes_test.go | Updates test fixture expectations for the expanded index list (and currently changes the file’s copyright year). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: srinivas <148582479+srinivasr@users.noreply.github.com>
|
@khanhtc1202 @yashisrani ci is green on this one. it just adds the firestore indexes needed for the pagination pr (#7234). let me know if anything else is needed here. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7274 +/- ##
==========================================
+ Coverage 29.75% 29.88% +0.13%
==========================================
Files 601 591 -10
Lines 64442 63490 -952
==========================================
- Hits 19172 18973 -199
+ Misses 43778 43047 -731
+ Partials 1492 1470 -22
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
splitting these out of #7234 per reviewer request so operators can let them build in the background before the actual query changes ship.
What this PR does:
Adds the Firestore composite indexes required by the paginated
ListApplicationsandListEventsqueries coming in #7234. TheApplicationindexes include theDisabledfield thatCreateDeploymentChainandListApplicationsalways filter on:ProjectId | PipedId | Disabled | IdProjectId | Disabled | IdProjectId | Disabled | Name | IdProjectId | Disabled | Kind | IdProjectId | Disabled | Name | Kind | IdAlso adds the
Eventindexes needed for cursor-pagedListEventsqueries.Why we need it:
Firestore indexes can take a few minutes to build after being created. Landing them separately lets operators deploy this first and let the indexes finish building before the query changes in #7234 ship, avoiding any query errors during the window between deployments.
Which issue(s) this PR fixes:
Fixes #
Prereq for #7234
Does this PR introduce a user-facing change?:
firestoreindexensurercomponent creates the new indexes automatically on next deployment.