@rizom/ops 0.2.0-alpha.483 → 0.2.0-alpha.484

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.
package/dist/images.d.ts CHANGED
@@ -3,11 +3,16 @@ export type { RequiredImage } from "./image-types";
3
3
  import { type ResolvedSiteOverride } from "./load-registry";
4
4
  import { type RunCommand } from "@brains/deploy-support/run-subprocess";
5
5
  /**
6
- * Resolve the immutable runtime image shared by every fleet instance on one
7
- * Brain version. Build and Deploy both import this function so their tags can
8
- * never disagree.
6
+ * Name the immutable runtime image for a Brain version and the exact site
7
+ * packages installed into it: `brain-<version>` for an instance without site
8
+ * pins, else that followed by each pin, sorted, in registry-safe spelling
9
+ * (`@rizom/site-x@1.2.3` → `rizom-site-x-1.2.3`). A pin set too long to spell
10
+ * out is named by a digest of it instead. Every instance with the same Brain
11
+ * version and pins shares one image; a change of pins is a new image, so a
12
+ * site can move on its own. Build and Deploy both import this function so
13
+ * their tags can never disagree.
9
14
  */
10
- export declare function runtimeImageTag(brainVersion: string): string;
15
+ export declare function runtimeImageTag(brainVersion: string, sitePackages?: readonly string[]): string;
11
16
  /**
12
17
  * The npm packages a site override contributes to every new fleet image.
13
18
  * A @rizom-scoped theme is independently published and installs at its own
@@ -21,18 +26,19 @@ export interface ImageRequirementSource {
21
26
  siteOverride?: ResolvedSiteOverride | undefined;
22
27
  }
23
28
  /**
24
- * Derive one immutable image per effective Brain version. Each image contains
25
- * the union of exact site/theme package pins across the entire fleet, including
26
- * instances still on older Brain versions. Promotion must not change an image.
29
+ * Derive one immutable image per effective Brain version and site pin set:
30
+ * every instance runs the image named by its own version and pins, so a
31
+ * site's pin change builds that site's image and no other, and promoting an
32
+ * instance to a version keeps whatever image already carries its pins there.
27
33
  */
28
34
  export declare function requiredImages(users: ImageRequirementSource[]): RequiredImage[];
29
35
  export interface ResolveImageBuildsOptions {
30
36
  users: ImageRequirementSource[];
31
37
  /**
32
38
  * Explicit dispatch override — the manual/backfill path. When set, exactly
33
- * this one version is built with the fleet union plus explicit extra pins. Published
34
- * tags stay immutable: a same-tag rebuild from a newer Dockerfile can
35
- * strand the tag boot-broken, so rebuilding needs allowTagOverwrite.
39
+ * one image is built: this version with exactly the dispatched pins.
40
+ * Published tags stay immutable: a same-tag rebuild from a newer Dockerfile
41
+ * can strand the tag boot-broken, so rebuilding needs allowTagOverwrite.
36
42
  */
37
43
  brainVersionInput?: string | undefined;
38
44
  sitePackagesInput?: string | undefined;