Skip to content

ci: bump Go versions#194

Merged
mvdan merged 2 commits intorogpeppe:masterfrom
twpayne:bump-go-version
Jan 18, 2023
Merged

ci: bump Go versions#194
mvdan merged 2 commits intorogpeppe:masterfrom
twpayne:bump-go-version

Conversation

@twpayne
Copy link
Copy Markdown
Contributor

@twpayne twpayne commented Jan 18, 2023

I noticed CI was still using Go 1.17 and 1.18.

Copy link
Copy Markdown
Collaborator

@mvdan mvdan left a comment

Choose a reason for hiding this comment

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

Thanks!

Comment thread .github/workflows/test.yml Outdated
wget -O gotip.tar.gz https://go.googlesource.com/go/+archive/${GO_COMMIT}.tar.gz
tar -xf gotip.tar.gz
echo "devel go1.19-${GO_COMMIT}" >VERSION
echo "devel go1.20-${GO_COMMIT}" >VERSION
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

note that master is 1.21 now :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point! In any case I've reverted this change as the tests fail with the latest commit from master.

Comment thread .github/workflows/test.yml Outdated
Comment on lines +15 to +16
- stable
- oldstable
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm personally not a fan of this, because in my opinion we want to be conscious about what major versions of Go we support.

We do tend to do the last two versions, but when a new version comes out, it's a human process to update the versions in multiple places (CI, go.mod, etc) and test that everything still works. Sometimes a few tests break, especially since we have tight coupling with some packages like testing - and we also don't want CI to start failing when a new version of Go is out :)

but perhaps @rogpeppe disagrees. Some people prefer their CI to track "latest stable" with the Go version, and then they can react when CI starts failing on its own. I personally prefer to keep CI closer to determinism, so that it's not likely to start failing on its own.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Worth noting that depending on the project I also track versions of the operating systems manually. For example, on a project of mine, macos-latest broke a test when that jumped from macos-11 to macos-12. But, for most Go projects, OS upgrades don't change behavior.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ack, I've changed the PR to use Go versions 1.18.x and 1.19.x explicitly.

Comment thread .github/workflows/test.yml Outdated

- name: Tidy
if: matrix.os == 'ubuntu-latest' # no need to do this everywhere
if: matrix.os == 'ubuntu-latest' && matrix.go-version == 'stable' # no need to do this everywhere
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

presumably this is wrong as it still mentions "stable"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

/facepalm Good catch, thanks.

@mvdan mvdan merged commit e3815af into rogpeppe:master Jan 18, 2023
@twpayne twpayne deleted the bump-go-version branch January 18, 2023 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants