Skip to content

0a974e89 - Set FAUCET_LOW_BALANCE_THRESHOLD in the e2e-stack API env - #1431

Draft
Danswar wants to merge 1 commit into
DFXswiss:developfrom
Danswar:fix/e2e-faucet-threshold
Draft

0a974e89 - Set FAUCET_LOW_BALANCE_THRESHOLD in the e2e-stack API env#1431
Danswar wants to merge 1 commit into
DFXswiss:developfrom
Danswar:fix/e2e-faucet-threshold

Conversation

@Danswar

@Danswar Danswar commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

EN:
The API container in e2e-stack no longer boots: its Configuration constructor validates FAUCET_LOW_BALANCE_THRESHOLD and throws when it is unset, so the process exits before Nest starts and up.sh times out after 540s waiting for api to be healthy. env/api.env never set that variable, so every full E2E run since that guard landed fails before a single Playwright test executes. This adds the variable next to the identical REALUNIT_W2W_GAS_LOW_BALANCE_THRESHOLD entry.

DE:
Der API-Container in e2e-stack bootet nicht mehr: Sein Configuration-Konstruktor validiert FAUCET_LOW_BALANCE_THRESHOLD und wirft, wenn die Variable fehlt, wodurch der Prozess vor dem Nest-Start abbricht und up.sh nach 540s auf einen gesunden api wartet. env/api.env hat diese Variable nie gesetzt, also scheitert seither jeder vollständige E2E-Lauf, bevor überhaupt ein Playwright-Test läuft. Dieser PR ergänzt die Variable direkt neben dem gleichartigen Eintrag REALUNIT_W2W_GAS_LOW_BALANCE_THRESHOLD.

Details

Observed failure

up.sh waits for the api service and then dumps the container log:

[e2e-stack] Waiting for service 'api' to become healthy (timeout 540s)...
[e2e-stack] ERROR: Timed out after 540s waiting for 'api' (last status: starting).
[e2e-stack] ERROR: API failed to become healthy. Recent API logs:
api-1  |             throw new Error('Missing FAUCET_LOW_BALANCE_THRESHOLD');
api-1  |     at new Configuration (/home/node/dist/src/config/config.js:62:1)
api-1  |     at GetConfig (/home/node/dist/src/config/config.js:60:12)

The throw happens while a module-level static initializer builds the config, i.e. during
require, so it is fatal for the process — the faucet feature itself is never reached.

Timeline

The last green full E2E run was at 2026-08-26T09:57Z. The guard was merged into the API at
10:45Z. Every full run after that point fails with the log above; none of them reach the
Playwright step.

Why this value

It is a tuning threshold in ETH, not a credential, and the guard only requires a finite value
greater than zero. No faucet wallet is funded in this hermetic stack, so the threshold is never
compared against a real balance. 0.05 mirrors REALUNIT_W2W_GAS_LOW_BALANCE_THRESHOLD, which
sits in the same block for the identical kind of guard, and matches the API's own
.env.example.

Scope

One variable plus a comment covering both threshold entries. No compose or script change.

The API validates FAUCET_LOW_BALANCE_THRESHOLD in its Configuration constructor and throws when it is unset, which kills the whole boot rather than only the faucet feature. Since that guard landed, the api service crash-loops and up.sh times out after 540s waiting for it to become healthy, so no Playwright test runs at all. The value is a tuning threshold, not a credential; the faucet wallet is not funded in this stack, so any positive value works - 0.05 matches the neighbouring REALUNIT_W2W_GAS_LOW_BALANCE_THRESHOLD, which exists for the identical guard.
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