From ee29216f8822695ea3eb80d113658ed4fd88c072 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 16 Jul 2026 17:17:25 +0000 Subject: [PATCH] [minor] Promote non-ISLE sitectl presets to v1 --- README.md | 6 ++ ci/config-management-smoke-inner.sh | 13 +++-- docs/examples.md | 11 +++- docs/managed-runtime.md | 5 ++ examples/binpack/main.tf | 7 +++ .../contracttest/template_version_test.go | 38 ++++++++----- template_versions.tftest.hcl | 55 ++++++++++++++++++- templates/apps.json | 26 ++++----- tests/config-management/ansible/smoke.yml | 5 +- .../config-management/salt-pillar/wp-prod.sls | 3 +- 10 files changed, 133 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index ea6faa5..fd45098 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,12 @@ release set. Override individual selectors with `runtime.sitectl.package_versions` when intentionally testing or promoting a different compatible release set. +All non-ISLE presets use the coordinated sitectl v1.0.0 core/plugin release. +ISLE intentionally remains on its last released compatibility set—sitectl +v0.40.0, sitectl-drupal v0.12.0, and sitectl-isle v0.19.0—until its remaining +components are ready for a coordinated v1 release. Keep ISLE on that complete +set rather than mixing its pre-v1 plugin with v1 packages. + GCP deployments have two Terraform ownership layers. Apply [`modules/gcp-foundation`](modules/gcp-foundation/README.md) once per service project from a small, long-lived state; it owns required APIs, the Cloud Run diff --git a/ci/config-management-smoke-inner.sh b/ci/config-management-smoke-inner.sh index b6515a3..8489319 100755 --- a/ci/config-management-smoke-inner.sh +++ b/ci/config-management-smoke-inner.sh @@ -263,8 +263,8 @@ assert env["SITECTL_PLUGIN"] == "isle" assert "sitectl-isle" in env["SITECTL_PACKAGES"].split() assert json.loads(env["SITECTL_PACKAGE_VERSIONS"]) == { "sitectl": "v0.40.0", - "sitectl-drupal": "v0.11.0", - "sitectl-isle": "v0.12.0", + "sitectl-drupal": "v0.12.0", + "sitectl-isle": "v0.19.0", } assert project["docker_compose_repo"] == "https://github.com/libops/isle" assert project["project_dir"] == "/mnt/disks/data/libops/isle/main" @@ -447,8 +447,8 @@ assert Path(expected_project_dir).is_dir() if expected_name == "wp-prod": assert json.loads(env["SITECTL_PACKAGE_VERSIONS"]) == { - "sitectl": "v0.40.0", - "sitectl-wp": "v0.10.0", + "sitectl": "v1.0.0", + "sitectl-wp": "v1.0.0", } assert "BASH_ENV" not in env assert "LD_PRELOAD" not in env @@ -474,6 +474,11 @@ if expected_name == "wp-prod": assert "\t/usr/local/bin/contract-agent\t0750\troot\troot\tcloud-compose.service" in artifact_manifest assert not Path("/tmp/cloud-compose-salt-backtick-injection").exists() assert not Path("/tmp/cloud-compose-salt-command-injection").exists() +elif expected_name == "drupal-prod": + assert json.loads(env["SITECTL_PACKAGE_VERSIONS"]) == { + "sitectl": "v1.0.0", + "sitectl-drupal": "v1.0.0", + } for path in [ "/home/cloud-compose/init", diff --git a/docs/examples.md b/docs/examples.md index fdcafbc..e128c5c 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -129,8 +129,8 @@ healthcheck settings: runtime = { sitectl = { package_versions = { - sitectl = "v0.40.0" - sitectl-wp = "v0.6.0" + sitectl = "v1.0.0" + sitectl-wp = "v1.0.0" } } compose = { @@ -173,6 +173,13 @@ runtime = { } } } + sitectl = { + package_versions = { + sitectl = "v1.0.0" + sitectl-wp = "v1.0.0" + sitectl-drupal = "v1.0.0" + } + } } ``` diff --git a/docs/managed-runtime.md b/docs/managed-runtime.md index 3044422..d418ff9 100644 --- a/docs/managed-runtime.md +++ b/docs/managed-runtime.md @@ -26,6 +26,11 @@ core and plugins independently. The provider-neutral backward-compatible fallback only for an installed package with neither a template selector nor an explicit per-package selector. +The ISLE preset is an intentional temporary exception to the v1 defaults. It +stays on sitectl v0.40.0, sitectl-drupal v0.12.0, and sitectl-isle v0.19.0 until +the remaining ISLE components can ship together as v1. Do not combine the +pre-v1 ISLE plugin with the v1 core or Drupal plugin. + Omitting `runtime.sitectl.packages` selects the template's package set. An explicit list replaces that set; `packages = []` or `packages = ["sitectl"]` selects the core CLI only. A per-project `sitectl_packages` value follows the diff --git a/examples/binpack/main.tf b/examples/binpack/main.tf index f72ac92..98f06b4 100644 --- a/examples/binpack/main.tf +++ b/examples/binpack/main.tf @@ -27,5 +27,12 @@ module "apps" { } } } + sitectl = { + package_versions = { + sitectl = "v1.0.0" + sitectl-wp = "v1.0.0" + sitectl-drupal = "v1.0.0" + } + } } } diff --git a/internal/contracttest/template_version_test.go b/internal/contracttest/template_version_test.go index 444cd56..afc30ad 100644 --- a/internal/contracttest/template_version_test.go +++ b/internal/contracttest/template_version_test.go @@ -29,36 +29,38 @@ func TestTemplateVersionContract(t *testing.T) { expectedVersions := map[string]map[string]string{ "default": { - "sitectl": "v0.40.0", + "sitectl": "v1.0.0", }, "archivesspace": { - "sitectl": "v0.40.0", - "sitectl-archivesspace": "v0.7.0", + "sitectl": "v1.0.0", + "sitectl-archivesspace": "v1.0.0", }, "drupal": { - "sitectl": "v0.40.0", - "sitectl-drupal": "v0.12.0", + "sitectl": "v1.0.0", + "sitectl-drupal": "v1.0.0", }, + // ISLE remains on its last released pre-v1 compatibility set until + // the outstanding ISLE components are ready for a coordinated v1. "isle": { "sitectl": "v0.40.0", "sitectl-drupal": "v0.12.0", "sitectl-isle": "v0.19.0", }, "ojs": { - "sitectl": "v0.40.0", - "sitectl-ojs": "v0.7.0", + "sitectl": "v1.0.0", + "sitectl-ojs": "v1.0.0", }, "omeka-classic": { - "sitectl": "v0.40.0", - "sitectl-omeka-classic": "v0.7.0", + "sitectl": "v1.0.0", + "sitectl-omeka-classic": "v1.0.0", }, "omeka-s": { - "sitectl": "v0.40.0", - "sitectl-omeka-s": "v0.7.0", + "sitectl": "v1.0.0", + "sitectl-omeka-s": "v1.0.0", }, "wp": { - "sitectl": "v0.40.0", - "sitectl-wp": "v0.6.0", + "sitectl": "v1.0.0", + "sitectl-wp": "v1.0.0", }, } @@ -121,4 +123,14 @@ func TestTemplateVersionContract(t *testing.T) { requireContains(t, content, "package_versions = merge(local.template_sitectl_package_versions, local.input_sitectl.package_versions)", relativePath+" explicit package-version override") requireContains(t, content, "local.input_sitectl.packages == null ? local.template.packages : local.input_sitectl.packages", relativePath+" omitted-package handling") } + + for _, relativePath := range []string{"examples/binpack/main.tf", "docs/examples.md"} { + content := readRepositoryFile(t, root, relativePath) + for _, packageName := range []string{"sitectl", "sitectl-wp", "sitectl-drupal"} { + requireContains(t, content, packageName, relativePath+" bin-pack package") + } + requireContains(t, content, `sitectl = "v1.0.0"`, relativePath+" bin-pack core selector") + requireContains(t, content, `sitectl-wp = "v1.0.0"`, relativePath+" bin-pack WordPress selector") + requireContains(t, content, `sitectl-drupal = "v1.0.0"`, relativePath+" bin-pack Drupal selector") + } } diff --git a/template_versions.tftest.hcl b/template_versions.tftest.hcl index 8752f40..bf9f3c9 100644 --- a/template_versions.tftest.hcl +++ b/template_versions.tftest.hcl @@ -8,7 +8,60 @@ mock_provider "google" { } mock_provider "time" {} -run "template_uses_released_package_set" { +run "default_template_uses_v1_core" { + command = plan + + variables { + name = "template-versions" + cloud_provider = "gcp" + gcp = { + project_id = "test-project" + project_number = "123456789" + } + runtime = { + rootfs_archive_url = "https://example.invalid/cloud-compose.tar.gz" + rootfs_archive_sha256 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + compose = { + repo = "https://github.com/libops/wp.git" + } + } + } + + assert { + condition = local.sitectl.package_versions == { + sitectl = "v1.0.0" + } + error_message = "The default template must select the released sitectl v1 core." + } +} + +run "non_isle_template_uses_v1_release_set" { + command = plan + + variables { + name = "template-versions" + cloud_provider = "gcp" + template = "wp" + gcp = { + project_id = "test-project" + project_number = "123456789" + } + runtime = { + rootfs_archive_url = "https://example.invalid/cloud-compose.tar.gz" + rootfs_archive_sha256 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + } + + assert { + condition = local.sitectl.package_versions == { + sitectl = "v1.0.0" + sitectl-wp = "v1.0.0" + } + error_message = "Non-ISLE templates must select their coordinated sitectl v1 release set." + } +} + +run "isle_template_uses_released_pre_v1_package_set" { command = plan variables { diff --git a/templates/apps.json b/templates/apps.json index 3dbaef6..9d4ea5e 100644 --- a/templates/apps.json +++ b/templates/apps.json @@ -5,7 +5,7 @@ "plugin": "core", "packages": ["sitectl"], "package_versions": { - "sitectl": "v0.40.0" + "sitectl": "v1.0.0" } }, "templates": { @@ -15,8 +15,8 @@ "plugin": "archivesspace", "packages": ["sitectl", "sitectl-archivesspace"], "package_versions": { - "sitectl": "v0.40.0", - "sitectl-archivesspace": "v0.7.0" + "sitectl": "v1.0.0", + "sitectl-archivesspace": "v1.0.0" } }, "ojs": { @@ -25,8 +25,8 @@ "plugin": "ojs", "packages": ["sitectl", "sitectl-ojs"], "package_versions": { - "sitectl": "v0.40.0", - "sitectl-ojs": "v0.7.0" + "sitectl": "v1.0.0", + "sitectl-ojs": "v1.0.0" } }, "isle": { @@ -46,8 +46,8 @@ "plugin": "drupal", "packages": ["sitectl", "sitectl-drupal"], "package_versions": { - "sitectl": "v0.40.0", - "sitectl-drupal": "v0.12.0" + "sitectl": "v1.0.0", + "sitectl-drupal": "v1.0.0" } }, "wp": { @@ -56,8 +56,8 @@ "plugin": "wp", "packages": ["sitectl", "sitectl-wp"], "package_versions": { - "sitectl": "v0.40.0", - "sitectl-wp": "v0.6.0" + "sitectl": "v1.0.0", + "sitectl-wp": "v1.0.0" } }, "omeka-s": { @@ -66,8 +66,8 @@ "plugin": "omeka-s", "packages": ["sitectl", "sitectl-omeka-s"], "package_versions": { - "sitectl": "v0.40.0", - "sitectl-omeka-s": "v0.7.0" + "sitectl": "v1.0.0", + "sitectl-omeka-s": "v1.0.0" } }, "omeka-classic": { @@ -76,8 +76,8 @@ "plugin": "omeka-classic", "packages": ["sitectl", "sitectl-omeka-classic"], "package_versions": { - "sitectl": "v0.40.0", - "sitectl-omeka-classic": "v0.7.0" + "sitectl": "v1.0.0", + "sitectl-omeka-classic": "v1.0.0" } } } diff --git a/tests/config-management/ansible/smoke.yml b/tests/config-management/ansible/smoke.yml index 79ef976..64a11ee 100644 --- a/tests/config-management/ansible/smoke.yml +++ b/tests/config-management/ansible/smoke.yml @@ -47,8 +47,9 @@ sitectl: environment: production package_versions: - sitectl-drupal: v0.11.0 - sitectl-isle: v0.12.0 + sitectl: v0.40.0 + sitectl-drupal: v0.12.0 + sitectl-isle: v0.19.0 managed_runtime: enabled: false internal_services_enabled: false diff --git a/tests/config-management/salt-pillar/wp-prod.sls b/tests/config-management/salt-pillar/wp-prod.sls index 2951e73..3017390 100644 --- a/tests/config-management/salt-pillar/wp-prod.sls +++ b/tests/config-management/salt-pillar/wp-prod.sls @@ -45,7 +45,8 @@ cloud_compose: sitectl: environment: production package_versions: - sitectl-wp: v0.10.0 + sitectl: v1.0.0 + sitectl-wp: v1.0.0 managed_runtime: enabled: false internal_services_enabled: false