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

Display "Interactive mode enabled" only when running odo init interactively #6100

Conversation

rm3l
Copy link
Member

@rm3l rm3l commented Sep 6, 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 #5957

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:
Running odo init non-interactively should no longer display the "Interactive mode enabled, please answer the following questions" message.

@netlify
Copy link

netlify bot commented Sep 6, 2022

Deploy Preview for odo-docusaurus-preview ready!

Name Link
🔨 Latest commit b48425e
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/63185076484e810009184f64
😎 Deploy Preview https://deploy-preview-6100--odo-docusaurus-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 6, 2022
@openshift-ci openshift-ci bot requested review from feloy and rnapoles-rh September 6, 2022 16:10
@rm3l rm3l requested review from valaparthvi and cdrage and removed request for rnapoles-rh September 6, 2022 16:12
@odo-robot
Copy link

odo-robot bot commented Sep 6, 2022

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

@odo-robot
Copy link

odo-robot bot commented Sep 6, 2022

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

@odo-robot
Copy link

odo-robot bot commented Sep 6, 2022

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

@odo-robot
Copy link

odo-robot bot commented Sep 6, 2022

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

@odo-robot
Copy link

odo-robot bot commented Sep 6, 2022

OpenShift Tests on commit b8b0649 finished successfully.
View logs: TXT HTML

@feloy
Copy link
Contributor

feloy commented Sep 6, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Sep 6, 2022
log.Info("\nInteractive mode enabled, please answer the following questions:")
if len(o.flags) == 0 {
log.Infof("\n%s", messages.InteractiveModeEnabled)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a print statement here printing a new line? Currently the message Dowloading devfile ... displayed seems very compact.
Screenshot from 2022-09-07 11-17-44

Copy link
Contributor

Choose a reason for hiding this comment

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

Or do we want to keep the header for the non-interactive command?

Copy link
Member Author

Choose a reason for hiding this comment

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

I find the header to provide helpful information about what the command is doing, even in non-interactive mode. It is also displayed in other non-interactive commands like odo deploy. For consistency, I think I'll keep the header for now, and print a new line before "Downloading devfile ...".

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought you were going to add a header to odo init's non-interactive mode. Were you?

Copy link
Member Author

Choose a reason for hiding this comment

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

The header is what we already have in both non-interactive and interactive modes: the logo, the "Initializing new component" and "odo version" messages.
Unless I've misunderstood the comments, I kept this header as it is now, but simply added a new line after it.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Sep 7, 2022
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 7, 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

@rm3l rm3l requested review from feloy and valaparthvi September 7, 2022 08:06
@valaparthvi
Copy link
Contributor

/approve

@openshift-ci
Copy link

openshift-ci bot commented Sep 7, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: valaparthvi

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Sep 7, 2022
@feloy
Copy link
Contributor

feloy commented Sep 7, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Sep 7, 2022
@feloy
Copy link
Contributor

feloy commented Sep 7, 2022

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

Tests pass on IBM Cloud

@openshift-ci
Copy link

openshift-ci bot commented Sep 7, 2022

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

In response to this:

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

Tests pass on IBM Cloud

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.

@rm3l
Copy link
Member Author

rm3l commented Sep 7, 2022

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

@openshift-ci
Copy link

openshift-ci bot commented Sep 7, 2022

@rm3l: Overrode contexts on behalf of rm3l: ci/prow/v4.10-integration-e2e

In response to this:

/override ci/prow/v4.10-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 1d719f0 into redhat-developer:main Sep 7, 2022
@rm3l rm3l deleted the 5957-running-odo-init-non-interactively-says-interactive-mode-enabled branch September 7, 2022 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. 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.

Running odo init non-interactively says "Interactive mode enabled"
4 participants