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

FIX When the namespace does not exist, it is still possible to create configuration items #12890

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from

Conversation

fuhouyu
Copy link
Contributor

@fuhouyu fuhouyu commented Nov 23, 2024

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

What is the purpose of the change

resolve #12889
FIX When the namespace does not exist, configuration items can still be created.

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.

Copy link

Thanks for your this PR. 🙏
Please check again for your PR changes whether contains any usage/api/configuration change such as Add new API , Add new configuration, Change default value of configuration.
If so, please add or update documents(markdown type) in docs/next/ for repository nacos-group/nacos-group.github.io


感谢您提交的PR。 🙏
请再次查看您的PR内容,确认是否包含任何使用方式/API/配置参数的变更,如:新增API新增配置参数修改默认配置等操作。
如果是,请确保在提交之前,在仓库nacos-group/nacos-group.github.io中的docs/next/目录下添加或更新文档(markdown格式)。

@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2024

Codecov Report

Attention: Patch coverage is 4.76190% with 20 lines in your changes missing coverage. Please review.

Project coverage is 72.26%. Comparing base (cb3685d) to head (1975f3a).

Files with missing lines Patch % Lines
...aba/nacos/core/utils/NamespaceParamCheckUtils.java 0.00% 12 Missing ⚠️
...a/nacos/common/paramcheck/DefaultParamChecker.java 20.00% 3 Missing and 1 partial ⚠️
...baba/nacos/core/paramcheck/ParamCheckerFilter.java 0.00% 2 Missing ⚠️
...nacos/core/remote/grpc/RemoteParamCheckFilter.java 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop   #12890      +/-   ##
=============================================
- Coverage      72.29%   72.26%   -0.03%     
- Complexity      9930     9932       +2     
=============================================
  Files           1302     1303       +1     
  Lines          41751    41770      +19     
  Branches        4392     4396       +4     
=============================================
+ Hits           30182    30185       +3     
- Misses          9461     9477      +16     
  Partials        2108     2108              
Files with missing lines Coverage Δ
.../nacos/common/paramcheck/AbstractParamChecker.java 100.00% <ø> (ø)
...baba/nacos/core/paramcheck/ParamCheckerFilter.java 20.93% <0.00%> (-0.50%) ⬇️
...nacos/core/remote/grpc/RemoteParamCheckFilter.java 0.00% <0.00%> (ø)
...a/nacos/common/paramcheck/DefaultParamChecker.java 96.84% <20.00%> (-1.78%) ⬇️
...aba/nacos/core/utils/NamespaceParamCheckUtils.java 0.00% <0.00%> (ø)

... and 1 file 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 cb3685d...1975f3a. Read the comment docs.

@wuyfee
Copy link

wuyfee commented Nov 23, 2024

$\color{red}{FAILURE}$
DETAILS
✅ - docker: success
✅ - deploy (standalone & cluster & standalone_auth): success
✅ - e2e-java-test (standalone & cluster & standalone_auth): success
❌ - e2e-go-test (standalone & cluster): failure
❌ - e2e-cpp-test (standalone & cluster): failure
✅ - e2e-csharp-test (standalone & cluster): success
❌ - e2e-nodejs-test (standalone & cluster): failure
❌ - e2e-python-test (standalone & cluster): failure
✅ - clean (standalone & cluster & standalone_auth): success

@shiyiyue1102
Copy link
Collaborator

  1. it will be better to extract empty tenant checking to a filter both on http and grpc.
  2. empty tenant checking should be light-weighting,we can't invoke persist operation through get config interface.
  3. considering upgrade compatibility for the current

@fuhouyu
Copy link
Contributor Author

fuhouyu commented Nov 26, 2024

  1. it will be better to extract empty tenant checking to a filter both on http and grpc.
  2. empty tenant checking should be light-weighting,we can't invoke persist operation through get config interface.
  3. considering upgrade compatibility for the current
    OK, thank you teacher. I'll look at how to extract this verification logic to the filter later.

@shiyiyue1102
Copy link
Collaborator

@fuhouyu would you please fix namespace existing checking on naming module together on this pr ?

@fuhouyu
Copy link
Contributor Author

fuhouyu commented Nov 27, 2024

@fuhouyu would you please fix namespace existing checking on naming module together on this pr ?

Ok, I will move the logic of this empty tenant check to the naming module over the weekend

@fuhouyu
Copy link
Contributor Author

fuhouyu commented Nov 30, 2024

@fuhouyu would you please fix namespace existing checking on naming module together on this pr ?

I see that the parameter validation in the code is placed in the core module, so the validation logic of this namespace is placed under the remoteFilter and paramFilter in the core module.
Please teacher check the code, thank you teacher.

@wuyfee
Copy link

wuyfee commented Nov 30, 2024

$\color{red}{FAILURE}$
DETAILS
✅ - docker: success
✅ - deploy (standalone & cluster & standalone_auth): success
❌ - e2e-java-test (standalone & cluster & standalone_auth): failure
❌ - e2e-go-test (standalone & cluster): failure
✅ - e2e-cpp-test (standalone & cluster): success
❌ - e2e-csharp-test (standalone & cluster): failure
✅ - e2e-nodejs-test (standalone & cluster): success
✅ - e2e-python-test (standalone & cluster): success
✅ - clean (standalone & cluster & standalone_auth): success

