-
Notifications
You must be signed in to change notification settings - Fork 170
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
MIWI cluster Dynamic Validation update for strict 1:1 matching for provided Platform Workload Identity to expected OCP Operators #3966
base: master
Are you sure you want to change the base?
Conversation
744b3ad
to
da1decc
Compare
Please rebase pull request. |
da1decc
to
305400e
Compare
…cluster deletion flow
…d platform identity is found
…for unexpected platform workload identity
305400e
to
8fb81f7
Compare
8fb81f7
to
ec9136e
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 except for one tiny suggestion on a cx-facing error message.
return api.NewCloudError(http.StatusBadRequest, api.CloudErrorCodeInvalidParameter, "identity", "The provided cluster identity is invalid; there should be exactly one.") | ||
} | ||
|
||
if operatorRolePresent && len(pwip.PlatformWorkloadIdentities) == 0 { | ||
return api.NewCloudError(http.StatusBadRequest, api.CloudErrorCodeInvalidParameter, "properties.platformWorkloadIdentityProfile", "Platform workload identity profile cannot be empty.") |
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.
return api.NewCloudError(http.StatusBadRequest, api.CloudErrorCodeInvalidParameter, "properties.platformWorkloadIdentityProfile", "Platform workload identity profile cannot be empty.") | |
return api.NewCloudError(http.StatusBadRequest, api.CloudErrorCodeInvalidParameter, "properties.platformWorkloadIdentityProfile.platformWorkloadIdentities", "The set of platform workload identities cannot be empty.") |
Suggesting this change because the error message should point to the exact property that we're validating to make the message easily actionable.
/azp run e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run ci |
Azure Pipelines successfully started running 1 pipeline(s). |
E2E failed with a known flake that's already captured in our CI failure epic. I'll wait to run it again until Rajdeep responds to my most recent review. |
Which issue this PR addresses:
Fixes ARO-10859
What this PR does / why we need it:
Test plan for issue:
[x] Unit tests were added/updated for the above implementation
[x] Create/Update MIWI cluster in local
[x] CI
[x] e2e
Is there any documentation that needs to be updated for this PR?
Not yet.
How do you know this will function as expected in production?
Feature is not in production yet.