Skip to content

chore(ci): push release artifacts to Cloudflare R2 instead of AWS S3 - #6241

Merged
tkyocum merged 2 commits into
masterfrom
chore/retarget-artifacts
Aug 4, 2026
Merged

chore(ci): push release artifacts to Cloudflare R2 instead of AWS S3#6241
tkyocum merged 2 commits into
masterfrom
chore/retarget-artifacts

Conversation

@tkyocum

@tkyocum tkyocum commented Jul 31, 2026

Copy link
Copy Markdown
Member

Briefly describe your proposed changes:

Retargets CI artifact uploads from the AWS S3 bucket dl.influxdata.com to the
Cloudflare R2 bucket dl-influxdata-com. Artifact key paths are unchanged
(chronograf/releases/..., chronograf/artifacts/...).

What was the problem?
Build artifacts and package signatures were pushed to AWS S3; distribution has
moved to Cloudflare R2. Finishing this will allow us to stop our Sippy replication
job.

What was the solution?

etc/build.py:

  • upload_packages() now reads the standard AWS_ENDPOINT_URL_S3 environment
    variable and passes it to the boto3 client with region_name="auto" (required
    by R2). If the variable is unset, behavior falls back to plain AWS S3.
  • DEFAULT_BUCKET changed to dl-influxdata-com/chronograf/artifacts.
  • Removed the per-object public-read ACL — R2 rejects canned ACLs; public
    access is served via the bucket's custom domain (dl.influxdata.com).
  • Removed EC2 IMDS credential tuning (credentials now always come from env vars).

.circleci/config.yml:

  • --bucket now dl-influxdata-com/chronograf/releases in deploy-nightly,
    deploy-pre-release, and deploy-release.
  • packages-upload-signatures replaces the aws-s3 orb with a plain
    aws s3 sync --endpoint-url "${AWS_ENDPOINT_URL_S3}" --region auto; the
    unused orb was removed.

Rollout (before merge):

  • AWS_ENDPOINT_URL_S3 variable created in CircleCI project settings
  • Approver: review and approve
  • Contact @tkyocum to swap AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY
    values to the R2 token pair in CircleCI
  • Merge

  • CHANGELOG.md updated with a link to the PR (not the Issue) — N/A, CI-only change
  • Well-formatted commit messages
  • Rebased/mergeable
  • Tests pass — no code paths exercised by tests changed; py_compile clean
  • swagger.json updated (if modified Go structs or API) — N/A
  • Sign CLA

Retarget uploads from AWS S3 bucket dl.influxdata.com to Cloudflare R2
bucket dl-influxdata-com. Artifact key paths are unchanged.

- build.py: read AWS_ENDPOINT_URL_S3, use region auto for R2, drop
  per-object public-read ACL (R2 rejects canned ACLs), drop IMDS tuning
- config.yml: update --bucket args; replace aws-s3 orb signature sync
  with plain aws s3 sync against the R2 endpoint

@bednar bednar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Requesting the inline change described below.

Comment thread .circleci/config.yml
AWS CLI v1 (current botocore) defaults request checksums to CRC32,
which Cloudflare R2 may reject on single-part PutObject uploads. Set
AWS_REQUEST_CHECKSUM_CALCULATION=when_required, matching the pattern
used by telegraf and influxctl. Integrity remains protected via the
SigV4 x-amz-content-sha256 hash and R2's MD5 ETag.
@tkyocum
tkyocum requested a review from bednar August 3, 2026 15:22

@bednar bednar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The requested checksum compatibility change has been addressed. The updated diff and CI checks look good.

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