Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request -- Null Owner fix #1161

Merged
merged 2 commits into from Jul 25, 2016
Merged

Request -- Null Owner fix #1161

merged 2 commits into from Jul 25, 2016

Conversation

@MattCCS
Copy link
Contributor

@MattCCS MattCCS commented Jul 20, 2016

This PR prevents new requests from being created which have one or more null owners, which have been causing errors elsewhere in Singularity.

(Dupe of #1160 for master at ssalinas' request)

/cc @ssalinas @Calvinp @tpetr

@ssalinas
Copy link
Member

@ssalinas ssalinas commented Jul 20, 2016

👍

@Calvinp
Copy link
Contributor

@Calvinp Calvinp commented Jul 20, 2016

The problem was that there were nulls in the list of owners? I had thought the problem was that the owners field itself was null. @wolfd

@ssalinas
Copy link
Member

@ssalinas ssalinas commented Jul 20, 2016

The owners field itself is an optional. I can double check this to be sure, but as far as I know that should come through as an Optional.absent (meaning we are already handling it) if the owners field as a whole is null. If that is not the case though please update us here @Calvinp

@@ -114,6 +114,10 @@ public SingularityRequest checkSingularityRequest(SingularityRequest request, Op
checkBadRequest(request.getId() != null && !StringUtils.containsAny(request.getId(), JOINER.join(REQUEST_ID_ILLEGAL_CHARACTERS)), "Id can not be null or contain any of the following characters: %s", REQUEST_ID_ILLEGAL_CHARACTERS);
checkBadRequest(request.getRequestType() != null, "RequestType cannot be null or missing");

if (request.getOwners().isPresent()) {
checkBadRequest(!request.getOwners().get().contains(null), "Request owner(s) must not be null");

This comment has been minimized.

@tpetr

tpetr Jul 21, 2016
Member

wording here is a little vague (i.e. owners: null is actually valid, but the message makes it sound like it wouldn't be) -- perhaps something like "Request owners cannot contain null values" ?

This comment has been minimized.

@MattCCS

MattCCS Jul 21, 2016
Author Contributor

Good point, I'll change that.

@MattCCS MattCCS added the hs_stable label Jul 22, 2016
@ssalinas ssalinas merged commit b2742cc into master Jul 25, 2016
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build failed
Details
@ssalinas ssalinas deleted the request_null_owner branch Jul 25, 2016
@ssalinas ssalinas removed hs_qa labels Jul 25, 2016
@ssalinas ssalinas modified the milestone: 0.9.0 Jul 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.