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/09/14 02:36:16 UTC

[GitHub] [pulsar-client-go] wolfstudy opened a new pull request, #820: Support dynamic set go sdk version in connection

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

   Signed-off-by: xiaolongran <xi...@tencent.com>
   
   
   
   ### Motivation
   
   Currently, when Go SDK creates a connection, the version information set is fixed to Pulsar Go 0.1. When we maintain multiple versions of Go SDK in the production environment, we want to obtain the specific version information used by users through operations such as tcpdump .
   
   ### Modifications
   
   Support dynamic set go sdk version in connection
   
   ![企业微信截图_77defb3a-bf37-4fc1-8640-7e2c076a4f78](https://user-images.githubusercontent.com/20965307/182090232-5ec838ca-a513-43c9-87bb-8e5f279fedd0.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-client-go] wolfstudy commented on pull request #820: Support dynamic set go sdk version in connection

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on PR #820:
URL: https://github.com/apache/pulsar-client-go/pull/820#issuecomment-1246157397

   > 
   
   


-- 
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-client-go] wolfstudy commented on pull request #820: Support dynamic set go sdk version in connection

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on PR #820:
URL: https://github.com/apache/pulsar-client-go/pull/820#issuecomment-1261686520

   > 
   
   OK, Here we launch a round of community voting to decide.


-- 
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-client-go] xuthus5 commented on pull request #820: Support dynamic set go sdk version in connection

Posted by GitBox <gi...@apache.org>.
xuthus5 commented on PR #820:
URL: https://github.com/apache/pulsar-client-go/pull/820#issuecomment-1243389676

   VERSION file:
   ```text
   v1.1.0
   ```
   
   logic file:
   ```go
   package main
   
   import (
   	_ "embed"
   	"fmt"
   )
   
   //go:embed VERSION
   var version string
   
   func main() {
   	fmt.Println("my version: ", version)
   }
   ```
   
   echo: `my version: v1.1.0`
   
   What do you think of this way ?
   


-- 
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-client-go] wolfstudy commented on pull request #820: Support dynamic set go sdk version in connection

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on PR #820:
URL: https://github.com/apache/pulsar-client-go/pull/820#issuecomment-1246158243

   > That's a useful feature. But why not determine version in build time like https://blog.alexellis.io/inject-build-time-vars-golang/ ?
   
   We cannot expect users to use runtime parameters to determine whether to add the current Go SDK version information when building their own code.


-- 
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-client-go] Shoothzj commented on pull request #820: Support dynamic set go sdk version in connection

Posted by GitBox <gi...@apache.org>.
Shoothzj commented on PR #820:
URL: https://github.com/apache/pulsar-client-go/pull/820#issuecomment-1248792177

   @freeznet Agree, I think we can move to go 1.16


-- 
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-client-go] zzzming commented on pull request #820: Support dynamic set go sdk version in connection

Posted by GitBox <gi...@apache.org>.
zzzming commented on PR #820:
URL: https://github.com/apache/pulsar-client-go/pull/820#issuecomment-1262296568

   Have you thought about using `ldflags` to pass git commit or git tag which can be the actual version. This will tie into a build system automatically without additional files.
   Here is an example.
   https://stackoverflow.com/questions/11354518/application-auto-build-versioning/55090713#55090713


-- 
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-client-go] wolfstudy commented on pull request #820: Support dynamic set go sdk version in connection

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on PR #820:
URL: https://github.com/apache/pulsar-client-go/pull/820#issuecomment-1246162218

   > ```go
   > embed
   > ```
   
   Yeah, `go:embed ` is a goog way, sadly it was only introduced after Go 1.16, in this case we have to require the version of the Go SDK > Go 1.16


-- 
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-client-go] freeznet commented on pull request #820: Support dynamic set go sdk version in connection

Posted by GitBox <gi...@apache.org>.
freeznet commented on PR #820:
URL: https://github.com/apache/pulsar-client-go/pull/820#issuecomment-1248777620

   I like the `embed` way, and according to https://go.dev/doc/devel/release#policy (quoted below), the current live supported go version should be 1.19, 1.18 and 1.17, so I think it should be fine if we move the pulsar-client-go with 1.16 as the minimum version. Maybe we could call for the community vote. 
   
   > Release Policy
   > Each major Go release is supported until there are two newer major releases. For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was supported until the Go 1.8 release. We fix critical problems, including [critical security problems](https://go.dev/security), in supported releases as needed by issuing minor revisions (for example, Go 1.6.1, Go 1.6.2, and so on).
   
   


-- 
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-client-go] wolfstudy closed pull request #820: Support dynamic set go sdk version in connection

Posted by GitBox <gi...@apache.org>.
wolfstudy closed pull request #820: Support dynamic set go sdk version in connection
URL: https://github.com/apache/pulsar-client-go/pull/820


-- 
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-client-go] wolfstudy closed pull request #820: Support dynamic set go sdk version in connection

Posted by GitBox <gi...@apache.org>.
wolfstudy closed pull request #820: Support dynamic set go sdk version in connection
URL: https://github.com/apache/pulsar-client-go/pull/820


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