Skip to content

Fix backwards compat with v2 containerd configs#3337

Merged
estesp merged 1 commit intocontainerd:masterfrom
crosbymichael:config-bk
Jun 12, 2019
Merged

Fix backwards compat with v2 containerd configs#3337
estesp merged 1 commit intocontainerd:masterfrom
crosbymichael:config-bk

Conversation

@crosbymichael
Copy link
Copy Markdown
Member

Closes #3336

The fix here is when containerd config default is called, generate a new v2 config, however, keep the default code set at v1 so that when the containerd main loads, it merges the default config with what is loaded from disk causing a backwards incompat change.

Signed-off-by: Michael Crosby [email protected]

config := &Config{
Config: defaultConfig(),
}
// for the time being, keep the defaultConfig's version set at 1 so that
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good idea!

@Random-Liu
Copy link
Copy Markdown
Member

LGTM

@crosbymichael
Copy link
Copy Markdown
Member Author

Sorry @Random-Liu

@Random-Liu
Copy link
Copy Markdown
Member

@crosbymichael This solution is perfect. :)

I was hesitated about whether to change default to v1 or not, because I also want containerd config default to recommend v2. :P Now it meets both requirements.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jun 11, 2019

Build succeeded.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jun 12, 2019

Codecov Report

Merging #3337 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3337   +/-   ##
=======================================
  Coverage   44.85%   44.85%           
=======================================
  Files         113      113           
  Lines       12361    12361           
=======================================
  Hits         5544     5544           
  Misses       5964     5964           
  Partials      853      853
Flag Coverage Δ
#linux 48.77% <ø> (ø) ⬆️
#windows 40.25% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53896d7...31afff2. Read the comment docs.

1 similar comment
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #3337 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3337   +/-   ##
=======================================
  Coverage   44.85%   44.85%           
=======================================
  Files         113      113           
  Lines       12361    12361           
=======================================
  Hits         5544     5544           
  Misses       5964     5964           
  Partials      853      853
Flag Coverage Δ
#linux 48.77% <ø> (ø) ⬆️
#windows 40.25% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53896d7...31afff2. Read the comment docs.

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Emphasize Config Change in the 1.3 Release Note.

4 participants