Skip to content

Conversation

@thaJeztah
Copy link
Member

The CLI currently hard-codes the schema-version for CLI plugins to "0.1.0", which doesn't allow us to expand the schema for plugins.

As there's many plugins that we shipped already, we can't break compatibility until we reach 2.0.0, but we can expand the schema with non-breaking changes.

This patch makes the validation more permissive to allow new schema versions <= 2.0.0. Note that existing CLIs will still invalidate such versions, so we cannot update the version until such CLIs are no longer expected to be used, but this patch lays the ground-work to open that option.

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

- A picture of a cute animal (not mandatory but encouraged)

The CLI currently hard-codes the schema-version for CLI plugins to
"0.1.0", which doesn't allow us to expand the schema for plugins.

As there's many plugins that we shipped already, we can't break
compatibility until we reach 2.0.0, but we can expand the schema
with non-breaking changes.

This patch makes the validation more permissive to allow new schema
versions <= 2.0.0. Note that existing CLIs will still invalidate
such versions, so we cannot update the version until such CLIs are
no longer expected to be used, but this patch lays the ground-work
to open that option.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@thaJeztah
Copy link
Member Author

Hm... alpine broken? Just had it on another PR as well;


#21 [engine 2/4] RUN apk --no-cache upgrade openssh-client &&   apk --no-cache add shadow openssh-server &&   groupadd -f docker &&   useradd --create-home --shell /bin/sh --password $(head -c32 /dev/urandom | base64) penguin &&   usermod -aG docker penguin &&   ssh-keygen -A
#21 0.111 fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz
#21 0.202 fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/community/x86_64/APKINDEX.tar.gz
#21 0.522 (1/3) Upgrading openssh-keygen (10.0_p1-r7 -> 10.0_p1-r8)
#21 0.536 (2/3) Upgrading openssh-client-common (10.0_p1-r7 -> 10.0_p1-r8)
#21 0.568 (3/3) Upgrading openssh-client-default (10.0_p1-r7 -> 10.0_p1-r8)
#21 0.583 Executing busybox-1.37.0-r18.trigger
#21 0.591 OK: 41 MiB in 75 packages
#21 0.671 fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz
#21 0.793 fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/community/x86_64/APKINDEX.tar.gz
#21 1.089 (1/3) Installing openssh-server-common (10.0_p1-r8)
#21 1.101 (2/3) Installing openssh-server (10.0_p1-r8)
#21 1.128 (3/3) Installing shadow (4.17.3-r0)
#21 1.151 Executing busybox-1.37.0-r18.trigger
#21 1.156 OK: 44 MiB in 78 packages
#21 1.256 OpenSSL version mismatch. Built against 3050003f, you have 30500020
#21 ERROR: process "/bin/sh -c apk --no-cache upgrade openssh-client &&   apk --no-cache add shadow openssh-server &&   groupadd -f docker &&   useradd --create-home --shell /bin/sh --password $(head -c32 /dev/urandom | base64) penguin &&   usermod -aG docker penguin &&   ssh-keygen -A" did not complete successfully: exit code: 255
------
 > [engine 2/4] RUN apk --no-cache upgrade openssh-client &&   apk --no-cache add shadow openssh-server &&   groupadd -f docker &&   useradd --create-home --shell /bin/sh --password $(head -c32 /dev/urandom | base64) penguin &&   usermod -aG docker penguin &&   ssh-keygen -A:
0.583 Executing busybox-1.37.0-r18.trigger
0.591 OK: 41 MiB in 75 packages
0.671 fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz
0.793 fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/community/x86_64/APKINDEX.tar.gz
1.089 (1/3) Installing openssh-server-common (10.0_p1-r8)
1.101 (2/3) Installing openssh-server (10.0_p1-r8)
1.128 (3/3) Installing shadow (4.17.3-r0)
1.151 Executing busybox-1.37.0-r18.trigger
1.156 OK: 44 MiB in 78 packages
1.256 OpenSSL version mismatch. Built against 3050003f, you have 30500020

@thaJeztah
Copy link
Member Author

Minimal reproducer;

docker run -it --rm alpine:3.22 sh -c 'apk --no-cache -qq add openssh-server && ssh-keygen -A'
OpenSSL version mismatch. Built against 3050003f, you have 30500010

@vvoland vvoland merged commit a44144e into docker:master Sep 24, 2025
125 of 131 checks passed
@thaJeztah thaJeztah deleted the plugin_semverish branch September 24, 2025 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants