@norskvideo/ctl-dev-kit 0.1.101 → 0.1.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,28 @@ support code that hits a studio/media port must route through a `TEST_HOST`
32
32
  helper** (`process.env.NORSK_TEST_HOST ?? "localhost"`), never a hardcoded
33
33
  `localhost`. Daemon/backend fetches stay on `localhost`.
34
34
 
35
+ ### A studio host port binds loopback unless you ask otherwise
36
+
37
+ norsk-ctl gives the **`studio`** service's compose ports (`STUDIO_HOST_PORT`) an
38
+ explicit `127.0.0.1` bind at launch — docker publishes an unbound port on every
39
+ interface and its rules sit ahead of ufw. No other service's ports are touched.
40
+
41
+ A loopback bind is **unreachable via `host.docker.internal`**. So in the DooD
42
+ runner, one of these must hold:
43
+
44
+ - `NORSK_TEST_NET=direct` — the preferred answer, and what the canonical
45
+ `integration.yml` / `smoke.yml` / `build-docs.yml` topology step already sets.
46
+ Instances are reached by compose name on `norsk-net` at the **container** port,
47
+ so no host publish is involved at all.
48
+ - the launch passes `--publish-debug-ports`, restoring the old binding. The
49
+ shared `runProductSmoke` and demo drivers do this for you when the host they
50
+ fetch from is not loopback, and only after probing that the resolved ctl
51
+ advertises the flag (the CLI is `.strict()`, and a product pins a released ctl
52
+ independently of the harness). A product's own launch code must do both.
53
+
54
+ A harness reaching a studio port at `${NORSK_TEST_HOST}` while neither holds
55
+ will see every studio gate time out with connection refused.
56
+
35
57
  ## Host-shared working directory (or studio EACCESes on boot)
36
58
 
37
59
  Studio bind-mounts its instance working directory as `${workdir}:/data` and runs
@@ -17,7 +17,12 @@ export declare function startInstanceProxy(opts: {
17
17
  * instead of `NORSK_TEST_HOST:studioHostPort` — a `noPublish` instance binds
18
18
  * no host port, so the caller supplies its `norsk-net` reach
19
19
  * (`<id>-studio-1:8000`) via `resolveEndpoint`. Omitted = today's
20
- * host-published behaviour. */
20
+ * host-published behaviour.
21
+ *
22
+ * Supply it whenever `NORSK_TEST_HOST` is not loopback: ctl binds a
23
+ * product's STUDIO_HOST_PORT to `127.0.0.1`, which the host-gateway alias
24
+ * cannot reach. The alternative is launching with `--publish-debug-ports`.
25
+ * See conventions/integration-testing.md. */
21
26
  upstream?: {
22
27
  host: string;
23
28
  port: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norskvideo/ctl-dev-kit",
3
- "version": "0.1.101",
3
+ "version": "0.1.103",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./create-product": "./create-product/create-product.ts",