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

Download large test repo once, then store in image #850

Merged
merged 4 commits into from
Jun 6, 2024

Conversation

rmunn
Copy link
Contributor

@rmunn rmunn commented Jun 4, 2024

This allows us to skip the lengthy step of downloading elawa.zip from Google Drive every time skaffold delete gets run, or the hg-repos volume gets deleted.

Fixes #758.

This allows us to skip the lengthy step of downloading elawa.zip from
Google Drive every time `skaffold delete` gets run, or the hg-repos
volume gets deleted.
@rmunn rmunn self-assigned this Jun 4, 2024
@rmunn rmunn requested a review from hahn-kev June 4, 2024 09:57
@rmunn
Copy link
Contributor Author

rmunn commented Jun 4, 2024

I suspect the docker build -t local-dev-init data/ line in task setup will turn out to be unnecessary now that I added the skaffold.yaml config, but I ran out of time to test that today. If you want to test this out, try deleting that line and see if the populate-test-repos container still runs correctly.

Copy link
Collaborator

@hahn-kev hahn-kev left a comment

Choose a reason for hiding this comment

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

the init-repos component (kustomize terminology) is used in staging and develop to init repos, this change would break that.

deployment/init-repos/hg-deployment-patch.yaml Outdated Show resolved Hide resolved
Taskfile.yml Show resolved Hide resolved
rmunn added 3 commits June 5, 2024 09:45
This restores the develop and staging environments to their previous
state.
If running as non-root, mkdir /init-repos will fail, so we will instead
download files (if necessary) into /tmp.

The alternative would be to run this initContainer as root, then do a
chown -R www-data:www-data on the newly-created repos.
There's no reason to unzip the sena-3.zip (or elawa.zip) files into the
dev's Git worktree any more. We had been doing this to populate the
repos volume when using Docker Compose, but now that we've switched to
Skaffold, this step is useless, so we'll remove it.
@rmunn rmunn requested a review from hahn-kev June 5, 2024 03:39
Copy link
Collaborator

@hahn-kev hahn-kev left a comment

Choose a reason for hiding this comment

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

nice job

@rmunn rmunn merged commit a9a22b6 into develop Jun 6, 2024
3 checks passed
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.

Speed up local dev setup by downloading repo zips beforehand
2 participants