-
Notifications
You must be signed in to change notification settings - Fork 843
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm building your change at jenkins-marathon-pipelines-PR-5587-1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔ Build of #5587 completed successfully.
See details at jenkins-marathon-pipelines-PR-5587-1.
You can create a DC/OS with your patched Marathon by creating a new pull
request with the following changes in buildinfo.json:
"url": "https://s3.amazonaws.com/downloads.mesosphere.io/marathon/snapshots/marathon-1.6.0-pre-31-g4302502.tgz",
"sha1": "696ff561009affd7ddeda9299780d476fa243196"
\\ ٩( ᐛ )و //
|
||
"IN operator" should { | ||
"require that the offer value be in the comma delimited list of values" in { | ||
makeOffer("host1") should meetConstraint(hostnameField, IN, "host1,host2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am worried that values might have commas in them. In this case, we would need to support escaping and/or strings inside value strings of constraint definitions. Although I would vote for supports of arrays of strings as constraint values. In this case the constraint in an app definition could look like ["some-field", "IN", ["value1", "value2"]
. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like what Ivan is proposing! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought of this; This would break API compatibility. If you put a comma in your value then you are awful. We can escape the comma for v2 API api and then allow the array syntax for v3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please forgive me my ignorance, but I do not see how it would break the user-facing API compatibility. Isn't it about addition/extension only? Are you referring to the case when Java/Python/etc clients would fail if their receive an array value, and not a string one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would change the type, specified here:
The specification is that constraints are a 2-3 item array of strings. Putting a non-string in there breaks the API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking of supporting strings and arrays: arrays for IN
and strings for everything else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understood this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ichernetsky did you mean to write this earlier?
["some-field", "IN", "value1", "value2"]
(sans the additional [
)?
@jdef mentioned this as a possibility and it made me wonder if perhaps this was what you were trying to suggest :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I was suggesting ["field", "IN", ["value1", "value2"]]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a general question - who and when updates the docs? Like this one https://mesosphere.github.io/marathon/docs/constraints.html
Great question :) On the one hand, it'd probably be a good idea to update the docs with this PR. Suzanne usually does our docs. On the other hand, no sense in writing docs until we fully settle on the behavior of these constraints. |
@timcharper ok, thanks :) then LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm building your change at jenkins-marathon-pipelines-PR-5587-2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔ Build of #5587 completed successfully.
See details at jenkins-marathon-pipelines-PR-5587-2.
You can create a DC/OS with your patched Marathon by creating a new pull
request with the following changes in buildinfo.json:
"url": "https://s3.amazonaws.com/downloads.mesosphere.io/marathon/snapshots/marathon-1.6.0-pre-38-geed526c.tgz",
"sha1": "a140ce48e9e79c0eea51eab17a3d56ddb335ed3f"
\\ ٩( ᐛ )و //
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -26,6 +26,10 @@ message Constraint { | |||
UNLIKE = 4; | |||
// Field will be grouped by field. Value specifies the maximum size of each group. | |||
MAX_PER = 5; | |||
// Field must be the specified value | |||
IS = 6; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our API is also defined in Protos?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
|
||
"trims whitespace after the commas (but not before)" in { | ||
makeOffer("host1") should meetConstraint(hostnameField, IN, "host1, host2") | ||
makeOffer("host1") should meetConstraint(hostnameField, IN, "host1 , host2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't here a whitespace before the comma? host1
is not equal to host1[ ]
. What am I missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The separator is a comma optionally surrounded by whitespaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err lol the test description is a lie 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe Mesos constraints what values can be specified on an agent attribute value. A user could potentially put trailing or leading spaces in the value. That would be an awful thing to do, but, none-the-less, possible.
I think it is more likely that people accidentally put a space in comma-delimited list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in agreement here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vinodkone corrected me; spaces are explicitly not allowed in attribute values, and they are removed by Mesos.
Waiting for this proposal to be accepted by DCOS SDK / Storage Services team: |
JIRA Issues: MARATHON_EE-1667
- Reject set/range values from IS constraints - Accept only set values for IN constraints - Reduce test verbosity
4302502
to
c84c556
Compare
Proposal is accepted and change has been updated to match proposal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm building your change at jenkins-marathon-pipelines-PR-5587-3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔ Build of #5587 completed successfully.
See details at jenkins-marathon-pipelines-PR-5587-3.
You can create a DC/OS with your patched Marathon by creating a new pull
request with the following changes in buildinfo.json:
"url": "https://s3.amazonaws.com/downloads.mesosphere.io/marathon/snapshots/marathon-1.6.0-pre-115-g254168f.tgz",
"sha1": "4c2d677483212af6cfe5bce9897afc255f58900c"
You can run system integration test changes of this PR against Marathon
master by tirggering this Jenkins job with the Pull_Request_id
5587
.
The job then reports back to this PR.
\\ ٩( ᐛ )و //
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm building your change at jenkins-marathon-pipelines-PR-5587-4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm building your change at jenkins-marathon-pipelines-PR-5587-5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm building your change at jenkins-marathon-pipelines-PR-5587-6.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔ Build of #5587 completed successfully.
See details at jenkins-marathon-pipelines-PR-5587-4.
You can create a DC/OS with your patched Marathon by creating a new pull
request with the following changes in buildinfo.json:
"url": "https://s3.amazonaws.com/downloads.mesosphere.io/marathon/snapshots/marathon-1.6.0-pre-116-gcd129c2.tgz",
"sha1": "1881d93f62c1fe8dbcd43dc4a34b42f604b1f327"
You can run system integration test changes of this PR against Marathon
master by tirggering this Jenkins job with the Pull_Request_id
5587
.
The job then reports back to this PR.
\\ ٩( ᐛ )و //
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔ Build of #5587 completed successfully.
See details at jenkins-marathon-pipelines-PR-5587-5.
You can create a DC/OS with your patched Marathon by creating a new pull
request with the following changes in buildinfo.json:
"url": "https://s3.amazonaws.com/downloads.mesosphere.io/marathon/snapshots/marathon-1.6.0-pre-117-g85dd4af.tgz",
"sha1": "257cd31f926d0956d9da7a8e4db1e180d1820508"
You can run system integration test changes of this PR against Marathon
master by tirggering this Jenkins job with the Pull_Request_id
5587
.
The job then reports back to this PR.
\\ ٩( ᐛ )و //
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔ Build of #5587 completed successfully.
See details at jenkins-marathon-pipelines-PR-5587-6.
You can create a DC/OS with your patched Marathon by creating a new pull
request with the following changes in buildinfo.json:
"url": "https://s3.amazonaws.com/downloads.mesosphere.io/marathon/snapshots/marathon-1.6.0-pre-118-gc35fe74.tgz",
"sha1": "3b39ab10929cdf100ea909907236e495dd5b62b7"
You can run system integration test changes of this PR against Marathon
master by tirggering this Jenkins job with the Pull_Request_id
5587
.
The job then reports back to this PR.
\\ ٩( ᐛ )و //
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm building your change at jenkins-marathon-pipelines-PR-5587-7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm building your change at jenkins-marathon-pipelines-PR-5587-8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔ Build of #5587 completed successfully.
See details at jenkins-marathon-pipelines-PR-5587-7.
You can create a DC/OS with your patched Marathon by creating a new pull
request with the following changes in buildinfo.json:
"url": "https://s3.amazonaws.com/downloads.mesosphere.io/marathon/snapshots/marathon-1.6.0-pre-119-gf1ca7e7.tgz",
"sha1": "a399477fc29e3993e5ceebaa71dfcf8da1fc0db8"
You can run system integration test changes of this PR against Marathon
master by tirggering this Jenkins job with the Pull_Request_id
5587
.
The job then reports back to this PR.
\\ ٩( ᐛ )و //
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔ Build of #5587 completed successfully.
See details at jenkins-marathon-pipelines-PR-5587-8.
You can create a DC/OS with your patched Marathon by creating a new pull
request with the following changes in buildinfo.json:
"url": "https://s3.amazonaws.com/downloads.mesosphere.io/marathon/snapshots/marathon-1.6.0-pre-120-g86f7168.tgz",
"sha1": "1772832233f6db5a56586b196701a57e43e9ce58"
You can run system integration test changes of this PR against Marathon
master by tirggering this Jenkins job with the Pull_Request_id
5587
.
The job then reports back to this PR.
\\ ٩( ᐛ )و //
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm building your change at jenkins-marathon-pipelines-PR-5587-9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔ Build of #5587 completed successfully.
See details at jenkins-marathon-pipelines-PR-5587-9.
You can create a DC/OS with your patched Marathon by creating a new pull
request with the following changes in buildinfo.json:
"url": "https://s3.amazonaws.com/downloads.mesosphere.io/marathon/snapshots/marathon-1.6.0-pre-123-g7fc6036.tgz",
"sha1": "f65fd33a3ab33e8f6a9a4ac9fc450ad75f6b560d"
You can run system integration test changes of this PR against Marathon
master by tirggering this Jenkins job with the Pull_Request_id
5587
.
The job then reports back to this PR.
\\ ٩( ᐛ )و //
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm building your change at jenkins-marathon-pipelines-PR-5587-10.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔ Build of #5587 completed successfully.
See details at jenkins-marathon-pipelines-PR-5587-10.
You can create a DC/OS with your patched Marathon by creating a new pull
request with the following changes in buildinfo.json:
"url": "https://s3.amazonaws.com/downloads.mesosphere.io/marathon/snapshots/marathon-1.6.0-pre-125-g193bf8b.tgz",
"sha1": "457e50923cb2c4fdc7e7c72c473495776c5d404a"
You can run system integration test changes of this PR against Marathon
master by tirggering this Jenkins job with the Pull_Request_id
5587
.
The job then reports back to this PR.
\\ ٩( ᐛ )و //
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a couple tiny comments. Otherwise, LGTM!
@@ -102,6 +102,8 @@ $ curl -X POST -H "Content-type: application/json" localhost:8080/v2/apps -d '{ | |||
}' | |||
``` | |||
|
|||
Note, if the attribute in question is a scalar, it is rounded to the nearest thousandth using the half-even rounding strategy; zeroes after the decimal are dropped. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Note:** If...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
|
||
#### Comparing scalar values | ||
|
||
When comparing scalars, the value is compared to the nearest thousandth (using half-even rounding strategy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^Period at the end of the sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
Thanks! Merged |
JIRA Issues: MARATHON_EE-1667