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

odo dev when it fails, shows to use odo log #5606

Closed
cdrage opened this issue Mar 30, 2022 · 0 comments · Fixed by #5609
Closed

odo dev when it fails, shows to use odo log #5606

cdrage opened this issue Mar 30, 2022 · 0 comments · Fixed by #5609
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@cdrage
Copy link
Member

cdrage commented Mar 30, 2022

/kind bug

What versions of software are you using?

Operating System: M1

Output of odo version: Master

How did you run odo exactly?

Using odo dev

↪ Deploying to the cluster in developer mode                                                                                                                                                                                                                                                                                                                               ✓  Waiting for Kubernetes resources [308ms]                                                                                                                                                                                                                                                                                                                               ✓  Syncing files into the container [2ms]                                                                                                                                                                                                                                                                                                                                 ✓  Building your application in container on cluster [1s]                                                                                                                                                                                                                                                                                                                 ✓  Executing the application [1s]                                                                                                                                                                                                                                                                                                                                         ⚠  Devfile command "run" exited with an error status in 1 seconds                                                                                                                                                                                                                                                                                                         Last 20 lines of log:                                                                                                                                                                                                                                                                                                                                                 time="2022-03-30T14:56:12Z" level=info msg="force to kill the program" program=devrun                                                                                                                                                                                                                                                                                     time="2022-03-30T14:56:12Z" level=info msg="force to kill the program" program=debugrun                                                                                                                                                                                                                                                                                   time="2022-03-30T14:56:12Z" level=debug msg="no auth required"                                                                                                                                                                                                                                                                                                            time="2022-03-30T14:56:12Z" level=debug msg="succeed to find process:devrun"                                                                                                                                                                                                                                                                                              time="2022-03-30T14:56:12Z" level=info msg="try to start program" program=devrun                                                                                                                                                                                                                                                                                          time="2022-03-30T14:56:12Z" level=info msg="success to start program" program=devrun
...
To get the full log output, please run 'odo log'

Your application is running on cluster.

- Port 3000 from "runtime" container forwarded to localhost:40001

Watching for changes in the current directory /Users/cdrage/syncthing/dev/k8s/devfiles/deploy-no-knative

Press Ctrl+c to exit.

Actual behavior

Shows odo log to use, which does not exist anymore.

Only shows output of last 20 lines.. But since we don't have odo log anymore, it should show ALL the lines.

Expected behavior

Show ALL the log lines, do not only show last 20, since odo log is not implemented.

Any logs, error output, etc?

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 30, 2022
cdrage added a commit to cdrage/odo that referenced this issue Mar 30, 2022
<!--
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 does the following:
- Removes the references to `odo log`
- Changes the output to last 100 lines and puts the number in a constant
- Reworks the output of `odo dev` a bit to be bolded / more consise with
  out outputs.

See below for the changes:
```sh
▶ copy-odo && devfiles && cd deploy-no-knative && odo dev
go build -mod=vendor -ldflags="-X github.com/redhat-developer/odo/pkg/version.GITCOMMIT=4669bc9dc" cmd/odo/odo.go
  __
 /  \__     Developing using the deploy-no-knative Devfile
 \__/  \    Namespace: default
 /  \__/    odo version: v2.5.0
 \__/

↪ Deploying to the cluster in developer mode
 ✓  Waiting for Kubernetes resources [360ms]
 ✓  Syncing files into the container [1ms]
 ✓  Building your application in container on cluster [1s]
 ✓  Executing the application [1s]
 ⚠  Devfile command "run" exited with an error status in 1 seconds
 ⚠  Last 100 lines of log:
time="2022-03-30T16:47:25Z" level=info msg="try to start program" program=devrun
time="2022-03-30T16:47:25Z" level=info msg="success to start program" program=devrun
ODO_COMMAND_RUN is npm start
Changing directory to /project
Executing command cd /project && npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /project/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/project/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
...
time="2022-03-30T16:50:30Z" level=info msg="Don't start the stopped program because its retry times 0 is greater than start retries 0" program=devrun
Your application is now running on the cluster.

- Port 3000 from "runtime" container forwarded to localhost:40001

Watching for changes in the current directory /Users/cdrage/syncthing/dev/k8s/devfiles/deploy-no-knative

Press Ctrl+c to exit.
```

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes redhat-developer#5606

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**

