* Wrap warning messages to make them more visible
For example, instead of displaying:
```
⚠ You are using "default" project, odo may not work as expected in the default project.
```
We are now displaying:
```
========================================================================================
⚠ You are using "default" project, odo may not work as expected in the default project.
========================================================================================
```
* Display warning message about default project/namespace in a single block
* Add unit test
* Fix sample outputs for doc automation tests
* Revert "Fix sample outputs for doc automation tests"
This reverts commit 98a6554c34.
* Ignore '===' warning header and footer for doc automation tests
* Display Git commit ID in output of odo commands where the version is displayed
This covers:
- odo init
- odo dev
- odo deploy
Displaying the commit ID (same as in `odo version`) will help quickly pinpoint the exact commit without having to run `odo version`.
See #6131 for more context
* Append the state of the working tree next to the Git commit ID
`git describe` is much more helpful to quickly understand the state of the working tree.
For backward compatibility, we are defaulting to `git rev-parse`,
just in case `git describe` does not work correctly.
* Fix integration tests
* Fix doc automation tests
Strip the Git commit ID from the full odo version string
prior to comparing the outputs.
We still want to compare the tag displayed.
* Display a generic Experimental mode warning message when this mode is enabled
This fixes the issue of having this warning displayed for a specific feature
that might not be used by the user.
Instead, we are now displaying a more generic and feature-agnostic warning
message once.
* Drop useless 'id' field in OdoFeature struct
* Add support for an experimental mode at the CLI level
This is backed by an "ODO_EXPERIMENTAL_MODE" environment variable.
* Mark the generic '--run-on' flag as experimental
Besides being hidden, it will error out as invalid flag
if the ODO_EXPERIMENTAL_MODE env var is not set to 'true'.
* Add integration test cases
* Document the experimental mode.
* fixup! Add support for an experimental mode at the CLI level
* fixup! Mark the generic '--run-on' flag as experimental
* Update odo to use go 1.18
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
* Update golangci-lint version in Makefile
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
* Use go 1.18, not go 1.19
Erroneously I had used go 1.19 at various places.
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
* Rearrange imports; fix golangci-lint errors
Fixed a bunch of golangci-lint errors like below:
`File is not `gofmt`-ed with `-s``
using the command: `golangci-lint run --fix`
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
* Use go install instead of go get
This is because with go 1.18, `go get` behaves as `go get -d` by
default. Which means that it will only download, but not install.
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
* Allow specifying message to end the spinner with
For certain long running tasks, we need to specify a message that
doesn't confuse the user when the spinnner ends. This commit adds
`EndWithStatus` which is a wrapper on top of `End` and lets the
developer specify a custom message to end the spinner with.
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
* Update pkg/devfile/adapters/kubernetes/component/commandhandler.go
Co-authored-by: Armel Soro <armel@rm3l.org>
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
Co-authored-by: Armel Soro <armel@rm3l.org>
* Create auxialiary functions to find current deployment and pod name
* Create auxialiary function for pushing Kubernetes components to cluster
* Auxiliary function getPushDevfileCommands and remocve RunModeChanged flag as it is not possible anymore with long running dev command
+ move prelimiray tests at the beginning
* Create auxiliary function updatePVCsOwnerReferences + move isMainStorageEphemeral inside aux. function
* Watch for deployments in addition to watching for files during odo dev
* - Check the Deployment Generation to return earlier when generation changed
- Return earlier when pod is not ready
* Push receives a Status that it can update, to indicate the status of the component when the function returns. This status is passed from Start to Watch
* Use status to decide to sync files
* Simplify getting pod
* Status for PostStartEvents
* - Touch .gitignore earlier so it is not synced
- Add devstate.jso file to .gitignore
* Fix the integration tests.
* Make --no-watch work again
* Get smaller volumes for tests
* Quit when fail to exec port forwarding
* Exponential delay after an error
* Fix: get running pod
* Remove testing odo dev stops when the build command fails. odo dev now gives a change to the user to fix the problem
* Fix order or volumes and volume mounts in pod spec
* Use server side apply for updating PVC when supported
* Watch Devfile separately
* Adapt tests for devfile handled separately
* Update forwarded ports when necessary
* Display kubernetes resources created only when created/updated
* Do not set ResourceVersion when patching
* TEMP: Add more logs on failing integrattests
* Tests: select the *running* pod
* Use forward slashes for .gitignore content, even on Windows
* Rename GetOnePodFromSelector to GetRunningPodFromSelector
* Cleanup logs
* Fix 'odo log' integration test
* Add log "Waiting for Kubernetes resources"
* Fail if service bindings are not injected
* Rename sources related watcher, timer
* Fix delay after error
* Display info about Pod
* Disambiguate error messages
* Display events related to components pod
* Remove now unused functions used to wait for Deployment / Pod
* Typos + function renaming
* Do not watch devfile with --no-watch
* Use type switch for Kubernertes watch event
* Do not fail when watching Events is Forbidden
* Do not fail when servicebinding resources are forbidden
* Exit when build command fails on no-watch mode
* Sync devfile.yaml by default, workaround when commands change on devfile
* Rename to warningsWatcher
* Fix comment
* Refactor color througout interactive mode and dev
<!--
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 feature
/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 cleanup
**What does this PR do / why we need it:**
This PR fixes the following:
- Updates the interactive mode so it's better looking when outputting
configuration so it's similar to the rest of the output:
```sh
? Is this correct? Yes
✓ Downloading devfile "nodejs" from registry "DefaultDevfileRegistry" [1s]
↪ Container Configuration "runtime":
OPEN PORTS:
- 3000
ENVIRONMENT VARIABLES:
? Select container for which you want to change configuration? runtime
? What configuration do you want change? Delete port "3000"
? What configuration do you want change? NOTHING - configuration is correct
↪ Container Configuration "runtime":
OPEN PORTS:
ENVIRONMENT VARIABLES:
? Select container for which you want to change configuration? [Use arrows to move, type to filter]
runtime
> NONE - configuration is correct
```
- Removes issue of fgGreen not appearing correctly because of direct use
of `color` instead of log/status.go. This is due to color not
detecting if the terminal supports the color, which is done in
`log/status.go` instead.
**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->
Fixes https://github.com/redhat-developer/odo/issues/5843
**How to test changes / Special notes to the reviewer:**
Signed-off-by: Charlie Drage <charlie@charliedrage.com>
* Update to not use println in business layer
Signed-off-by: Charlie Drage <charlie@charliedrage.com>
* Add odo logs
* Nolint for random number generation
* Changes based on Philippe's PR review
* Add logs for `odo logs`
* Add nolint at the right place to fix unit tests
* Changes based on PR feedback
* Name the key in unstructured.Unstructured
* Name containers with same names as c, c1, c2
* Remove unused struct field
* Modify documentation to follow general pattern
* Undo the changes done in earlier commits
* odo logs help message is accurate
* Update docs/website/versioned_docs/version-3.0.0/command-reference/logs.md
Co-authored-by: Parthvi Vala <pvala@redhat.com>
* Fixes broken link rendering
* Correct the example used in odo logs doc
* Make container name clearer in odo logs output
* Wrap at 120 chars, not 80
* Fixes to the document after rebase mistake
Co-authored-by: Parthvi Vala <pvala@redhat.com>
* Adds odo registry command
<!--
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:**
This adds the `odo registry` command, to output the details of what's
in the registry.
It also implements the flags:
- `--filter`
- `--devfile`
- `--details`
This can be tested by typing in the `odo registry` command after adding
a registry (you should already have one by default)
**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->
Fixes https://github.com/redhat-developer/odo/issues/5524
**PR acceptance criteria:**
- [X] Unit test
- [X] Integration test
- [X] Documentation
**How to test changes / Special notes to the reviewer:**
`odo registry`
* Update based on review
Signed-off-by: Charlie Drage <charlie@charliedrage.com>
* List based on registry
Signed-off-by: Charlie Drage <charlie@charliedrage.com>
* Update tests + improve based on comments
* Move function down to business layer, fix tests
* Add business layer logic for sorting
* odo init -o json
* docs
* fix header and json
* Make DevfileLocation part of api package
* Add Component api kind
* odo init -o json return value
* Document api package
* Update tests
* review
* Error when json output and no flags
* Update doc
* review
* 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>
<!--
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:**
When using the spinner, we shouldn't output the spinner if it is less
than 1ms (nanoseconds).
**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->
Fixes https://github.com/redhat-developer/odo/issues/5380
**PR acceptance criteria:**
- [X] Unit test
N/A, unable to write (function could possibly be more than 1ns)
- [X] Integration test
N/A, unable to write (function could possibly be more than 1ns)
- [X] Documentation
**How to test changes / Special notes to the reviewer:**
```
odo create nodejs foobar
odo push
```
And you should see that all nanosecond spinners are no longer shown.
Signed-off-by: Charlie Drage <charlie@charliedrage.com>
* Adding deprecation warning for git based registries
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
* Adding tests for deprecation warning for git based registry
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
* Adding changelog
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
* Fixing gofmt
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
* Fixing gofmt
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
* Moving color sprint funcions inside if block
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
* Removing unnessasary comment
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
* Expanding url matching for github to github.com
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
* Combining outputs of out and err for matching
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
* Adding raw githubusercontent to git registry check
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
* Fixing as per comments by @valaparthvi
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
* Moving declarations to just before each
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
* Update go-git
* Add support for specifying branch and tag name
* Fix gosec error
Fix Integration test
* Added warning if commit id is used as revision
Added Integration tests
* fix devfile
* Fix failing test update tag version
* Address review comment 1
* refactor: simplify execution of devfile commands
Fixes#3518
* fix: remove mistakenly re-added PlatformAdapter interface
* refactor: move catalog list output to where it's actually needed
This simplifies the package organization by avoiding to import catalog-
related packages in the lower-level machine output package.
* feat: add LoggingClient method on ComponentAdapter interface
* refactor: rename all receivers similarly
* fix: typo
* refactor: ComponentAdapter implements ExecClient, simplify Execute
* fix: typo
* refactor: introduce GenericAdapter to share more code
* chore: remove now unneeded methods
* fix: update from master
* fix: improper code to ExecuteCommand
* fix: properly initialize Client in adapters
* fix: update tests
* chore: add docs [skip ci]
* refactor: expose component info factory methods
* feat: add ExplicitSpinner function
* refactor: simplify adapters using NewMachineEventLoggingClient factory
* refactor: introduce command concept following the composite pattern
Still needs a lot of work to accommodate composite-support changes
* refactor: re-implement command execution using composite commands
* refactor: re-organize command implementations in multiple files
* doc: document New and command
* fix: typo
* fix: change var name
* fix: improper check for composite command
* clean-up: unneeded code
* refactor: rename ExecuteDevfileCommandSynchronously more appropriately
* chore: re-add some tests
* fix: init the ComponentInfoFactories after the GenericAdapter is created
This is needed because the previous implementation resulted in the
componentInfo and supervisorComponentInfo variables capturing
uninitialized adapters and thus causing errors.
* chore: add documentation
* fix: use Errorf instead of Wrapf since there is no error to wrap
* fix: infinite loop
* fix: do not report an error if the supervisor container is not found
* fix: only start the supervisor if we found its container
* fix: remove redundant check
* fix: supervisor commands now use proper component info
Introduced newSupervisor*Command to encapsulate supervisor command
details.
* fix: do not add to composite if supervisor command is nil
* fix: supervisor start/stop should be more like regular simple commands
* fix: add newline at the end of output
* doc: add documentation
[skip ci]
* refactor: rename createFrom to createCommandFrom
* refactor: make sourcePath a const and move it where it's used
* fix: comment out failing tests
See #3685
* fix: typo
* doc: clarify simpleCommand's behavior with respect to commands
[skip ci]
* feat: do not show spinner if message is empty
* fix: do not show spinner for stop command
* fix: remove unneeded fmt.Sprintf call
* chore: update after rebase
* Build progress does not show correctly when the command line is too long
* Build progress does not show correctly when the command line is too long
* Build progress does not show correctly when the command line is too long
* Build progress does not show correctly when the command line is too long
**What type of PR is this?**
/kind feature
**What does does this PR do / why we need it**:
This PR:
- Adds more information when deploying via "WaitAndGetPod". We parse
the current events which are happening and then look for event counts
which have occured more than 5 times. We then output this information
with the spinner in order to help the user determine what's taking so
long to deploy
- Collect event information that's outputted when it fails with a
table.
- Changes how we output errors
Example outputs:
```sh
▶ odo push -f
Validation
✓ Checking component [122ms]
Configuration changes
✓ Initializing component
✓ Creating component [733ms]
Pushing to component nodejs-nodejs-ex-dorv of type local
✗ Waiting for component to start [5s]
ERROR:
waited 5s but was unable to find a running pod matching selector: 'deploymentconfig=nodejs-nodejs-ex-dorv-app'
```
```sh
~/openshift/nodejs-ex master ✗ 28d ⚑ ◒
▶ odo push -f
Validation
✓ Checking component [134ms]
Configuration changes
✓ Initializing component
✓ Creating component [417ms]
Pushing to component nodejs-nodejs-ex-dorv of type local
✗ Waiting for component to start [5s] [WARNING x5: FailedScheduling, use `-v` for more information.]
ERROR:
waited 5s but was unable to find a running pod matching selector: 'deploymentconfig=nodejs-nodejs-ex-dorv-app'
For more information to help determine the cause of the error, re-run with '-v'.
See below for a list of failed events that occured more than 5 times during deployment:
+----------------------------------------------------+-------+------------------+-------------------------------------+
| NAME | COUNT | REASON | MESSAGE |
+----------------------------------------------------+-------+------------------+-------------------------------------+
| nodejs-nodejs-ex-dorv-app-1-r46cg.15f66f7d73693e5c | 15 | FailedScheduling | persistentvolumeclaim |
| | | | "nodejs-nodejs-ex-dorv-app-s2idata" |
| | | | not found |
| nodejs-nodejs-ex-dorv-app-1-vn8vd.15f66f8482ee88f6 | 5 | FailedScheduling | persistentvolumeclaim |
| | | | "nodejs-nodejs-ex-dorv-app-s2idata" |
| | | | not found |
+----------------------------------------------------+-------+------------------+-------------------------------------+
```
**Which issue(s) this PR fixes**:
Fixes https://github.com/openshift/odo/issues/2244
**How to test changes / Special notes to the reviewer**:
Run a test application like so:
```sh
git clone https://github.com/openshift/nodejs-ex
odo create node js
odo preference set PushTimeout
watch -n 1 oc delete pvc --all
odo push -f
```
**What kind of PR is this?**
<!--
DELETE the kind(s) which are not applicable before opening the PR.
-->
/kind code refactorting
/kind docs
/kind enhancement
**What does does this PR do / why we need it**:
This PR:
- Adds italic font when outputting what to "do next". Essentially, when
using log.Info it's for a "bold" or "title" log. When using log.Italic
it's mainly used for when we want to say to the user what to do next,
such as using `odo push` to propagate changes
- Removes random periods which aren't suppose to be there (all output
should not be sentences with periods)
**Which issue(s) this PR fixes**:
N/A
**How to test changes / Special notes to the reviewer**:
Run: `odo create nodejs` or any other similar commands, such as `odo
url create` which have "next steps" in them.
Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Changes the update information to display at italic in order to not get
mixed in with the other output.
Also remove the quotes for `odo preference set UpdateNotification false`
so it's easier to copy-and-paste from the terminal.
To test:
1. Modify pkg/odo/cli/version/version.go VERSION var to "v1.0.0-beta4"
or any version previous
2. Compile
3. Run a standard create command `odo create nodejs`
This PR:
- Makes `-o` or `--output` a global parameter
- Disables logging completely when performing `-o json`, including
using verbosity `-v`
- Fixes a minor bug within some commands where `-o json` wasn't
detected corretly due to a local flag being used `outputFlag` rather
than `OutputFlag`
* Switch to using string-based formatting for time elapsed
This PR:
- Uses string based formatting for the time
- No longer uses "%v" with time.Duration, so there are no
false-positives when displaying the time
Closes https://github.com/openshift/odo/issues/1811
* Start time not being set in verbose
* List apps deployed via servers within odo app list
This PR:
- Updates `odo app list` to also include services
- Adds tests to both GetDeploymentConfigLabelValues as well as
GetServiceInstanceLabelValues
To replicate:
```sh
▶ ./odo app list
The project 'myproject' has the following applications:
NAME
app
app2
```
Closes https://github.com/openshift/odo/issues/1730
* Change wording
* Adds a timer to UI / UX output
Adds a timer to the UI / UX:
```sh
Validation
✓ Validating component [5s]
✓ Checking component [6s]
Configuration changes
✓ Applying configuration [808ms]
Applying URL changes
✓ URL myurl2 already exists
Pushing to component nodejs-lhov of type local
✓ Waiting for component to start [61ms]
✓ Copying files to component [3s]
✓ Building component [6s]
✓ Changes successfully pushed to component
```
Closes https://github.com/openshift/odo/issues/1726
* Update based on feedback
* Fixes issue of odo login not working correctly
This fixes the issue of `odo login` not working correctly.
In this PR:
- Added logging for before AND after
- Changed stdout / stderror to the correct ones from odolog package
- Fix up success output
- Added Success function to odolog
Closes issue https://github.com/openshift/odo/issues/1643
* Fix error and colouring
* Re-add the color
* Fix other error
* Adds another fix with regards to filtering messages
* Remove color
* Add another filter
* Vendoring for go-colorable
* Adds color support for Windows
This fixes the issue of ASCII characters not appearing correctly for
Windows users.
Changes with this PR:
- Odo will detect if Windows is used and use a non-Unicode spinner.
- Odo will also use "X" and "V" to indicate success and unsuccessful on Windows since "✓" is Unicode.
Closes issue: #https://github.com/redhat-developer/odo/issues/1072
Removes all unnecessary newlines that were added, this was caused by not
accounting `Sprintln` (which includes a newline...)
Changes:
```sh
github.com/redhat-developer/odo remove-newline-error ✗ 1d ⚑ ⍉
▶ ./odo create nodejs
✗ unable to get current application
github.com/redhat-developer/odo remove-newline-error ✗ 1d ⚑ ⍉
▶ make bin
go build -ldflags="-w -X github.com/redhat-developer/odo/pkg/odo/cli/version.GITCOMMIT=57603295" -o odo cmd/odo/odo.go
github.com/redhat-developer/odo remove-newline-error ✗ 1d ⚑
▶ ./odo create nodejs
✗ unable to get current application
```
As well as for other output messages:
```sh
github.com/redhat-developer/odo remove-newline-error ✗ 1d ✚
▶ ./odo push
Pushing changes to component: odo-nodejs-pjfp
✓ Waiting for pod to start
✓ Copying files to component
◐ Building component ✗ Unable to build files
+ set -eo pipefail
+ '[' '!' -z /opt/app-root/src ']'
+ '[' /tmp '!=' /opt/app-root/src ']'
+ '[' /opt/app-root/src '!=' /opt/app-root/src ']'
+ '[' -f /tmp/src/.s2i/bin/assemble ']'
+ '[' -n /usr/libexec/s2i ']'
+ rm -rf /opt/app-root/src/.git
+ /usr/libexec/s2i/assemble
---> Installing application source
---> Building your Node application from source
Current git config
url.https://github.com.insteadof=git@github.com:
url.https://.insteadof=ssh://
url.https://github.com.insteadof=ssh://git@github.com
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=git@github.com:cdrage/odo.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.namespace-components.remote=origin
branch.namespace-components.merge=refs/heads/namespace-components
branch.add-logs.remote=origin
branch.add-logs.merge=refs/heads/add-logs
remote.upstream.url=git@github.com:redhat-developer/odo.git
remote.upstream.fetch=+refs/heads/*:refs/remotes/upstream/*
branch.gh-pages.remote=upstream
branch.gh-pages.merge=refs/heads/gh-pages
travis.slug=cdrage/odo
---> Installing dependencies
internal/modules/cjs/loader.js:582
throw err;
^
Error: Cannot find module './package.json'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at [eval]:1:13
at Script.runInThisContext (vm.js:96:20)
at Object.runInThisContext (vm.js:303:38)
at Object.<anonymous> ([eval]-wrapper:6:22)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at evalScript (internal/bootstrap/node.js:582:27)
✗ Building component
✗ command terminated with exit code 1
```
* Fix#1400 : Adding prow style OWNERS files
This PR adds OWNERS files to enable prow to ping appropriate people
and decide whose PRs warrant automatic merge
Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
* Removing kadel from tests
This PR updates the spinner so it now uses "◐◓◑◒" icons in order to not
only switch to ASCII only (since ◐◓◑◒ keys are ASCII), but to also
reduce the amount of spacing needed for everything to format correctly.
Previously, the spinner was using 2 character spaces, this will now only
use 1 character space. This will make the logging more "concise" and
appear more compact.
For example:
```sh
▶ ./odo create nodejs --git https://github.com/openshift/nodejs-ex
✓ Checking component
✓ Checking component version
✓ Creating component nodejs-ex-nodejs-jkzn
◑ Triggering build from git
```