Skip to content
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

Improve Homebrew build #1997

Closed
imiric opened this issue Apr 28, 2021 · 2 comments
Closed

Improve Homebrew build #1997

imiric opened this issue Apr 28, 2021 · 2 comments

Comments

@imiric
Copy link
Contributor

imiric commented Apr 28, 2021

The current k6 Homebrew formula doesn't set any of the build flags we use in build-release.sh like -trimpath or -ldflags to inject the build date and Git commit, so the k6 version output for the Homebrew binary is e.g. k6 v0.31.1 ((devel), go1.16.2, darwin/amd64). This should be consistent with how build-release.sh works, which generates a version string like k6 v0.31.1 (2021-03-17T13:23:23+0000/e9d8349, go1.15.8, linux/amd64), while also keeping in mind #1996.

@joanlopez
Copy link
Contributor

joanlopez commented Apr 9, 2024

Double-checked, with the latest release (v0.50.0):

  • On MacOS, installed with Homebrew: k6 v0.50.0 (go1.22.1, darwin/arm64)
  • On MacOS, using the binary from GitHub Releases: k6 v0.50.0 (commit/f18209a5e3, go1.21.8, darwin/arm64)
  • On MacOS, using the Docker container: k6 v0.50.0 (commit/f18209a5e3, go1.21.8, linux/arm64)
  • On a Debian container, following the installation steps: k6 v0.50.0 (commit/f18209a5e3, go1.21.8, linux/amd64)

So, yeah, for the sake of consistency, we should adjust the Homebrew build. Let's give it a try!

@joanlopez joanlopez assigned joanlopez and unassigned codebien Apr 9, 2024
@joanlopez
Copy link
Contributor

joanlopez commented Apr 10, 2024

After an internal discussion with the team, we've decided to close this issue as it's no longer such a problem as it was exposed at the initial description of the issue, where the build seemed to be a development one.

Also considering that:

  • The k6 version (e.g. v0.50.0, without the commit hash) should be enough in the vast majority of cases when debugging bugs or doing things like that.
  • The way k6 is being built now for Homebrew: running go build over the release source code, instead of, for instance, pulling the binaries from GH releases, seems to be the convention in Homebrew.

So, with that being said, we've decided to close this for now. If anybody finds this issue, and have any meaningful argument in favor of putting some efforts to make k6 version outputs look the same, please share. Likewise, if we ever re-consider this more important, we may want to explore a solution. For now, it just doesn't deserves the effort.

Thanks! 🙇🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants