-
Notifications
You must be signed in to change notification settings - Fork 243
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
Updates odo init output, fixes colorized output for tests. #5613
Updates odo init output, fixes colorized output for tests. #5613
Conversation
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
/retest |
e501bd9
to
6caf0ba
Compare
/retest |
a386247
to
ff4bda6
Compare
This assumes that the user will always download a starter project, while they can choose not to do so. I am likely nitpicking, but felt like pointing out nevertheless. |
ff4bda6
to
61073c2
Compare
@cdrage Indeed, it looks like the tests for this PR are not passing because of the welcoming messages added as part of #5514 |
61073c2
to
1e28f26
Compare
/hold Trying to fix an issue with tests not passing... |
1e28f26
to
91ac20e
Compare
91ac20e
to
c26b55b
Compare
/hold cancel |
pkg/component/component.go
Outdated
const NoSourceCodeDetected = "Files: Source code detected, a Devfile will be determined based upon source code autodetection" | ||
const SourceCodeDetected = "Files: No source code detected, a starter project will be created in the current directory" |
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 names are misplaced.
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.
Woops! Thank you
<!-- Thank you for opening a PR! Here are some things you need to know before submitting: 1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Dev:-odo-Dev-Guidelines 2. Label this PR accordingly with the '/kind' line 3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Dev:-Writing-and-running-tests 4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/Pull-Requests:-Review-guideline Documentation: If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Documentation:-Contributing --> **What type of PR is this:** <!-- Add one of the following kinds: /kind bug /kind cleanup /kind tests /kind documentation Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well. --> /kind feature **What does this PR do / why we need it:** We have the logo appearing in `odo dev` and `odo deploy` Those 3 commands are the most used with `odo`, and the ones that are most used. All three should have similar and consistent output that contains: * What the component is doing (first line) * What's detected (in odo init, it's the files, in odo deploy and dev it's the component name) * odo version that is being used / outputted. ```sh $ odo init __ / \__ Initializing a new component \__/ \ Files: No source code detected, a starter project will be created in the current directory / \__/ odo version: v2.5.0 \__/ Interactive mode enabled, please answer the following questions: ? Select language: javascript ? Select project type: Next.js ✓ Downloading devfile "nodejs-nextjs" from registry "DefaultDevfileRegistry" [450ms] ? Which starter project do you want to use? nodejs-nextjs-starter ? Enter component name: my-nodejs-nextjs-app ✓ Downloading starter project "nodejs-nextjs-starter" [516ms] Your new component 'my-nodejs-nextjs-app' is ready in the current directory. To start editing your component, use 'odo dev' and open this folder in your favorite IDE. Changes will be directly reflected on the cluster. ``` **Which issue(s) this PR fixes:** <!-- Specifying the issue will automatically close it when this PR is merged --> N/A **PR acceptance criteria:** - [X] Unit test - [X] Integration test - [X] Documentation **How to test changes / Special notes to the reviewer:** N/A Signed-off-by: Charlie Drage <charlie@charliedrage.com>
c26b55b
to
0bf9369
Compare
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 added few comments. Let me know what you think.
Signed-off-by: Charlie Drage <charlie@charliedrage.com>
a7cc711
to
e21175e
Compare
Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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 changes.
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feloy 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 |
…veloper#5613) * Update vendoring for coloring to add NO_COLOR * Updates odo init output / adds logo <!-- Thank you for opening a PR! Here are some things you need to know before submitting: 1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Dev:-odo-Dev-Guidelines 2. Label this PR accordingly with the '/kind' line 3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Dev:-Writing-and-running-tests 4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/Pull-Requests:-Review-guideline Documentation: If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Documentation:-Contributing --> **What type of PR is this:** <!-- Add one of the following kinds: /kind bug /kind cleanup /kind tests /kind documentation Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well. --> /kind feature **What does this PR do / why we need it:** We have the logo appearing in `odo dev` and `odo deploy` Those 3 commands are the most used with `odo`, and the ones that are most used. All three should have similar and consistent output that contains: * What the component is doing (first line) * What's detected (in odo init, it's the files, in odo deploy and dev it's the component name) * odo version that is being used / outputted. ```sh $ odo init __ / \__ Initializing a new component \__/ \ Files: No source code detected, a starter project will be created in the current directory / \__/ odo version: v2.5.0 \__/ Interactive mode enabled, please answer the following questions: ? Select language: javascript ? Select project type: Next.js ✓ Downloading devfile "nodejs-nextjs" from registry "DefaultDevfileRegistry" [450ms] ? Which starter project do you want to use? nodejs-nextjs-starter ? Enter component name: my-nodejs-nextjs-app ✓ Downloading starter project "nodejs-nextjs-starter" [516ms] Your new component 'my-nodejs-nextjs-app' is ready in the current directory. To start editing your component, use 'odo dev' and open this folder in your favorite IDE. Changes will be directly reflected on the cluster. ``` **Which issue(s) this PR fixes:** <!-- Specifying the issue will automatically close it when this PR is merged --> N/A **PR acceptance criteria:** - [X] Unit test - [X] Integration test - [X] Documentation **How to test changes / Special notes to the reviewer:** N/A Signed-off-by: Charlie Drage <charlie@charliedrage.com> * Update based on reviews Signed-off-by: Charlie Drage <charlie@charliedrage.com> * Update based on review Signed-off-by: Charlie Drage <charlie@charliedrage.com>
What type of PR is this:
/kind feature
What does this PR do / why we need it:
We have the logo appearing in
odo dev
andodo deploy
.Those 3 commands are the most used with
odo
, and the ones that aremost used. All three should have similar and consistent output that
contains:
it's the component name)
We also
NO_COLOR
supportWhich issue(s) this PR fixes:
N/A
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer:
N/A
Signed-off-by: Charlie Drage charlie@charliedrage.com