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

polish: reduce magic value of 'NACOS_SERVER_HEADER' #9663

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

drgnchan
Copy link
Contributor

@drgnchan drgnchan commented Dec 4, 2022

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

What is the purpose of the change

polish

Brief changelog

In UtilsAndCommons.java,refer NACOS_SERVER_HEADER to com.alibaba.nacos.sys.env.Constants#NACOS_SERVER_HEADER so that there is only one magic value of "Nacos-Server".

Verifying this change

  1. run mvn clean:package
  2. build succeed.

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 Report

Merging #9663 (7b4730f) into develop (2d31722) will increase coverage by 0.02%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #9663      +/-   ##
=============================================
+ Coverage      47.46%   47.48%   +0.02%     
- Complexity      4555     4556       +1     
=============================================
  Files            855      855              
  Lines          28350    28350              
  Branches        3197     3197              
=============================================
+ Hits           13456    13463       +7     
+ Misses         13668    13660       -8     
- Partials        1226     1227       +1     
Impacted Files Coverage Δ
...com/alibaba/nacos/naming/misc/UtilsAndCommons.java 64.28% <ø> (ø)
...cos/core/cluster/remote/ClusterRpcClientProxy.java 72.85% <0.00%> (-1.43%) ⬇️
.../core/v2/event/publisher/NamingEventPublisher.java 74.68% <0.00%> (-1.27%) ⬇️
...alibaba/nacos/client/config/impl/ClientWorker.java 51.15% <0.00%> (-0.20%) ⬇️
...ent/manager/impl/ConnectionBasedClientManager.java 81.13% <0.00%> (+7.54%) ⬆️
...m/alibaba/nacos/naming/misc/HttpClientManager.java 83.33% <0.00%> (+14.28%) ⬆️

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 2d31722...7b4730f. Read the comment docs.

@KomachiSion KomachiSion merged commit 5be6385 into alibaba:develop Dec 6, 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.

3 participants