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

Don't raise exception on inexistent services in 'down' command #1117

Merged

Conversation

rjeffman
Copy link
Contributor

When running 'podman-compose down ', if service is not part of the compose, a KeyError exception was raised it function 'get_excluded'.

By only allowing evaluation of services that exist in the compose provides a cleaner and gentler exit for this case.

@rjeffman rjeffman force-pushed the no_exception_if_service_is_not_in_compose branch from 4e7a973 to cc9faed Compare January 23, 2025 02:56
@rjeffman rjeffman marked this pull request as draft January 23, 2025 15:54
@p12tic
Copy link
Collaborator

p12tic commented Jan 30, 2025

Looks good. Please also add:

When running 'podman-compose down <service>', if service is not part of
the compose, a KeyError exception is raised in function 'get_excluded'.

By only allowing evaluation of services that exist in the compose
provides a cleaner and gentler exit for this case.

Signed-off-by: Rafael Guterres Jeffman <[email protected]>
@rjeffman rjeffman force-pushed the no_exception_if_service_is_not_in_compose branch from cc9faed to d476071 Compare March 5, 2025 18:50
@rjeffman rjeffman marked this pull request as ready for review March 5, 2025 18:51
@rjeffman
Copy link
Contributor Author

rjeffman commented Mar 5, 2025

@p12tic sorry for the long delay (work and a needed PTO were in place).

I fixed the PR with your requests. Let me know if anything else is needed.

@p12tic p12tic merged commit 04fcc26 into containers:main Mar 5, 2025
8 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.

3 participants