You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "crossoverJie (via GitHub)" <gi...@apache.org> on 2024/10/30 09:30:01 UTC

[PR] [improve] PIP-368: Support lookup based on the lookup properties [pulsar-client-go]

crossoverJie opened a new pull request, #1303:
URL: https://github.com/apache/pulsar-client-go/pull/1303

   
   ### Motivation
   
   Support pip: https://github.com/apache/pulsar/pull/23223/
   
   
   
   ### Modifications
   
   - Upgrade Pulsar image to 4.0.0
   - Client support LookupProperties
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (yes / no)
     - The public API: (yes)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (yes)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes)
     - If yes, how is the feature documented? (GoDocs)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


-- 
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


Re: [PR] [improve] PIP-368: Support lookup based on the lookup properties [pulsar-client-go]

Posted by "crossoverJie (via GitHub)" <gi...@apache.org>.
crossoverJie commented on PR #1303:
URL: https://github.com/apache/pulsar-client-go/pull/1303#issuecomment-2446523455

   > BTW, I found the lint task in the Makefile is repeated, we use `golangci/golangci-lint-action@v6` in CI, where `make lint` is never used.
   
   You are right, `make lint` can be used locally.


-- 
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


Re: [PR] [improve] PIP-368: Support lookup based on the lookup properties [pulsar-client-go]

Posted by "crossoverJie (via GitHub)" <gi...@apache.org>.
crossoverJie commented on PR #1303:
URL: https://github.com/apache/pulsar-client-go/pull/1303#issuecomment-2451662123

   
   > LGTM, could you add a test for verify the lookup properties in the `pulsar/internal/lookup_service_test.go`?
   
   Relevant code has been added https://github.com/apache/pulsar-client-go/pull/1303/files#diff-eaa8996b10b63f4ccd290c3af5dff5397e3911ab7cd228e20ecc99f0d69aeff4. 
   


-- 
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


Re: [PR] [improve] PIP-368: Support lookup based on the lookup properties [pulsar-client-go]

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on code in PR #1303:
URL: https://github.com/apache/pulsar-client-go/pull/1303#discussion_r1825558626


##########
pulsar/consumer_test.go:
##########
@@ -4691,3 +4691,66 @@ func TestPartitionConsumerGetLastMessageIDs(t *testing.T) {
 	}
 
 }
+
+func TestLookupConsumer(t *testing.T) {
+	client, err := NewClient(ClientOptions{

Review Comment:
   If so, we can just configure values in `ProducerMessage`. Configuring key and properties might make users think if lookup properties will affect them.



-- 
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


Re: [PR] [improve] PIP-368: Support lookup based on the lookup properties [pulsar-client-go]

Posted by "crossoverJie (via GitHub)" <gi...@apache.org>.
crossoverJie commented on code in PR #1303:
URL: https://github.com/apache/pulsar-client-go/pull/1303#discussion_r1825508977


##########
pulsar/consumer_test.go:
##########
@@ -4691,3 +4691,66 @@ func TestPartitionConsumerGetLastMessageIDs(t *testing.T) {
 	}
 
 }
+
+func TestLookupConsumer(t *testing.T) {
+	client, err := NewClient(ClientOptions{

Review Comment:
   Yes, I agree with you, this is a basic functional test of duplication to ensure that the  `LookupProperties` do not affect the existing functionality.



-- 
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


Re: [PR] [improve] PIP-368: Support lookup based on the lookup properties [pulsar-client-go]

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on code in PR #1303:
URL: https://github.com/apache/pulsar-client-go/pull/1303#discussion_r1825498773


##########
pulsar/consumer_test.go:
##########
@@ -4691,3 +4691,66 @@ func TestPartitionConsumerGetLastMessageIDs(t *testing.T) {
 	}
 
 }
+
+func TestLookupConsumer(t *testing.T) {
+	client, err := NewClient(ClientOptions{

Review Comment:
   Since the lookup properties rely on the customized lookup logic, I think it's okay to not add any test.



-- 
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


Re: [PR] [improve] PIP-368: Support lookup based on the lookup properties [pulsar-client-go]

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower merged PR #1303:
URL: https://github.com/apache/pulsar-client-go/pull/1303


-- 
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


Re: [PR] [improve] PIP-368: Support lookup based on the lookup properties [pulsar-client-go]

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on code in PR #1303:
URL: https://github.com/apache/pulsar-client-go/pull/1303#discussion_r1825497349


##########
pulsar/consumer_test.go:
##########
@@ -4691,3 +4691,66 @@ func TestPartitionConsumerGetLastMessageIDs(t *testing.T) {
 	}
 
 }
+
+func TestLookupConsumer(t *testing.T) {
+	client, err := NewClient(ClientOptions{

Review Comment:
   What does this test try to verify? It's a trivial end-to-end test. The message properties are never related to the lookup properties.



-- 
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


Re: [PR] [improve] PIP-368: Support lookup based on the lookup properties [pulsar-client-go]

Posted by "crossoverJie (via GitHub)" <gi...@apache.org>.
crossoverJie commented on PR #1303:
URL: https://github.com/apache/pulsar-client-go/pull/1303#issuecomment-2449537904

   > Could you use a separated PR to fix conflicts after upgrading Pulsar to 4.0.0?
   
   Sorry, I didn't fully understand what you meant😂.
   
   This PR has upgraded the image to 4.0.0. do you mean to create a separate PR for this part? I think the contents of this PR are not complicated, and the code review should be completed quickly.
   
   
   


-- 
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


Re: [PR] [improve] PIP-368: Support lookup based on the lookup properties [pulsar-client-go]

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on PR #1303:
URL: https://github.com/apache/pulsar-client-go/pull/1303#issuecomment-2446509088

   Could you use a separated PR to fix conflicts after upgrading Pulsar to 4.0.0 like https://github.com/apache/pulsar-client-go/pull/1302?
   
   BTW, I found the lint task in the Makefile is repeated, we use `golangci/golangci-lint-action@v6` in CI, where `make lint` is never used.


-- 
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


Re: [PR] [improve] PIP-368: Support lookup based on the lookup properties [pulsar-client-go]

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on PR #1303:
URL: https://github.com/apache/pulsar-client-go/pull/1303#issuecomment-2451139264

   > This PR has upgraded the image to 4.0.0. do you mean to create a separate PR for this part?
   
   Yes. Including the tool versions upgrade in a code PR is not a good practice.


-- 
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


Re: [PR] [improve] PIP-368: Support lookup based on the lookup properties [pulsar-client-go]

Posted by "crossoverJie (via GitHub)" <gi...@apache.org>.
crossoverJie commented on PR #1303:
URL: https://github.com/apache/pulsar-client-go/pull/1303#issuecomment-2451222618

   > Yes. Including the tool versions upgrade in a code PR is not a good practice.
   
   PTAL. https://github.com/apache/pulsar-client-go/pull/1304


-- 
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