diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46006e09..e621e211 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,9 @@ on: - "internal/skills/docs/**" - "packaging/**" - "examples/**" + - "internal/splice/versions.json" + - "assets/**" + - "internal/ui/dist/**" push: branches: - main @@ -37,6 +40,9 @@ on: - "internal/skills/docs/**" - "packaging/**" - "examples/**" + - "internal/splice/versions.json" + - "assets/**" + - "internal/ui/dist/**" permissions: contents: read diff --git a/docs/versions.md b/docs/versions.md index 8448ab02..d59aa4f2 100644 --- a/docs/versions.md +++ b/docs/versions.md @@ -109,6 +109,11 @@ A maintainer then: - Reviews the diff. - Bumps `latest_alias` if the new tag should become the default `--version latest`. +- Sets `min_memory_bytes` and `recommended_memory_bytes` on the first + entry of a new major line (from that release's + `cluster/compose/localnet/resource-constraints.yaml`). Later tags in + the line inherit them; `go test ./internal/splice/` fails until a + new major has them. - Optionally runs the integration test against the new entry before merging. - Commits + pushes. diff --git a/internal/splice/versions.json b/internal/splice/versions.json index a26b40b9..9a531776 100644 --- a/internal/splice/versions.json +++ b/internal/splice/versions.json @@ -178,7 +178,9 @@ "commit": "4957155938c910d0f498d2abbec5ca404e9a4b92", "content_sha": "7eb3397d27e2e78143260e6d56df0cb4fb84c8ec1a3e6ef67690dd2bf1f964d9", "size": 206905054, - "major": "0.9" + "major": "0.9", + "min_memory_bytes": 8000000000, + "recommended_memory_bytes": 12000000000 }, { "tag": "token-standard-v2", diff --git a/internal/splice/versions_test.go b/internal/splice/versions_test.go index 5d1b3bf3..dcda213d 100644 --- a/internal/splice/versions_test.go +++ b/internal/splice/versions_test.go @@ -230,6 +230,23 @@ func TestMinMemoryFor_ExplicitOverrideWins(t *testing.T) { } } +func TestEveryCataloguedMajorHasCuratedFloor(t *testing.T) { + curated := map[string]bool{} + for _, v := range SupportedVersions { + if _, ok := curated[v.Major]; !ok { + curated[v.Major] = false + } + if v.MinMemoryBytes > 0 && v.RecommendedMemoryBytes > 0 { + curated[v.Major] = true + } + } + for major, ok := range curated { + if !ok { + t.Errorf("Splice major %q has no entry with min_memory_bytes and recommended_memory_bytes set", major) + } + } +} + func TestSupportedIsSorted(t *testing.T) { got := Supported() for i := 1; i < len(got); i++ {