@wuyfee
Copy link

wuyfee commented Nov 30, 2024

$\color{red}{FAILURE}$
DETAILS
✅ - docker: success
✅ - deploy (standalone & cluster & standalone_auth): success
❌ - e2e-java-test (standalone & cluster & standalone_auth): failure
❌ - e2e-go-test (standalone & cluster): failure
✅ - e2e-cpp-test (standalone & cluster): success
❌ - e2e-csharp-test (standalone & cluster): failure
✅ - e2e-nodejs-test (standalone & cluster): success
✅ - e2e-python-test (standalone & cluster): success
✅ - clean (standalone & cluster & standalone_auth): success

@wuyfee
Copy link

wuyfee commented Nov 30, 2024

$\color{red}{FAILURE}$
DETAILS
✅ - docker: success
✅ - deploy (standalone & cluster & standalone_auth): success
❌ - e2e-java-test (standalone & cluster & standalone_auth): failure
✅ - e2e-go-test (standalone & cluster): success
✅ - e2e-cpp-test (standalone & cluster): success
✅ - e2e-csharp-test (standalone & cluster): success
✅ - e2e-nodejs-test (standalone & cluster): success
✅ - e2e-python-test (standalone & cluster): success
✅ - clean (standalone & cluster & standalone_auth): success

@wuyfee
Copy link

wuyfee commented Nov 30, 2024

$\color{red}{FAILURE}$
DETAILS
✅ - docker: success
✅ - deploy (standalone & cluster & standalone_auth): success
❌ - e2e-java-test (standalone & cluster & standalone_auth): failure
✅ - e2e-go-test (standalone & cluster): success
✅ - e2e-cpp-test (standalone & cluster): success
✅ - e2e-csharp-test (standalone & cluster): success
✅ - e2e-nodejs-test (standalone & cluster): success
✅ - e2e-python-test (standalone & cluster): success
✅ - clean (standalone & cluster & standalone_auth): success

@wuyfee
Copy link

wuyfee commented Nov 30, 2024

$\color{red}{FAILURE}$
DETAILS
✅ - docker: success
✅ - deploy (standalone & cluster & standalone_auth): success
❌ - e2e-java-test (standalone & cluster & standalone_auth): failure
✅ - e2e-go-test (standalone & cluster): success
✅ - e2e-cpp-test (standalone & cluster): success
✅ - e2e-csharp-test (standalone & cluster): success
✅ - e2e-nodejs-test (standalone & cluster): success
✅ - e2e-python-test (standalone & cluster): success
✅ - clean (standalone & cluster & standalone_auth): success

@fuhouyu
Copy link
Contributor Author

fuhouyu commented Dec 2, 2024

Test is error, I will be fix it later

@wuyfee
Copy link

wuyfee commented Dec 3, 2024

$\color{red}{FAILURE}$
DETAILS
✅ - docker: success
✅ - deploy (standalone & cluster & standalone_auth): success
❌ - e2e-java-test (standalone & cluster & standalone_auth): failure
✅ - e2e-go-test (standalone & cluster): success
✅ - e2e-cpp-test (standalone & cluster): success
✅ - e2e-csharp-test (standalone & cluster): success
✅ - e2e-nodejs-test (standalone & cluster): success
✅ - e2e-python-test (standalone & cluster): success
✅ - clean (standalone & cluster & standalone_auth): success

@wuyfee
Copy link

wuyfee commented Dec 3, 2024

$\color{red}{FAILURE}$
DETAILS
✅ - docker: success
✅ - deploy (standalone & cluster & standalone_auth): success
❌ - e2e-java-test (standalone & cluster & standalone_auth): failure
✅ - e2e-go-test (standalone & cluster): success
✅ - e2e-cpp-test (standalone & cluster): success
✅ - e2e-csharp-test (standalone & cluster): success
✅ - e2e-nodejs-test (standalone & cluster): success
✅ - e2e-python-test (standalone & cluster): success
✅ - clean (standalone & cluster & standalone_auth): success

@wuyfee
Copy link

wuyfee commented Dec 7, 2024

$\color{red}{FAILURE}$
DETAILS
✅ - docker: success
✅ - deploy (standalone & cluster & standalone_auth): success
❌ - e2e-java-test (standalone & cluster & standalone_auth): failure
✅ - e2e-go-test (standalone & cluster): success
✅ - e2e-cpp-test (standalone & cluster): success
✅ - e2e-csharp-test (standalone & cluster): success
✅ - e2e-nodejs-test (standalone & cluster): success
✅ - e2e-python-test (standalone & cluster): success
✅ - clean (standalone & cluster & standalone_auth): success

@wuyfee
Copy link

wuyfee commented Dec 7, 2024

$\color{red}{FAILURE}$
DETAILS
✅ - docker: success
✅ - deploy (standalone & cluster & standalone_auth): success
❌ - e2e-java-test (standalone & cluster & standalone_auth): failure
✅ - e2e-go-test (standalone & cluster): success
✅ - e2e-cpp-test (standalone & cluster): success
✅ - e2e-csharp-test (standalone & cluster): success
✅ - e2e-nodejs-test (standalone & cluster): success
✅ - e2e-python-test (standalone & cluster): success
✅ - clean (standalone & cluster & standalone_auth): success

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants