Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lexicons/fly/src/composites/fly-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface FlapsStepOpts {
name?: string;
/** Host port mapped to the emulator's `:4280`. Default: `4280`. */
port?: number;
/** Image. Default: `ghcr.io/intentius/mudflaps:0.3.0`. */
/** Image. Default: the pinned mudflaps image (`MUDFLAPS_IMAGE`, from the flapsUp activity). */
image?: string;
/** Readiness timeout in ms. */
timeoutMs?: number;
Expand Down
21 changes: 21 additions & 0 deletions lexicons/fly/src/op/activities/emulator-images.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Single source of truth for the Fly emulator image pins (#808 T2).
*
* mudflaps (Machines API) and spritzer (Sprites API) are the local fakes fly's
* activities are exercised against. These tags were previously duplicated across
* flaps.ts, sprites-emulator.ts, the fly-deploy composite, and tests — and had
* already drifted (the composite's docstring said mudflaps 0.3.0 while the
* activity pinned 0.3.1). Pin each here so a bump touches one line and the
* emulator-freshness check (#808 T2) has a single target to compare against the
* latest GHCR release.
*
* Bump policy (#808): move these only when a consuming test needs a newer
* emulator (a fidelity fix the activities exercise), not on every emulator
* release. For new upstream API surface the emulator leads, then fly bumps here.
*/

/** Pinned mudflaps (Fly Machines / flaps emulator) image. */
export const MUDFLAPS_IMAGE = "ghcr.io/intentius/mudflaps:0.3.1";

/** Pinned spritzer (Fly Sprites emulator) image. */
export const SPRITZER_IMAGE = "ghcr.io/intentius/spritzer:0.3.1";
3 changes: 2 additions & 1 deletion lexicons/fly/src/op/activities/flaps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import {
flapsHealthUrl,
flapsEndpoint,
} from "./flaps";
import { MUDFLAPS_IMAGE } from "./emulator-images";

describe("flaps (mudflaps) lifecycle commands", () => {
test("run command uses defaults and maps the port", () => {
expect(flapsRunCommand({})).toBe(
"docker run -d --rm --name chant-mudflaps -p 4280:4280 ghcr.io/intentius/mudflaps:0.3.1",
`docker run -d --rm --name chant-mudflaps -p 4280:4280 ${MUDFLAPS_IMAGE}`,
);
});

Expand Down
5 changes: 3 additions & 2 deletions lexicons/fly/src/op/activities/flaps.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { emulatorLifecycle } from "@intentius/chant/op";
import { MUDFLAPS_IMAGE } from "./emulator-images";

export interface FlapsUpArgs {
/** Container name. Default: `chant-mudflaps`. */
name?: string;
/** Host port mapped to the emulator's `:4280`. Default: `4280`. */
port?: number;
/** Image. Default: `ghcr.io/intentius/mudflaps:0.3.1`. */
/** Image. Default: the pinned mudflaps image ({@link MUDFLAPS_IMAGE}). */
image?: string;
/** Readiness timeout in ms. Default: `60000`. */
timeoutMs?: number;
Expand All @@ -23,7 +24,7 @@ export interface FlapsDownArgs {
// with FLY_FLAPS_BASE_URL. Shared lifecycle: emulatorLifecycle (#746).
const flaps = emulatorLifecycle({
name: "chant-mudflaps",
image: "ghcr.io/intentius/mudflaps:0.3.1",
image: MUDFLAPS_IMAGE,
containerPort: 4280,
healthPath: "/_mudflaps/health",
});
Expand Down
5 changes: 3 additions & 2 deletions lexicons/fly/src/op/activities/sprites-emulator.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { emulatorLifecycle } from "@intentius/chant/op";
import { SPRITZER_IMAGE } from "./emulator-images";

export interface SpritesUpArgs {
/** Container name. Default: `chant-spritzer`. */
name?: string;
/** Host port mapped to the emulator's `:4290`. Default: `4290`. */
port?: number;
/** Image. Default: `ghcr.io/intentius/spritzer:0.3.1`. */
/** Image. Default: the pinned spritzer image ({@link SPRITZER_IMAGE}). */
image?: string;
/** Readiness timeout in ms. Default: `60000`. */
timeoutMs?: number;
Expand All @@ -24,7 +25,7 @@ export interface SpritesDownArgs {
// helper that boots mudflaps for fly).
const spritzer = emulatorLifecycle({
name: "chant-spritzer",
image: "ghcr.io/intentius/spritzer:0.3.1",
image: SPRITZER_IMAGE,
containerPort: 4290,
healthPath: "/_spritzer/health",
});
Expand Down