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

Allow setting credentials as lambda #254

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

laurynas
Copy link

@laurynas laurynas commented Jul 4, 2023

We had a problem with multiple Puma workers and preload, because Temporal initializer which configures connection credentials ran before fork. Therefore after fork it we got an error:

grpc cannot be used before and after forking

Reconfiguring credentials after forking does not work because of the guard in grpc gem:
https://github.com/grpc/grpc/blob/e20e7a1198b2ff276a2f4f8514201b8ac1456830/src/ruby/ext/grpc/rb_grpc.c#L264
There is an old issue about it: grpc/grpc#8798

Therefore the most elegant solution was to configure credentials on demand, when connection is being built (after fork).
I have added a lambda support to solve this issue. It works for us.

@egletam

@lorines
Copy link

lorines commented Apr 3, 2024

@laurynas @egletam any updates on when this will be merged?

@laurynas
Copy link
Author

laurynas commented Apr 4, 2024

@lorines I don't know, it is up to the library maintainers.
cc @jeffschoner

@gytisgreitai
Copy link

Hey @antstorm anyone willing to take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants