diff --git a/deploy/nginx/README.md b/deploy/nginx/README.md index 6283d53b..831ad26d 100644 --- a/deploy/nginx/README.md +++ b/deploy/nginx/README.md @@ -90,11 +90,15 @@ The shared routes name `site`, `content`, `analysis`, `content_node`, absorbs both: node in this repository taking over most of what Tomcat serves, and the site being startable locally, where they become compose service names. -`/api/` for DeltaSignal exists in none of the Apache configuration, which is why -DeltaSignal cannot work on beta today — the Angular side calls it as a bare -relative path, routed only by the dev server's proxy, which does not exist in a -built artifact. Note the port on the dev box: **8090**, not the 8080 DeltaSignal's -own compose binds, because 8080 there is Tomcat. +`/api/` is DeltaSignal's: the Angular side calls `/api/pathways`, `/api/parse` and +`/api/solve` as bare relative paths, which `common/routes.conf` sends to the +`deltasignal` upstream (the dev server's proxy does the same under `ng serve`). +Beta's site profile turns the Perturb button on because of this route; only a +deployment with this route may turn `deltaSignal` on. The DeltaSignal service is not part of +this repository's compose: it runs from DeltaSignal's own repository on the same +host, published on loopback only, at **8090**, not the 8080 DeltaSignal's own +compose binds, because 8080 there is Tomcat. If it stops, the button's calls fail; +`/api/pathways` answering a list confirms it is up. ## Connections, which is a reason this is worth doing diff --git a/e2e/deltasignal-toggle.spec.ts b/e2e/deltasignal-toggle.spec.ts index b26c0514..2e97e610 100644 --- a/e2e/deltasignal-toggle.spec.ts +++ b/e2e/deltasignal-toggle.spec.ts @@ -1,10 +1,10 @@ /** * DeltaSignal is offered only where a deployment asks for it. * - * It is a research feature that depends on a DeltaSignal backend, and `/api` is - * routed only by proxy.conf.js -- the dev server's proxy, which does not exist in - * a built artifact. A deployment without that backend must not offer a button - * whose every call fails, so the profile decides, and absent means off. + * It is a research feature that depends on a DeltaSignal backend, reached at + * `/api` through proxy.conf.js under the dev server and through nginx on beta. A + * deployment without that route must not offer a button whose every call fails, + * so the profile decides, and absent means off. * * Both states are checked against one build by setting `window.__APP_ENV` before * the app's scripts run, which is the runtime profile override the config already @@ -54,6 +54,8 @@ test.describe('The DeltaSignal toggle', () => { await expect(page.locator('cr-deltasignal-panel')).toHaveCount(0); }); + // One "on" case: its title keys its recorded backend, and which profiles have + // the flag (development and beta) is pinned by environments.spec.ts. test('offers it on a deployment that does', async ({ page }) => { await openWithProfile(page, 'development'); await expect(perturb(page)).toHaveCount(1); diff --git a/projects/website-angular/src/config/environments.ts b/projects/website-angular/src/config/environments.ts index 4476a00a..1186eea0 100644 --- a/projects/website-angular/src/config/environments.ts +++ b/projects/website-angular/src/config/environments.ts @@ -52,9 +52,9 @@ export interface SiteProfile { * `specs/005-search-page-answers/research.md`, D1 and D3. * * Absent means off, like `deltaSignal`, so a deployment opts in rather than - * inherits. Only `development` has it today: the endpoint is not deployed on - * beta yet, and no keypair has been exchanged, so every other profile would - * offer a button whose calls fail. + * inherits. `development` and `beta` have it: beta's route is served by + * serve-prod.js, which holds the signing key (see the beta profile); any other + * profile would offer a button whose calls fail. */ searchAnswerEndpoint?: string; /**