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

Optimize modules release time #326

Merged
merged 1 commit into from
Nov 8, 2023
Merged

Conversation

pkwarren
Copy link
Member

@pkwarren pkwarren commented Nov 8, 2023

We should run with -m option to enable parallel uploads. Additionally, we should run with either -c or -i instead of the default (which compares modification time). Since files are sync'd from a actions/checkout git clone, all of the files mtimes are set to the time of checkout, so the default behavior will be to copy every file every time.

We should run with `-m` option to enable parallel uploads. Additionally,
we should run with either `-c` or `-i` instead of the default (which
compares modification time). Since files are sync'd from a
actions/checkout git clone, all of the files mtimes are set to the time
of checkout, so the default behavior will be to copy every file every
time.
@@ -60,4 +60,4 @@ jobs:
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@e30db14379863a8c79331b04a9969f4c1e225e0b
- name: Upload To Release Bucket
run: gsutil rsync -r modules/sync gs://buf-modules
run: gsutil -m rsync -c -r modules/sync gs://buf-modules
Copy link
Member Author

Choose a reason for hiding this comment

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

Global options (-m): https://cloud.google.com/storage/docs/gsutil/addlhelp/GlobalCommandLineOptions#options
Rsync options (-c): https://cloud.google.com/storage/docs/gsutil/commands/rsync#options

I really think it would be safe if we ran with -i which ignores mtime entirely and just skips any files which exist at the destination already, however we can try starting with -c to see what the impact on release time is. Right now I've confirmed that every time it copies all of the files.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually -i won't work for files like state.json that change with each update. It would only work for the CAS files.

@pkwarren pkwarren merged commit 0182726 into main Nov 8, 2023
2 checks passed
@pkwarren pkwarren deleted the pkw/optimize-modules-release branch November 8, 2023 22:27
@unmultimedio
Copy link
Member

Lovely! thanks so much

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