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

k6: pin go version to 1.23 #204322

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

mstoykov
Copy link

Fixing grafana/k6#2699

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

@github-actions github-actions bot added the go Go use is a significant feature of the PR or issue label Jan 15, 2025
Copy link
Contributor

Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request.

@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Jan 15, 2025
Formula/k/k6.rb Outdated Show resolved Hide resolved
@chenrui333 chenrui333 changed the title k6: pin go version to 1.23 k6: pin go version to 1.21 Jan 15, 2025
@chenrui333 chenrui333 changed the title k6: pin go version to 1.21 k6: pin go version to 1.22 Jan 15, 2025
@mstoykov mstoykov changed the title k6: pin go version to 1.22 k6: pin go version to 1.23 Jan 15, 2025
@stefanb
Copy link
Member

stefanb commented Jan 15, 2025

FYI, initial builds and tests with Go 1.24 in the

found no issues with k6.

@@ -14,7 +14,7 @@ class K6 < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "6c59c33536818d69e337bd36ce5b3e58054a019260d35027efae3b50ca7b56a5"
end

depends_on "go" => :build
depends_on "go@1.23" => :build # See https://github.com/grafana/k6/issues/2699 and https://github.com/grafana/k6/issues/2474
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* Dependency '[email protected]' is an alias; use the canonical name 'go'.

this might need to wait after #201070

Copy link
Author

@mstoykov mstoykov Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not pin the latest version we need to pin to an old one if we want ?

@mstoykov
Copy link
Author

mstoykov commented Jan 17, 2025

@stefanb I am aware it will compile or that the test will pass - we have been running our tests with gotip for years. Even before the issue linked.

The problem is that we weren't testing for this particular case and likely won't for the next case that breaks something.

We just want that instead of us building with whatever is the latest go version we bump it when we bump it within k6.
The same way I would not make a docker container that just gets the latest .. ubuntu and then install something and hope that between versions of ubuntu nothing will change. I would want to stick to the version of go that we are using to building within the team and then bump on our time.

Currently, it seems that pinning to [email protected] is a lint error as it is alias to go and that apparently is a problem.
So:

  1. we can set it to 1.23 and ignore the lint somehow
  2. actually this shouldn't be a lint error as otherwise I don't know why the alias exist if using it is a lint error 🤔
  3. we can pin to go1.22 which means that we will have similar problem - our official builds will be with a different version from brew
  4. I guess brew can start using the prebuild binary instead of building it - I think there was a policy against that though
  5. We can just ignore this and close this PR

@stefanb , @chenrui333 I don't know if you can help with any of this or point me to documentation about any of the approaches and reasons for the policies and linters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosquash Automatically squash pull request commits according to Homebrew style. go Go use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants