-
Notifications
You must be signed in to change notification settings - Fork 35
[mobile config] track asset ownership. Add owner info to grpc response (part 2) #1125
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR implements the second stage of asset ownership tracking by exposing owner information through a new GRPC endpoint and removing the one-time backfill function. Building on PR #1102 which added owner tracking to the database, this change makes owner data available to API consumers and completes the migration.
Changes:
- Added
info_stream_v4GRPC endpoint that returns gateway information includingownerandowner_changed_atfields with filtering support - Updated tracker logic to properly update
last_changed_atwhen owner changes (previously only hash changes triggered this) - Removed one-time backfill function
backfill_gateway_ownersand its associated test now that migration is complete
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| mobile_config/tests/integrations/main.rs | Adds gateway_service_v4 test module |
| mobile_config/tests/integrations/gateway_tracker.rs | Removes backfill test and updates assertion to verify last_changed_at is updated when owner changes |
| mobile_config/tests/integrations/gateway_service_v4.rs | Comprehensive tests for v4 endpoint including basic functionality, NULL owner filtering, and min_owner_changed_at filtering |
| mobile_config/src/gateway/tracker.rs | Removes backfill function and updates last_changed_at logic to trigger on owner changes |
| mobile_config/src/gateway/service/mod.rs | Implements info_stream_v4 endpoint with owner filtering support |
| mobile_config/src/gateway/service/info_v4.rs | New module defining GatewayInfoV4 struct with owner fields and conversions |
| mobile_config/src/gateway/db.rs | Adds stream_gateway_info_v4 query function with owner_changed_at filtering |
| Cargo.toml | Patches proto dependencies to use gateway-info-v4 branch |
| Cargo.lock | Updates dependency versions to gateway-info-v4 branch |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Previous PR: #1102
Add info_stream_v4 GRPC endpoint
Remove (oneshot) backfill_gateway_owners
GRPC endpoint
Could be tested manually on branch mobile-config-cli-gateway-info4-test
test command exmpl:
./target/debug/mobile-config-cli --log-filter=Debug --config-host http://localhost:8090 --config-pubkey 13L4aDqCvji18g1uUqirM96Y9y67FyDLsV7C986sGTdCNCmYFeG --keypair ./config-server-keypair.
bin gateway info-stream-v4 --min-owner-changed-at 1769627776 --batch-size 5000