The FedWiki walkthrough fails on networks whose DNS drops loopback answers #236

Closed
opened 2026-10-17 16:18:26 +00:00 by cgalo5758 · 3 comments
Owner

What a contributor runs into

The test stack names the FedWiki farm under localtest.me, a public domain whose names all resolve to 127.0.0.1 and ::1. Some resolvers refuse to pass on a public name that points at the loopback address: home routers with DNS-rebind protection, some office resolvers and some VPNs. Without a network the name does not resolve at all.

On such a network the app's call to the farm fails with lookup admin.localtest.me: no such host. TestFedWikiSitesWalkthrough then waits 30 seconds and fails in phase 1 with "row for walk-....sites.localhost never reached the expected state". Nothing in the failure names DNS, and the same commit passes on a network whose resolver answers.

The walkthroughs' reachability guard (skipUnlessIntegrationEndpointReachable) has the same blind spot. When its request to the farm fails on the lookup, it skips with "add "fedwiki" to COMPOSE_PROFILES", although the farm is composed.

The farm cannot move to *.localhost like the stack's other names. FedWiki's sign-in shares one session cookie across the farm's sites, and browsers do not scope a cookie to .localhost, so sign-in on one site would not reach another.

Why it costs

The suite's result depends on the network it runs on. A contributor on a filtering network gets a timeout or a misleading skip, with nothing pointing at the cause.

Where

test/e2e/operator-walkthroughs/helpers_test.go, test/bootstrap-stack.sh, test/AGENTS.md

Done when

  • The reachability guard checks the endpoint's host before it sends the request: the host resolves, and a name defined to point at this machine (*.localhost, *.localtest.me) resolves only to loopback addresses. When the check fails, the guard fails the test instead of skipping it, naming the host, what the lookup returned, and the hosts-file lines that fix it. An endpoint hosted elsewhere still passes the check.
  • bootstrap-stack.sh runs the same check on the farm's host whenever the fedwiki profile is on, and prints the same fix.
  • test/AGENTS.md says why the farm uses localtest.me, which resolvers break it, and gives the hosts-file lines.
### What a contributor runs into The test stack names the FedWiki farm under `localtest.me`, a public domain whose names all resolve to `127.0.0.1` and `::1`. Some resolvers refuse to pass on a public name that points at the loopback address: home routers with DNS-rebind protection, some office resolvers and some VPNs. Without a network the name does not resolve at all. On such a network the app's call to the farm fails with `lookup admin.localtest.me: no such host`. `TestFedWikiSitesWalkthrough` then waits 30 seconds and fails in phase 1 with "row for walk-....sites.localhost never reached the expected state". Nothing in the failure names DNS, and the same commit passes on a network whose resolver answers. The walkthroughs' reachability guard (`skipUnlessIntegrationEndpointReachable`) has the same blind spot. When its request to the farm fails on the lookup, it skips with "add "fedwiki" to COMPOSE_PROFILES", although the farm is composed. The farm cannot move to `*.localhost` like the stack's other names. FedWiki's sign-in shares one session cookie across the farm's sites, and browsers do not scope a cookie to `.localhost`, so sign-in on one site would not reach another. ### Why it costs The suite's result depends on the network it runs on. A contributor on a filtering network gets a timeout or a misleading skip, with nothing pointing at the cause. ### Where test/e2e/operator-walkthroughs/helpers_test.go, test/bootstrap-stack.sh, test/AGENTS.md ### Done when - The reachability guard checks the endpoint's host before it sends the request: the host resolves, and a name defined to point at this machine (`*.localhost`, `*.localtest.me`) resolves only to loopback addresses. When the check fails, the guard fails the test instead of skipping it, naming the host, what the lookup returned, and the hosts-file lines that fix it. An endpoint hosted elsewhere still passes the check. - `bootstrap-stack.sh` runs the same check on the farm's host whenever the `fedwiki` profile is on, and prints the same fix. - test/AGENTS.md says why the farm uses `localtest.me`, which resolvers break it, and gives the hosts-file lines.
cgalo5758 added the
kind
debt
area/testing
labels 2026-10-17 16:18:26 +00:00
Author
Owner

Fixed in dbd3a890. The reachability guard looks the endpoint's host up before it sends the request and fails the test with the host, the reason and the /etc/hosts lines. bootstrap-stack.sh prints the same fix when the fedwiki profile is on, and test/AGENTS.md has a section, "Names that must resolve to this machine".

Fixed in dbd3a890. The reachability guard looks the endpoint's host up before it sends the request and fails the test with the host, the reason and the /etc/hosts lines. `bootstrap-stack.sh` prints the same fix when the fedwiki profile is on, and test/AGENTS.md has a section, "Names that must resolve to this machine".
Author
Owner

Reopening: the walkthrough guard never runs its name check, for the farm or for the forum.

skipUnlessIntegrationEndpointReachable reads the endpoint from the integration's settings page, from the field named for the key. fedwiki-farm-api-url and discourse-base-url are deployment-only keys, and the settings page renders a deployment-only key as static text, "Set fedwiki-farm-api-url in the environment.", with no field holding the URL. The guard finds no http value and returns early, treating the endpoint as unconfigured, so neither the resolution check added here nor the reachability skip runs.

On a network whose resolver drops loopback answers for localtest.me, make test again fails in TestFedWikiSitesWalkthrough with "row ... never reached the expected state; last ... Pending", and the console's log shows lookup admin.localtest.me: no such host on every farm call. The suite that closed this issue ran on a network that resolved the name, so it never exercised the check.

The fix: the guard reads the endpoint from test/.env (MC_FEDWIKI_FARM_API_URL, MC_DISCOURSE_BASE_URL), the file the walkthrough already loads and the console's environment comes from, and a test pins the mapping from key to variable so the guard cannot silently stop reading it again. The bootstrap warning and the test/AGENTS.md section stand as they are.

Reopening: the walkthrough guard never runs its name check, for the farm or for the forum. `skipUnlessIntegrationEndpointReachable` reads the endpoint from the integration's settings page, from the field named for the key. `fedwiki-farm-api-url` and `discourse-base-url` are deployment-only keys, and the settings page renders a deployment-only key as static text, "Set fedwiki-farm-api-url in the environment.", with no field holding the URL. The guard finds no `http` value and returns early, treating the endpoint as unconfigured, so neither the resolution check added here nor the reachability skip runs. On a network whose resolver drops loopback answers for `localtest.me`, `make test` again fails in `TestFedWikiSitesWalkthrough` with "row ... never reached the expected state; last ... Pending", and the console's log shows `lookup admin.localtest.me: no such host` on every farm call. The suite that closed this issue ran on a network that resolved the name, so it never exercised the check. The fix: the guard reads the endpoint from `test/.env` (`MC_FEDWIKI_FARM_API_URL`, `MC_DISCOURSE_BASE_URL`), the file the walkthrough already loads and the console's environment comes from, and a test pins the mapping from key to variable so the guard cannot silently stop reading it again. The bootstrap warning and the `test/AGENTS.md` section stand as they are.
Author
Owner

Fixed in e1bb2959. The guard reads the endpoint from test/.env, under the variable the console reads for the key, and no longer visits the settings page. TestEndpointEnvVar pins the mapping from key to variable for fedwiki-farm-api-url and discourse-base-url.

Fixed in e1bb2959. The guard reads the endpoint from `test/.env`, under the variable the console reads for the key, and no longer visits the settings page. `TestEndpointEnvVar` pins the mapping from key to variable for `fedwiki-farm-api-url` and `discourse-base-url`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#236