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 shutdown of bootstrap server #73

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

welteki
Copy link
Member

@welteki welteki commented Dec 11, 2023

Description

The call to bootstrap.Serve starts the provider server and blocks. In order to shutdown the server gracefully a parameter that accepts a context was added to support cancellation.

Motivation an context

This is required by the faas-netes provider to support graceful shutdown and should be useful for other provider implementation as well.

How has this been tested

This change was vendored into the faas-netes provider using the replace directive.

Verified the server shuts down when the context is done.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

All providers should be updated to call Serve with an additional context parameter.

Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

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

Approved

@alexellis alexellis merged commit e88354f into openfaas:master Dec 11, 2023
1 check passed
@welteki welteki deleted the graceful-shutdown branch December 11, 2023 09:55
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.

2 participants