Swap cgroupsv1 testing from GitHub Actions runner to Vagrant VM#368
Conversation
77d76e2 to
87401c2
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR updates the testing environment for cgroups by swapping out cgroupsv1 tests from the GitHub Actions runner to a Vagrant VM setup while also updating related tooling and CI configurations.
- Adds a new Vagrant-based provisioning script (resize-vagrant-root.sh) for adjusting the VM filesystem.
- Refactors key parsing in rdma utils for both cgroup1 and cgroup2 using switch-case.
- Updates CI workflows, Go versions, and associated configurations to support Ubuntu 24.04 and the new testing infrastructure.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| script/resize-vagrant-root.sh | New script for resizing VM root partition with updated filesystem logic. |
| cgroup2/utils.go | Refactored rdma key parsing with a switch-case statement. |
| cgroup1/rdma.go | Similar refactoring to use switch-case in parsing rdma kv. |
| cgroup1/memory_test.go | Minor formatting adjustments in test variable declarations and conditions. |
| Vagrantfile | New Vagrant configuration for provisioning and testing within a VM. |
| .golangci.yml | Minimal update to disable errcheck in linting configuration. |
| .github/workflows/ci.yml | Updated CI workflow with new OS version, Go version updates and Vagrant-based test jobs. |
80f5047 to
dad0c77
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR updates the CI setup to swap cgroup v1 testing from GitHub Actions runners to AlmaLinux/8 Vagrant VMs and makes several ancillary CI improvements. Key changes include:
- Adding a new Vagrant provisioning script (resize-vagrant-root.sh) for VM disk resizing.
- Converting conditional logic in RDMA parsing from if/else to switch-case in both cgroup1 and cgroup2.
- Updating GitHub Actions workflows to run on Ubuntu 24.04, adding Go 1.24 to the CI matrix, and upgrading golangci-lint.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| script/resize-vagrant-root.sh | New script for resizing the Vagrant VM root partition during provisioning. |
| cgroup2/utils.go | Switch-case refactor for parsing RDMA key-value pairs. |
| cgroup1/rdma.go | Same refactor as cgroup2 to improve clarity in RDMA key handling. |
| cgroup1/memory_test.go | Minor code style updates in boolean declarations and test conditions. |
| Vagrantfile | New Vagrant configuration for AlmaLinux/8, including multiple provisioning steps. |
| .golangci.yml | New configuration file for golangci-lint with enabled linter settings. |
| .github/workflows/ci.yml | CI workflow updates including OS version upgrade, Go version matrix changes, and vagrant-based test jobs. |
| (growpart -h > /dev/null) || dnf -y install cloud-utils-growpart | ||
|
|
||
| df_line=$(df -T / | grep '^/dev/') | ||
| if [[ "$df_line" =~ ^/dev/([a-z]+)([0-9]+) ]]; then |
There was a problem hiding this comment.
The regex used to parse the device name may not match commonly used device names like /dev/nvme0n1p1 that include numbers in the device portion. Consider updating the regex to something like ^/dev/([a-z0-9]+)([0-9]+)$ to better support a broader range of device names.
| if [[ "$df_line" =~ ^/dev/([a-z]+)([0-9]+) ]]; then | |
| if [[ "$df_line" =~ ^/dev/([a-z0-9]+)([0-9]+) ]]; then |
dad0c77 to
923cd16
Compare
Signed-off-by: Austin Vazquez <[email protected]>
This change swaps the cgroupsv1 testing from GitHub Actions Ubuntu 20 runner which went end-of-life in April 2025 to testing in a Vagrant virtual machine. Signed-off-by: Austin Vazquez <[email protected]>
923cd16 to
ba9729c
Compare
|
FYI in opencontainers/cgroups we use Lima: https://github.com/opencontainers/cgroups/blob/v0.0.2/.github/workflows/test.yml#L31-L57 |
Oh between the setup action and the template that looks simpler than the work I had to do here. :) |
This pull request includes CI updates for cgroup v1 testing by swapping from Ubuntu 20 GitHub Actions runners to AlmaLinux/8 Vagrant VMs. This is needed because the cgroup v1 GitHub Actions runners went end-of-life in April 2025.