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

Only clone repos necessary for selected services #13

Merged
merged 16 commits into from
Oct 26, 2023

Conversation

fitztrev
Copy link
Member

Faster startup times for gitpod workspaces + prevents cloning unnecessary repos

Copy link
Member

@trevorbayless trevorbayless left a comment

Choose a reason for hiding this comment

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

From a fresh checkout of this PR (with an empty repo directory), I'm seeing an issue where empty directories are being created for services that I did not select. For example, I selected "Berserk" as the only optional service I wanted:

Screenshot_20231025_161301

And it mentioned in the output the 5 repos that were necessary to clone. However, in my repos directory I have the following that were created:

Screenshot_20231025_161631

In this instance, it additionally created all of the directories in the screenshot above owned by root, but they are empty.

This is problematic, because the next time I run ./lila-docker down, followed by a start and let's say I want to select the scalachess service this time around, I won't be able to as the directory already exists (and is owned by root):

image

@fitztrev
Copy link
Member Author

Thanks for testing! I will work on addressing this.

It's creating those empty folders because they are the volumes defined for the containers in docker-compose.yml.

When I tested, it wasn't an issue because on both my Mac and Linux machines, it creates them as my user (not root). So next time I do a start and clone a repo I haven't cloned before, it's able to override that folder. Our Docker engines must be configured slightly differently.

@fitztrev fitztrev marked this pull request as ready for review October 26, 2023 03:17
@fitztrev
Copy link
Member Author

Pushed 2 commits to fix. The first did it in bash but the Rust command had to communicate which dirs to create, so I had to create a new .env var. The second changes that behavior and mounts the repos dir to the command's container and creates them directly in Rust.

Copy link
Member

@trevorbayless trevorbayless left a comment

Choose a reason for hiding this comment

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

Unfortunately, now everything is owned by root causing initial cloning to fail:

image

Since I'm only able to recreate this at the moment, I'll take a look on my end to see if I can figure out what's going on.

@fitztrev
Copy link
Member Author

I tried it in gitpod and got that error too. Just reverted the 2nd commit and went back to creating it in bash. Now it creates them with the gitpod user correctly.

Copy link
Member

@trevorbayless trevorbayless left a comment

Choose a reason for hiding this comment

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

Tested and it's now working for me as well.

@fitztrev fitztrev merged commit 247ab7e into lichess-org:main Oct 26, 2023
2 checks passed
@fitztrev fitztrev deleted the repo-selection branch October 26, 2023 21:13
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