fix(scripts): fail the federation probe without an answer; quiet init.sh under deploy.sh #4

Merged
genji1024 merged 2 commits from fix/scripts-checks into main 2026-10-10 14:06:31 +09:00
Collaborator

Closes #3

Changes

  • scripts/check.sh: the federation probe now passes only when the server actually answers with a status other than 200. A connection error (DNS, refused, timeout) now fails with could not check federation (…) instead of reporting the endpoint as closed.
  • scripts/init.sh: new --no-hint option that skips the closing "what to do next" message. Rendering is unchanged, and running init.sh by hand still prints the hint.
  • scripts/deploy.sh: calls init.sh --no-hint, since it stops Synapse when the config changed and starts the stack itself. The deploy log no longer tells you to restart Synapse by hand.

Verification

  • sh -n passes for every script (CI also runs this).
  • check.sh with curl failing: the federation line is now FAIL could not check federation (curl:…).
  • check.sh with a stubbed curl that answers like a healthy, closed homeserver (versions 200, CORS header, federation 404, register 403): all four lines are ok, exit 0.
  • Not yet run against the real stack: the next demo deploy after merging will show init.sh without the hint and check.sh passing.
Closes #3 ## Changes - **`scripts/check.sh`**: the federation probe now passes only when the server actually answers with a status other than 200. A connection error (DNS, refused, timeout) now fails with `could not check federation (…)` instead of reporting the endpoint as closed. - **`scripts/init.sh`**: new `--no-hint` option that skips the closing "what to do next" message. Rendering is unchanged, and running `init.sh` by hand still prints the hint. - **`scripts/deploy.sh`**: calls `init.sh --no-hint`, since it stops Synapse when the config changed and starts the stack itself. The deploy log no longer tells you to restart Synapse by hand. ## Verification - `sh -n` passes for every script (CI also runs this). - `check.sh` with `curl` failing: the federation line is now `FAIL could not check federation (curl:…)`. - `check.sh` with a stubbed `curl` that answers like a healthy, closed homeserver (versions 200, CORS header, federation 404, register 403): all four lines are `ok`, exit 0. - Not yet run against the real stack: the next demo deploy after merging will show `init.sh` without the hint and `check.sh` passing.
- Only report federation as closed when the server says so
  - fail with the curl error when no HTTP answer came back
  - keep failing on 200 and passing on any other status

Refs #3
fix(init): skip the next-step hint when deploy.sh runs it
All checks were successful
ci / check (pull_request) Successful in 57s
384ba62740
- Stop the deploy log telling people to restart Synapse by hand
  - add an option to init.sh that skips its closing hint
  - use it from deploy.sh, which does those steps itself

Closes #3
genji1024 approved these changes 2026-10-10 14:05:45 +09:00
genji1024 left a comment

LGTM!

LGTM!
genji1024 deleted branch fix/scripts-checks 2026-10-10 14:06:31 +09:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
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
genji1024/koto!4
No description provided.