You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by as...@apache.org on 2020/09/25 16:04:37 UTC
[mesos] 01/05: Added `OfferConstraints` validity criteria into
protobuf comments.
This is an automated email from the ASF dual-hosted git repository.
asekretenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 739a704a11f6cfc68ab6e035c7e945d8f5774303
Author: Andrei Sekretenko <as...@mesosphere.com>
AuthorDate: Tue Sep 22 14:55:13 2020 +0200
Added `OfferConstraints` validity criteria into protobuf comments.
Review: https://reviews.apache.org/r/72898
---
include/mesos/scheduler/scheduler.proto | 9 +++++++++
include/mesos/v1/scheduler/scheduler.proto | 9 +++++++++
2 files changed, 18 insertions(+)
diff --git a/include/mesos/scheduler/scheduler.proto b/include/mesos/scheduler/scheduler.proto
index f70738c..f70d379 100644
--- a/include/mesos/scheduler/scheduler.proto
+++ b/include/mesos/scheduler/scheduler.proto
@@ -443,6 +443,15 @@ message AttributeConstraint {
// NOTE: Even if a particular resource matches offer constraints of a
// framework's role, there is still no guarantee that it will ever be offered
// to this role of the framework.
+//
+// NOTE: Each `Group` must contain at least one constraint, and
+// `RoleConstraints` must contain at least one `Group`, otherwise
+// the message is not valid.
+//
+// NOTE: Frameworks are allowed to use default-constructed
+// `OfferConstraints` (instead of not setting the `offer_constraints` field)
+// in the SUBSCRIBE/UPDATE_FRAMEWORK calls to indicate subscription without
+// any offer constraints.
message OfferConstraints {
message RoleConstraints {
message Group {
diff --git a/include/mesos/v1/scheduler/scheduler.proto b/include/mesos/v1/scheduler/scheduler.proto
index 364d2c8..a8596b6 100644
--- a/include/mesos/v1/scheduler/scheduler.proto
+++ b/include/mesos/v1/scheduler/scheduler.proto
@@ -441,6 +441,15 @@ message AttributeConstraint {
// NOTE: Even if a particular resource matches offer constraints of a
// framework's role, there is still no guarantee that it will ever be offered
// to this role of the framework.
+//
+// NOTE: Each `Group` must contain at least one constraint, and
+// `RoleConstraints` must contain at least one `Group`, otherwise
+// the message is not valid.
+//
+// NOTE: Frameworks are allowed to use default-constructed
+// `OfferConstraints` (instead of not setting the `offer_constraints` field)
+// in the SUBSCRIBE/UPDATE_FRAMEWORK calls to indicate subscription without
+// any offer constraints.
message OfferConstraints {
message RoleConstraints {
message Group {