Signed-off-by: Charlie Drage <[email protected]>
cdrage added a commit to cdrage/odo that referenced this issue Mar 31, 2022
<!--
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 does the following:
- Removes the references to `odo log`
- Changes the output to last 100 lines and puts the number in a constant
- Reworks the output of `odo dev` a bit to be bolded / more consise with
  out outputs.

See below for the changes:
```sh
▶ copy-odo && devfiles && cd deploy-no-knative && odo dev
go build -mod=vendor -ldflags="-X github.com/redhat-developer/odo/pkg/version.GITCOMMIT=4669bc9dc" cmd/odo/odo.go
  __
 /  \__     Developing using the deploy-no-knative Devfile
 \__/  \    Namespace: default
 /  \__/    odo version: v2.5.0
 \__/

↪ Deploying to the cluster in developer mode
 ✓  Waiting for Kubernetes resources [360ms]
 ✓  Syncing files into the container [1ms]
 ✓  Building your application in container on cluster [1s]
 ✓  Executing the application [1s]
 ⚠  Devfile command "run" exited with an error status in 1 seconds
 ⚠  Last 100 lines of log:
time="2022-03-30T16:47:25Z" level=info msg="try to start program" program=devrun
time="2022-03-30T16:47:25Z" level=info msg="success to start program" program=devrun
ODO_COMMAND_RUN is npm start
Changing directory to /project
Executing command cd /project && npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /project/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/project/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
...
time="2022-03-30T16:50:30Z" level=info msg="Don't start the stopped program because its retry times 0 is greater than start retries 0" program=devrun
Your application is now running on the cluster.

- Port 3000 from "runtime" container forwarded to localhost:40001

Watching for changes in the current directory /Users/cdrage/syncthing/dev/k8s/devfiles/deploy-no-knative

Press Ctrl+c to exit.
```

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes redhat-developer#5606

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**

Signed-off-by: Charlie Drage <[email protected]>
cdrage added a commit to cdrage/odo that referenced this issue Apr 1, 2022
<!--
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 does the following:
- Removes the references to `odo log`
- Changes the output to last 100 lines and puts the number in a constant
- Reworks the output of `odo dev` a bit to be bolded / more consise with
  out outputs.

See below for the changes:
```sh
▶ copy-odo && devfiles && cd deploy-no-knative && odo dev
go build -mod=vendor -ldflags="-X github.com/redhat-developer/odo/pkg/version.GITCOMMIT=4669bc9dc" cmd/odo/odo.go
  __
 /  \__     Developing using the deploy-no-knative Devfile
 \__/  \    Namespace: default
 /  \__/    odo version: v2.5.0
 \__/

↪ Deploying to the cluster in developer mode
 ✓  Waiting for Kubernetes resources [360ms]
 ✓  Syncing files into the container [1ms]
 ✓  Building your application in container on cluster [1s]
 ✓  Executing the application [1s]
 ⚠  Devfile command "run" exited with an error status in 1 seconds
 ⚠  Last 100 lines of log:
time="2022-03-30T16:47:25Z" level=info msg="try to start program" program=devrun
time="2022-03-30T16:47:25Z" level=info msg="success to start program" program=devrun
ODO_COMMAND_RUN is npm start
Changing directory to /project
Executing command cd /project && npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /project/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/project/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
...
time="2022-03-30T16:50:30Z" level=info msg="Don't start the stopped program because its retry times 0 is greater than start retries 0" program=devrun
Your application is now running on the cluster.

- Port 3000 from "runtime" container forwarded to localhost:40001

Watching for changes in the current directory /Users/cdrage/syncthing/dev/k8s/devfiles/deploy-no-knative

Press Ctrl+c to exit.
```

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes redhat-developer#5606

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**

