Skip to content

Conversation

AkihiroSuda
Copy link
Member

Will release v2.0.4 after merging this

@AkihiroSuda AkihiroSuda added this to the v2.0.4 milestone Mar 18, 2025
Copy link
Member

@fahedouch fahedouch left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda force-pushed the dev branch 2 times, most recently from 35895dc to 7b931ef Compare March 18, 2025 10:15
@AkihiroSuda AkihiroSuda requested a review from fahedouch March 18, 2025 11:32
Copy link
Member Author

Choose a reason for hiding this comment

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

Checking if we can have a new release of BuildKit soon as well:

@AkihiroSuda AkihiroSuda marked this pull request as draft March 19, 2025 07:33
…hashes

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@AkihiroSuda AkihiroSuda marked this pull request as ready for review March 19, 2025 13:55
@AkihiroSuda AkihiroSuda mentioned this pull request Mar 19, 2025
;;
esac

"$GIT" checkout "$TAG"
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be a separate PR, but we should:

eg: git clone --quiet --depth 1 --branch "$VERSION"

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM - but if you feel like doing it in this PR, suggesting we do quiet and shallow clone.

Copy link
Member Author

Choose a reason for hiding this comment

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

Cloning is out of the scope of this script.
Probably dockerfile's ADD git:// instruction should be used for cache optimality

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, we can discuss separately.
re: ADD.
I do not know what ADD git:// does under the hood. Is it still only on dockerfile/labs or generally available? Also, need to check what it does wrt quiet and --depth.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cloning is out of the scope of this script.

To clarify: there should be no need for a separate checkout operation at all, which is why I am bringing it up here.

Copy link
Member

Choose a reason for hiding this comment

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

git clone --quiet --depth 1 --branch "$VERSION"

LGTM, the cmd is sandboxed in the ci container, no cache is left and no need to fetch the git entire history of the the tag.

Copy link
Member Author

Choose a reason for hiding this comment

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

ADD git:// is available
since 2022 (moby/buildkit#2799) and out of experimental since 2023 (moby/buildkit#3979)

https://docs.docker.com/reference/dockerfile/#adding-files-from-a-git-repository

This might be more cache-efficient when running tests with several containerd versions

Copy link
Contributor

Choose a reason for hiding this comment

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

Moving that part of the conversation to #4022

;;
esac

"$GIT" checkout "$TAG"
Copy link
Member

Choose a reason for hiding this comment

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

git clone --quiet --depth 1 --branch "$VERSION"

LGTM, the cmd is sandboxed in the ci container, no cache is left and no need to fetch the git entire history of the the tag.

Comment on lines +41 to +46
else
if [ "$HEAD" != "$HASH" ]; then
echo >&2 "ERROR: ${TAG}: expected ${HASH}, got ${HEAD}"
exit 1
fi
fi
Copy link
Member

Choose a reason for hiding this comment

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

shallow fetch makes the else block useless. The following cond is always true:
"$HEAD" == "$HASH"

Copy link
Member Author

Choose a reason for hiding this comment

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

Doesn't seem so?

$ git clone --depth 1 --branch v2.0.4 https://github.com/containerd/containerd
$ cd containerd
$ ~/gopath/src/github.com/containerd/nerdctl/hack/git-checkout-tag-with-hash.sh v2.0.4@wrong-hash
HEAD is now at 1a43cb6 Merge commit from fork
ERROR: v2.0.4: expected wrong-hash, got 1a43cb6a1035441f9aca8f5666a9b3ef9e70ab20

# @BINARY: the binary checksums are verified via Dockerfile.d/SHA256SUMS.d/<COMPONENT>-<VERSION>
ARG CONTAINERD_VERSION=v2.0.4@1a43cb6a1035441f9aca8f5666a9b3ef9e70ab20
ARG RUNC_VERSION=v1.2.6@e89a29929c775025419ab0d218a43588b4c12b9a
ARG CNI_PLUGINS_VERSION=v1.6.2@BINARY
Copy link
Member

@fahedouch fahedouch Mar 20, 2025

Choose a reason for hiding this comment

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

(not blocker) a comment to mention that module is BINARY is not enough ?

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you mean?

Copy link
Member

Choose a reason for hiding this comment

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

the @BINARY suffix is ​​a bit disturbing

@fahedouch
Copy link
Member

fahedouch commented Mar 20, 2025

There are people waiting for the release, let's focus on v2.0.4 and then address all this refactoring later please

@apostasie
Copy link
Contributor

There are people waiting for the release, let's focus on v2.0.4 and then address all this refactoring later please

Suggesting we just merge this now.
It does bring in important updates, and is good enough in its current shape.
We can refine the controversial bits later.

@AkihiroSuda AkihiroSuda merged commit 13a3622 into containerd:main Mar 20, 2025
30 checks passed
@AkihiroSuda
Copy link
Member Author

Merging and making a release, but we will probably to make another new release soon with a new release of BuildKit

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.

4 participants