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: support for exit zero sigterm #684

Merged
merged 1 commit into from
Jul 29, 2024
Merged

feat: support for exit zero sigterm #684

merged 1 commit into from
Jul 29, 2024

Conversation

nancynh
Copy link
Collaborator

@nancynh nancynh commented Jul 26, 2024

Adds a new flag exit-zero-on-sigterm to exit with a 0 exit code when SIGTERM is received. This is a port of CloudSQL's exit-on-zero-sigterm (GoogleCloudPlatform/cloud-sql-proxy#1870). Likewise, it is needed for applications that think that an exit code 143 is an error when it is not, and this provides users an easy workaround.

Fixes #683

@nancynh nancynh marked this pull request as ready for review July 26, 2024 23:36
@nancynh nancynh requested a review from a team as a code owner July 26, 2024 23:36
@jackwotherspoon
Copy link
Contributor

@enocom @nancynh I wonder if we should just add full support and feature parity for sigterm while you are it.

i.e. support for --min-sigterm-delay and --max-sigterm-delay

https://github.com/GoogleCloudPlatform/cloud-sql-proxy/blob/4cfa6a20763c483427331fae8e3227a64bc3b4a4/cmd/root.go#L466-L469

@enocom
Copy link
Member

enocom commented Jul 29, 2024

Yes, we probably should. I have separate tracking issue for min-sigterm-delay here: #670.

@nancynh could I interest you in picking that up? ^^;

@nancynh
Copy link
Collaborator Author

nancynh commented Jul 29, 2024

Yup, I can port both of those flags too in a separate PR

@nancynh nancynh merged commit 790b935 into main Jul 29, 2024
15 checks passed
@nancynh nancynh deleted the exit-zero branch July 29, 2024 15:44
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.

Port --exit-zero-on-sigterm from cloud-sql-proxy
3 participants