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

Support disabling error for services exiting with code 0 in wait mode #11649

Conversation

pkoutsovasilis
Copy link

What I did
This PR introduces a flag for compose up, namely --wait-allow-exit, that targets wait mode (--wait) and enables treating services exited with a code of 0 not as an error

Related issue

closes #10596 and #11638

(not mandatory) A picture of a cute animal, if possible in relation to what you did

…it mode

Signed-off-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
@pkoutsovasilis pkoutsovasilis force-pushed the pkoutsovasilis/wait_allow_exit branch from 744be23 to 4496ca4 Compare March 22, 2024 04:08
@ndeloof
Copy link
Contributor

ndeloof commented Mar 30, 2024

I don't think adding an additional flag is the right solution, we miss a way to declare a more explicit init container and have compose manage it accordingly. service_completed_successfully unlocked a few usages but is only a partial solution

@pkoutsovasilis
Copy link
Author

I don't think adding an additional flag is the right solution, we miss a way to declare a more explicit init container and have compose manage it accordingly. service_completed_successfully unlocked a few usages but is only a partial solution

I mean sure having a more explicit way to declare init containers, I agree, sounds like the way to go. But until that's implemented, a minor change like adding an additional flag could still be beneficial for managing init containers more effectively, right?! I think that when such a way becomes a thing, the code of this PR can be repurposed/removed easily.

@ndeloof
Copy link
Contributor

ndeloof commented Mar 30, 2024

such a "minor change" we would have to support and maintain for years, so I prefer to say "no" and take time to find a better way, even this takes bit more time, than making the code ever more complicated by introducing some more corner cases

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.

[BUG] compose up --wait exits 1 on init containers successfully completing
2 participants