You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/05/21 15:31:22 UTC
[GitHub] [pulsar] cbornet opened a new pull request, #15700: [fix][admin] Fix check on create function class name
cbornet opened a new pull request, #15700:
URL: https://github.com/apache/pulsar/pull/15700
<!--
### Contribution Checklist
- PR title format should be *[type][component] summary*. For details, see *[Guideline - Pulsar PR Naming Convention](https://docs.google.com/document/d/1d8Pw6ZbWk-_pCKdOmdvx9rnhPiyuxwq60_TrD68d7BA/edit#heading=h.trs9rsex3xom)*.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- Each pull request should address only one issue, not mix up code from multiple issues.
- Each commit in the pull request has a meaningful commit message
- Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
**(The sections below can be removed for hotfixes of typos)**
-->
### Motivation
The check was done for PYTHON or JAVA runtime but the runtime is not inferred in the admin CLI.
The fix is to do the check if a jar or py is provided instead.
### Modifications
trivial, see diff
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
This change added tests and can be verified as follows:
Before the change, create a Java function not providing the classname, the error will come from the broker (`Function classname cannot be null`).
After the change, the error will come from the admin CLI and will be `No Function Classname specified`
### Does this pull request potentially affect one of the following parts:
No
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): (yes / no)
- The public API: (yes / no)
- The schema: (yes / no / don't know)
- The default values of configurations: (yes / no)
- The wire protocol: (yes / no)
- The rest endpoints: (yes / no)
- The admin cli options: (yes / no)
- Anything that affects deployment: (yes / no / don't know)
### Documentation
Check the box below or label this PR directly.
Need to update docs?
- [ ] `doc-required`
(Your PR needs to update docs and you will update later)
- [x] `no-need-doc`
it's a fix
- [ ] `doc`
(Your PR contains doc changes)
- [ ] `doc-added`
(Docs have been already added)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] cbornet commented on pull request #15700: [fix][admin] Fix check on create function class name
Posted by GitBox <gi...@apache.org>.
cbornet commented on PR #15700:
URL: https://github.com/apache/pulsar/pull/15700#issuecomment-1141437590
/pulsarbot rerun-failure-checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] cbornet commented on a diff in pull request #15700: [fix][admin] Fix check on create function class name
Posted by GitBox <gi...@apache.org>.
cbornet commented on code in PR #15700:
URL: https://github.com/apache/pulsar/pull/15700#discussion_r884825967
##########
pulsar-client-tools-test/src/test/java/org/apache/pulsar/admin/cli/CmdFunctionsTest.java:
##########
@@ -831,7 +845,7 @@ public void testUpdateAuthData() throws Exception {
"--jar", URL,
"--tenant", "sample",
"--namespace", "ns1",
- "--className", DummyFunction.class.getName(),
+ "--classname", DummyFunction.class.getName(),
Review Comment:
Both `className` and `classname` are accepted. `className` is the legacy deprecated param and only accepted for backward compat. Nowadays people should use `classname` so I think it's better to test with what people really use. WDYT ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] cbornet commented on pull request #15700: [fix][admin] Fix check on create function class name
Posted by GitBox <gi...@apache.org>.
cbornet commented on PR #15700:
URL: https://github.com/apache/pulsar/pull/15700#issuecomment-1134646695
/pulsarbot rerun-failure-checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] nicoloboschi merged pull request #15700: [fix][admin] Fix check on create function class name
Posted by GitBox <gi...@apache.org>.
nicoloboschi merged PR #15700:
URL: https://github.com/apache/pulsar/pull/15700
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] cbornet commented on a diff in pull request #15700: [fix][admin] Fix check on create function class name
Posted by GitBox <gi...@apache.org>.
cbornet commented on code in PR #15700:
URL: https://github.com/apache/pulsar/pull/15700#discussion_r885084524
##########
pulsar-client-tools-test/src/test/java/org/apache/pulsar/admin/cli/CmdFunctionsTest.java:
##########
@@ -831,7 +845,7 @@ public void testUpdateAuthData() throws Exception {
"--jar", URL,
"--tenant", "sample",
"--namespace", "ns1",
- "--className", DummyFunction.class.getName(),
+ "--classname", DummyFunction.class.getName(),
Review Comment:
There are a lot of deprecated params in CmdFunctions and no tests for compatibility. Let's deal with this in another PR. I removed the param name change. PTAL.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] eolivelli commented on a diff in pull request #15700: [fix][admin] Fix check on create function class name
Posted by GitBox <gi...@apache.org>.
eolivelli commented on code in PR #15700:
URL: https://github.com/apache/pulsar/pull/15700#discussion_r885056188
##########
pulsar-client-tools-test/src/test/java/org/apache/pulsar/admin/cli/CmdFunctionsTest.java:
##########
@@ -831,7 +845,7 @@ public void testUpdateAuthData() throws Exception {
"--jar", URL,
"--tenant", "sample",
"--namespace", "ns1",
- "--className", DummyFunction.class.getName(),
+ "--classname", DummyFunction.class.getName(),
Review Comment:
Do we have a test to ensure backward compatibility?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] cbornet commented on a diff in pull request #15700: [fix][admin] Fix check on create function class name
Posted by GitBox <gi...@apache.org>.
cbornet commented on code in PR #15700:
URL: https://github.com/apache/pulsar/pull/15700#discussion_r884825967
##########
pulsar-client-tools-test/src/test/java/org/apache/pulsar/admin/cli/CmdFunctionsTest.java:
##########
@@ -831,7 +845,7 @@ public void testUpdateAuthData() throws Exception {
"--jar", URL,
"--tenant", "sample",
"--namespace", "ns1",
- "--className", DummyFunction.class.getName(),
+ "--classname", DummyFunction.class.getName(),
Review Comment:
Both `className` and `classname` are accepted. `className` is the legacy deprecated param and only accepted for backward compat. Nowadays people should use `classname` so I think it's better to test with what people really use. Isn't it ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] cbornet commented on pull request #15700: [fix][admin] Fix check on create function class name
Posted by GitBox <gi...@apache.org>.
cbornet commented on PR #15700:
URL: https://github.com/apache/pulsar/pull/15700#issuecomment-1141101683
/pulsarbot rerun-failure-checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] eolivelli commented on a diff in pull request #15700: [fix][admin] Fix check on create function class name
Posted by GitBox <gi...@apache.org>.
eolivelli commented on code in PR #15700:
URL: https://github.com/apache/pulsar/pull/15700#discussion_r884819850
##########
pulsar-client-tools-test/src/test/java/org/apache/pulsar/admin/cli/CmdFunctionsTest.java:
##########
@@ -831,7 +845,7 @@ public void testUpdateAuthData() throws Exception {
"--jar", URL,
"--tenant", "sample",
"--namespace", "ns1",
- "--className", DummyFunction.class.getName(),
+ "--classname", DummyFunction.class.getName(),
Review Comment:
Why are we changing these tests?
Are we breaking compatibility?
I would prefer to not change existing tests if not needed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] cbornet commented on pull request #15700: [fix][admin] Fix check on create function class name
Posted by GitBox <gi...@apache.org>.
cbornet commented on PR #15700:
URL: https://github.com/apache/pulsar/pull/15700#issuecomment-1141218930
/pulsarbot rerun-failure-checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] cbornet commented on pull request #15700: [fix][admin] Fix check on create function class name
Posted by GitBox <gi...@apache.org>.
cbornet commented on PR #15700:
URL: https://github.com/apache/pulsar/pull/15700#issuecomment-1141319843
/pulsarbot rerun-failure-checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] cbornet commented on pull request #15700: [fix][admin] Fix check on create function class name
Posted by GitBox <gi...@apache.org>.
cbornet commented on PR #15700:
URL: https://github.com/apache/pulsar/pull/15700#issuecomment-1142055075
/pulsarbot rerun-failure-checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org