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(compose_up): add --abort-on-container-exit flag #2873

Conversation

alegrey91
Copy link
Contributor

Fixes #2795 .
This PR adds the flag --abort-on-container-exit flag for nerdctl compose up command.
As the flag says, using it all containers are being stopped if any container was stopped during the run.

@alegrey91 alegrey91 force-pushed the feat/add-abort-on-container-exit-flag-compose-up branch from 6bfd736 to c1bfc73 Compare March 12, 2024 21:08
@alegrey91 alegrey91 marked this pull request as draft March 12, 2024 21:28
@alegrey91 alegrey91 force-pushed the feat/add-abort-on-container-exit-flag-compose-up branch 2 times, most recently from 54f8a96 to f5d6c66 Compare March 13, 2024 09:14
@alegrey91 alegrey91 marked this pull request as ready for review March 13, 2024 09:46
@alegrey91
Copy link
Contributor Author

@AkihiroSuda could you please re-run the pipeline?

@fahedouch
Copy link
Member

done. Next time your can rewrite your commit this will trigger the pipeline

@alegrey91
Copy link
Contributor Author

done. Next time your can rewrite your commit this will trigger the pipeline

Thanks!

@AkihiroSuda AkihiroSuda added this to the v2.0.0 milestone Mar 13, 2024
@@ -39,7 +40,7 @@ type LogsOptions struct {
NoLogPrefix bool
}

func (c *Composer) Logs(ctx context.Context, lo LogsOptions, services []string) error {
func (c *Composer) Logs(ctx context.Context, lo LogsOptions, services []string, abortOnContainerExit bool) error {
Copy link
Member

Choose a reason for hiding this comment

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

Why not add this to LogsOption?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it was out of scope, but if it's ok for you I can move it under the LogsOption struct

Copy link
Member

Choose a reason for hiding this comment

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

Please consider squashing commits

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok

Signed-off-by: Alessio Greggi <ale_grey_91@hotmail.it>
@alegrey91 alegrey91 force-pushed the feat/add-abort-on-container-exit-flag-compose-up branch from f5d6c66 to 0f9c8de Compare March 13, 2024 23:34
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit 922767f into containerd:main Mar 14, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support --abort-on-container-exit for nerdctl compose up.
3 participants