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
USHIFT-704: skip [sig-cli] whoami result with console for MicroShift #28005
USHIFT-704: skip [sig-cli] whoami result with console for MicroShift #28005
Conversation
@chiragkyal: This pull request references USHIFT-704 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Skipping CI for Draft Pull Request. |
05f4633
to
0d68217
Compare
test/extended/cli/basics.go
Outdated
@@ -250,6 +250,11 @@ var _ = g.Describe("[sig-cli] oc basics", func() { | |||
}) | |||
|
|||
g.It("can show correct whoami result with console", func() { | |||
nsExist, err := exutil.IsNamespaceExist(oc, "openshift-config-managed") |
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.
How is that namespace related to this test? Is that where the console runs? Or does the whoami command use information from that namespace?
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.
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 console is an optional component now. What does whoami
do if the namespace exists but the console URL is empty? Maybe there's a bug in whoami
for this more extreme case where the console URL cannot be determined?
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 only is an issue if the "--show-console" arg is specified. If you specify that arg when you don't have the console enabled, you'll get an error but that should not be surprising.
i feel like we had to deal w/ this for the "nocaps" e2e job, but since this test doesn't seem to contain any logic to check for which caps are enabled, i'm not sure how we ended up doing that.
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.
118d288 adds this test to a set annotated with [Skipped:NoOptionalCapabilities]
. In test/extended/util/annotate/rules.go that maps to requires-optional-cap
, which is left out of no optional capabilities
in the test case list defined in TestDecodeProvider
. That entry has platform set to GCE, though, and MicroShift runs the tests with provider none
.
Can we do something else in the setup before running the tests for MicroShift to indicate that all capabilities are disabled and that no optional capabilities
configuration should be used? Do we need another entry in the list in TestDecodeProvider
for MicroShift?
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.
Do we need another entry in the list in TestDecodeProvider for MicroShift?
No, that's just a test case for ensuring we detect/decode clusters correctly (so that we can pick the right set of tests). I think you need to update the cluster discovery logic to recognize a "microshift" cluster and set the EnabledCapabilities accordingly:
origin/cmd/openshift-tests/provider.go
Line 78 in 5c4887a
func decodeProvider(provider string, dryRun, discover bool, clusterState *exutilcluster.ClusterState) (*exutilcluster.ClusterConfiguration, error) { |
origin/test/extended/util/cluster/cluster.go
Lines 149 to 153 in 5c4887a
clusterVersion, err := configClient.ConfigV1().ClusterVersions().Get(context.Background(), "version", metav1.GetOptions{}) | |
if err != nil { | |
return nil, err | |
} | |
state.OptionalCapabilities = clusterVersion.Status.Capabilities.EnabledCapabilities |
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've updated the decodeProvider logic to recognize a "microshift" cluster and set config.HasNoOptionalCapabilities = true
. However, the [Skipped:NoOptionalCapabilities]
annotation doesn't seem to be getting enabled for this test. Any suggestions that I may be missing here?
/retest |
a56ec6e
to
a36c1c2
Compare
cmd/openshift-tests/provider.go
Outdated
} | ||
if isMicroShift { | ||
config.HasNoOptionalCapabilities = true | ||
} |
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.
are you sure you're ending on up in the "Default" provider case when running against a microshift cluster?
should be easy enough to run locally w/ some debug statements and see what's actually happening when the detection logic runs
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.
No, it should be inside "none" case. There was something wrong with my MicroShift cluster which leads all debug statements to go inside "Default" case.
I've added it now in "none" case.
cmd/openshift-tests/provider.go
Outdated
if err != nil { | ||
return nil, err | ||
} | ||
isMicroShift, err := exutil.IsMicroShiftCluster(coreClient) |
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 would do this in "DiscoverClusterState" and not "decodeProvider".
The provider is irrelevant
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.
Most of the cluster state logic checks inside "DiscoverClusterState" are not applicable for MicroShift. For example:
infrastructures.config.openshift.io
networks.operator.openshift.io
clusterversion
If we conditionally try to skip the above checks based on IsMicroShiftCluster()
in "DiscoverClusterState", then I think, we also need to update "LoadConfig()", which would be called after "DiscoverClusterState".
/cc @pacevedom
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.
yeah ok, since we don't call DiscoverClusterState in the case of provider==none, it's not a good fit.
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.
Agree with Ben, even though the name might be misleading because its more discovery than decoding.
a36c1c2
to
a57105d
Compare
lgtm, is there a microshift job we can run this PR against? |
Not yet. Currently, one by one we are fixing the tests which are failing in MicroShift. Ultimately, our target is to have a working job, passing all the tests. |
a57105d
to
4a72ef7
Compare
/approve |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bparees, chiragkyal, dhellmann The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest-required |
/retest-required |
/hold Revision 4a72ef7 was retested 3 times: holding |
/unhold |
/retest-required |
1 similar comment
/retest-required |
/hold Revision 4a72ef7 was retested 3 times: holding |
/unhold |
/retest-required |
/hold Revision 4a72ef7 was retested 3 times: holding |
/unhold |
/retest-required |
@chiragkyal: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
This change will skip
"[sig-cli] oc basics can show correct whoami result with console [Skipped:NoOptionalCapabilities] [Suite:openshift/conformance/parallel]"
test by adding NoOptionalCapabilities for MicroShift