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

feat: listen podman machine stop to mark playgrounds as stopped #228

Merged
merged 4 commits into from
Feb 5, 2024

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Feb 5, 2024

What does this PR do?

This PR makes AI Studio listen for podman machine stop, so the playground are declared as non running when this happens.

  • unit tests

Screenshot / video of UI

What issues does this PR fix or reference?

Fixes #215

Stopping the machine from the CLI (podman machine stop) is not detected by AI Studio, as Podman Desktop does not send event for this (issue podman-desktop/podman-desktop#5842).

How to test this PR?

On Mac, Windows only (not Linux)

  • Start a playground container
  • Stop the podman machine (from the GUI)
  • Check that the playground is marked as not running on the Playground page

@feloy feloy requested a review from a team as a code owner February 5, 2024 13:10
@axel7083
Copy link
Contributor

axel7083 commented Feb 5, 2024

I am not getting the state update when testing it

(1) Start a playground
(2) open a terminal and run podman machine stop
(3) wait for the machine to be properly stopped

podman-machine-stop.mp4

No update on the UI

@lstocchi
Copy link
Contributor

lstocchi commented Feb 5, 2024

I am not getting the state update when testing it

(1) Start a playground (2) open a terminal and run podman machine stop (3) wait for the machine to be properly stopped

No update on the UI

On the PR description Philippe wrote Stopping the machine from the CLI (podman machine stop) is not detected by AI Studio, as Podman Desktop does not send event for this (issue https://github.com/containers/podman-desktop/issues/5842).
You have to stop/start through desktop

@axel7083
Copy link
Contributor

axel7083 commented Feb 5, 2024

I am not getting the state update when testing it
(1) Start a playground (2) open a terminal and run podman machine stop (3) wait for the machine to be properly stopped
No update on the UI

On the PR description Philippe wrote Stopping the machine from the CLI (podman machine stop) is not detected by AI Studio, as Podman Desktop does not send event for this (issue https://github.com/containers/podman-desktop/issues/5842). You have to stop/start through desktop

Oh sorry I though because he were using the this.podmanConnection.onMachineStop(() => { we was able to find a work around which was not the onDidUpdateContainerConnection

@feloy feloy force-pushed the feat-215/listen-machine-stop branch from 07b0882 to 55869f1 Compare February 5, 2024 15:38
Copy link
Contributor

@lstocchi lstocchi left a comment

Choose a reason for hiding this comment

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

LGTM

@feloy feloy merged commit 6c57b38 into containers:main Feb 5, 2024
3 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.

listen to podman machine stop to mark playground as non running
3 participants