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/04/13 03:57:01 UTC

[GitHub] [pulsar] Shawyeok opened a new pull request, #15145: [pulsar-client-tools] Ability to send a message with null body

Shawyeok opened a new pull request, #15145:
URL: https://github.com/apache/pulsar/pull/15145

   ### Motivation
   
   Now it's not possible use `pulsar-client produce` send a message with `null` body, but it's needed in some scenes, e.g. delete topic policy manually or test topic compaction.
   
   ### Modifications
   
   Add an explicit option `--null` to `pulsar-client produce` subcommand.
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   This change added tests and can be verified as follows:
   
     - *Added unit test PulsarClientToolTest#testNullBody*
   
   ### Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (no)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (no)
     - The rest endpoints: (no)
     - The admin cli options: (no)
     - Anything that affects deployment: (no)
   
   ### Documentation
   
   - [x] `doc-required` 
   (Your PR needs to update docs and you will update later)


-- 
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] momo-jun commented on a diff in pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
momo-jun commented on code in PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#discussion_r873337254


##########
site2/docs/reference-cli-tools.md:
##########
@@ -328,8 +328,8 @@ Options
 
 |Flag|Description|Default|
 |---|---|---|
-|`-f`, `--files`|Comma-separated file paths to send; either -m or -f must be specified|[]|
-|`-m`, `--messages`|Comma-separated string of messages to send; either -m or -f must be specified|[]|
+|`-f`, `--files`|Comma separated file paths to send, either -m or -f or --null must be specified.|[]|

Review Comment:
   ```suggestion
   |`-f`, `--files`|Comma-separated file paths to send. At least one of the following values must be specified: `-m`, `-f` or `--null`.|[]|
   ```



##########
site2/docs/reference-cli-tools.md:
##########
@@ -328,8 +328,8 @@ Options
 
 |Flag|Description|Default|
 |---|---|---|
-|`-f`, `--files`|Comma-separated file paths to send; either -m or -f must be specified|[]|
-|`-m`, `--messages`|Comma-separated string of messages to send; either -m or -f must be specified|[]|
+|`-f`, `--files`|Comma separated file paths to send, either -m or -f or --null must be specified.|[]|

Review Comment:
   ```suggestion
   |`-f`, `--files`|Comma-separated file paths to send. At least one of the following values must be specified: `-m`, `-f` or `--null`.|[]|
   ```



-- 
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] poorbarcode commented on pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
poorbarcode commented on PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#issuecomment-1099847786

   > but it's needed in some scenes
   
   Can you descript on that


-- 
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] Shawyeok commented on pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
Shawyeok commented on PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#issuecomment-1125876170

   > > > Hi @Shawyeok, will you update the docs in a follow-up PR?
   > > 
   > > 
   > > @momo-jun I'm not sure this doc [reference-cli-tools](https://pulsar.apache.org/docs/next/reference-cli-tools#pulsar-client) is auto generated or not.
   > 
   > Currently, this page is for frequently used commands and is manually maintained at site2/docs/reference-cli-tools.md. As shown below, the comprehensive list is auto-generated at https://pulsar.apache.org/tools/. <img alt="image" width="1127" src="https://user-images.githubusercontent.com/60642177/168257954-9ace2465-9ce0-4510-be9e-7338c61d3066.png">
   
   Thanks for your detailed answer, now I've committed the doc update.


-- 
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] momo-jun commented on pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
momo-jun commented on PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#issuecomment-1125847726

   Hi @Shawyeok, will you update the docs in a follow-up PR?


-- 
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] Shawyeok commented on pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
Shawyeok commented on PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#issuecomment-1125856660

   > Hi @Shawyeok, will you update the docs in a follow-up PR?
   
   I'm not sure this doc [reference-cli-tools](https://pulsar.apache.org/docs/next/reference-cli-tools#pulsar-client) is auto generated or not.


-- 
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] momo-jun commented on a diff in pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
momo-jun commented on code in PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#discussion_r873338845


##########
site2/docs/reference-cli-tools.md:
##########
@@ -339,6 +339,7 @@ Options
 |`-p`, `--properties`|Properties to add. If you want to add multiple properties, use the comma as the separator, e.g. `k1=v1,k2=v2`.| |
 |`-ekn`, `--encryption-key-name`|The public key name to encrypt payload.| |
 |`-ekv`, `--encryption-key-value`|The URI of public key to encrypt payload. For example, `file:///path/to/public.key` or `data:application/x-pem-file;base64,*****`.| |
+|`--null`|Send a message with the body is null|false|

Review Comment:
   ```suggestion
   |`--null`|Send a message with a null body.|false|
   ```



-- 
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] tisonkun closed pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
tisonkun closed pull request #15145: [pulsar-client-tools] Ability to send a message with null body
URL: https://github.com/apache/pulsar/pull/15145


-- 
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] Shawyeok commented on pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
Shawyeok commented on PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#issuecomment-1097556976

   /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] momo-jun commented on a diff in pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
momo-jun commented on code in PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#discussion_r873335859


##########
site2/docs/reference-cli-tools.md:
##########
@@ -328,8 +328,8 @@ Options
 
 |Flag|Description|Default|
 |---|---|---|
-|`-f`, `--files`|Comma-separated file paths to send; either -m or -f must be specified|[]|
-|`-m`, `--messages`|Comma-separated string of messages to send; either -m or -f must be specified|[]|
+|`-f`, `--files`|Comma separated file paths to send, either -m or -f or --null must be specified.|[]|

Review Comment:
   Comma-separated file paths to send. At least one of the following values must be specified: `-m`, `-f` or `--null` .



##########
site2/docs/reference-cli-tools.md:
##########
@@ -328,8 +328,8 @@ Options
 
 |Flag|Description|Default|
 |---|---|---|
