-
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
Preflight update and tests #3686
Conversation
/azp run ci,e2e |
Azure Pipelines successfully started running 2 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.
lgtm!
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.
Thanks for the continued work here! I don't have anything blocking, but I think updating the SprintF to a template execution could be warranted here if desired.
`, apiVersion, clusterId, api.ExampleOpenShiftClusterDocument().OpenShiftCluster.Name, | ||
api.ExampleOpenShiftClusterDocument().OpenShiftCluster.Type, | ||
location, defaultProfile, resourceGroup, api.EncryptionAtHostEnabled, version.DefaultInstallStream.Version.String(), | ||
mockSubID, mockSubID, netProfile, netProfile, api.VMSizeStandardD32sV3, masterSub, | ||
api.EncryptionAtHostEnabled, encryptionSet, | ||
api.ExampleOpenShiftClusterDocument().OpenShiftCluster.Properties.WorkerProfiles[0].Name, api.VMSizeStandardD32sV3, | ||
api.ExampleOpenShiftClusterDocument().OpenShiftCluster.Properties.WorkerProfiles[0].DiskSizeGB, | ||
api.EncryptionAtHostEnabled, workerSub, | ||
api.ExampleOpenShiftClusterDocument().OpenShiftCluster.Properties.WorkerProfiles[0].Count, | ||
encryptionSet, api.VisibilityPublic, defaultProfile, api.VisibilityPublic, | ||
api.ExampleOpenShiftClusterDocument().OpenShiftCluster.Properties.IngressProfiles[0].IP)) |
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.
nit: 28 ordered parameters is going to be hard to maintain over time - if it's easy enough, can we convert this to a golang string template, and then populate it with named parameters rather than ordered ones?
Resources: []json.RawMessage{ | ||
[]byte(fmt.Sprintf(` | ||
{ | ||
"apiVersion": "%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.
nit: same as above - now thinking this should be wrapped in a function call, where you pass it a map of variables.
Merging with approvals for now, but @carvalhe let's try and get Brendan's ideas in a separate PR if possible. Thanks! |
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. 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: #3365 but it was getting messy, and needed to move off the forked branch so that E2E tests would work correctly.
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. Preflight is also marked for testing and won't hit live until another PR in the future sets that value.