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

bugfix: nacos-config.py script could not run with namespace #2932

Merged
merged 5 commits into from
Aug 5, 2020

Conversation

luorenjin
Copy link
Contributor

将!=改成<= 即可

Ⅰ. Describe what this PR did

运行:python nacos-config.py 172.16.xxx.xxx:31263 seata
提示:python nacos-config.py nacosAddr
看逻辑得知,请求的参数数量判断逻辑错误了

源逻辑:
if len(sys.argv) != 2: print ('python nacos-config.py nacosAddr') exit()
修改后:
if len(sys.argv) <= 2: print ('python nacos-config.py nacosAddr') exit()
可以正确执行,带 namespace 参数的命令

Ⅱ. Does this pull request fix one issue?

自己发现的

Ⅲ. Why don't you add test cases (unit test/integration test)?

修改后保存:
执行 python nacos-config.py 172.16.xxx.xxx:31263 seata 成功,数据正确写入了nacos

Ⅳ. Describe how to verify it

查看命令窗口日志,并查看nacos配置,是否正确写入

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented Jul 27, 2020

Codecov Report

Merging #2932 into develop will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2932      +/-   ##
=============================================
- Coverage      50.28%   50.27%   -0.02%     
+ Complexity      3063     3062       -1     
=============================================
  Files            600      600              
  Lines          19503    19503              
  Branches        2404     2403       -1     
=============================================
- Hits            9807     9805       -2     
  Misses          8712     8712              
- Partials         984      986       +2     
Impacted Files Coverage Δ Complexity Δ
...o/seata/server/coordinator/DefaultCoordinator.java 54.63% <0.00%> (-0.52%) 28.00% <0.00%> (-2.00%)
...in/java/io/seata/server/session/GlobalSession.java 83.71% <0.00%> (-0.46%) 71.00% <0.00%> (-1.00%)

@l81893521 l81893521 added first-time contributor first-time contributor module/script script module labels Jul 28, 2020
@slievrly slievrly added this to the 1.4.0 milestone Jul 28, 2020
Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

LGTM

@slievrly
Copy link
Member

@luorenjin modify the pr title in En.

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

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

LGTM

@funky-eyes
Copy link
Contributor

请修改标题为英文,并且以bugfix: 开头

Copy link
Contributor

@l81893521 l81893521 left a comment

Choose a reason for hiding this comment

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

LGTM

@l81893521 l81893521 changed the title 判断导致输入namespace 参数是不能正确执行 bugfix: nacos-config.py script could not run with namespace Aug 5, 2020
@l81893521 l81893521 merged commit bc56055 into apache:develop Aug 5, 2020
@Ever2154
Copy link

<=似乎依然不行,使用python nacos-config.py 192.168.168.128:1111 返回python nacos-config.py nacosAddr,

@Ever2154
Copy link

namespace是可选参数,个人感觉应该是<2

l81893521 pushed a commit to l81893521/seata that referenced this pull request Oct 22, 2020
hicf pushed a commit to hicf/seata that referenced this pull request Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first-time contributor first-time contributor module/script script module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants