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: terminal is not restarted if container if not running + state management #9793

Merged

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Nov 6, 2024

Signed-off-by: Philippe Martin [email protected]

What does this PR do?

  • the terminal is not restarted if the container is not running
  • Svelte state is reduced to only the container state, not the entire container information, or the $effect was respawned in an infinite loop when a container restarts.

Screenshot / video of UI

terminal-restart-container.mp4

What issues does this PR fix or reference?

Fixes #9771

How to test this PR?

  • Start a container, go to the terminal page, check that the terminal works as expected

  • Stop the container

  • restart the container

  • the terminal should be working again

  • the app should work

  • no error should appear in the console

  • Tests are covering the bug fix or the new feature

@feloy feloy requested review from benoitf and a team as code owners November 6, 2024 16:01
@feloy feloy requested review from cdrage, deboer-tim, axel7083 and SoniaSandler and removed request for a team November 6, 2024 16:01
@feloy
Copy link
Contributor Author

feloy commented Nov 6, 2024

I have found this issue #9794
the problem seems very similar (using restart button instead of stop + start), but the root cause seems different, as this PR does not fix the problem, I'll create another PR to fix that other issue #9794

Copy link
Contributor

@SoniaSandler SoniaSandler left a comment

Choose a reason for hiding this comment

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

LGTM, tested the changes and it works

@feloy feloy merged commit 8aee37f into podman-desktop:main Nov 6, 2024
15 checks passed
feloy added a commit to feloy/podman-desktop that referenced this pull request Nov 6, 2024
…nagement (podman-desktop#9793)

* fix: terminal is not restarted if container if not running + state management
Signed-off-by: Philippe Martin <[email protected]>

* refactor: containerState as $derived
Signed-off-by: Philippe Martin <[email protected]>
@feloy feloy mentioned this pull request Nov 6, 2024
@podman-desktop-bot podman-desktop-bot added this to the 1.15.0 milestone Nov 6, 2024
feloy added a commit that referenced this pull request Nov 6, 2024
fix: terminal is not restarted if container if not running + state management (#9793)

* fix: terminal is not restarted if container if not running + state management
Signed-off-by: Philippe Martin <[email protected]>

* refactor: containerState as $derived
Signed-off-by: Philippe Martin <[email protected]>
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.

UI get unresponsive if Container stopped/started while terminal tab is open
4 participants