Skip to content

Conversation

thaJeztah
Copy link
Member


reexec: test cmd.Cancel, bump minimum go version to go1.20

This requires go1.20 or up; https://go-review.googlesource.com/23300

@thaJeztah thaJeztah force-pushed the reexec_test_cancel branch from 5c82dea to d197f51 Compare June 24, 2025 11:58
Copy link
Collaborator

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM

(I dream about the day we can drop Go 1.18 entirely, and just use supported versions)

@thaJeztah
Copy link
Member Author

Yeah, it's a bit of extra hassle, then again for modules that don't need it, it reduces having to update those. Perhaps we should check the go.mod for version, and based on that skip the module in the matrix (so that we don't have to maintain a list).

@thaJeztah thaJeztah marked this pull request as ready for review August 14, 2025 09:55
@thaJeztah
Copy link
Member Author

This seems to work; I'll open a follow-up for that one.

#!/usr/bin/env bash

set -eu

# Check if the module's declared Go version is <= current Go version
go_version="$(go env GOVERSION)"
go_version="${go_version#go}"

packages=""
for p in */; do
  [ -f "$p/go.mod" ] || continue
  if ! (cd "$p" && go list -m -f "{{if gt .GoVersion \"$go_version\"}}ko{{end}}" | grep -q ko); then
    packages+="${p%/} "
  fi
done

echo "PACKAGES=${packages}"

@thaJeztah thaJeztah merged commit f4c0392 into moby:main Aug 14, 2025
20 checks passed
@thaJeztah thaJeztah deleted the reexec_test_cancel branch August 14, 2025 10:42
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