codefloe/forgejo-codefloe
Watch
4
12
Fork
You've already forked forgejo-codefloe
0

fix: statichost primary domain and build-init flow #32

Merged
pat-s merged 8 commits from fix/sh-primary-domain into v15.0/forgejo-codefloe 2026-04-23 17:03:45 +00:00
Contributor

Summary

  • pass primary_domain on StaticHost site creation to avoid race conditions
  • fix StaticHost UpdateDomain endpoint path and content type
  • use StaticHost-returned site name and retry domain sync on pages enable
  • trigger an initial build after initialization

Notes

  • branch: fix/sh-primary-domain
## Summary - pass `primary_domain` on StaticHost site creation to avoid race conditions - fix StaticHost UpdateDomain endpoint path and content type - use StaticHost-returned site name and retry domain sync on pages enable - trigger an initial build after initialization ## Notes - branch: `fix/sh-primary-domain`
Previously the SiteID was set to our locally computed slug, ignoring the site_name returned by StaticHost's CreateSite API. If StaticHost assigns a different name, all subsequent API calls (UpdateDomain, TriggerBuild) would use the wrong slug and fail silently.

Also replaced the single fire-and-forget domain sync attempt (30s delay) with a retry loop (10s, 30s, 60s, 120s) so the codefloe.page domain is reliably set as primary even if StaticHost is slow to initialize.
The domain sync was failing with 404 because:
1. Wrong path: /SITE/domains → /SITE/settings/domains
2. Wrong content type: JSON → form-encoded (matching StaticHost's UI)
3. Redirect domains sent as \r\n-separated single field, matching StaticHost's expected format
Merge branch 'v14.0/forgejo-codefloe' into fix/sh-primary-domain
All checks were successful
Integration tests for the release process / release-simulation (push) Has been skipped
a86c3fad48
StaticHost's maintainer confirmed that adding domains via a separate API call after site creation causes a race condition where the initial build is already in progress and domain/SSL changes aren't picked up.
The fix is to pass primary_domain directly in the create-site request.
This removes the domain sync retry goroutine and the separate TriggerBuild call, which are no longer needed.
Merge branch 'v15.0/forgejo-codefloe' into fix/sh-primary-domain
Some checks failed
Integration tests for the release process / release-simulation (push) Has been cancelled
411c66405f
fix: trigger initial build after init
Some checks failed
issue-labels / backporting (pull_request_target) Has been skipped
testing / test-mysql (pull_request) Has been skipped
testing / test-sqlite (pull_request) Has been skipped
testing / frontend-checks (pull_request) Failing after 1m49s
testing / backend-checks (pull_request) Failing after 3m19s
testing / test-unit (pull_request) Has been skipped
testing / semgrep/ci (pull_request) Successful in 44s
milestone / set (pull_request_target) Has been skipped
testing / test-e2e (pull_request) Has been skipped
testing / test-remote-cacher (redis) (pull_request) Has been skipped
testing / test-remote-cacher (redict) (pull_request) Has been skipped
testing / test-pgsql (pull_request) Has been skipped
testing / test-remote-cacher (garnet) (pull_request) Has been skipped
testing / test-remote-cacher (valkey) (pull_request) Has been skipped
testing / security-check (pull_request) Has been skipped
bceb3c0e20
pat-s merged commit bb0fb8cdbc into v15.0/forgejo-codefloe 2026-04-23 17:03:45 +00:00
pat-s deleted branch fix/sh-primary-domain 2026-04-23 17:03:45 +00:00
Sign in to join this conversation.
No reviewers
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
codefloe/forgejo-codefloe!32
No description provided.