Signed-off-by: Charlie Drage <[email protected]>
cdrage added a commit to cdrage/odo that referenced this issue Apr 4, 2022
<!--
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 does the following:
- Removes the references to `odo log`
- Changes the output to last 100 lines and puts the number in a constant
- Reworks the output of `odo dev` a bit to be bolded / more consise with
  out outputs.

See below for the changes:
```sh
▶ copy-odo && devfiles && cd deploy-no-knative && odo dev
go build -mod=vendor -ldflags="-X github.com/redhat-developer/odo/pkg/version.GITCOMMIT=4669bc9dc" cmd/odo/odo.go
  __
 /  \__     Developing using the deploy-no-knative Devfile
 \__/  \    Namespace: default
 /  \__/    odo version: v2.5.0
 \__/

↪ Deploying to the cluster in developer mode
 ✓  Waiting for Kubernetes resources [360ms]
 ✓  Syncing files into the container [1ms]
 ✓  Building your application in container on cluster [1s]
 ✓  Executing the application [1s]
 ⚠  Devfile command "run" exited with an error status in 1 seconds
 ⚠  Last 100 lines of log:
time="2022-03-30T16:47:25Z" level=info msg="try to start program" program=devrun
time="2022-03-30T16:47:25Z" level=info msg="success to start program" program=devrun
ODO_COMMAND_RUN is npm start
Changing directory to /project
Executing command cd /project && npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /project/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/project/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
...
time="2022-03-30T16:50:30Z" level=info msg="Don't start the stopped program because its retry times 0 is greater than start retries 0" program=devrun
Your application is now running on the cluster.

- Port 3000 from "runtime" container forwarded to localhost:40001

Watching for changes in the current directory /Users/cdrage/syncthing/dev/k8s/devfiles/deploy-no-knative

Press Ctrl+c to exit.
```

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes redhat-developer#5606

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**

Signed-off-by: Charlie Drage <[email protected]>
cdrage added a commit to cdrage/odo that referenced this issue Apr 4, 2022
<!--
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 does the following:
- Removes the references to `odo log`
- Changes the output to last 100 lines and puts the number in a constant
- Reworks the output of `odo dev` a bit to be bolded / more consise with
  out outputs.

See below for the changes:
```sh
▶ copy-odo && devfiles && cd deploy-no-knative && odo dev
go build -mod=vendor -ldflags="-X github.com/redhat-developer/odo/pkg/version.GITCOMMIT=4669bc9dc" cmd/odo/odo.go
  __
 /  \__     Developing using the deploy-no-knative Devfile
 \__/  \    Namespace: default
 /  \__/    odo version: v2.5.0
 \__/

↪ Deploying to the cluster in developer mode
 ✓  Waiting for Kubernetes resources [360ms]
 ✓  Syncing files into the container [1ms]
 ✓  Building your application in container on cluster [1s]
 ✓  Executing the application [1s]
 ⚠  Devfile command "run" exited with an error status in 1 seconds
 ⚠  Last 100 lines of log:
time="2022-03-30T16:47:25Z" level=info msg="try to start program" program=devrun
time="2022-03-30T16:47:25Z" level=info msg="success to start program" program=devrun
ODO_COMMAND_RUN is npm start
Changing directory to /project
Executing command cd /project && npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /project/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/project/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
...
time="2022-03-30T16:50:30Z" level=info msg="Don't start the stopped program because its retry times 0 is greater than start retries 0" program=devrun
Your application is now running on the cluster.

- Port 3000 from "runtime" container forwarded to localhost:40001

Watching for changes in the current directory /Users/cdrage/syncthing/dev/k8s/devfiles/deploy-no-knative

Press Ctrl+c to exit.
```

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes redhat-developer#5606

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**

