Skip to content

Conversation

aleDsz
Copy link
Member

@aleDsz aleDsz commented Sep 10, 2025

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

@aleDsz aleDsz self-assigned this Sep 10, 2025

# wait for the repo to be cloned
# TODO: remove this sleep
Process.sleep(100)
Copy link
Member

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}
""")
Copy link
Contributor

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?

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)
Copy link
Contributor

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.

Copy link
Contributor

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.

@aleDsz aleDsz requested a review from josevalim September 18, 2025 16:01
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.

3 participants