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

Add filtering of postCreateCommand stdout stderr logs #1149

Conversation

janekbaraniewski
Copy link
Contributor

Fixes issue where everything sent to stderr by postCreateCommand was logged as error by devpod

13:15:27 info Creating devcontainer...
13:15:27 info Inspecting image mcr.microsoft.com/vscode/devcontainers/python
13:15:27 info a8e8a369f917aa05b34e84a115077384c4c63d9c09cd12904d0c7672003966f9
13:15:28 info Setup container...
13:15:29 info Chown workspace...
13:15:29 info Run command : pipx install uv...
13:15:29 error creating virtual environment...
13:15:29 error installing uv...
13:15:30 error done! ✨ 🌟 ✨
13:15:30 info installed package uv 0.2.18, installed using Python 3.12.3
13:15:30 info These apps are now globally available
13:15:30 info - uv
13:15:30 done Successfully ran command : pipx install uv
13:15:30 info Install extensions 'dbaeumer.vscode-eslint,ms-python.python,ms-python.vscode-pylance,ms-python.autopep8' in the background
13:15:30 info Run 'ssh minimal-example.devpod' to ssh into the devcontainer
13:15:30 info Starting VSCode...

Now those will appear as warning level log unless they're actual errors:

15:17:01 info Creating devcontainer...
15:17:01 info Deleting devcontainer...
15:17:02 info Inspecting image mcr.microsoft.com/vscode/devcontainers/python
15:17:02 info 9c2e1cf2064e71dc36e7efe2ba99c3983766e725dd32ddf4313bfa0dd45d9905
15:17:02 info Setup container...
15:17:02 info Chown workspace...
15:17:02 info Run command : pipx install uv...
15:17:02 warn creating virtual environment...
15:17:03 warn installing uv...
15:17:04 warn done! ✨ 🌟 ✨
15:17:04 info installed package uv 0.2.22, installed using Python 3.12.3
15:17:04 info These apps are now globally available
15:17:04 info - uv
15:17:04 info - uvx
15:17:04 done Successfully ran command : pipx install uv
15:17:04 info Install extensions 'dbaeumer.vscode-eslint,ms-python.python,ms-python.vscode-pylance,ms-python.autopep8' in the background
15:17:04 info Run 'ssh minimal-example.devpod' to ssh into the devcontainer
15:17:04 info Starting VSCode...

pkg/devcontainer/setup/setup.go Outdated Show resolved Hide resolved
pkg/devcontainer/setup/setup.go Show resolved Hide resolved
pkg/devcontainer/setup/setup.go Show resolved Hide resolved
@janekbaraniewski janekbaraniewski force-pushed the POD-716/fix-stdout-stderr-handling branch from 7e1f89c to 995263f Compare July 8, 2024 13:45
@pascalbreuninger pascalbreuninger merged commit acfeedc into loft-sh:main Jul 8, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants