support multiple docker parameters and task labels#1169
Conversation
|
@tpetr it seems the In cef1df4 I implemented some 'wrapper' classes for handling the custom (de)serialization. Tested it and the old |
|
Note here, there was not an easy way to do this that wasn't a breaking change (that I could find). So we will need to make it clear in the release notes that while the api will accept |
| @JsonProperty("dockerParameters") Optional<List<SingularityDockerParameter>> dockerParameters) { | ||
| if (dockerParameters.isPresent() && !dockerParameters.get().isEmpty() && parameters.isPresent() && !parameters.get().isEmpty()) { | ||
| throw new IllegalArgumentException("Can only specify one of 'parameters' or 'dockerParameters'"); | ||
| } |
There was a problem hiding this comment.
I'm a little hesitant of putting these kinds of exceptions in constructors -- if we somehow had a bogus one saved we'd be throwing every time it was deserialized. What do you think about moving this into SingularityValidator instead?
|
@tpetr moved those checks to the validator. Since I'm setting both objects when the deprecated one is set, validating by making sure that they are the same |
Updates Docker parameters and task labels to support multiple values for a specific key. Still testing this out.
Fixes #1074