Skip to content

[SCB-2663]Support to update microservice properties to the registration center.#3261

Merged
liubao68 merged 1 commit intoapache:masterfrom
Vientu:weidenghuang
Aug 9, 2022
Merged

[SCB-2663]Support to update microservice properties to the registration center.#3261
liubao68 merged 1 commit intoapache:masterfrom
Vientu:weidenghuang

Conversation

@Vientu
Copy link
Copy Markdown
Contributor

@Vientu Vientu commented Aug 5, 2022

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a JIRA issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [SCB-XXX] Fixes bug in ApproximateQuantiles, where you replace SCB-XXX with the appropriate JIRA issue.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean install -Pit to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

@Vientu Vientu force-pushed the weidenghuang branch 2 times, most recently from d26765a to c7d7a4f Compare August 5, 2022 07:57
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 5, 2022

Codecov Report

Merging #3261 (99552ca) into master (7b39a7a) will decrease coverage by 0.04%.
The diff coverage is 47.36%.

@@             Coverage Diff              @@
##             master    #3261      +/-   ##
============================================
- Coverage     77.48%   77.44%   -0.05%     
- Complexity     1439     1445       +6     
============================================
  Files          1631     1648      +17     
  Lines         43455    43635     +180     
  Branches       3657     3669      +12     
============================================
+ Hits          33671    33792     +121     
- Misses         8270     8320      +50     
- Partials       1514     1523       +9     
Impacted Files Coverage Δ
...rvice/center/client/ServiceCenterRegistration.java 0.00% <0.00%> (ø)
...omb/service/center/client/ServiceCenterClient.java 24.30% <38.46%> (+0.66%) ⬆️
...serviceregistry/task/MicroserviceRegisterTask.java 87.19% <69.23%> (-1.48%) ⬇️
...e/center/client/model/UpdatePropertiesRequest.java 100.00% <100.00%> (ø)
.../governance/handler/AbstractGovernanceHandler.java 80.00% <0.00%> (-15.84%) ⬇️
...mb/governance/handler/InstanceBulkheadHandler.java 63.33% <0.00%> (-7.04%) ⬇️
...rvicecomb/governance/marker/GovernanceRequest.java 94.73% <0.00%> (-5.27%) ⬇️
...b/governance/handler/InstanceIsolationHandler.java 73.33% <0.00%> (-4.72%) ⬇️
...mb/serviceregistry/client/http/RestClientUtil.java 78.50% <0.00%> (-1.87%) ⬇️
...he/servicecomb/foundation/common/net/NetUtils.java 64.80% <0.00%> (-1.61%) ⬇️
... and 27 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

microservice.setServiceId(serviceId);

// Need to update microservice properties if we have modified or added properties of microservices.
Microservice microserviceTemp = new Microservice();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When you update microservcie propeties, the client may not be notified for this change. And why you implement this feature and does your scenario need notification?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

To support the gray deployment function。

Map<String, String> propertiesTemp = microserviceTemp.getProperties();
if (srClient.getMicroservice(serviceId) != null) {
microserviceTemp.setProperties(srClient.getMicroservice(serviceId).getProperties());
microserviceTemp.getProperties().putAll(propertiesTemp);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

srClient.getMicroservice(serviceId) is a remote RPC call, use the result above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK

@liubao68 liubao68 merged commit f1e649e into apache:master Aug 9, 2022
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.

4 participants