-
Notifications
You must be signed in to change notification settings - Fork 104
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
CI fix, part II: kube #607
Conversation
ae3f08c
to
9cba261
Compare
@imeoer going to rebase this ASAP so that we can consider just the Kube fixes |
Signed-off-by: apostasie <[email protected]>
@@ -25,115 +26,22 @@ jobs: | |||
with: | |||
go-version-file: 'go.mod' | |||
cache-dependency-path: "go.sum" | |||
- name: Setup Kind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of this logic, currently tied into github actions / engineerd/setup-kind, is making it (quite) difficult to test locally.
With this proposed PR, the logic gets moved to an independent shell script that should make it much easier to test locally, and also to control what version of what gets used.
@@ -58,6 +58,11 @@ build: | |||
GOOS=${GOOS} GOARCH=${GOARCH} ${PROXY} go build -ldflags "$(LDFLAGS)" -v -o bin/containerd-nydus-grpc ./cmd/containerd-nydus-grpc | |||
GOOS=${GOOS} GOARCH=${GOARCH} ${PROXY} go build -ldflags "$(LDFLAGS)" -v -o bin/nydus-overlayfs ./cmd/nydus-overlayfs | |||
|
|||
.PHONY: static |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we do not know what is going inside the kind control plane where the binary will get copied, we do not a static build. There is already a 'release-static' target, but it does require rust / the optimization thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, how about splitting static-release
into static
and static-optimizer
? but the current changes is also LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, cleaning-up the Makefile in that context would definitely make sense.
@@ -24,21 +24,21 @@ $ nerdctl run --snapshotter nydus --rm nginx | |||
|
|||
# Show mounted rootfs a container | |||
$ mount | |||
/dev/loop17 on /var/lib/containerd-nydus/snapshots/7/mnt type erofs (ro,relatime,user_xattr,acl,cache_strategy=readaround) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This, and any other similar change is just to complete the transition started in the earlier PR.
ARG CONTAINERD_VER=1.6.15 | ||
ARG CONTAINERD_PROJECT=/containerd | ||
ARG RUNC_VERSION=1.1.4 | ||
ARG NYDUS_SNAPSHOTTER_PROJECT=/nydus-snapshotter | ||
ARG DOWNLOADS_MIRROR="https://github.com" | ||
ARG NYDUS_VER=2.2.4 | ||
ARG NERDCTL_VER=1.0.0 | ||
ARG NERDCTL_VER=1.7.6 | ||
ARG DELVE_VER=1.23.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pinning delve will avoid one of the recent breakage of the CI, where the latest delve started depending on go features only available in a more recent version of go that what we used here.
@@ -0,0 +1,161 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generic helpers for nydus scripting.
@@ -0,0 +1,113 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The kind script that replaces the github action logic and can be used locally.
@@ -0,0 +1,228 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generic bash helpers, not specific to nydus (provides logging, http, heathcheck, minimal github client).
@imeoer rebased - one commit left - CI is green. I just added a bunch of inline comments to facilitate review. Thanks for your help! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
This is fixing the recent kube testing bustage.
NOTE that this PR is on-top of #606 as I needed a working CI environment as a starting point to debug.
We can either merge this and close 606, or merge 606 first, then I will rebase here.
As far as I can tell, the issues with kube were:
What this PR does (in commit "Fix kube test bustage"):
static
target so that we get truly staticbin/containerd-nydus-grpc
binaries that we can safely copy into the kind control plane/var/lib/containerd/io.containerd.snapshotter.v1.nydus
(follow-up to fix: error in Kubelet when using default root directory #603)kind.sh
shell script (undertests/helpers
) that takes care of setting everything up, so that we can also use that locally / outside of github actionsCI is now green and both PRs are ready to review.
Hope this is helpful.