-
Notifications
You must be signed in to change notification settings - Fork 296
prowgen: IaaS-agnostic src installer tests #21
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -293,17 +293,18 @@ type TestStepConfiguration struct { | |
| Secret *Secret `json:"secret,omitempty"` | ||
|
|
||
| // Only one of the following can be not-null. | ||
| ContainerTestConfiguration *ContainerTestConfiguration `json:"container,omitempty"` | ||
| OpenshiftAnsibleClusterTestConfiguration *OpenshiftAnsibleClusterTestConfiguration `json:"openshift_ansible,omitempty"` | ||
| OpenshiftAnsibleSrcClusterTestConfiguration *OpenshiftAnsibleSrcClusterTestConfiguration `json:"openshift_ansible_src,omitempty"` | ||
| OpenshiftAnsibleCustomClusterTestConfiguration *OpenshiftAnsibleCustomClusterTestConfiguration `json:"openshift_ansible_custom,omitempty"` | ||
| OpenshiftAnsible40ClusterTestConfiguration *OpenshiftAnsible40ClusterTestConfiguration `json:"openshift_ansible_40,omitempty"` | ||
| OpenshiftAnsibleUpgradeClusterTestConfiguration *OpenshiftAnsibleUpgradeClusterTestConfiguration `json:"openshift_ansible_upgrade,omitempty"` | ||
| OpenshiftInstallerClusterTestConfiguration *OpenshiftInstallerClusterTestConfiguration `json:"openshift_installer,omitempty"` | ||
| OpenshiftInstallerSrcClusterTestConfiguration *OpenshiftInstallerSrcClusterTestConfiguration `json:"openshift_installer_src,omitempty"` | ||
| OpenshiftInstallerUPIClusterTestConfiguration *OpenshiftInstallerUPIClusterTestConfiguration `json:"openshift_installer_upi,omitempty"` | ||
| OpenshiftInstallerConsoleClusterTestConfiguration *OpenshiftInstallerConsoleClusterTestConfiguration `json:"openshift_installer_console,omitempty"` | ||
| OpenshiftInstallerRandomClusterTestConfiguration *OpenshiftInstallerRandomClusterTestConfiguration `json:"openshift_installer_random,omitempty"` | ||
| ContainerTestConfiguration *ContainerTestConfiguration `json:"container,omitempty"` | ||
| OpenshiftAnsibleClusterTestConfiguration *OpenshiftAnsibleClusterTestConfiguration `json:"openshift_ansible,omitempty"` | ||
| OpenshiftAnsibleSrcClusterTestConfiguration *OpenshiftAnsibleSrcClusterTestConfiguration `json:"openshift_ansible_src,omitempty"` | ||
| OpenshiftAnsibleCustomClusterTestConfiguration *OpenshiftAnsibleCustomClusterTestConfiguration `json:"openshift_ansible_custom,omitempty"` | ||
| OpenshiftAnsible40ClusterTestConfiguration *OpenshiftAnsible40ClusterTestConfiguration `json:"openshift_ansible_40,omitempty"` | ||
| OpenshiftAnsibleUpgradeClusterTestConfiguration *OpenshiftAnsibleUpgradeClusterTestConfiguration `json:"openshift_ansible_upgrade,omitempty"` | ||
| OpenshiftInstallerClusterTestConfiguration *OpenshiftInstallerClusterTestConfiguration `json:"openshift_installer,omitempty"` | ||
| OpenshiftInstallerSrcClusterTestConfiguration *OpenshiftInstallerSrcClusterTestConfiguration `json:"openshift_installer_src,omitempty"` | ||
| OpenshiftInstallerUPIClusterTestConfiguration *OpenshiftInstallerUPIClusterTestConfiguration `json:"openshift_installer_upi,omitempty"` | ||
| OpenshiftInstallerConsoleClusterTestConfiguration *OpenshiftInstallerConsoleClusterTestConfiguration `json:"openshift_installer_console,omitempty"` | ||
| OpenshiftInstallerRandomClusterTestConfiguration *OpenshiftInstallerRandomClusterTestConfiguration `json:"openshift_installer_random,omitempty"` | ||
| OpenshiftInstallerSrcRandomClusterTestConfiguration *OpenshiftInstallerSrcRandomClusterTestConfiguration `json:"openshift_installer_src_random,omitempty"` | ||
| } | ||
|
|
||
| // Secret describes a secret to be mounted inside a test | ||
|
|
@@ -440,6 +441,11 @@ type OpenshiftInstallerUPIClusterTestConfiguration struct { | |
| // chosen randomly and runs conformance tests. | ||
| type OpenshiftInstallerRandomClusterTestConfiguration struct{} | ||
|
|
||
| // OpenshiftInstallerSrcRandomClusterTestConfiguration describes a | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, someone actually reads those? =p
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A fluke :D |
||
| // that provisions a cluster using openshift-installer in a provider | ||
| // chosen randomly and executes a command in the `src` image. | ||
| type OpenshiftInstallerSrcRandomClusterTestConfiguration struct{} | ||
|
|
||
| // PipelineImageStreamTagReference is a tag on the | ||
| // ImageStream corresponding to the code under test. | ||
| // This tag will identify an image but not use any | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,3 +43,6 @@ tests: | |
| - as: e2e-random | ||
| commands: make e2e | ||
| openshift_installer_random: {} | ||
| - as: e2e-random-src | ||
| commands: make e2e | ||
| openshift_installer_src_random: {} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know this only follows what was done for the first template, but I only noticed now. If we intend ci-operator files to be usable (readable/writable) by humans, we should avoid non-intuitive clutter like this, even for a cost of slightly more complicated implementation. How hard would it be to make it: ? It's probaby not a matter of this PR, but I think we're still early enough in the IaaS-agnostic job work to make that change.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That makes sense, I didn't really think about it too long before deciding on the name. How about omitting the cluster profile altogether? I don't really like
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I liked what you proposed at first (even wrote a comment in that direction), but after more thinking I think we should keep the explicit config. I think the agnostic behavior could make a good default, but its not intuitive to whoever is trying to read and write these configs. We know every bit and quirk of it, but that's not the case for everyone. (to be entirely clear, I did not originally like the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some API Objects have a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ignoring the problem of how to structure the configuration (more on that below) I think If the test needs a cluster, use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As for the configuration, we have these test types (ignoring
I don't particularly like the empty dictionary, but there are examples even in Kubernetes (e.g.). Adding an extra field to all types seems silly in this case: unless we default the value if one of the pointers is set, which doesn't seem very ellegant either, we would end up with: type: container
container:
# …Additionally, if we ever add a field to the cluster types (
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'm trying to imagine this from the PoV of a generic OpenShift engineer who does not know ci-operator configs very well. Currently the config is telling them quite well what they have set up, "smart" defaults defeat that. The details of what cluster is created should not concern them: This IMHO makes sense only from high-level, not from individual's PoV.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not really, the point of k8s and openshift in general is to be portable cross-cloud and not worry at all, so the default idea that it matters not which infra is underneath is a good one.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good discussion. I'm not entirely convinced, but I do not need to be. I'm OK with making it that way. |
||
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.
Both branches are the same, is this intentional? Looks correct, but then an OR instead of a separate
ifmay be in order.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.
It was supposed to keep the line short(er), using those names is a bit ridiculous. I'll change to an
||.