fix(ci): detect existing R versions via public object HEAD probe #8

Merged
pat-s merged 1 commit from t3code/f3864a84 into main 2026-06-29 12:11:04 +00:00
Owner

The existing-version check listed the bucket with an anonymous curl, but
Backblaze B2 requires authentication for the list-bucket API, so it returned
AccessDenied and r-versions-existing.txt was always empty -> every version
was rebuilt despite already existing in s3.

Signing the request is not workable here: the B2 credentials are scoped to
the plugin-s3 image in crow and are not injected into this plain alpine step
(curl saw --user ":").

Individual artifacts are public-read, so probe each expected object URL with
an anonymous HEAD instead of listing the bucket. The filename mirrors what
nfpm produces (version/release pinned to 1): r-1.{apk,deb} for
alpine/ubuntu and R--1-1..rpm for el*. Verified against the live
bucket for all three packager families.

The existing-version check listed the bucket with an anonymous curl, but Backblaze B2 requires authentication for the list-bucket API, so it returned AccessDenied and r-versions-existing.txt was always empty -> every version was rebuilt despite already existing in s3. Signing the request is not workable here: the B2 credentials are scoped to the plugin-s3 image in crow and are not injected into this plain alpine step (curl saw --user ":"). Individual artifacts are public-read, so probe each expected object URL with an anonymous HEAD instead of listing the bucket. The filename mirrors what nfpm produces (version/release pinned to 1): r-<ver>_1_<arch>.{apk,deb} for alpine/ubuntu and R-<ver>-1-1.<arch>.rpm for el*. Verified against the live bucket for all three packager families.
The existing-version check listed the bucket with an anonymous curl, but
Backblaze B2 requires authentication for the list-bucket API, so it returned
AccessDenied and r-versions-existing.txt was always empty -> every version
was rebuilt despite already existing in s3.

Signing the request is not workable here: the B2 credentials are scoped to
the plugin-s3 image in crow and are not injected into this plain alpine step
(curl saw --user ":").

Individual artifacts are public-read, so probe each expected object URL with
an anonymous HEAD instead of listing the bucket. The filename mirrors what
nfpm produces (version/release pinned to 1): r-<ver>_1_<arch>.{apk,deb} for
alpine/ubuntu and R-<ver>-1-1.<arch>.rpm for el*. Verified against the live
bucket for all three packager families.
pat-s force-pushed t3code/f3864a84 from b917759865 to 60d67022e2 2026-06-29 12:09:54 +00:00 Compare
pat-s merged commit ca336c2720 into main 2026-06-29 12:11:04 +00:00
pat-s deleted branch t3code/f3864a84 2026-06-29 12:11:04 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
devxy/r-builds!8
No description provided.