mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [mesos] asekretenko commented on a change in pull request #326: MESOS-6874: Validate the match between Type and *Infos in the ContainerInfo.
Date Tue, 12 Mar 2019 11:51:58 GMT
asekretenko commented on a change in pull request #326: MESOS-6874: Validate the match between
Type and *Infos in the ContainerInfo.
URL: https://github.com/apache/mesos/pull/326#discussion_r264639836
 
 

 ##########
 File path: include/mesos/mesos.proto
 ##########
 @@ -3328,6 +3328,9 @@ message TTYInfo {
  */
 message ContainerInfo {
   // All container implementation types.
+  // For each type there should be a field in the ContainerInfo itself
+  // with exactly matching name in the lowercase.
 
 Review comment:
   Unfortunately, there are two problems with converting this external interface to `oneof`.
   - First, it would make the code that sets both `docker` and `mesos` silently do strange
things (instead of failing). I cannot prove that there is no such code outside of Mesos.
   - Second, we will still need `ContainerInfo::Type` and thus the validation. There are a
lot of tests that only do `set_type(Type::MESOS)` but set neither `docker` nor `mesos`. According
to the comment above the `ContainerInfo` definition, this is a perfectly valid way to set
up a `MESOS` container without a filesystem isolation. I would expect such code to also exist
in production outside of Mesos itself.
   
   It would have been a right decision to use `oneof` when this interface was initially introduced
(and do without the `type` field), but now it is too late:( 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message