Skip to content

Commit 0dc177d

Browse files
committed
Fix Supervisor sending empty port names and descriptions
1 parent 41b5dfa commit 0dc177d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

components/supervisor/pkg/ports/ports.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -350,19 +350,20 @@ func (pm *Manager) nextState(ctx context.Context) map[uint32]*managedPort {
350350
// 2. second capture configured since we don't want to auto expose already exposed ports
351351
if pm.configs != nil {
352352
pm.configs.ForEach(func(port uint32, config *gitpod.PortConfig) {
353-
if pm.boundInternally(port) {
354-
return
355-
}
356-
357353
mp, exists := state[port]
358354
if !exists {
359355
mp = &managedPort{}
360356
state[port] = mp
361357
}
362-
mp.LocalhostPort = port
363358
mp.Description = config.Description
364359
mp.Name = config.Name
365360

361+
if pm.boundInternally(port) {
362+
return
363+
}
364+
365+
mp.LocalhostPort = port
366+
366367
autoExpose, autoExposed := pm.autoExposed[port]
367368
if autoExposed {
368369
mp.AutoExposure = autoExpose.state

0 commit comments

Comments
 (0)