-
Notifications
You must be signed in to change notification settings - Fork 19
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
[uss_qualifier] scd CRSimple checks that mutation is only allowed with the correct OVN #765
Conversation
50fc09e
to
703ac55
Compare
if qe.cause_status_code in [400, 404, 409]: | ||
# An empty OVN can be seen as: | ||
# an incorrect parameter (400), a reference to a non-existing entity (404) as well as a conflict (409) |
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.
Looking at the OpenAPI definition, I don't think it is correct to add a 404 here. The description is The requested Entity could not be found. The OVN is not an entity.
What motivates this addition?
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.
This comment on the equivalent PR for OIRs, so I'm aligning this scenario with it too.
We don't request from an implementation that they send a 404, but returning a 404 would not be entirely wrong either, and we generally want to have a reasonably wide interpretation.
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 agree there is some ambiguity in the 404 language. It could be read as "The requested Entity could not be found", meaning that the Entity existing and just not having the specified OVN should not return 404, but rather necessarily 400 or 409. The way I read it is "The requested Entity could not be found", meaning that the Entity, as requested (where request includes specification of the OVN -- essentially a subindex), could not be found. So, I would keep the 404 addition as that also matches the conceptual REST paradigm of a subfolder referring to subresources, and a 404 is the appropriate RESTful response to the absence of the requested subresource. I unfortunately can't make the meeting this week, but I don't feel super strongly about this if there is strong disagreement.
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.
Fair enough!
) | ||
except QueryError as qe: | ||
self.record_queries(qe.queries) | ||
if qe.cause_status_code in [400, 404, 409]: |
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.
Same remark as above.
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.
Same reply as above
703ac55
to
1795bbf
Compare
Note: prober step failed while pulling the base image:
I start observing these once or twice a week. |
1795bbf
to
cc92286
Compare
…h the correct OVN
cc92286
to
fac668a
Compare
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
last piece to implement #760 by having a test case explicitly dedicated to attempting mutation with missing an incorrect OVNs
Only the last commit of this PR is relevant, this will remain a draft until #762 is merged.