Skip to content

Commit 4af3a5d

Browse files
authored
Merge pull request #4199 from apostasie/2025-05-c1
[CI]: small fixes
2 parents 0cd6b6c + e658602 commit 4af3a5d

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

.github/workflows/job-test-in-container.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ jobs:
5656
run:
5757
shell: bash
5858

59+
env:
60+
# https://github.com/containerd/nerdctl/issues/622
61+
# The only case when rootlesskit-version is force-specified is when we downgrade explicitly to v1
62+
WORKAROUND_ISSUE_622: ${{ inputs.rootlesskit-version }}
63+
5964
steps:
6065
- name: "Init: checkout"
6166
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -137,16 +142,6 @@ jobs:
137142
sudo mkdir -p /etc/docker
138143
echo '{"ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64", "experimental": true, "ip6tables": true}' | sudo tee /etc/docker/daemon.json
139144
sudo systemctl restart docker
140-
# Rootless with old rootlesskit wants to disable buildkit
141-
- if: ${{ inputs.target != 'rootful' && inputs.rootlesskit-version != '' }}
142-
name: "Init: disable buildkit for old rootlesskit"
143-
run: |
144-
# https://github.com/containerd/nerdctl/issues/622
145-
WORKAROUND_ISSUE_622=
146-
if echo "${ROOTLESSKIT_VERSION}" | grep -q v1; then
147-
WORKAROUND_ISSUE_622=1
148-
fi
149-
echo "WORKAROUND_ISSUE_622=$WORKAROUND_ISSUE_622" >> "$GITHUB_ENV"
150145
- name: "Run: integration tests"
151146
run: |
152147
. ./hack/github/action-helpers.sh

Dockerfile.d/test-integration-rootless.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if [[ "$(id -u)" = "0" ]]; then
2626
fi
2727

2828
: "${WORKAROUND_ISSUE_622:=}"
29-
if [[ "$WORKAROUND_ISSUE_622" = "1" ]]; then
29+
if [[ "$WORKAROUND_ISSUE_622" != "" ]]; then
3030
touch /workaround-issue-622
3131
fi
3232

Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ DOCDIR ?= $(DATADIR)/doc
3939

4040
BINARY ?= "nerdctl"
4141
MAKEFILE_DIR := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
42-
VERSION ?= $(shell git -C $(MAKEFILE_DIR) describe --match 'v[0-9]*' --dirty='.m' --always --tags)
42+
VERSION ?= $(shell git -C $(MAKEFILE_DIR) describe --match 'v[0-9]*' --dirty='.m' --always --tags 2>/dev/null || echo no_git_information)
4343
VERSION_TRIMMED := $(VERSION:v%=%)
44-
REVISION ?= $(shell git -C $(MAKEFILE_DIR) rev-parse HEAD)$(shell if ! git -C $(MAKEFILE_DIR) diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
44+
REVISION ?= $(shell git -C $(MAKEFILE_DIR) rev-parse HEAD 2>/dev/null || echo no_git_information)$(shell if ! git -C $(MAKEFILE_DIR) diff --no-ext-diff --quiet --exit-code 2>/dev/null; then echo .m; fi)
4545
LINT_COMMIT_RANGE ?= main..HEAD
4646
GO_BUILD_LDFLAGS ?= -s -w
4747
GO_BUILD_FLAGS ?=
@@ -136,7 +136,8 @@ lint-go-all:
136136
@cd $(MAKEFILE_DIR) \
137137
&& GOOS=linux make lint-go \
138138
&& GOOS=windows make lint-go \
139-
&& GOOS=freebsd make lint-go
139+
&& GOOS=freebsd make lint-go \
140+
&& GOOS=darwin make lint-go
140141
$(call footer, $@)
141142

142143
lint-yaml:
@@ -179,8 +180,9 @@ lint-licenses-all:
179180
$(call title, $@)
180181
@cd $(MAKEFILE_DIR) \
181182
&& GOOS=linux make lint-licenses \
183+
&& GOOS=windows make lint-licenses \
182184
&& GOOS=freebsd make lint-licenses \
183-
&& GOOS=windows make lint-licenses
185+
&& GOOS=darwin make lint-go
184186
$(call footer, $@)
185187

186188
##########################
@@ -196,8 +198,9 @@ fix-go-all:
196198
$(call title, $@)
197199
@cd $(MAKEFILE_DIR) \
198200
&& GOOS=linux make fix-go \
201+
&& GOOS=windows make fix-go \
199202
&& GOOS=freebsd make fix-go \
200-
&& GOOS=windows make fix-go
203+
&& GOOS=darwin make lint-go
201204
$(call footer, $@)
202205

203206
fix-mod:

cmd/nerdctl/container/container_run_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,11 @@ func TestRunRmTime(t *testing.T) {
600600
base.Cmd("run", "--rm", testutil.CommonImage, "true").AssertOK()
601601
t1 := time.Now()
602602
took := t1.Sub(t0)
603-
const deadline = 3 * time.Second
603+
var deadline = 3 * time.Second
604+
// FIXME: Investigate? it appears that since the move to containerd 2 on Windows, this is taking longer.
605+
if runtime.GOOS == "windows" {
606+
deadline = 10 * time.Second
607+
}
604608
if took > deadline {
605609
t.Fatalf("expected to have completed in %v, took %v", deadline, took)
606610
}

0 commit comments

Comments
 (0)