Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Remove annotation config json key #2028

Merged

Conversation

WeiZhang555
Copy link
Member

@WeiZhang555 WeiZhang555 commented Sep 4, 2019

This is a WIP PR trying to remove ConfigJSONKey annotation.

Currently we have several places saving the OCI spec in configurations which bing a lot of redundancy and confusion, the plan is removing them all and only keep "bundle/config.json" from upper level components.

Fixes: #2023

We can get OCI spec config from bundle instead of annotations, so this
field isn't necessary.

Signed-off-by: Wei Zhang weizhang555.zw@gmail.com

@WeiZhang555
Copy link
Member Author

/test

@WeiZhang555
Copy link
Member Author

depends-on: #2022

Waiting for it's merging.

@WeiZhang555 WeiZhang555 force-pushed the remove-annotation-ConfigJSONKey branch from 77f1b41 to 42e603f Compare September 5, 2019 03:48
@codecov
Copy link

codecov bot commented Sep 5, 2019

Codecov Report

Merging #2028 into master will decrease coverage by 0.05%.
The diff coverage is 65.45%.

@@            Coverage Diff             @@
##           master    #2028      +/-   ##
==========================================
- Coverage   51.67%   51.61%   -0.06%     
==========================================
  Files         107      108       +1     
  Lines       14615    14617       +2     
==========================================
- Hits         7552     7545       -7     
- Misses       6152     6168      +16     
+ Partials      911      904       -7

@codecov
Copy link

codecov bot commented Sep 5, 2019

Codecov Report

Merging #2028 into master will decrease coverage by 0.06%.
The diff coverage is 65.57%.

@@            Coverage Diff             @@
##           master    #2028      +/-   ##
==========================================
- Coverage   51.93%   51.87%   -0.07%     
==========================================
  Files         107      108       +1     
  Lines       14465    14461       -4     
==========================================
- Hits         7513     7502      -11     
- Misses       6060     6072      +12     
+ Partials      892      887       -5

@WeiZhang555 WeiZhang555 force-pushed the remove-annotation-ConfigJSONKey branch 2 times, most recently from 29d3c70 to 0fabefd Compare September 5, 2019 05:58
@WeiZhang555
Copy link
Member Author

/test

@@ -47,9 +47,6 @@ const (
// AssetHashType is the hash type used for assets verification
AssetHashType = vcAnnotationsPrefix + "AssetHashType"

// ConfigJSONKey is the annotation key to fetch the OCI configuration.
ConfigJSONKey = vcAnnotationsPrefix + "pkg.oci.config"
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is an API change, we need to think about how we're going to manage its removal - if this PR is merged and we make a new release, some users may be surprised the feature has disappeared 😄

Related: #1113 (comment)

@egernst, @gnawux - any thoughts on this? Raise this issue in the AC meeting and announce the plan on the mailing list?

Copy link
Member Author

Choose a reason for hiding this comment

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

@jodh-intel I don't think it's an API change. This annotation is used for storing OCI spec in kata-runtime itself's configuration. It's not exposed to user and user won't have any way to use it, so this is an internal change and it's definitely safe to remove 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry @WeiZhang555 ! You are of course correct - the lower-case pkg.oci prefix should have been the clue to me 😄

@WeiZhang555 WeiZhang555 force-pushed the remove-annotation-ConfigJSONKey branch 2 times, most recently from 0332362 to 186f48e Compare September 6, 2019 02:37
@WeiZhang555 WeiZhang555 changed the title [WIP] Remove annotation config json key Remove annotation config json key Sep 6, 2019
@WeiZhang555 WeiZhang555 added the needs-review Needs to be assessed by the team. label Sep 6, 2019
Copy link
Contributor

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

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

Thanks @WeiZhang555.

lgtm

@WeiZhang555
Copy link
Member Author

/test

Fixes: kata-containers#2023

We can get OCI spec config from bundle instead of annotations, so this
field isn't necessary.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
@WeiZhang555
Copy link
Member Author

/test

Rebase on upstream master.

ping @lifupan @bergwolf @sboeuf @devimc

@jshachm
Copy link
Member

jshachm commented Sep 18, 2019

LGTM

Copy link
Member

@bergwolf bergwolf left a comment

Choose a reason for hiding this comment

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

It would be better if we abstract necessary info at sandbox config level and do not have to access sandbox container oci spec in VC. But it can be done later. Thanks for the nice work Wei!

@bergwolf bergwolf merged commit 74e7d3d into kata-containers:master Sep 18, 2019
@WeiZhang555 WeiZhang555 deleted the remove-annotation-ConfigJSONKey branch September 18, 2019 07:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-review Needs to be assessed by the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limit usage of CompatOCISpec
5 participants