Skip to content

Commit aabbd38

Browse files
authored
Skip existing release artifacts when retrying mirror uploads (#4937)
A mirror upload can fail after some files for a release have already reached R2. Retrying then attempts to overwrite those immutable objects and can fail again. This change makes the versioned mirror upload skip existing keys and upload only the missing files. It assumes a retry uses the same release artifacts. An existing file is kept even if its local checksum differs. Tested against a local S3 server with a partially uploaded release. The first run preserved the existing file and uploaded the missing files. A second run made zero writes.
1 parent e8a6c93 commit aabbd38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎.github/workflows/publish-mirror.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
R2_BUCKET: ${{ secrets.MIRROR_R2_BUCKET_NAME }}
4949
PROJECT: ty
5050
run: |
51-
aws s3 cp --recursive --output table --color on \
51+
aws s3 sync --no-overwrite --output table --color on \
5252
--exclude '*' \
5353
--include '*.zip' --include '*.zip.sha256' \
5454
--include '*.tar.gz' --include '*.tar.gz.sha256' \

0 commit comments

Comments
 (0)