Scope the sidecar trailer by package so a mixed branch cannot lose it
This commit is contained in:
@@ -83,6 +83,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
VERSION=${INPUT_VERSION:-${GIT_TAG#v}}
|
VERSION=${INPUT_VERSION:-${GIT_TAG#v}}
|
||||||
|
VERSION=${VERSION#v}
|
||||||
# An empty dispatch input falls back to the branch name, so gate this like a tag.
|
# An empty dispatch input falls back to the branch name, so gate this like a tag.
|
||||||
docker run --rm -v "$PWD:/repo" -w /repo node:24.19.0-alpine3.24 \
|
docker run --rm -v "$PWD:/repo" -w /repo node:24.19.0-alpine3.24 \
|
||||||
node release-tooling/contract-version.ts "$VERSION" src/plugin-host/plugin.ts
|
node release-tooling/contract-version.ts "$VERSION" src/plugin-host/plugin.ts
|
||||||
|
|||||||
@@ -606,7 +606,7 @@ provider/consumer semantics in `checkApiVersion`:
|
|||||||
| Plugin `apiVersion` vs host | Result | Host action |
|
| Plugin `apiVersion` vs host | Result | Host action |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| same major, same minor (patch ignored) | `ok` | load |
|
| same major, same minor (patch ignored) | `ok` | load |
|
||||||
| same major, plugin minor **<** host minor | `warn` | load, log — additive-compatible, newer features exist |
|
| same major, plugin minor **<** host minor | `warn` | load, log — built against an older release; check that release's notes |
|
||||||
| same major, plugin minor **>** host minor | `refuse` | **abort boot** — plugin needs a newer host |
|
| same major, plugin minor **>** host minor | `refuse` | **abort boot** — plugin needs a newer host |
|
||||||
| different major | `refuse` | **abort boot** — incompatible contract |
|
| different major | `refuse` | **abort boot** — incompatible contract |
|
||||||
| missing / not a valid semver | `refuse` | **abort boot** — must be declared |
|
| missing / not a valid semver | `refuse` | **abort boot** — must be declared |
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ test("the quick start's sidecars are pinned to the same versions this repo runs"
|
|||||||
const pins = (source: string) =>
|
const pins = (source: string) =>
|
||||||
new Map([...source.matchAll(/image: ([^:\s]+):(v?\d\S*)/g)].map((m) => [m[1] ?? "", m[2] ?? ""]));
|
new Map([...source.matchAll(/image: ([^:\s]+):(v?\d\S*)/g)].map((m) => [m[1] ?? "", m[2] ?? ""]));
|
||||||
const ours = new Map([
|
const ours = new Map([
|
||||||
...pins(readFileSync("compose.yml", "utf8")),
|
|
||||||
...pins(readFileSync("compose.override.yml", "utf8")),
|
...pins(readFileSync("compose.override.yml", "utf8")),
|
||||||
|
...pins(readFileSync("compose.yml", "utf8")), // production wins: the template is the prod quick start
|
||||||
]);
|
]);
|
||||||
const published = pins(template());
|
const published = pins(template());
|
||||||
assert.ok(published.size > 0, "the template should pin sidecars");
|
assert.ok(published.size > 0, "the template should pin sidecars");
|
||||||
|
|||||||
@@ -60,7 +60,13 @@ async function main(): Promise<number> {
|
|||||||
if (!VERSION.test(version)) return fail(`version must be X.Y.Z, got ${JSON.stringify(version)}`);
|
if (!VERSION.test(version)) return fail(`version must be X.Y.Z, got ${JSON.stringify(version)}`);
|
||||||
|
|
||||||
const templatePath = join(import.meta.dirname, "dockerhub-overview.md.tmpl");
|
const templatePath = join(import.meta.dirname, "dockerhub-overview.md.tmpl");
|
||||||
const body = renderOverview(readFileSync(templatePath, "utf8"), version);
|
let template = "";
|
||||||
|
try {
|
||||||
|
template = readFileSync(templatePath, "utf8");
|
||||||
|
} catch (err) {
|
||||||
|
return fail(`${templatePath}: ${err instanceof Error ? err.message : String(err)}`);
|
||||||
|
}
|
||||||
|
const body = renderOverview(template, version);
|
||||||
const leftover = leftoverPlaceholders(body);
|
const leftover = leftoverPlaceholders(body);
|
||||||
if (leftover.length > 0) return fail(`${templatePath} has unrendered placeholders: ${leftover.join(", ")}`);
|
if (leftover.length > 0) return fail(`${templatePath} has unrendered placeholders: ${leftover.join(", ")}`);
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,12 @@
|
|||||||
"matchManagers": ["docker-compose"],
|
"matchManagers": ["docker-compose"],
|
||||||
"commitBody": "Release-Bump: {{{updateType}}}"
|
"commitBody": "Release-Bump: {{{updateType}}}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "The production sidecars, wherever they are pinned — compose.yml and the published quick start move in one branch, so the trailer must not depend on which upgrade sorts first. mailpit is dev-only and stays out",
|
||||||
|
"matchDatasources": ["docker"],
|
||||||
|
"matchPackageNames": ["oryd/hydra", "oryd/keto", "oryd/kratos", "postgres"],
|
||||||
|
"commitBody": "Release-Bump: {{{updateType}}}"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "node is pinned to one version across Dockerfile, dev, E2E and CI, so Renovate moves them in a single branch whose commitBody would otherwise depend on upgrade order — the Dockerfile copy ships, so any node bump is a product change",
|
"description": "node is pinned to one version across Dockerfile, dev, E2E and CI, so Renovate moves them in a single branch whose commitBody would otherwise depend on upgrade order — the Dockerfile copy ships, so any node bump is a product change",
|
||||||
"matchDatasources": ["docker"],
|
"matchDatasources": ["docker"],
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import { AUTH_FLOWS } from "../auth/flow-view.ts";
|
|||||||
// HOST_API_VERSION would always equal the host and defeat the check. No `id`/`basePath` — the
|
// HOST_API_VERSION would always equal the host and defeat the check. No `id`/`basePath` — the
|
||||||
// host derives both from the plugin's folder name.
|
// host derives both from the plugin's folder name.
|
||||||
const scheduling: PluginManifest = definePlugin({
|
const scheduling: PluginManifest = definePlugin({
|
||||||
apiVersion: "0.1.0",
|
apiVersion: "1.0.0",
|
||||||
hooks: { onBoot: () => {} },
|
hooks: { onBoot: () => {} },
|
||||||
nav: [{
|
nav: [{
|
||||||
children: [{ href: "/scheduling/shifts", id: "scheduling:shifts", label: "Shifts", permission: "scheduling:read" }],
|
children: [{ href: "/scheduling/shifts", id: "scheduling:shifts", label: "Shifts", permission: "scheduling:read" }],
|
||||||
|
|||||||
Reference in New Issue
Block a user