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
backend/jupiterbrain: parse SSH key on backend init #214
Conversation
Instead of loading, parsing and decrypting the key on every SSH connect, this does it only once when the worker is first set up. Fixes #206.
Tested in staging by running a few jobs in parallel, and I observed no issues. |
On second thought, it'd probably be best to port this over to the other providers too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎺
Will make some more changes to this tomorrow to port the changes over to the other backends too. |
The different backends were doing a lot of common SSH logic that is more or less the same across all packages. This extracts it to a subpackage that they all can use without having to re-do all of the logic. This also brings the recent improvements to the SSH logic in the jupiterbrain backend over to the other backends.
Alright, I ported everything over to the other backends by extracting the functionality to an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YES 💯 🐑 🇮🇹
Instead of loading, parsing and decrypting the key on every SSH connect, this does it only once when the worker is first set up.
Gonna test this in staging once the build passes and I have a binary to test with.
Fixes #206.