-
Notifications
You must be signed in to change notification settings - Fork 471
Introducing Git file storage #3056
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
base: main
Are you sure you want to change the base?
Conversation
|
||
# wait for the repo to be cloned | ||
# TODO: remove this sleep | ||
Process.sleep(100) |
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.
Maybe remove this?
Or this change after this PR?
#{@begin_key} | ||
#{normalize_ssh_key(file_system.key)} | ||
#{@end_key} | ||
""") |
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.
Instead of normalizing, should we use :public_key.pem_decode/1
to validate/parse it?
lib/livebook/hubs/team_client.ex
Outdated
fetch_file_system(file_system.external_id, state) do | ||
if current_file_system.repo_url != file_system.repo_url or | ||
current_file_system.branch != file_system.branch do | ||
FileSystem.Git.Client.fetch(file_system) |
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.
We shouldn't really hard-code actions specific to Git here. We should either have a callback in the filesystem protocol whenever a filesystem is added/updated/removed or, perhaps better, whenever the filesystem is loaded in the interface, we ask it to refresh/update itself. Another option is to do it periodically.
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.
I am probably in favor of something more driven on the UI. For example, there is no reason for us to fetch a file system when we push to agents, if no one is reading them. So perhaps in the interface, we never we mount them, we call a "mounted" callback or something. Although we will need a GenServer to avoid concurrent operations.
The git file storage requires the Git and SSH to run.
To run the tests, you must specify the
TEST_GIT_SSH_KEY
environment variable with the content of your Github SSH Deploy Key/User's SSH Key