rawwar commented on code in PR #45967:
URL: https://github.com/apache/airflow/pull/45967#discussion_r1927327047
##########
dev/breeze/src/airflow_breeze/utils/docker_command_utils.py:
##########
@@ -613,6 +613,29 @@ def remove_docker_networks(networks: list[str] | None =
None) -> None:
)
+def remove_docker_volumes(volumes: list[str] | None = None) -> None:
+ """
+ Removes specified docker volumes. If no volumes are specified, it removes
all unused volumes.
+ Errors are ignored (not even printed in the output), so you can safely
call it without checking
+ if the volumes exist.
+
+ :param volumes: list of volumes to remove
+ """
+ if volumes is None:
+ run_command(
+ ["docker", "volume", "prune", "-f", "-a", "--filter",
"label=com.docker.compose.project=breeze"],
Review Comment:
@potiuk , should we do a similar thing when removing networks as well? Since
a network created by breeze also has the label
"com.docker.compose.project=breeze"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]