-
Notifications
You must be signed in to change notification settings - Fork 2k
[ENH]: Add frontend logic for indexing status #6127
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
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
899b7e8 to
11f2ed6
Compare
|
It also wires the indexing status flow through the Rust frontend route, updates the associated metrics and OpenAPI documentation, and adds integration coverage to exercise the new endpoint. Affected Areas• This summary was automatically generated by @propel-code-bot |
| database = database, | ||
| collection_id = collection_id | ||
| ); | ||
| // TODO(tanujnay112): Add authorization for indexing status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Documentation] There is a stale TODO here. The authorization logic is implemented immediately below.
| // TODO(tanujnay112): Add authorization for indexing status | |
| // TODO(tanujnay112): Add authorization for indexing status |
(Remove the line or update it)
Context for Agents
There is a stale TODO here. The authorization logic is implemented immediately below.
```suggestion
// TODO(tanujnay112): Add authorization for indexing status
```
(Remove the line or update it)
File: rust/frontend/src/server.rs
Line: 181811f2ed6 to
60b074e
Compare
rescrv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably have some tests, right?
| pub async fn indexing_status( | ||
| &mut self, | ||
| collection_id: CollectionUuid, | ||
| ) -> Result<IndexStatusResponse, IndexStatusError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This returns error. Let's use that to not silently zero things.
a81c634 to
c5646ca
Compare
c5646ca to
1f10903
Compare
rust/frontend/src/server.rs
Outdated
| let _guard = server.scorecard_request(&[ | ||
| "op:indexing_status", | ||
| format!("tenant:{}", tenant).as_str(), | ||
| format!("collection:{}", collection_id).as_str(), | ||
| format!("requester:{}", requester_identity.tenant).as_str(), | ||
| ])?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put this above the auth check as it's 100% derivable from URL?
1f10903 to
a4da0a2
Compare
| res | ||
| } | ||
|
|
||
| pub async fn indexing_status( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Reliability] Other frontend methods (like get, query, add) implement a retry pattern (e.g., retryable_get + get with a retry loop) to handle transient failures. Since indexing_status makes a network call to the log service (scout_logs), consider wrapping this in a similar retry mechanism to ensure system reliability.
Context for Agents
Other frontend methods (like `get`, `query`, `add`) implement a retry pattern (e.g., `retryable_get` + `get` with a retry loop) to handle transient failures. Since `indexing_status` makes a network call to the log service (`scout_logs`), consider wrapping this in a similar retry mechanism to ensure system reliability.
File: rust/frontend/src/impls/service_based_frontend.rs
Line: 1419There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good recommendation.

Description of changes
Implemented frontend node logic for the proposed indexing_status endpoint. This endpoint is per collection and returns a tuple of
(percentage_ops_that_are_indexed, num_unindexed_ops, num_indexed_ops, total_ops_in_collection)
TODO after this change:
authorization for this new endpoint
client additions to hit this endpoint
end to end automated testing
Improvements & Bug fixes
New functionality
Test plan
How are these changes tested?
pytestfor python,yarn testfor js,cargo testfor rustMigration plan
Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?
Observability plan
What is the plan to instrument and monitor this change?
Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the _docs section?_