Skip to content

Use S3 conditional writes to prevent overwriting published artifacts - #11532

Merged
AngelYanev merged 1 commit into
masterfrom
angelyanev-s3-conditional-writes
Sep 28, 2026
Merged

AngelYanev merged 1 commit into
masterfrom
angelyanev-s3-conditional-writes

Conversation

@AngelYanev

Copy link
Copy Markdown
Contributor

Describe the changes in the pull request

  1. Current: artifact uploads (aws s3 cp) and the release copy (copy_object) silently overwrite whatever is already at the target key in s3://redismodules.
  2. Change: upload with aws s3api put-object --if-none-match "*" and copy with IfNoneMatch="*", so S3 rejects the write if the object exists.
  3. Outcome: CI only. A published snapshot or release artifact can no longer be replaced by a later run; the job fails instead.

Which additional issues this PR fixes

  1. N/A

Main objects this PR modified

  1. sbin/upload-artifacts — conditional put, rejected uploads fail the job
  2. event-release.yml set-artifacts — conditional copy

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

Release Notes

  • This PR requires release notes
  • This PR does not require release notes

sbin/upload-artifacts now uploads via `aws s3api put-object --if-none-match "*"`
instead of `aws s3 cp`, and the release workflow's copy_object passes
IfNoneMatch="*". Both fail loudly if an object already exists at the target key
instead of silently overwriting it. upload-artifacts also propagates a rejected
upload to the job exit status, which the `{ ...; } || ...` construct swallowed.
@codecov

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.52%. Comparing base (0007952) to head (71aae49).
⚠️ Report is 92 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11532      +/-   ##
==========================================
- Coverage   83.99%   83.52%   -0.48%     
==========================================
  Files         635      664      +29     
  Lines       83953    86418    +2465     
  Branches    38902    40278    +1376     
==========================================
+ Hits        70515    72178    +1663     
- Misses      13080    13867     +787     
- Partials      358      373      +15     
Flag Coverage Δ
flow 84.67% <ø> (+0.18%) ⬆️
unit 58.61% <ø> (+0.58%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud

Copy link
Copy Markdown

@AngelYanev
AngelYanev added this pull request to the merge queue Sep 28, 2026
Merged via the queue into master with commit 046c693 Sep 28, 2026
216 checks passed
@AngelYanev
AngelYanev deleted the angelyanev-s3-conditional-writes branch September 28, 2026 12:05
@redisearch-backport-pull-request

redisearch-backport-pull-request Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Auto-backport summary

Target Status Backport PR
2.8 conflicts(2) #11599
2.6 conflicts(2) #11600
2.10 conflicts(1) #11598
8.2 conflicts(1) #11597
8.4 clean #11591
8.6 clean #11592
8.6-rse clean #11593
8.8 clean #11594
8.8-rse clean #11595
8.10 clean #11596

(PR #11532, 046c69348 — generated by the auto-backport workflow.)

Workflow run · Retry unfinished targets with /backport <branches>.

oshadmi pushed a commit that referenced this pull request Nov 29, 2026
…ifacts (#11596)

Use S3 conditional writes to prevent overwriting published artifacts (#11532)

sbin/upload-artifacts now uploads via `aws s3api put-object --if-none-match "*"`
instead of `aws s3 cp`, and the release workflow's copy_object passes
IfNoneMatch="*". Both fail loudly if an object already exists at the target key
instead of silently overwriting it. upload-artifacts also propagates a rejected
upload to the job exit status, which the `{ ...; } || ...` construct swallowed.

(cherry picked from commit 046c693)

Co-authored-by: Angel Yanev <[email protected]>
oshadmi pushed a commit that referenced this pull request Nov 29, 2026
…facts (#11592)

Use S3 conditional writes to prevent overwriting published artifacts (#11532)

sbin/upload-artifacts now uploads via `aws s3api put-object --if-none-match "*"`
instead of `aws s3 cp`, and the release workflow's copy_object passes
IfNoneMatch="*". Both fail loudly if an object already exists at the target key
instead of silently overwriting it. upload-artifacts also propagates a rejected
upload to the job exit status, which the `{ ...; } || ...` construct swallowed.

(cherry picked from commit 046c693)

Co-authored-by: Angel Yanev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants