Skip to content

Conversation

@tanujnay112
Copy link
Contributor

@tanujnay112 tanujnay112 commented Jan 7, 2026

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

    • The described indexing_status GET endpoint.

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Migration 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?_

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copy link
Contributor Author

tanujnay112 commented Jan 7, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@tanujnay112 tanujnay112 force-pushed the indexing_progres_backend branch from 899b7e8 to 11f2ed6 Compare January 7, 2026 23:16
@tanujnay112 tanujnay112 marked this pull request as ready for review January 7, 2026 23:17
@propel-code-bot
Copy link
Contributor

propel-code-bot bot commented Jan 7, 2026

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

rust/frontend/src/impls/service_based_frontend.rs
rust/frontend/src/server.rs
rust/types/src/api_types.rs
rust/frontend/src/tests (integration test module)

This summary was automatically generated by @propel-code-bot

database = database,
collection_id = collection_id
);
// TODO(tanujnay112): Add authorization for indexing status
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Advisory

[Documentation] There is a stale TODO here. The authorization logic is implemented immediately below.

Suggested change
// 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: 1818

@tanujnay112 tanujnay112 force-pushed the indexing_progres_backend branch from 11f2ed6 to 60b074e Compare January 7, 2026 23:42
@tanujnay112 tanujnay112 requested a review from rescrv January 7, 2026 23:44
Copy link
Contributor

@rescrv rescrv left a 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> {
Copy link
Contributor

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.

@tanujnay112 tanujnay112 force-pushed the indexing_progres_backend branch 2 times, most recently from a81c634 to c5646ca Compare January 8, 2026 00:33
@tanujnay112 tanujnay112 force-pushed the indexing_progres_backend branch from c5646ca to 1f10903 Compare January 8, 2026 01:25
@tanujnay112 tanujnay112 requested a review from rescrv January 8, 2026 02:10
Comment on lines 1831 to 1836
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(),
])?;
Copy link
Contributor

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?

@tanujnay112 tanujnay112 force-pushed the indexing_progres_backend branch from 1f10903 to a4da0a2 Compare January 8, 2026 19:02
@tanujnay112 tanujnay112 enabled auto-merge (squash) January 8, 2026 19:03
res
}

pub async fn indexing_status(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommended

[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: 1419

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good recommendation.

@tanujnay112 tanujnay112 merged commit 9afe34a into main Jan 8, 2026
65 checks passed
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.

3 participants