Skip to content

[installer] Add missing nil check for experimental ws-daemon config #8302

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

Merged
merged 1 commit into from
Feb 20, 2022

Conversation

corneliusludmann
Copy link
Contributor

Description

Add missing nil check for experimental ws-daemon config

Related Issue(s)

Fixes #8223

How to test

Step 1: Get the current installer:

docker create -ti --name installer eu.gcr.io/gitpod-core-dev/build/installer:main.2486
docker cp installer:/app/installer ./installer
docker rm -f installer
./installer init > gitpod.config.yaml

Step 2: Add

experimental:
  IDEConfig:

to the Gitpod config and run

$ ./installer render --danger-use-unsupported-config --config gitpod.config.yaml > gitpod.yaml

You get:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1a3d056]

Step 3: Get the installer of this PR:

docker create -ti --name installer eu.gcr.io/gitpod-core-dev/build/installer:corneliusludmann-installer-fix-8223.0
docker cp installer:/app/installer ./installer
docker rm -f installer

run

$ ./installer render --danger-use-unsupported-config --config gitpod.config.yaml > gitpod.yaml

Should work without errors.

Bonus points for setting proper workspace CPULimits and testing if it still renders as it should.

Release Notes

NONE

@corneliusludmann corneliusludmann requested a review from a team February 18, 2022 10:08
@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label Feb 18, 2022
@codecov
Copy link

codecov bot commented Feb 18, 2022

Codecov Report

Merging #8302 (f2a26cb) into main (26e2777) will decrease coverage by 22.95%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #8302       +/-   ##
==========================================
- Coverage   31.10%   8.15%   -22.96%     
==========================================
  Files          39      31        -8     
  Lines        5913    2184     -3729     
==========================================
- Hits         1839     178     -1661     
+ Misses       3934    2003     -1931     
+ Partials      140       3      -137     
Flag Coverage Δ
components-gitpod-cli-app 11.17% <ø> (ø)
components-installer-raw-app 5.62% <ø> (?)
components-local-app-app-darwin-amd64 ?
components-local-app-app-darwin-arm64 ?
components-local-app-app-linux-amd64 ?
components-local-app-app-linux-arm64 ?
components-local-app-app-windows-386 ?
components-local-app-app-windows-amd64 ?
components-local-app-app-windows-arm64 ?
components-supervisor-app ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/supervisor/pkg/config/gitpod-config.go
components/supervisor/pkg/supervisor/git.go
components/supervisor/pkg/ports/ports.go
components/supervisor/pkg/ports/exposed-ports.go
components/supervisor/pkg/supervisor/supervisor.go
components/supervisor/pkg/supervisor/config.go
components/supervisor/pkg/terminal/service.go
components/supervisor/pkg/supervisor/services.go
...mponents/supervisor/pkg/supervisor/notification.go
components/supervisor/pkg/terminal/terminal.go
... and 24 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 26e2777...f2a26cb. Read the comment docs.

@roboquat roboquat merged commit 6884789 into main Feb 20, 2022
@roboquat roboquat deleted the corneliusludmann/installer-fix-8223 branch February 20, 2022 15:30
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note-none size/S team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[installer] Fix experimental ws-daemon config
3 participants