-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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][fn] TLS args admin download command use zero arity #20513
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
This issue has been discovered by our CI , in which we run additional tests on k8s functions.
Unfortunately they are not easily portable to the Apache OSS repo, as they need too many resources.
Maybe we could setup something with test contains and k3s (@nicoloboschi recently started to write some small scale tests with the helm chart and docker)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
FYI - we check multiple Pulsar branches on a daily basis based on docker images built daily.
Codecov Report
@@ Coverage Diff @@
## master #20513 +/- ##
=============================================
+ Coverage 36.78% 72.90% +36.12%
- Complexity 12059 31916 +19857
=============================================
Files 1690 1867 +177
Lines 129001 138546 +9545
Branches 14041 15212 +1171
=============================================
+ Hits 47453 101011 +53558
+ Misses 75294 29504 -45790
- Partials 6254 8031 +1777
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Is it a minor break for admin cli? |
There is no change to the admin CLI in this PR. |
### Motivation #20482 broke the function download command with this error: ``` Expected a command, got false Usage: pulsar-admin [options] [command] [command options] Options: --admin-url Admin Service URL to which to connect. Default: http://localhost:8080/ ``` The problem is that the TLS args for hostname verification and for insecure TLS are zero arity, and therefore, we should not add the `false` or the `true` arguments. ### Modifications * Correct the changes made to the TLS args passed to the `pulsar-admin` CLI tool ### Documentation - [x] `doc-not-needed` (cherry picked from commit 50b9a93)
Currently there is inconsistency across the different tools. For example in LocalRunner, there is pulsar/pulsar-functions/localrun/src/main/java/org/apache/pulsar/functions/LocalRunner.java Lines 177 to 184 in ec102fb
https://jcommander.org/#_boolean I think that JCommander's design is bad in this aspect. Changing arity would be a breaking change. |
For what it's worth, I'll need to introduce a breaking change to make PIP 273 with hostname verification work because arity 0 assumes your default is false. This PR didn't change any of those though. |
Cherry picking this to 2.11, 2.10, and 2.9 by #20533 |
### Motivation This PR is a combination of #20482 and #20513 because cherry picking those PRs produced too many conflicts. ### Modifications * Made the same addition as the source PRs, though the code has changed a bit, so I had to make a few extra changes. ### Documentation - [x] `doc-not-needed` (cherry picked from commit 8c9c6e9)
### Motivation This PR is a combination of #20482 and #20513 because cherry picking those PRs produced too many conflicts. ### Modifications * Made the same addition as the source PRs, though the code has changed a bit, so I had to make a few extra changes. ### Documentation - [x] `doc-not-needed` (cherry picked from commit 8c9c6e9)
### Motivation apache#20482 broke the function download command with this error: ``` Expected a command, got false Usage: pulsar-admin [options] [command] [command options] Options: --admin-url Admin Service URL to which to connect. Default: http://localhost:8080/ ``` The problem is that the TLS args for hostname verification and for insecure TLS are zero arity, and therefore, we should not add the `false` or the `true` arguments. ### Modifications * Correct the changes made to the TLS args passed to the `pulsar-admin` CLI tool ### Documentation - [x] `doc-not-needed` (cherry picked from commit 50b9a93)
As discussed on the mailing list https://lists.apache.org/thread/w4jzk27qhtosgsz7l9bmhf1t7o9mxjhp, there is no plan to release 2.9.6, so I am going to remove the release/2.9.6 label |
Motivation
#20482 broke the function download command with this error:
The problem is that the TLS args for hostname verification and for insecure TLS are zero arity, and therefore, we should not add the
false
or thetrue
arguments.Modifications
pulsar-admin
CLI toolDocumentation
doc-not-needed