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

[1.1] Add go 1.21 to CI #3976

Merged
merged 11 commits into from
Aug 10, 2023
Merged

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Aug 9, 2023

kolyshkin and others added 8 commits August 8, 2023 18:38
Signed-off-by: Kir Kolyshkin <[email protected]>
[XXX 1.1 note: the above subject and the rest of the commit message
is the original description from the cherry-picked commit which talks
about 1.19 -- while in fact it is now 1.20.]

This variable is used in curl to download a go release, so we are using
the initial Go 1.19 release in Cirrus CI, not the latest Go 1.19.x
release.

From the CI perspective, it makes more sense to use the latest release.

Add some jq magic to extract the latest minor release information
from the download page, and use it.

This brings Cirrus CI jobs logic in line with all the others (GHA,
Dockerfile), where by 1.20 we actually mean "latest 1.20.x".

Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit 873d7bb)
Signed-off-by: Kir Kolyshkin <[email protected]>
1. Do not use echo, as this results in lines like this:

	...
	echo "-----"
	-----
	...

2. Move "cat /proc/cpuinfo" to be the last one, as the output is usually
   very long.

3. Add "go version" to CentOS jobs.

Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit fd1a79f)
Signed-off-by: Kir Kolyshkin <[email protected]>
For "make integration", the tests are run inside a Docker/Podman
container. Problem is, if cgroup v2 is used, the in-container
/sys/fs/cgroup/cgroup.subtree_control is empty.

The added script, used as Docker entrypoint, moves the current process
into a sub-cgroup, and then adds all controllers in top-level
cgroup.subtree_control.

Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit cfc801b)
Signed-off-by: Kir Kolyshkin <[email protected]>
Split the test into two -- for fs and systemd cgroup managers, and only
run the second one if systemd is available.

Prevents the following failure during `make unittest`:

> === RUN   TestNilResources
>     manager_test.go:27: systemd not running on this host, cannot use systemd cgroups manager
> --- FAIL: TestNilResources (0.22s)

Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit 962019d)
Signed-off-by: Kir Kolyshkin <[email protected]>
A few cases relied on the fact that systemd is used, and thus
/sys/fs/cgroup/user.slice is available.

Guess what, in case of "make unittest" it might not be.

Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit 5c6b334)
Signed-off-by: Kir Kolyshkin <[email protected]>
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
(cherry picked from commit e3cf217)
Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin kolyshkin added this to the 1.1.9 milestone Aug 9, 2023
@AkihiroSuda AkihiroSuda changed the base branch from main to release-1.1 August 9, 2023 22:45
@AkihiroSuda AkihiroSuda closed this Aug 9, 2023
@AkihiroSuda AkihiroSuda reopened this Aug 9, 2023
@kolyshkin
Copy link
Contributor Author

I've restarted cirrus tasks

Since commit e3cf217 actions/setup-go@v4 uses caching
implicitly, so it is no longer required.

Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit 083e978)
Signed-off-by: Kir Kolyshkin <[email protected]>
Since commit e3cf217 actions/setup-go@v4 uses caching
implicitly, and olangci/golangci-lint-action also uses caching.

These two caches clash, resulting in multiple warnings in CI logs.

The official golangci-lint-action solution is to disable caching
for setup-go job (see [1]). Do the same.

[1] golangci/golangci-lint-action#704

Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit 62cc13e)
Signed-off-by: Kir Kolyshkin <[email protected]>
The exception was fixed by polyfloyd/go-errorlint#12
which eventually made its way into golangci-lint.

Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit 98317c1)
Signed-off-by: Kir Kolyshkin <[email protected]>
@@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.17.x, 1.19.x, 1.20.x]
go-version: [1.17.x, 1.20.x, 1.21.x]
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need 1.17 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure. The original plan was to maintain support for older releases in a stable branch, but since this branch ended up a very long lived one, we had to drop 1.16 support in runc 1.1.6 because of #3817.

Let it stay for now (I hope we'll release 1.2.0 soon and more-or-less forget about 1.1.x)

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.

3 participants