Skip to content

Switch exec pod promise to reject on websocket error#127

Merged
nikola-jokic merged 4 commits intomainfrom
nikola-jokic/exec-pod-promise
Feb 5, 2024
Merged

Switch exec pod promise to reject on websocket error#127
nikola-jokic merged 4 commits intomainfrom
nikola-jokic/exec-pod-promise

Conversation

@nikola-jokic
Copy link
Copy Markdown
Collaborator

Exec returns a websocket. If websocket fails, we should reject the promise. Otherwise, websocket will call a callback. Since at that point, websocket is not failing, we can safely resolve or reject the promise.

Fixes #107

@nikola-jokic nikola-jokic requested review from a team as code owners December 29, 2023 14:21
Comment thread packages/k8s/src/k8s/index.ts
Comment thread packages/k8s/src/k8s/index.ts
fhammerl
fhammerl previously approved these changes Feb 5, 2024
Copy link
Copy Markdown
Contributor

@fhammerl fhammerl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Co-authored-by: Ferenc Hammerl <31069338+fhammerl@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@fhammerl fhammerl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nikola-jokic nikola-jokic merged commit 50e14cf into main Feb 5, 2024
@nikola-jokic nikola-jokic deleted the nikola-jokic/exec-pod-promise branch February 5, 2024 13:40
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.

Rejections from k8s.Exec.exec() are not handled

2 participants