Skip to content

feat: upload static builds to all project site registries - #287

Merged
Terryda merged 5 commits into
mainfrom
feat/cfStatic
Oct 13, 2026
Merged

Terryda merged 5 commits into
mainfrom
feat/cfStatic

Conversation

@Terryda

@Terryda Terryda commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Make static builds upload to every ready SiteRegistry returned for the project, then register one build containing all provider artifacts.

  • Retain Hyphen Cloud's upload/finalize flow and add direct Cloudflare R2 uploads with SigV4, temporary credential renewal, original file paths, and the manifest uploaded last.
  • Validate the upload destination and revision when renewing credentials, refuse storage redirects, and keep APIX credentials off storage requests.
  • Carry each static artifact as site: { registryId, uri } and select site deployment targets from the project's registries.
  • Update CLI help and documentation for both providers and the shared build registration behavior.

Validation completed during implementation: build-package and CLI tests, full Go build, focused Go vet, and whitespace checks. Upload tests use temporary files and local HTTP servers; no live provider uploads ran.

Requires the matching APIX and nFabric contracts; the APIX companion PR must include its pending URI/config cleanup commit before rollout.

Companion PRs: nfabric #171, apix #2312, hyphen-app #1665.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request adds support for uploading static sites to multiple ready SiteRegistry targets (including Hyphen Cloud and Cloudflare R2) and registering them under a single static build. It introduces direct Cloudflare R2 upload capabilities with temporary credential renewal, updates deployment and build services to handle multiple site integration IDs, and adds comprehensive unit tests. The review feedback suggests refining the R2 credential validation to avoid spurious failures when credentials outlive the capability session, and improving the error messages for file and size limit violations to include specific details for better troubleshooting.

Comment thread internal/build/static_r2.go
Comment thread internal/build/static_r2.go
Comment thread internal/build/static_r2.go Outdated
@Terryda

Terryda commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces support for uploading static builds to multiple ready site registries (such as Hyphen Cloud and Cloudflare R2) simultaneously, rather than limiting to a single registry. It adds a new Cloudflare R2 upload implementation using the AWS SDK, updates the deployment and build services to handle multiple site integration IDs, and replaces the revision-based artifact tracking with URI-based tracking. A review comment highlights a potential bug in internal/build/static_r2.go where instruction.Path should be NFC-normalized before looking it up in the byPath map to prevent validation failures on systems with different path normalization standards.

Comment thread internal/build/static_r2.go
@Terryda
Terryda merged commit 42333bc into main Oct 13, 2026
6 checks passed
@Terryda
Terryda deleted the feat/cfStatic branch October 13, 2026 22:03
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.

1 participant