Skip to content

[dev:preview] Add retry to previewctl install-context invocation #14759

Closed
@mads-hartmann

Description

@mads-hartmann

We don't currently retry the previewctl install-context invocation in leeway run dev:preview which sometimes result in the following error

.. Input redacted ...

build succeded
E1117 07:48:19.367954   21165 portforward.go:406] an error occurred forwarding 2242 -> 2200: error forwarding port 2200 to pod 948e504ae7dc12f0179a3122ba8ec3cd8f095ab0e1e1968fffb93be53422d6da, uid : failed to execute portforward in network namespace "/var/run/netns/cni-e6088db1-279b-e21d-ede0-0b6b2a0a6e4a": failed to dial 2200: dial tcp4 127.0.0.1:2200: connect: connection refused
time="2022-11-17 07:48:19" level=error msg="ssh: handshake failed: EOF"
Error: ssh: handshake failed: EOF
E1117 07:48:19.368392   21165 portforward.go:234] lost connection to pod
Usage:
  previewctl install-context [flags]

Flags:
      --gcp-service-account string   path to the GCP service account to use
  -h, --help                         help for install-context
      --private-key-path string      path to the private key used to authenticate with the VM (default "/home/gitpod/.ssh/vm_id_rsa")
  -t, --timeout duration             Timeout before considering the installation failed (default 10m0s)
      --watch                        If watch is enabled, previewctl will keep trying to install the kube-context every 15 seconds.

Global Flags:
      --branch string      From which branch's preview previewctl should interact with. By default it will use the result of "git rev-parse --abbrev-ref HEAD"
      --log-level string   The logger's log level (default "info")

time="2022-11-17 07:48:19" level=fatal msg="command failed." err="ssh: handshake failed: EOF"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions