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

service: Revise DiscoveryClient API #375

Merged
merged 7 commits into from
Sep 18, 2023

Conversation

bkeryan
Copy link
Collaborator

@bkeryan bkeryan commented Sep 14, 2023

What does this Pull Request accomplish?

ServiceInfo:

  • Add display_name field

DiscoveryClient:

  • Add a register_service method:
    • Not measurement-specific
    • Accepts the full ServiceLocation, not only the insecure port
    • Returns registration id instead of using a member variable
  • Deprecate register_measurement_service
  • Deprecate properties that should not be public

GrpcService:

  • Call new register_service method
  • Save registration ID

tests:

  • Update test_discovery_client.py to test the new & old APIs
  • Update test_discovery_client.py to use a mock DiscoveryServiceStub

Why should this Pull Request be merged?

Make the public API more general and follow the proto file more closely.

Hide implementation details.

What testing has been done?

Ran pytest.

@github-actions
Copy link

github-actions bot commented Sep 14, 2023

Test Results

     12 files  ±  0       12 suites  ±0   2m 0s ⏱️ +5s
   198 tests +  4     169 ✔️ +  4    29 💤 ±0  0 ±0 
2 364 runs  +48  2 016 ✔️ +48  348 💤 ±0  0 ±0 

Results for commit 1ed046b. ± Comparison against base commit 90d6064.

♻️ This comment has been updated with latest results.

@bkeryan bkeryan merged commit 04ea56d into main Sep 18, 2023
@bkeryan bkeryan deleted the users/bkeryan/discovery-client-cleanup branch September 18, 2023 19:26
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