Skip to content
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

Delay the display of warnings related to experimental features #6375

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Dec 5, 2022

What type of PR is this:

/kind bug

What does this PR do / why we need it:

Which issue(s) this PR fixes:

Fixes #6374

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

@netlify
Copy link

netlify bot commented Dec 5, 2022

Deploy Preview for odo-docusaurus-preview canceled.

Name Link
🔨 Latest commit f9d807c
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/638db7149b84cc0009055753

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 5, 2022
@openshift-ci openshift-ci bot requested a review from kadel December 5, 2022 09:17
@odo-robot
Copy link

odo-robot bot commented Dec 5, 2022

NoCluster Tests on commit eaf9337 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 5, 2022

Unit Tests on commit eaf9337 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 5, 2022

Validate Tests on commit eaf9337 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 5, 2022

Kubernetes Tests on commit eaf9337 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 5, 2022

Windows Tests (OCP) on commit eaf9337 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Dec 5, 2022

OpenShift Tests on commit eaf9337 finished with errors.
View logs: TXT HTML

Copy link
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Dec 5, 2022
@valaparthvi
Copy link
Member

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label Dec 5, 2022
@valaparthvi
Copy link
Member

I think the behavior even after this fix is weird. This might not be related to this PR, but I'd like to talk about it anyway.

➜  ODO_EXPERIMENTAL_MODE=true odo list component
Experimental mode enabled for flag: --run-on. Use at your own risk. More details on https://odo.dev/docs/user-guides/advanced/experimental-mode
 ⚠  No connection to cluster defined
 ✓  Listing components from namespace '' 
 NAME      PROJECT TYPE  RUNNING IN  MANAGED 
 * nodejs  nodejs        None        Unknown 

Here I do not use --run-on flag with my command and yet I see the warning. I think the warning must only be displayed if the feature in question is used, regardless of whether the ODO_EXPERIMENTAL_MODE is set. WDYT?

@rm3l
Copy link
Member

rm3l commented Dec 5, 2022

I think the behavior even after this fix is weird. This might not be related to this PR, but I'd like to talk about it anyway.

➜  ODO_EXPERIMENTAL_MODE=true odo list component
Experimental mode enabled for flag: --run-on. Use at your own risk. More details on https://odo.dev/docs/user-guides/advanced/experimental-mode
 ⚠  No connection to cluster defined
 ✓  Listing components from namespace '' 
 NAME      PROJECT TYPE  RUNNING IN  MANAGED 
 * nodejs  nodejs        None        Unknown 

Here I do not use --run-on flag with my command and yet I see the warning. I think the warning must only be displayed if the feature in question is used, regardless of whether the ODO_EXPERIMENTAL_MODE is set. WDYT?

Indeed. At the moment, this message might be displayed every time we call feature.IsEnabled to see if a given feature is enabled or not (even if we are not using it afterward).
Maybe we could just display a more global warning at the beginning, stating that the specified command is running in experimental mode when we detect that ODO_EXPERIMENTAL_MODE is true.

@rm3l
Copy link
Member

rm3l commented Dec 6, 2022

I think the behavior even after this fix is weird. This might not be related to this PR, but I'd like to talk about it anyway.

➜  ODO_EXPERIMENTAL_MODE=true odo list component
Experimental mode enabled for flag: --run-on. Use at your own risk. More details on https://odo.dev/docs/user-guides/advanced/experimental-mode
 ⚠  No connection to cluster defined
 ✓  Listing components from namespace '' 
 NAME      PROJECT TYPE  RUNNING IN  MANAGED 
 * nodejs  nodejs        None        Unknown 

Here I do not use --run-on flag with my command and yet I see the warning. I think the warning must only be displayed if the feature in question is used, regardless of whether the ODO_EXPERIMENTAL_MODE is set. WDYT?

As discussed in standup, this is a valid point but not related to this PR.
I've created a separate issue for this: #6381

So I'm removing the hold to unblock other PRs waiting on this one.

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label Dec 6, 2022
@rm3l rm3l closed this Dec 6, 2022
@rm3l rm3l reopened this Dec 6, 2022
@sonarcloud
Copy link

sonarcloud bot commented Dec 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@feloy
Copy link
Contributor Author

feloy commented Dec 6, 2022

/override OpenShift-Integration-tests/OpenShift-Integration-tests
Flaky e2e test

@openshift-ci
Copy link

openshift-ci bot commented Dec 6, 2022

@feloy: Overrode contexts on behalf of feloy: OpenShift-Integration-tests/OpenShift-Integration-tests

In response to this:

/override OpenShift-Integration-tests/OpenShift-Integration-tests
Flaky e2e test

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.

@feloy
Copy link
Contributor Author

feloy commented Dec 6, 2022

/override ci/prow/v4.11-integration-e2e

@openshift-ci
Copy link

openshift-ci bot commented Dec 6, 2022

@feloy: Overrode contexts on behalf of feloy: ci/prow/v4.11-integration-e2e

In response to this:

/override ci/prow/v4.11-integration-e2e

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.

@openshift-merge-robot openshift-merge-robot merged commit 623a145 into redhat-developer:main Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Message displayed with Experimental mode is displayed in JSON output
4 participants