-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix(deps): use consistent Go version in builds and CI #377
Conversation
ea668e8
to
8073ac3
Compare
- name: Set Go Version Matrices | ||
id: set-matrix | ||
run: | | ||
echo "all=[\"${{ steps.set-env.outputs.latest }}\",\"${{ steps.set-env.outputs.penultimate }}\"]" >> $GITHUB_OUTPUT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This whole file is copied from Relay. It'd be nice to make it reusable.. but not sure it's worth it yet.)
There is a choice we can make for supporting Go versions. We can support the latest release N and penultimate N-1, and keep these up-to-date automatically with a workflow. This would be equivalent to roughly 1 year of Go support, and is what Relay does. Or, we could support latest release N and some other minimum compatible version < N, not necessarily the penultimate. This allows for wider compatibility, at the cost of having to think about when to bump the minimum version. Since we're shipping binaries of this, and people likely aren't building from source, I think the first option is easiest. |
@@ -1,6 +1,6 @@ | |||
module github.com/launchdarkly/ldcli | |||
|
|||
go 1.20 | |||
go 1.21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although it's not strictly true that we require 1.21, since we're building with 1.21 and 1.22 we can't claim this. See my other comment for an alternative.
Currently we are building with whatever Go version is installed on the runner at the time of the build. At the same time, we're testing with a particular Go version in CI.
This PR unifies the versions used in test and build. That way we know we've tested what we're shipping.