Signed-off-by: Charlie Drage <[email protected]>
cdrage added a commit to cdrage/odo that referenced this issue Apr 5, 2022
<!--
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 does the following:
- Removes the references to `odo log`
- Changes the output to last 100 lines and puts the number in a constant
- Reworks the output of `odo dev` a bit to be bolded / more consise with
  out outputs.

See below for the changes:
```sh
▶ copy-odo && devfiles && cd deploy-no-knative && odo dev
go build -mod=vendor -ldflags="-X github.com/redhat-developer/odo/pkg/version.GITCOMMIT=4669bc9dc" cmd/odo/odo.go
  __
 /  \__     Developing using the deploy-no-knative Devfile
 \__/  \    Namespace: default
 /  \__/    odo version: v2.5.0
 \__/

↪ Deploying to the cluster in developer mode
 ✓  Waiting for Kubernetes resources [360ms]
 ✓  Syncing files into the container [1ms]
 ✓  Building your application in container on cluster [1s]
 ✓  Executing the application [1s]
 ⚠  Devfile command "run" exited with an error status in 1 seconds
 ⚠  Last 100 lines of log:
time="2022-03-30T16:47:25Z" level=info msg="try to start program" program=devrun
time="2022-03-30T16:47:25Z" level=info msg="success to start program" program=devrun
ODO_COMMAND_RUN is npm start
Changing directory to /project
Executing command cd /project && npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /project/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/project/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
...
time="2022-03-30T16:50:30Z" level=info msg="Don't start the stopped program because its retry times 0 is greater than start retries 0" program=devrun
Your application is now running on the cluster.

- Port 3000 from "runtime" container forwarded to localhost:40001

Watching for changes in the current directory /Users/cdrage/syncthing/dev/k8s/devfiles/deploy-no-knative

Press Ctrl+c to exit.
```

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes redhat-developer#5606

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**

Signed-off-by: Charlie Drage <[email protected]>
cdrage added a commit to cdrage/odo that referenced this issue Apr 8, 2022
<!--
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 does the following:
- Removes the references to `odo log`
- Changes the output to last 100 lines and puts the number in a constant
- Reworks the output of `odo dev` a bit to be bolded / more consise with
  out outputs.

See below for the changes:
```sh
▶ copy-odo && devfiles && cd deploy-no-knative && odo dev
go build -mod=vendor -ldflags="-X github.com/redhat-developer/odo/pkg/version.GITCOMMIT=4669bc9dc" cmd/odo/odo.go
  __
 /  \__     Developing using the deploy-no-knative Devfile
 \__/  \    Namespace: default
 /  \__/    odo version: v2.5.0
 \__/

↪ Deploying to the cluster in developer mode
 ✓  Waiting for Kubernetes resources [360ms]
 ✓  Syncing files into the container [1ms]
 ✓  Building your application in container on cluster [1s]
 ✓  Executing the application [1s]
 ⚠  Devfile command "run" exited with an error status in 1 seconds
 ⚠  Last 100 lines of log:
time="2022-03-30T16:47:25Z" level=info msg="try to start program" program=devrun
time="2022-03-30T16:47:25Z" level=info msg="success to start program" program=devrun
ODO_COMMAND_RUN is npm start
Changing directory to /project
Executing command cd /project && npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /project/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/project/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
...
time="2022-03-30T16:50:30Z" level=info msg="Don't start the stopped program because its retry times 0 is greater than start retries 0" program=devrun
Your application is now running on the cluster.

- Port 3000 from "runtime" container forwarded to localhost:40001

Watching for changes in the current directory /Users/cdrage/syncthing/dev/k8s/devfiles/deploy-no-knative

Press Ctrl+c to exit.
```

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes redhat-developer#5606

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**

Signed-off-by: Charlie Drage <[email protected]>
openshift-merge-robot pushed a commit that referenced this issue Apr 8, 2022
<!--
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 does the following:
- Removes the references to `odo log`
- Changes the output to last 100 lines and puts the number in a constant
- Reworks the output of `odo dev` a bit to be bolded / more consise with
  out outputs.

See below for the changes:
```sh
▶ copy-odo && devfiles && cd deploy-no-knative && odo dev
go build -mod=vendor -ldflags="-X github.com/redhat-developer/odo/pkg/version.GITCOMMIT=4669bc9dc" cmd/odo/odo.go
  __
 /  \__     Developing using the deploy-no-knative Devfile
 \__/  \    Namespace: default
 /  \__/    odo version: v2.5.0
 \__/

↪ Deploying to the cluster in developer mode
 ✓  Waiting for Kubernetes resources [360ms]
 ✓  Syncing files into the container [1ms]
 ✓  Building your application in container on cluster [1s]
 ✓  Executing the application [1s]
 ⚠  Devfile command "run" exited with an error status in 1 seconds
 ⚠  Last 100 lines of log:
time="2022-03-30T16:47:25Z" level=info msg="try to start program" program=devrun
time="2022-03-30T16:47:25Z" level=info msg="success to start program" program=devrun
ODO_COMMAND_RUN is npm start
Changing directory to /project
Executing command cd /project && npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /project/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/project/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
...
time="2022-03-30T16:50:30Z" level=info msg="Don't start the stopped program because its retry times 0 is greater than start retries 0" program=devrun
Your application is now running on the cluster.

- Port 3000 from "runtime" container forwarded to localhost:40001

Watching for changes in the current directory /Users/cdrage/syncthing/dev/k8s/devfiles/deploy-no-knative

Press Ctrl+c to exit.
```

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes #5606

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**

Signed-off-by: Charlie Drage <[email protected]>
cdrage added a commit to cdrage/odo that referenced this issue Aug 31, 2022
<!--
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 does the following:
- Removes the references to `odo log`
- Changes the output to last 100 lines and puts the number in a constant
- Reworks the output of `odo dev` a bit to be bolded / more consise with
  out outputs.

See below for the changes:
```sh
▶ copy-odo && devfiles && cd deploy-no-knative && odo dev
go build -mod=vendor -ldflags="-X github.com/redhat-developer/odo/pkg/version.GITCOMMIT=4669bc9dc" cmd/odo/odo.go
  __
 /  \__     Developing using the deploy-no-knative Devfile
 \__/  \    Namespace: default
 /  \__/    odo version: v2.5.0
 \__/

↪ Deploying to the cluster in developer mode
 ✓  Waiting for Kubernetes resources [360ms]
 ✓  Syncing files into the container [1ms]
 ✓  Building your application in container on cluster [1s]
 ✓  Executing the application [1s]
 ⚠  Devfile command "run" exited with an error status in 1 seconds
 ⚠  Last 100 lines of log:
time="2022-03-30T16:47:25Z" level=info msg="try to start program" program=devrun
time="2022-03-30T16:47:25Z" level=info msg="success to start program" program=devrun
ODO_COMMAND_RUN is npm start
Changing directory to /project
Executing command cd /project && npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /project/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/project/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
...
time="2022-03-30T16:50:30Z" level=info msg="Don't start the stopped program because its retry times 0 is greater than start retries 0" program=devrun
Your application is now running on the cluster.

- Port 3000 from "runtime" container forwarded to localhost:40001

Watching for changes in the current directory /Users/cdrage/syncthing/dev/k8s/devfiles/deploy-no-knative

Press Ctrl+c to exit.
```

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes redhat-developer#5606

**PR acceptance criteria:**

- [X] Unit test

- [X] Integration test

- [X] Documentation

**How to test changes / Special notes to the reviewer:**

Signed-off-by: Charlie Drage <[email protected]>
@rm3l rm3l added the v3 label Oct 7, 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants