open-cli-tools / open-cli-tools/concurrently
python stack traces sometimes not logged until concurrently terminated
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.9k
- Forks
- 281
- Avg merge
- 17h 12m
- Merged PRs (30d)
- 1
Description
concurrently version: 5.3.0
Starting webpack and flask app via npm start and the following scripts in package.json
"scripts": {
"start": "concurrently --kill-others -n webpack,flask -c blue,green \"npm:webpack\" \"PORT=${PORT:-5001} npm run flask\"",
"flask": "DEVPORTAL_CFG=../development.cfg FLASK_APP=devportal PYTHONDONTWRITEBYTECODE=1 FLASK_ENV=development flask run --port=$PORT",
"webpack": "webpack --config webpack.dev.js",
the flask app contains the following lines:
log.info("log.info works normally")
log.info("log.error works normally")
raise Exception("ERROR")
repeating the request that executes these lines results in the following log output:
[flask] 2020-09-04 18:12:03,840 | devportal.api.auth | INFO | log.info works normally
[flask] 2020-09-04 18:12:03,840 | devportal.api.auth | ERROR | log.error works normally
[flask] Traceback (most recent call last):
... stacktrace ...
[flask] raise Exception("ERROR")
[flask] Exception: ERROR
[flask] 2020-09-04 18:12:08,165 | devportal.api.auth | INFO | log.info works normally
[flask] 2020-09-04 18:12:08,165 | devportal.api.auth | ERROR | log.error works normally
[flask] 2020-09-04 18:12:09,145 | devportal.api.auth | INFO | log.info works normally
[flask] 2020-09-04 18:12:09,146 | devportal.api.auth | ERROR | log.error works normally
[flask] 2020-09-04 18:12:09,987 | devportal.api.auth | INFO | log.info works normally
[flask] 2020-09-04 18:12:09,987 | devportal.api.auth | ERROR | log.error works normally
Note the stacktrace was only logged once. terminating command vi CTRL-C results in the missing traces being logged:
^C[flask] Traceback (most recent call last):
... stacktrace ...
[flask] Exception: ERROR
[flask] Traceback (most recent call last):
... stacktrace ...
[flask] Exception: ERROR
[flask] Traceback (most recent call last):
... stacktrace ...
[flask] Exception: ERROR
[webpack] npm run webpack exited with code 0
--> Sending SIGTERM to other processes..
[flask] PORT=5001 npm run flask exited with code 0
Concurrently logs traces correctly when the --raw flag is set. Any ideas whether this is user error or a bug?
reproduction: https://github.com/crvarner/concurrently_bug.git
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked reproduction repository and run the package.json npm start command using concurrently 5.3.0. Compare default output with the --raw flag while triggering repeated Flask exceptions; done means stack traces are logged promptly without requiring Ctrl-C.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, python, typescript, webpack
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100