-
Notifications
You must be signed in to change notification settings - Fork 169
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
Added Preflight Update Checks #3365
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.
LGTM and sorry for being the person who gets my random questions :D
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.
Overall LGTM, I worry about a few internal-error-looking cases being returned to customers directly.
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 apart from Brendan's concerns about returning internal errors to our customers. I am also concerned that based on recently experiences, that a 404 might just mean "it's not in the db yet". It might be good to make sure that cosmosdb does indeed return 404 for "it's not there and you shouldn't wait".
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.
Hey Brian, sorry to take so long on re-review. I really like the changes, thank you!
I mostly have nits here - feel free to ignore/action them. I think it is worth reverting/rewriting the Subscription test data so we don't conflate Subscription docs with OpenShiftCluster docs.
Please rebase pull request. |
081ed70
to
de7644c
Compare
/azp run ci |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
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 e2e failure should be resolved before merge (the branch might need to be rebased) but the changes look good to me! I left a comment on something I noticed during review we might want to fix while we're here.
@@ -52,9 +52,9 @@ func (f *frontend) preflightValidation(w http.ResponseWriter, r *http.Request) { | |||
continue |
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.
Won't all subsequent validation fail if we continue 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.
Not necessarily as we are unmarshalling each resource separately. If one fails to unmarshall it doesn't mean the rest will, and according to preflight, is not considered a validation failure either.
/azp run e2e |
No pipelines are associated with this pull request. |
Which issue this PR addresses:
Fixes https://issues.redhat.com/browse/ARO-3854
What this PR does / why we need it:
Currently we have preflight set up for create operations but also need it for update. These changes allow for both put/patch operations on preflight so that it can leave the testing stage and go live. This PR also cleans up the way we validate for preflight and adds new checks for it as well. There was a previous PR for this here: #3181 but it was getting messy, and issues were arising so creating this new PR instead.
Test plan for issue:
Created additional unit tests that are similar to put/patch tests. Kusto logs also show preflight success and failures with more details than before.