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

Rebuild discovery-first config server #737

Merged
merged 11 commits into from
Sep 9, 2021
Merged

Conversation

TimHess
Copy link
Member

@TimHess TimHess commented Jul 29, 2021

Following up on #660, Rebuild discovery-first config server:

  • use private ref to Discovery.ClientBase
  • add ability to swap with DI-provided discovery client and logging via new IHostedService

Also adds:

  • some missing services for config server & k8s config during bootstrap
  • support for spring:cloud:discovery:enabled and eureka:client:enabled

- use private ref to Discovery.ClientBase
- add ability to swap with DI-provided discovery client and logging
add some missing services during bootstrap
@TimHess TimHess added Component/Configuration Issues related to Configuration providers ReleaseLine/3.x Identified as a feature/fix for the 3.x release line Component/Bootstrapping Issues related to AutoConfiguration package labels Jul 29, 2021
@TimHess TimHess self-assigned this Jul 29, 2021
@codecov
Copy link

codecov bot commented Jul 29, 2021

Codecov Report

Merging #737 (e0c197c) into main (88857cf) will increase coverage by 0.04%.
The diff coverage is 83.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #737      +/-   ##
==========================================
+ Coverage   74.22%   74.26%   +0.04%     
==========================================
  Files        1312     1313       +1     
  Lines       45593    45667      +74     
  Branches     8957     8955       -2     
==========================================
+ Hits        33840    33916      +76     
  Misses       9246     9246              
+ Partials     2507     2505       -2     
Impacted Files Coverage Δ
.../src/ConfigServerBase/ConfigServerHostedService.cs 0.00% <0.00%> (ø)
...very/src/Consul/Registry/ConsulServiceRegistrar.cs 56.25% <0.00%> (ø)
src/Discovery/src/Eureka/DiscoveryClient.cs 56.25% <ø> (ø)
.../Bootstrap/src/Autoconfig/HostBuilderExtensions.cs 89.28% <71.42%> (-2.39%) ⬇️
...otstrap/src/Autoconfig/WebHostBuilderExtensions.cs 89.02% <71.42%> (-2.41%) ⬇️
...figServerBase/ConfigServerConfigurationProvider.cs 83.58% <75.00%> (+1.14%) ⬆️
...c/ConfigServerBase/ConfigServerDiscoveryService.cs 100.00% <100.00%> (+41.17%) ⬆️
...figServerCore/ConfigServerHostBuilderExtensions.cs 100.00% <100.00%> (ø)
...overy/src/Consul/ConsulDiscoveryClientExtension.cs 100.00% <100.00%> (ø)
...overy/src/Eureka/EurekaDiscoveryClientExtension.cs 100.00% <100.00%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88857cf...e0c197c. Read the comment docs.

{
break;
}

attempts++;
if (attempts < _settings.RetryAttempts)
if (attempts <= _settings.RetryAttempts)
Copy link
Member Author

Choose a reason for hiding this comment

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

Previously setting RetryAttempts to 1 would result in a single total call rather than 1 call with 1 retry

@TimHess TimHess marked this pull request as ready for review July 30, 2021 15:03
@TimHess TimHess added this to the 3.2.0 milestone Aug 31, 2021
hananiel
hananiel previously approved these changes Sep 7, 2021
@sonarcloud
Copy link

sonarcloud bot commented Sep 9, 2021

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@TimHess TimHess merged commit b7da00d into main Sep 9, 2021
@TimHess TimHess deleted the timhess/discovery_first branch September 9, 2021 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component/Bootstrapping Issues related to AutoConfiguration package Component/Configuration Issues related to Configuration providers ReleaseLine/3.x Identified as a feature/fix for the 3.x release line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants