Fix backword-compatibility issue of non-versioned config file#5359
Fix backword-compatibility issue of non-versioned config file#5359estesp merged 1 commit intocontainerd:masterfrom
Conversation
|
Please tell me if we should fix the doc (not the validation implementation). |
|
Build succeeded.
|
|
Can we have a test? |
@AkihiroSuda Thanks for the review. |
|
Build succeeded.
|
@dims We've already switched to v2 config by containerd/stargz-snapshotter#302 (just after we found the issue) ! 😄 |
|
@ktock Excellent Kohei! |
mikebrow
left a comment
There was a problem hiding this comment.
LGTM
just a nit to add a comment on the Version setting
There was a problem hiding this comment.
this test will also pass even if platformAgnosticDefaultConfig() returns Version to 2
But it is a good test to ensure v1 will pass v2 validate by it returning nil..
hmm.. let's also add a comment where the default config Version is defined explaining why it should not be changed... I'll suggest a comment above
There was a problem hiding this comment.
suggest adding a comment here something like
// see: https://github.com/containerd/containerd/blob/5c6ea7fdc1247939edaddb1eba62a94527418687/RELEASES.md#daemon-configuration
// this version MUST remain set to 1 until either there exists a means to override / configure the default at the containerd cli .. or when
// version 1 is no longer supported
There was a problem hiding this comment.
Thanks for the review.
Added the suggested comment.
According to the doc about `config.toml` of containerd: ``` If no version number is specified inside the config file then it is assumed to be a version 1 config and parsed as such. ``` However, it's not true recently. This will break the backward-compatibility in some environment. This commit fixes this issue. Signed-off-by: Kohei Tokunaga <[email protected]>
|
Build succeeded.
|
|
All green. |
Related: #5335
According to the doc about
config.tomlof containerd:However, it's not true recently.
This will break the backward-compatibility in some environment (e.g. stargz-snapshotter project CI).
This commit fixes this issue.
cc @dims @AkihiroSuda @mikebrow @kzys