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

Errors don't surface to websockets for alloc exec/actions #19164

Open
philrenaud opened this issue Nov 23, 2023 · 0 comments · Fixed by #19172
Open

Errors don't surface to websockets for alloc exec/actions #19164

philrenaud opened this issue Nov 23, 2023 · 0 comments · Fixed by #19172
Assignees
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/actions Nomad Task Actions theme/api HTTP API and SDK issues type/bug

Comments

@philrenaud
Copy link
Contributor

In #19084 (comment), @pkazmierczak noticed that Permission Denied errors were not being returned to the opened websocket, resulting in a "Complete" state for the action, but no indication that a problem occurred.

Upon investigating, noticed that our exec functionality behaves similarly — we show a "The connection has closed." message int he exec terminal but no further indication that it had anything to do with permissions or otherwise.

The ws.WriteMessage call at

websocket.FormatCloseMessage(toWsCode(codedErr.Code()), codedErr.Error()))
}
indicates that we should have a way of returning with the error code, but it seems like the channel is closed before that has the chance to take place.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/actions Nomad Task Actions theme/api HTTP API and SDK issues type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants