-
Notifications
You must be signed in to change notification settings - Fork 64
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
update Go version, alpine, golangci and gotestsum #206
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: João Vanzuita <joaovanzuita@me.com>
The linter is failing:
We should fix it with
Can you handle it @converge ? |
Signed-off-by: João Vanzuita <joaovanzuita@me.com>
sure thing! |
ALPINE_VERSION=3.12.2 | ||
GOLANGCI_LINT_VERSION=v1.33.0-alpine | ||
GOTESTSUM_VERSION=0.6.0 | ||
GO_VERSION=1.18-alpine |
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.
@silvin-lubecki do you prefer to keep the go version pinned to minor releases? (1.18.1
currently)? (same for the Dockerfile probably).
Slightly confused why we define defaults for them both as a make var and as a default var in the Dockerfile though; I think if we'd change the Makefile to remove the =$(VARIABLE)
, the build-args should take the value from the environment (if set), and otherwise take the default from the Dockerfile, i.e., something like:
BUILD_ARGS:=--build-arg GO_VERSION \
--build-arg CLI_VERSION \
--build-arg ALPINE_VERSION \
--build-arg GOLANGCI_LINT_VERSION) \
--build-arg TAG_NAME \
--build-arg GOTESTSUM_VERSION \
--build-arg BINARY_NAME \
--build-arg BINARY
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.
if I can jump in.. keep up with 1.18 (1.18.x) would be nice, since it uses the most recent version, and the minor changes from Go are usually security updates.
Regarding point 2, you're right, we were setting the dependencies at the Makefile and var.mk file. I updated the Dockerfile to only read the ARG values from the Makefile (that sets the ARG values). WDYT?
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.
I'd rather keep the defaults in the Dockerfile if that works, that way the Dockerfile itself has usable defaults, which allows it to be built without having to pass specific build args.
Not near my computer to try if that works though
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.
Good catch @thaJeztah 👍
vars.mk
Outdated
GOLANGCI_LINT_VERSION=v1.33.0-alpine | ||
GOTESTSUM_VERSION=0.6.0 | ||
GO_VERSION=1.18-alpine | ||
CLI_VERSION=20.10.12 |
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.
While we're updating; could you make this 20.10.14 (which is latest)? (same for the Dockerfile)
Signed-off-by: João Vanzuita <joaovanzuita@me.com>
Signed-off-by: João Vanzuita <joaovanzuita@me.com>
GOTESTSUM_VERSION=0.6.0 | ||
GO_VERSION=1.18-alpine | ||
CLI_VERSION=20.10.14 | ||
ALPINE_VERSION=3.15.4 |
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.
Let's go to 3.17 now
Signed-off-by: João Vanzuita joaovanzuita@me.com
- What I did
Updated
Go version to 1.18
Docker CLI to 20.10.12
ALPINE Docker image to 3.15.4
GoLang Lint to 1.45.2
Go Test Sum to 1.8.0
- How I did it
Updating software version and testing it manually on a Mac M1.
- How to verify it
Build the project without cache.
- Description for the changelog
Update Go Lang to 1.8 and update overall dependencies to the most recent versions.
p.s: before we merge, it would be nice to test on Linux and Windows.
- A picture of a cute animal (not mandatory)