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

feature: add client labels collect and attach labels to conn #11844

Merged
merged 3 commits into from
Mar 21, 2024

Conversation

robynron
Copy link
Contributor

Please do not create a Pull Request without creating an issue first.

What is the purpose of the change

nacos-client can collect labels in the form of SPI plug-in and attach them to the labels attribute of long connection.


支持nacos-client可以通过SPI插件的形式采集labels标签,并附加labels属性到长连接中。

Brief changelog

XX

Verifying this change

XXXX

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

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.

@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 68.34171% with 63 lines in your changes missing coverage. Please review.

Project coverage is 67.90%. Comparing base (b79d585) to head (efb27e3).
Report is 162 commits behind head on develop.

Files with missing lines Patch % Lines
...mon/labels/impl/DefaultLabelsCollectorManager.java 66.66% 18 Missing and 3 partials ⚠️
...om/alibaba/nacos/common/utils/ConnLabelsUtils.java 56.81% 12 Missing and 7 partials ⚠️
...a/nacos/common/remote/client/RpcClientFactory.java 0.00% 9 Missing ⚠️
.../com/alibaba/nacos/core/remote/ConnectionMeta.java 0.00% 9 Missing ⚠️
...common/labels/impl/utils/AbstractConfigGetter.java 80.00% 2 Missing ⚠️
...mmon/labels/impl/utils/PropertiesConfigGetter.java 81.81% 1 Missing and 1 partial ⚠️
...java/com/alibaba/nacos/core/remote/Connection.java 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop   #11844      +/-   ##
=============================================
- Coverage      67.91%   67.90%   -0.02%     
- Complexity      8915     8973      +58     
=============================================
  Files           1236     1245       +9     
  Lines          40459    40657     +198     
  Branches        4292     4308      +16     
=============================================
+ Hits           27479    27609     +130     
- Misses         11003    11060      +57     
- Partials        1977     1988      +11     
Files with missing lines Coverage Δ
...n/java/com/alibaba/nacos/api/common/Constants.java 58.33% <ø> (ø)
...alibaba/nacos/client/config/impl/ClientWorker.java 76.56% <100.00%> (ø)
...os/common/labels/impl/AbstractLabelsCollector.java 100.00% <100.00%> (ø)
...cos/common/labels/impl/DefaultLabelsCollector.java 100.00% <100.00%> (ø)
.../common/labels/impl/utils/ConfigGetterManager.java 100.00% <100.00%> (ø)
...acos/common/labels/impl/utils/EnvConfigGetter.java 100.00% <100.00%> (ø)
...acos/common/labels/impl/utils/JvmConfigGetter.java 100.00% <100.00%> (ø)
...java/com/alibaba/nacos/core/remote/Connection.java 81.25% <0.00%> (-5.42%) ⬇️
...common/labels/impl/utils/AbstractConfigGetter.java 80.00% <80.00%> (ø)
...mmon/labels/impl/utils/PropertiesConfigGetter.java 81.81% <81.81%> (ø)
... and 4 more

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

@shiyiyue1102 shiyiyue1102 merged commit 9fd6ff6 into alibaba:develop Mar 21, 2024
7 checks passed
@KomachiSion KomachiSion added kind/refactor and removed kind/feature type/feature labels Apr 2, 2024
@KomachiSion KomachiSion added this to the 2.3.2 milestone Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants