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

Fix panic 'provided file is not a console' #3434

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

apostasie
Copy link
Contributor

See commit message.

Fixes #3433

This should put this panic issue to rest.

@apostasie
Copy link
Contributor Author

Ping @AkihiroSuda - pending green CI.

@apostasie
Copy link
Contributor Author

Ahhhh windows, windows.

@sondavidb @jsturtevant any idea for me on this?

@sondavidb
Copy link
Contributor

Was trying to set up containerd on my local machine and it has been a lot more difficult than I anticipated 😓

Looks like the change you made had the integration pass but not the canary. Is this test known to be flaky? Looking through the changes it seems fine so I'm pretty stumped as well

@apostasie
Copy link
Contributor Author

@sondavidb I think TestRunWithTtyAndDetached is failing very often - but may succeed occasionally.

Might be a recent regression, and unrelated to this changeset, as my other PRs get the failure too.

Investigating...

@apostasie
Copy link
Contributor Author

apostasie commented Sep 18, 2024

Test appears broken on main.

Moving discussion to #3437

@apostasie
Copy link
Contributor Author

@AkihiroSuda besides what appears to be an unrelated regression / flakyness (#3437) this is ready.

@AkihiroSuda AkihiroSuda added this to the v2.0.0 milestone Sep 19, 2024
As outlined in containerd#3433, containerd/console will panic on a call to console.Current().
This patch provides a simple consoleutil wrapper that will return an error instead.

Note that part of containerd#3300 is being reverted, as no longer necessary.

This patch does not try to be "smart" and does not check the status of stdin/out/err otherwise or if it is consistent with user provided flags,
but merely ensures we do not crash.

Signed-off-by: apostasie <[email protected]>
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit a40889b into containerd:main Sep 19, 2024
22 checks passed
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.

Panic: not a console, follow-up to #3297
3 participants