fix(dev): stop the dev stack /ready 503 from Infisical #471

Merged
Claude-Run merged 1 commit from fix/PMS-707-dev-ready-infisical-probe into main 2026-08-01 02:57:40 +02:00
Member

compose.dev.yml hardcoded INFISICAL_BASE_URL: http://infisical:8080 on the server service while the infisical service itself sits behind the infisical compose profile, which just dev does not start. The readiness handler treats a set INFISICAL_BASE_URL as opt-in to the probe, so a plain just dev stack probed an absent host, failed after the 1s client timeout, and returned 503 with checks.infisical set to the error on every /api/v1/ready.

Compose now interpolates ${MOKOSH_SERVER_INFISICAL_BASE_URL:-}, which renders as an empty value by default. The distinct name is deliberate: .env already carries a host-side INFISICAL_BASE_URL=http://localhost:28002 that just infisical-bootstrap consumes on the host, so the in-network service-DNS form needs its own key rather than a re-used one.

An empty value alone was not enough, because env::var returns Ok("") for a variable set to the empty string. infisical_probe() now treats unset, empty, and whitespace-only alike as unconfigured, so the probe reports "skipped" instead of dialling an empty URL. The build path is split into build_infisical_probe() and run_infisical_probe() so both the blank rule and the configured-but-unreachable error path are unit testable without touching the process-global OnceLock. tests/readiness.rs now sets the empty value rather than removing the key, which is the exact shape compose hands the container, so the integration test guards the rule end to end.

just dev-infisical writes MOKOSH_SERVER_INFISICAL_BASE_URL=http://infisical:8080 into .env before bringing the profile up, reusing the in-place rewrite pattern just dev already uses for MOKOSH_HOST_BIND_IP and USER, so the opt-in path stays a single command.

#PMS-707

compose.dev.yml hardcoded `INFISICAL_BASE_URL: http://infisical:8080` on the server service while the `infisical` service itself sits behind the `infisical` compose profile, which `just dev` does not start. The readiness handler treats a set `INFISICAL_BASE_URL` as opt-in to the probe, so a plain `just dev` stack probed an absent host, failed after the 1s client timeout, and returned 503 with `checks.infisical` set to the error on every `/api/v1/ready`. Compose now interpolates `${MOKOSH_SERVER_INFISICAL_BASE_URL:-}`, which renders as an empty value by default. The distinct name is deliberate: `.env` already carries a host-side `INFISICAL_BASE_URL=http://localhost:28002` that `just infisical-bootstrap` consumes on the host, so the in-network service-DNS form needs its own key rather than a re-used one. An empty value alone was not enough, because `env::var` returns `Ok("")` for a variable set to the empty string. `infisical_probe()` now treats unset, empty, and whitespace-only alike as unconfigured, so the probe reports "skipped" instead of dialling an empty URL. The build path is split into `build_infisical_probe()` and `run_infisical_probe()` so both the blank rule and the configured-but-unreachable error path are unit testable without touching the process-global `OnceLock`. `tests/readiness.rs` now sets the empty value rather than removing the key, which is the exact shape compose hands the container, so the integration test guards the rule end to end. `just dev-infisical` writes `MOKOSH_SERVER_INFISICAL_BASE_URL=http://infisical:8080` into `.env` before bringing the profile up, reusing the in-place rewrite pattern `just dev` already uses for `MOKOSH_HOST_BIND_IP` and `USER`, so the opt-in path stays a single command. #PMS-707
fix(dev): stop the dev stack /ready 503 from Infisical
All checks were successful
E2E / Playwright against staging (pull_request) Successful in 43s
Check / fmt + clippy + build + tests (pull_request) Successful in 4m55s
Integration / integration tests (pull_request) Successful in 9m23s
Create release / Gate (release-branch merges only) (pull_request) Successful in 3s
Create release / Create release from merged PR (pull_request) Has been skipped
8fc4606a3d
compose.dev.yml hardcoded `INFISICAL_BASE_URL: http://infisical:8080` on the server service while the `infisical` service itself sits behind the `infisical` compose profile, which `just dev` does not start. The readiness handler treats a set `INFISICAL_BASE_URL` as opt-in to the probe, so a plain `just dev` stack probed an absent host, failed after the 1s client timeout, and returned 503 with `checks.infisical` set to the error on every `/api/v1/ready`.

Compose now interpolates `${MOKOSH_SERVER_INFISICAL_BASE_URL:-}`, which renders as an empty value by default. The distinct name is deliberate: `.env` already carries a host-side `INFISICAL_BASE_URL=http://localhost:28002` that `just infisical-bootstrap` consumes on the host, so the in-network service-DNS form needs its own key rather than a re-used one.

An empty value alone was not enough, because `env::var` returns `Ok("")` for a variable set to the empty string. `infisical_probe()` now treats unset, empty, and whitespace-only alike as unconfigured, so the probe reports "skipped" instead of dialling an empty URL. The build path is split into `build_infisical_probe()` and `run_infisical_probe()` so both the blank rule and the configured-but-unreachable error path are unit testable without touching the process-global `OnceLock`. `tests/readiness.rs` now sets the empty value rather than removing the key, which is the exact shape compose hands the container, so the integration test guards the rule end to end.

`just dev-infisical` writes `MOKOSH_SERVER_INFISICAL_BASE_URL=http://infisical:8080` into `.env` before bringing the profile up, reusing the in-place rewrite pattern `just dev` already uses for `MOKOSH_HOST_BIND_IP` and `USER`, so the opt-in path stays a single command.

#PMS-707
Claude-Run deleted branch fix/PMS-707-dev-ready-infisical-probe 2026-08-01 02:57:41 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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
psa-systems/mokosh-server!471
No description provided.