New gha ci#887
Conversation
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Signed-off-by: Tim Zhou <timcoding1988@gmail.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Signed-off-by: Tim Zhou <timcoding1988@gmail.com>
|
|
||
| GOSRC="$(pwd)" | ||
| SKOPEO_PATH="/var/tmp/skopeo" | ||
| SKOPEO_CIDEV_CONTAINER_FQIN="quay.io/libpod/skopeo_cidev:latest" |
There was a problem hiding this comment.
(Just a drive-by, I won’t be able to review this today.) We never used :latest — if it even exists.
There was a problem hiding this comment.
right though the automation to build these is dead, we need to add a new one in https://github.com/podman-container-tools/automation for this image
Luap99
left a comment
There was a problem hiding this comment.
LGTM, we can tweak later, some CI is better none
| ./hack/ci/df.log | ||
| if-no-files-found: ignore | ||
|
|
||
| common-test: |
There was a problem hiding this comment.
should this job use the path-filter dependency too?
There was a problem hiding this comment.
common has to run always basically, I guess the only exception would be basic readme changes but not really worth making this more complicated here as tests are fast enough.
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| GO_VERSION: "1.26.x" |
There was a problem hiding this comment.
I'd rather remove this line and use go-version-file: go.mod below with setup-go.
|
|
||
| env: | ||
| GO_VERSION: "1.26.x" | ||
| LIMA_VERSION: "v2.1.1" |
There was a problem hiding this comment.
Latest lima is usually fine so we can drop this one, too.
|
|
||
| jobs: | ||
| path-filter: | ||
| runs-on: ubuntu-24.04 |
There was a problem hiding this comment.
nit: ubuntu-latest so we have less diff noise / maintenance burden in the future.
mtrmac
left a comment
There was a problem hiding this comment.
Thanks! One real gap - the c/image tests that run as root are not correctly executed.
Otherwise, just a few changes, mostly to document motivations / outstanding actions, please.
Completely ignore the “not now” comments.
| - main | ||
| - podman-* | ||
| pull_request: | ||
| branches: |
There was a problem hiding this comment.
(Do we need this branch restriction? Running on everything would “fail closed”.)
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| GO_VERSION: "1.26.x" |
There was a problem hiding this comment.
Hard-coding a version would mean we need to manage updates.
For linters / warnings, we can use go-version: stable and there is nothing to manage.
If we do want a precise version, we can drive it by go.mod via go-version-file.
| if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" ]] || \ | ||
| [[ "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then |
There was a problem hiding this comment.
(Not now? I’d prefer this to check only for success/skipped, and fail on unexpected states.)
|
|
||
| source "$SCRIPT_DIR/lib.sh" | ||
|
|
||
| AUTOMATION_RELEASE="20260520t200858z" |
There was a problem hiding this comment.
Is this the right place for
| AUTOMATION_RELEASE="20260520t200858z" | |
| AUTOMATION_RELEASE="20260520t200858z" # FIXME: Make this Renovate-managed |
?
| --set ".images=[{\"location\":\"$IMAGE_URL\", \"arch\": \"x86_64\"}]" \ | ||
| "$SCRIPT_DIR/template.lima.yml" | ||
|
|
||
| limactl copy "$REPO_DIR" "$LIMA_VM_NAME:/var/tmp/container-libs" |
There was a problem hiding this comment.
Not now: Is it plausible to use mounts? It’s probably not material here but to benefit from Go module / … cache, we might need to copy hundreds of megabytes of data.
There was a problem hiding this comment.
I tried mounts on podman originally the problem is that I was not able to get the selinux labels right that way as they where set on the entire mount on a per file basis.
|
|
||
| GOSRC="$(pwd)" | ||
| SKOPEO_PATH="/var/tmp/skopeo" | ||
| SKOPEO_CIDEV_CONTAINER_FQIN="quay.io/libpod/skopeo_cidev:latest" |
There was a problem hiding this comment.
If this is should be Renovate-managed, please add a FIXME comment.
| sudo mkdir -p /registry | ||
| sudo cp -a "$mnt/atomic-registry-config.yml" / | ||
| sudo podman umount --latest | ||
| sudo podman rm --latest |
There was a problem hiding this comment.
Not now: Could we embed the binaries directly into the VM image?
| sudo podman umount --latest | ||
| sudo podman rm --latest | ||
|
|
||
| git clone -b main https://github.com/containers/skopeo.git "$SKOPEO_PATH" |
There was a problem hiding this comment.
We will need to use release branches of Skopeo on stable branches of c/image.
So the main should at the very least be a top-level variable in the script (previously SKOPEO_CI_BRANCH).
| paste -sd "|" -) | ||
| if [ -n "$test_filter" ]; then | ||
| sudo -E env "PATH=$PATH" "GOPATH=$GOPATH_DIR" "HOME=$HOME" \ | ||
| make test "BUILDTAGS=$BUILDTAGS" "TESTFLAGS=-v -run $test_filter" TEST_PACKAGES=./storage |
There was a problem hiding this comment.
This seems to be reporting testing: warning: no tests to run, i.e. the filter computation does not work.
There was a problem hiding this comment.
Added some debug logging in #891 , to hopefully speed this up.
There was a problem hiding this comment.
#891 has a fix that could be ported here.
- One part (missing
') is a clear bug in the CI port, that’s fine - Another part is that it seems ~impossible to prevent Make evaluating a
$in a value, so we have to pre-escape. Am I missing a clean solution? If not, this definitely needs a comment (and preserving more of the original comment about how the filter is constructed would be nice.) - If I understand the situation correctly, this never worked?! I am surprised we merged the original PR without noticing.
| echo | ||
| echo "#################" | ||
| echo "Logging system info" | ||
| echo "#################" |
There was a problem hiding this comment.
Not now, https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands documents various formats that we probably can use to get a nicer UI (collapsible groups, group titles, default-collapsed groups)
There was a problem hiding this comment.
Done prototyped in #891 , results in much less log noise.
|
While there are a lot of comments on this, I will just say: having working CI is better than not having working CI, and we can work details in follow-on PRs. I suggest we just merge this now. |
|
Thanks @timcoding1988 @giuseppe ! |
new GHA based on PR from podman-container-tools/container-libs-sandbox#1