Skip to content

Ensure Docker containers are stopped even if Micro is not running #162

@mirkoCrobu

Description

@mirkoCrobu

Describe the problem

Currently, the stopAppWithCmd function handles the teardown of an application by sequentially addressing the sketch and then the Python/Docker containers

There is a logic flaw in the control. Inside the sketch validation block, if the app status is detected as not running, the function performs an early return.

If the system thinks the microcontroller part is already stopped, it fails to clean up the Python/Brick containers, leaving zombie containers running.

To reproduce

Possible way

  • run an app
  • stop the micro manually
  • use the stop command
  • check if containers are still running

Expected behavior

[ ] When calling stop/down on an app that appears "Stopped" (Micro side), the function still attempts to run docker compose stop/down.

[ ] No zombie containers are left behind when stopAppWithCmd returns.

Arduino App CLI version

0.8.0

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions