Skip to content

go.mod: pin k8s version to fix build on go1.16, and update buildx to v0.8.1#9317

Merged
ndeloof merged 2 commits intodocker:v2from
thaJeztah:fix_k8s_deps
Mar 28, 2022
Merged

go.mod: pin k8s version to fix build on go1.16, and update buildx to v0.8.1#9317
ndeloof merged 2 commits intodocker:v2from
thaJeztah:fix_k8s_deps

Conversation

@thaJeztah
Copy link
Member

go.mod: pin k8s dependencies to the same version as in buildx

Buildx uses replace rules to pin these dependencies to the version
that's used in buildkit. Newer versions of these dependencies are
incompatible with some go versions, and we do not need the newer
versions for where it's used.

go.mod: github.com/docker/buildx v0.8.1

Fix possible panic on handling build context scanning errors

What I did

Related issue

(not mandatory) A picture of a cute animal, if possible in relation with what you did

Buildx uses replace rules to pin these dependencies to the version
that's used in buildkit. Newer versions of these dependencies are
incompatible with some go versions, and we do not need the newer
versions for where it's used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Fix possible panic on handling build context scanning errors

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Comment on lines -2284 to -2285
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s=
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs=
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the dependency that broke the build; it's a fork of Golang's json package, but "case-sensitive", and it's depending on some features that are not available in go1.16 (which is still in use in the docker 20.10 release pipeline)

@thaJeztah
Copy link
Member Author

@ndeloof @tonistiigi @crazy-max PTAL

Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@ndeloof ndeloof left a comment

Choose a reason for hiding this comment

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

LGTM.
We should adopt same approach proposed on docker/buildx#840 so that we don't get such side effect as packaging tries to build from source with a distinct runtime

@ndeloof ndeloof merged commit 950cb1a into docker:v2 Mar 28, 2022
@thaJeztah thaJeztah deleted the fix_k8s_deps branch March 28, 2022 14:27
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.

3 participants