-|`-f`, `--files`|Comma-separated file paths to send; either -m or -f must be specified|[]|
-|`-m`, `--messages`|Comma-separated string of messages to send; either -m or -f must be specified|[]|
+|`-f`, `--files`|Comma separated file paths to send, either -m or -f or --null must be specified.|[]|

Review Comment:
   Comma-separated file paths to send. At least one of the following values must be specified: `-m`, `-f` or `--null` .



-- 
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] momo-jun commented on a diff in pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
momo-jun commented on code in PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#discussion_r873336942


##########
site2/docs/reference-cli-tools.md:
##########
@@ -328,8 +328,8 @@ Options
 
 |Flag|Description|Default|
 |---|---|---|
-|`-f`, `--files`|Comma-separated file paths to send; either -m or -f must be specified|[]|
-|`-m`, `--messages`|Comma-separated string of messages to send; either -m or -f must be specified|[]|
+|`-f`, `--files`|Comma separated file paths to send, either -m or -f or --null must be specified.|[]|
+|`-m`, `--messages`|Messages to send, either -m or -f or --null must be specified. The default separator is comma|[]|

Review Comment:
   ```suggestion
   |`-m`, `--messages`|Messages to send. At least one of the following values must be specified: `-m`, `-f` or `--null`. The default separator is a comma. |[]|
   ```
   ```suggestion
   |`-m`, `--messages`|Messages to send, either -m or -f or --null must be specified. The default separator is comma|[]|
   ```



-- 
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] github-actions[bot] commented on pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#issuecomment-1157154367

   The pr had no activity for 30 days, mark with Stale label.


-- 
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] momo-jun commented on pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
momo-jun commented on PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#issuecomment-1125861367

   > > Hi @Shawyeok, will you update the docs in a follow-up PR?
   > 
   > @momo-jun I'm not sure this doc [reference-cli-tools](https://pulsar.apache.org/docs/next/reference-cli-tools#pulsar-client) is auto generated or not.
   
   Currently, this page is for frequently used commands and is manually maintained at site2/docs/reference-cli-tools.md. 
   As shown below, the comprehensive list is auto-generated at https://pulsar.apache.org/tools/.
   <img width="1127" alt="image" src="https://user-images.githubusercontent.com/60642177/168257954-9ace2465-9ce0-4510-be9e-7338c61d3066.png">
   


-- 
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] momo-jun commented on a diff in pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
momo-jun commented on code in PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#discussion_r873335861


##########
site2/docs/reference-cli-tools.md:
##########
@@ -328,8 +328,8 @@ Options
 
 |Flag|Description|Default|
 |---|---|---|
-|`-f`, `--files`|Comma-separated file paths to send; either -m or -f must be specified|[]|
-|`-m`, `--messages`|Comma-separated string of messages to send; either -m or -f must be specified|[]|
+|`-f`, `--files`|Comma separated file paths to send, either -m or -f or --null must be specified.|[]|

Review Comment:
   Comma-separated file paths to send. At least one of the following values must be specified: `-m`, `-f` or `--null` .



-- 
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] momo-jun commented on a diff in pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
momo-jun commented on code in PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#discussion_r873336941


##########
site2/docs/reference-cli-tools.md:
##########
@@ -328,8 +328,8 @@ Options
 
 |Flag|Description|Default|
 |---|---|---|
-|`-f`, `--files`|Comma-separated file paths to send; either -m or -f must be specified|[]|
-|`-m`, `--messages`|Comma-separated string of messages to send; either -m or -f must be specified|[]|
+|`-f`, `--files`|Comma separated file paths to send, either -m or -f or --null must be specified.|[]|
+|`-m`, `--messages`|Messages to send, either -m or -f or --null must be specified. The default separator is comma|[]|

Review Comment:
   ```suggestion
   |`-m`, `--messages`|Messages to send. At least one of the following values must be specified: `-m`, `-f` or `--null`. The default separator is a comma. |[]|
   ```
   ```suggestion
   |`-m`, `--messages`|Messages to send, either -m or -f or --null must be specified. The default separator is comma|[]|
   ```



##########
site2/docs/reference-cli-tools.md:
##########
@@ -328,8 +328,8 @@ Options
 
 |Flag|Description|Default|
 |---|---|---|
-|`-f`, `--files`|Comma-separated file paths to send; either -m or -f must be specified|[]|
-|`-m`, `--messages`|Comma-separated string of messages to send; either -m or -f must be specified|[]|
+|`-f`, `--files`|Comma separated file paths to send, either -m or -f or --null must be specified.|[]|
+|`-m`, `--messages`|Messages to send, either -m or -f or --null must be specified. The default separator is comma|[]|

Review Comment:
   ```suggestion
   |`-m`, `--messages`|Messages to send. At least one of the following values must be specified: `-m`, `-f` or `--null`. The default separator is a comma. |[]|
   ```
   ```suggestion
   |`-m`, `--messages`|Messages to send, either -m or -f or --null must be specified. The default separator is comma|[]|
   ```



-- 
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] tisonkun commented on pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#issuecomment-1339103192

   Closed as stale and conflict. Feel free to rebase and resubmit the patch.


-- 
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] Shawyeok commented on pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
Shawyeok commented on PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#issuecomment-1125858521

   > LGTM. Please make sure `CmdConsume` can handle null values.
   
   Confirmed.


-- 
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] Shawyeok commented on pull request #15145: [pulsar-client-tools] Ability to send a message with null body

Posted by GitBox <gi...@apache.org>.
Shawyeok commented on PR #15145:
URL: https://github.com/apache/pulsar/pull/15145#issuecomment-1125853655

   /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