> On 五月 12, 2016, 12:25 p.m., Guangya Liu wrote: > > include/mesos/docker/v1.proto, lines 56-57 > > <https://reviews.apache.org/r/47198/diff/2/?file=1380544#file1380544line56> > > > > Why both `optional`? I found that other `Label` definition are defining > > `key` as required but `value` as `optional` or `required`. I think that for > > your case, both `key` and `value` should be required? > > Gilbert Song wrote: > The docker label should be independent from the label in our first class > proto. > > Even though from docker documentation `Keys should start and end with an > alpha numeric character`. But I can still generate the followings by some > experiments using docker build: > ``` > "Labels": { > "": "something", > "com.example.release-date": "2015-02-12", > "com.example.version": "0.0.1-beta", > "com.example.version.is-beta": "", > "com.example.version.is-production": "", > "vendor": "ACME Incorporated" > }``` > > So that is the reason we want both optional. Actually `optional` should > be more safe even if you dont have the issue above.
I think that at least we need to have the `key` as required, otherwise, the label as `"": "something",` may have no meaning, how does a label without `key` works? - Guangya ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/47198/#review132879 ----------------------------------------------------------- On 五月 13, 2016, 8:48 p.m., Gilbert Song wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/47198/ > ----------------------------------------------------------- > > (Updated 五月 13, 2016, 8:48 p.m.) > > > Review request for mesos, Benjamin Mahler, Artem Harutyunyan, Jie Yu, and > Kevin Klues. > > > Bugs: MESOS-5272 > https://issues.apache.org/jira/browse/MESOS-5272 > > > Repository: mesos > > > Description > ------- > > Added labels to docker v1 spec config. > > > Diffs > ----- > > include/mesos/docker/v1.proto ff18f8cadfce3315467f194d50d3469fa839f686 > > Diff: https://reviews.apache.org/r/47198/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Gilbert Song > >
