diff --git a/definitions/agent-platform/README.md b/definitions/agent-platform/README.md index 345c9f13..bb6ba546 100644 --- a/definitions/agent-platform/README.md +++ b/definitions/agent-platform/README.md @@ -36,9 +36,9 @@ policy decides once, and what the definition drops. The render library reads it. | The models Gateway's certificate (`modelServing.modelsGateway.tls.issuerRef.name`): a cert-manager Certificate of the models host. The platform runs no edge of its own on the fleet, so no wildcard Secret of the platform could serve the host | `installation.clusterIssuer`: `gatewayApi.clusterIssuer` of `config.yaml.patch`, else the shared default's; the serving slice on a record without one is refused at plan time | | The cluster-manager's commit mode (`cluster-manager.github.enabled`: registered with muster pinned to its GitHub App, `mode: commit` on `create_node_pool` and `delete_node_pool`, the pull request opened as the person) and its egress to `api.github.com` | one choice, `clusterManager.github.enabled`, read back from the key; where the policy runs the cluster-manager only. The App's OAuth client is the installation's own Secret `giantswarm-cluster-manager-oauth-client`, not rendered | | The model-manager's and the agent-manager's commit mode (`model-manager.github.enabled`, `agent-manager.github.enabled`: each registered with muster pinned to its own GitHub App, `giantswarm-model-manager` and `giantswarm-agent-manager`, `mode: commit` on their write tools, the pull request opened as the person in the repository that owns the target namespace); their egress to `api.github.com` is the connectivity chart's | one choice each, `modelManager.github.enabled` (the 4 chart line only) and `agentManager.github.enabled` (where the policy runs the agent-manager only), read back from the key. Each App's OAuth client is the installation's own Secret, `giantswarm-model-manager-oauth-client` and `giantswarm-agent-manager-oauth-client`, not rendered | -| The agent-manager's skill catalog (`agent-manager.skills.repositories`, the repositories `list_skills` discovers for meta agents; `agent-manager.skills.github.app.secretName`, the read-only skills GitHub App's Secret discovery and pinning run with, a private repository offered only to the people who can read it; `agent-manager.skills.gitAuthSecretName`, the Secret in kagent every agent with a git skill boots with, or `agent-manager.skills.mintGitAuthSecret`, that Secret minted from the skills App by agent-manager) | `agentManager.skills.{repositories,github.app.secretName,gitAuthSecretName,mintGitAuthSecret}`, each written only when chosen and read back from the configmap patch; both named Secrets are the installation's own and exist before their names are set, since a missing one stops the pod; minting needs `github.app.secretName` and replaces `gitAuthSecretName`; refused where the fleet policy runs no agent-manager | -| The skill-manager's sources (`skillManager.sources`, the meta chart's component `skill-manager`, which follows the agent-manager: the repositories it lists and pins skills from, after the platform's own `skills/`; the portal offers the same) and the read-only skills GitHub App it reads them with (`skill-manager.github.app.secretName`, a private source listed only to the people who can read it) | two choices. `skillManager.github.app.secretName`, the installation's Secret in the skill-manager's namespace, which exists before its name is set, since a missing one stops the pod; default none (anonymous reads, public sources only). `skillManager.sources`, each an http(s) URL or `{url, ref, path, readOnly}`, written as read with every key kept, default none (the chart's list, giantswarm/agent-skills, stands; a list replaces it, so it names agent-skills to keep it); read back from the configmap patch. No entry names the platform's own repository (the meta chart lists it first, read-only, `skills.platformSource`), and `agentManager.skills.repositories` is refused beside the list (the meta chart takes both, but this definition keeps one list: one reconcile sets the sources and empties the agent-manager's list), where a `versions.components.agent-manager` hold puts the agent-manager at 2.24.0 or later (it then takes its skills from the skill-manager and the meta chart fails on the list; the chart's default range starts below), and, from the release with the skill-manager on, with an entry naming the platform's own repository. Both inputs: the 4 chart line only, where the fleet policy runs the agent-manager, with no `versions.chart` hold below the release with the skill-manager (4.179.0, giantswarm/agent-platform#1265). The object form is the skill-manager's; `agentManager.skills.repositories` stays URLs | -| The default agent, the meta agent the meta chart ships (`components.default-agent`, in `kagent`, the platform's skills pinned to the release) | `defaultAgent.enabled`, default true, the chart's default: nothing is written; false writes `components.default-agent.enabled: false`. `defaultAgent.modelConfig` writes `defaultAgent.modelConfig`, the ModelConfig it answers with; none: the agent gets a model by itself only where the agent-manager's version range (a `versions.components.agent-manager` hold, else the meta chart's default, `>=2.22.0` on 4.179.0) starts at 2.24.0 or later, where the meta chart has agent-manager set the installation's default model once while the agent has none; anywhere else set it, or the agent has no model and kagent reports it not ready (`Compatible=False`, `kagent ModelConfig is required`). Both read back from the configmap patch. Off and the override: the 4 chart line only, where the fleet policy runs kagent and the agent-manager. Off: any chart release (`components` is open). The override: no chart hold below the release shipping the agent (4.179.0, giantswarm/agent-platform#1265). Agents an installation keeps under `extras/agent-platform/agents/` stay kept, not rendered. Set `enabled: false` on an installation that still runs a hand-added meta agent (gazelle's `swarm-operator`) before upgrading to that release | +| The agent-manager's skill catalog (`agent-manager.skills.repositories`, the repositories `list_skills` discovers for meta agents; `agent-manager.skills.github.app.secretName`, the read-only skills GitHub App's Secret discovery and pinning run with, a private repository offered only to the people who can read it; `agent-manager.skills.gitAuthSecretName`, the Secret in kagent every agent with a git skill boots with, or `agent-manager.skills.mintGitAuthSecret`, that Secret minted from the skills App by agent-manager) | `agentManager.skills.{repositories,github.app.secretName,gitAuthSecretName,mintGitAuthSecret}`, each written only when chosen and read back from the configmap patch; both named Secrets are the installation's own and exist before their names are set, since a missing one stops the pod; minting needs `github.app.secretName` and replaces `gitAuthSecretName`; refused where the fleet policy runs no agent-manager; the repositories are refused where the agent-manager takes its skills from the skill-manager, on meta chart 4.180.0 and later with no agent-manager hold (see the skill-manager's sources below) | +| The skill-manager's sources (`skillManager.sources`, the meta chart's component `skill-manager`, which follows the agent-manager: the repositories it lists and pins skills from, after the platform's own `skills/`; the portal offers the same) and the read-only skills GitHub App it reads them with (`skill-manager.github.app.secretName`, a private source listed only to the people who can read it) | two choices. `skillManager.github.app.secretName`, the installation's Secret in the skill-manager's namespace, which exists before its name is set, since a missing one stops the pod; default none (anonymous reads, public sources only). `skillManager.sources`, each an http(s) URL or `{url, ref, path, readOnly}`, written as read with every key kept, default none (the chart's list, giantswarm/agent-skills, stands; a list replaces it, so it names agent-skills to keep it); read back from the configmap patch. No entry names the platform's own repository (the meta chart lists it first, read-only, `skills.platformSource`), and `agentManager.skills.repositories` is refused beside the list (the meta chart takes both, but this definition keeps one list: one reconcile sets the sources and empties the agent-manager's list), where the agent-manager's version range starts at 2.24.0 or later: a `versions.components.agent-manager` hold at 2.24.0 or later, or, with no such hold, a meta chart the installation gets at 4.180.0 or later, whose default range starts there (it then takes its skills from the skill-manager and the meta chart fails on the list; the refusal names the release and says to move the list to `skillManager.sources`; a `versions.chart` hold below 4.180.0 or an agent-manager hold below 2.24.0 keeps the list; the meta chart's default agent-manager range of each release: 4.179.0 `>=2.22.0 <3.0.0`, 4.180.0 `>=2.24.0 <3.0.0`, 4.181.0 `>=3.0.0 <4.0.0`), and, from the release with the skill-manager on, with an entry naming the platform's own repository. Both inputs: the 4 chart line only, where the fleet policy runs the agent-manager, with no `versions.chart` hold below the release with the skill-manager (4.179.0, giantswarm/agent-platform#1265). The object form is the skill-manager's; `agentManager.skills.repositories` stays URLs | +| The default agent, the meta agent the meta chart ships (`components.default-agent`, in `kagent`, the platform's skills pinned to the release) | `defaultAgent.enabled`, default true, the chart's default: nothing is written; false writes `components.default-agent.enabled: false`. `defaultAgent.modelConfig` writes `defaultAgent.modelConfig`, the ModelConfig it answers with; none: the agent gets a model by itself only where the agent-manager's version range (a `versions.components.agent-manager` hold, else the meta chart's default: 4.179.0 `>=2.22.0 <3.0.0`, 4.180.0 `>=2.24.0 <3.0.0`, 4.181.0 `>=3.0.0 <4.0.0`) starts at 2.24.0 or later, where the meta chart has agent-manager set the installation's default model once while the agent has none; anywhere else set it, or the agent has no model and kagent reports it not ready (`Compatible=False`, `kagent ModelConfig is required`). Both read back from the configmap patch. Off and the override: the 4 chart line only, where the fleet policy runs kagent and the agent-manager. Off: any chart release (`components` is open). The override: no chart hold below the release shipping the agent (4.179.0, giantswarm/agent-platform#1265). Agents an installation keeps under `extras/agent-platform/agents/` stay kept, not rendered. Set `enabled: false` on an installation that still runs a hand-added meta agent (gazelle's `swarm-operator`) before upgrading to that release | | The Agent Platform organizations (the meta chart 4.176.6 and later, giantswarm/giantswarm#38891): `agentPlatformOrganizations.enabled` — agent-platform-operator, the organizations' role, admission policies and access, agent-manager's organization tools, whose `tenants.enabled` the chart derives from the switch — with `agentPlatformOrganizations.apiHostnames`, the installation's API hostnames beside the derived `api.`; in commit mode agent-manager's `tenants.commit` (the installation's management-clusters repository as the registry names it, `installation.repositories.managementClusters`, the policy's branch, `objectsPath` `management-clusters//extras/agent-platform-organizations/objects` and `contentPrefix` `.../content`) and, together with it and never alone, the operator's Flux values `agentPlatformOrganizations.fluxNamespace`, `fluxSource`, `fluxDecryptionSecret` (the policy's `organizations.flux`) and `fluxPathPrefix` (`./` and the content prefix and `/`), with the operator's `commitMode.installationKustomization`, the installation's Kustomization in the Flux namespace that applies the objects (the policy's `organizations.installationKustomization`). The installation's repository layout (that Kustomization, `objects/kustomization.yaml`, CODEOWNERS and SOPS) is the installation's own, not rendered | `organizations.enabled` (the 4 chart line, where the policy runs kagent; a hold of the meta chart below 4.176.6 is refused), `organizations.apiHostnames` and `organizations.commit.enabled` (each written only with the switch, so turning it off takes them along; commit mode refused where the policy runs no agent-manager, where the registry names no management-clusters repository or under a hold of the meta chart below 4.177.0, the first release with giantswarm/agent-platform#1312; either dependent typed with the switch off is refused, naming the switch, by the schema's `x-requires`), read back from the configmap patch on record — commit mode as the presence of `agent-manager.tenants.commit.repository` — so a reconcile keeps them and no `kept` entry is needed. The meta chart refuses `agent-manager.tenants.commit` before 4.177.0 (giantswarm/agent-platform#1312), so commit mode is turned on only where the installation runs that release or a later one; agent-manager's credential form (`agent-manager.credentials.uiURL`) and its token exchange (`agent-manager.github.tokenExchange`) are not these inputs' | | Who the platform tenant binds in the kagent namespace and who lists muster's MCP servers (giantswarm/agent-platform#706, #1331): `tenants.platform.users` (`agent-platform:platform-user`), `tenants.platform.editors` and `tenants.platformTeam` (`agent-platform:editor`; the meta chart also adds the platform team to muster's `mcpserver-editor` and `workflow-editor` subjects), and `musterMcpServerViewers` (the Role and RoleBinding `agent-platform:mcpserver-viewer` in muster's namespace; unset, the chart falls back to `tenants.platform.users`). Each list in the chart's subject shape (`apiGroup`, `kind`, `name`, `namespace`) | `tenants.platform.users`, `tenants.platform.editors`, `tenants.platformTeam` and `musterMcpServerViewers`, each unset by default: the key is not written and the chart's default stands. An empty list is written as `[]` and binds nobody: the retirement of the platform tenant (giantswarm/giantswarm#38990) sets the viewers, then types the users and editors as `[]`, since a removed key brings the chart's default back. Typed `null`, a list goes and the default comes back. Read back from the configmap patch on record, an empty list too, so a reconcile keeps them and no `kept` entry is needed. Refused: off the 4 chart line; under a hold of the meta chart below 4.132.0-rc.1 (`tenants.*`) or 4.178.0-rc.4 (`musterMcpServerViewers`); the users or editors where the policy runs no kagent; a subject a RoleBinding cannot carry; and, with `organizations.enabled`, no viewer — the viewers empty, or the users empty while the viewers are unset — which the meta chart refuses (`agent-platform.muster.organizations`) | | The stateful singletons' placement (`scheduling.singletons.nodeSelector` `karpenter.sh/capacity-type: on-demand`: muster, muster-valkey, the kagent controller and klaus-gateway off spot capacity, whose reclaim takes muster's token store away for minutes) | one choice, `scheduling.singletonsCapacity: on-demand`, read back from the key; a capa installation only, whose Karpenter NodePool admits on-demand | diff --git a/definitions/agent-platform/schema.json b/definitions/agent-platform/schema.json index d6583397..363af98b 100644 --- a/definitions/agent-platform/schema.json +++ b/definitions/agent-platform/schema.json @@ -492,7 +492,7 @@ "x-readback": {"file": "configmap", "key": "agent-manager.skills.repositories"}, "x-feature": "runtime", "x-renders": ["configmap:agent-manager.skills.repositories"], - "description": "The GitHub repositories agent-manager's list_skills discovers skills in (agent-manager.skills.repositories), the catalog meta agents create agents from. None, the key is not written and the chart's default (giantswarm/agent-skills) stands. Refused beside skillManager.sources (the meta chart takes both, but this definition keeps one list: move it into skillManager.sources and empty it in the same reconcile), where a versions.components.agent-manager hold puts the agent-manager at 2.24.0 or later (it then takes its skills from the skill-manager, and the meta chart fails on the list), and, from the release with the skill-manager on, an entry naming the platform's own repository. Read back from the configmap patch on record." + "description": "The GitHub repositories agent-manager's list_skills discovers skills in (agent-manager.skills.repositories), the catalog meta agents create agents from. None, the key is not written and the chart's default (giantswarm/agent-skills) stands. Refused beside skillManager.sources (the meta chart takes both, but this definition keeps one list: move it into skillManager.sources and empty it in the same reconcile), where the agent-manager's version range starts at 2.24.0 or later (it then takes its skills from the skill-manager, and the meta chart fails on the list): a versions.components.agent-manager hold at 2.24.0 or later, or, with no such hold, a meta chart the installation gets at 4.180.0 or later, whose default range starts there; the refusal names the release and says to move the list to skillManager.sources, and a versions.chart hold below 4.180.0 or an agent-manager hold below 2.24.0 keeps the list (the meta chart's default agent-manager range of each release: 4.179.0 >=2.22.0 <3.0.0, 4.180.0 >=2.24.0 <3.0.0, 4.181.0 >=3.0.0 <4.0.0), and, from the release with the skill-manager on, an entry naming the platform's own repository. Read back from the configmap patch on record." }, "github": { "type": "object", @@ -654,7 +654,7 @@ "x-readback": {"file": "configmap", "key": "defaultAgent.modelConfig"}, "x-feature": "runtime", "x-renders": ["configmap:defaultAgent.modelConfig"], - "description": "The ModelConfig in kagent the default agent answers with (defaultAgent.modelConfig). Empty, the key is not written and the agent gets a model by itself only where the agent-manager's version range (components.agent-manager.versionRange: a versions.components.agent-manager hold, else the meta chart's default, >=2.22.0 on 4.179.0) starts at 2.24.0 or later: the meta chart then has agent-manager set the installation's default model once, while the agent has none, and never re-point it. Anywhere else, set it, or the agent has no model and kagent reports it not ready (Compatible=False, kagent ModelConfig is required). Set it to pin or change the model. The 4 chart line only, where the fleet policy runs kagent and the agent-manager, with no versions.chart hold below the release with the default agent (4.179.0). Read back from the configmap patch on record." + "description": "The ModelConfig in kagent the default agent answers with (defaultAgent.modelConfig). Empty, the key is not written and the agent gets a model by itself only where the agent-manager's version range (components.agent-manager.versionRange: a versions.components.agent-manager hold, else the meta chart's default: 4.179.0 >=2.22.0 <3.0.0, 4.180.0 >=2.24.0 <3.0.0, 4.181.0 >=3.0.0 <4.0.0) starts at 2.24.0 or later: the meta chart then has agent-manager set the installation's default model once, while the agent has none, and never re-point it. Anywhere else, set it, or the agent has no model and kagent reports it not ready (Compatible=False, kagent ModelConfig is required). Set it to pin or change the model. The 4 chart line only, where the fleet policy runs kagent and the agent-manager, with no versions.chart hold below the release with the default agent (4.179.0). Read back from the configmap patch on record." } } }, diff --git a/render/agentplatform/input.go b/render/agentplatform/input.go index 9b08e7f9..be8b1c2d 100644 --- a/render/agentplatform/input.go +++ b/render/agentplatform/input.go @@ -1307,14 +1307,34 @@ func namesPlatformSkills(url string) bool { return strings.TrimSuffix(strings.TrimSuffix(strings.TrimSuffix(url, "/"), ".git"), "/") == platformSkillsRepository } +// agentManagerViaSkillManagerChart is the first meta chart whose default +// components.agent-manager.versionRange starts at agentManagerViaSkillManager +// (giantswarm/agent-platform#1371), its first release candidate with it; its +// release is 4.180.0. The default ranges of the releases: 4.179.0 +// ">=2.22.0 <3.0.0", 4.180.0 ">=2.24.0 <3.0.0", 4.181.0 ">=3.0.0 <4.0.0". +const agentManagerViaSkillManagerChart = "4.180.0-rc.2" + +// agentManagerViaSkillManagerRelease is the release of +// agentManagerViaSkillManagerChart, the one a refusal names. +const agentManagerViaSkillManagerRelease = "4.180.0" + // takesSkillsFromSkillManager says whether the agent-manager takes its skills // from the skill-manager, as the meta chart decides it // (agent-platform.agentManager.viaSkillManager): on a chart with the // skill-manager, the floor of components.agent-manager.versionRange at -// agentManagerViaSkillManager or later. Only a hold sets that range here; -// without one the chart's default (>=2.22.0) stands, below the floor. +// agentManagerViaSkillManager or later. A versions.components.agent-manager +// hold sets that range; without one the chart's default stands, which starts +// there from agentManagerViaSkillManagerChart on, so a meta chart the +// installation may resolve at or above it takes the skills from the +// skill-manager. func (in *Input) takesSkillsFromSkillManager() bool { - return in.reachesSkillManagerChart() && componentFloorAtLeast(in.Versions.Components[componentAgentManager], agentManagerViaSkillManager) + if !in.reachesSkillManagerChart() { + return false + } + if hold := in.Versions.Components[componentAgentManager]; hold != "" { + return componentFloorAtLeast(hold, agentManagerViaSkillManager) + } + return holdAdmits(in.Versions.Chart, agentManagerViaSkillManagerChart) } // checkSkillSourceConflicts refuses a skill source naming the platform's own @@ -1334,9 +1354,6 @@ func (in *Input) checkSkillSourceConflicts() error { return refuse(fmt.Sprintf("%s entry %d (%s) names the platform's own skill repository, which the meta chart already lists read-only at its release; remove the entry", describe("skillManager.sources"), i, s.URL)) } } - if len(in.AgentManagerSkills.Repositories) > 0 && in.takesSkillsFromSkillManager() { - return refuse(fmt.Sprintf("%s is set, and %s holds the agent-manager at %s or later, which takes its skills from the skill-manager, so the meta chart fails on the list; move it into skillManager.sources, or hold the agent-manager below %s", describe("agentManager.skills.repositories"), describe("versions.components.agent-manager"), agentManagerViaSkillManager, agentManagerViaSkillManager)) - } if in.reachesSkillManagerChart() { for i, url := range in.AgentManagerSkills.Repositories { if namesPlatformSkills(url) { @@ -1344,8 +1361,14 @@ func (in *Input) checkSkillSourceConflicts() error { } } } + if len(in.AgentManagerSkills.Repositories) > 0 && in.takesSkillsFromSkillManager() { + if in.Versions.Components[componentAgentManager] != "" { + return refuse(fmt.Sprintf("%s is set, and %s holds the agent-manager at %s or later, which takes its skills from the skill-manager, so the meta chart fails on the list; move it into skillManager.sources, or hold the agent-manager below %s", describe("agentManager.skills.repositories"), describe("versions.components.agent-manager"), agentManagerViaSkillManager, agentManagerViaSkillManager)) + } + return refuse(fmt.Sprintf("%s is set, and the meta chart this installation gets is %s or later (from its candidate %s), whose default agent-manager range starts at %s, which takes its skills from the skill-manager, so the meta chart fails on the list; move the list to the skill-manager's sources, skillManager.sources, and empty %s in the same reconcile, or hold versions.chart below %s", describe("agentManager.skills.repositories"), agentManagerViaSkillManagerRelease, agentManagerViaSkillManagerChart, agentManagerViaSkillManager, describe("agentManager.skills.repositories"), agentManagerViaSkillManagerChart)) + } if len(in.SkillManagerSources) > 0 && len(in.AgentManagerSkills.Repositories) > 0 { - return refuse(fmt.Sprintf("%s and %s are both set. The meta chart takes both, but an agent-manager below %s (the meta chart's default range among them) then reads its own list and the skill-manager the sources, two lists that can differ; this definition keeps one list: move the agent-manager's list into skillManager.sources and empty it in the same reconcile", describe("skillManager.sources"), describe("agentManager.skills.repositories"), agentManagerViaSkillManager)) + return refuse(fmt.Sprintf("%s and %s are both set. The meta chart takes both, but an agent-manager below %s (a hold, or the meta chart's default range before %s) then reads its own list and the skill-manager the sources, two lists that can differ; this definition keeps one list: move the agent-manager's list into skillManager.sources and empty it in the same reconcile", describe("skillManager.sources"), describe("agentManager.skills.repositories"), agentManagerViaSkillManager, agentManagerViaSkillManagerRelease)) } return nil } diff --git a/render/agentplatform/render_test.go b/render/agentplatform/render_test.go index 173720ec..eebf0544 100644 --- a/render/agentplatform/render_test.go +++ b/render/agentplatform/render_test.go @@ -838,12 +838,15 @@ func runReleaseCandidates(input map[string]any) map[string]any { // TestAgentManagerSkills renders the agent-manager's skill catalog from its // choices: only what is chosen is written, under the agent-manager's values -// next to its commit mode; refused where the policy runs no agent-manager. +// next to its commit mode; refused where the policy runs no agent-manager. The +// repositories render with the agent-manager held below 2.24.0, which keeps +// its own list. func TestAgentManagerSkills(t *testing.T) { input, secrets := loadInput(t, shapeHubPrivateTarget) input["agentManager"] = map[string]any{keyGitHub: map[string]any{keyEnabled: true}, keySkills: map[string]any{ //nolint:gosec // Secret names in a fixture, no credential keyRepositories: []any{"https://github.com/acme/skills", "https://github.com/acme/skills-internal"}, keyGitHub: appSecret(skillsApp), keyToken: skillsTok}} + input[keyVersions] = agentManagerBelowSkillManager result, err := Render(input, secrets, render.ModeCommit) if err != nil { t.Fatal(err) @@ -864,6 +867,7 @@ func TestAgentManagerSkills(t *testing.T) { input, secrets = loadInput(t, shapeHubPrivateTarget) input["agentManager"] = map[string]any{keySkills: map[string]any{keyRepositories: []any{"https://github.com/acme/skills"}}} + input[keyVersions] = agentManagerBelowSkillManager result, err = Render(input, secrets, render.ModeCommit) if err != nil { t.Fatal(err) @@ -1873,12 +1877,16 @@ func TestAgentManagerSkillRepositoriesAreURLs(t *testing.T) { } // TestAgentManagerSkillRepositoriesBeforeTheSkillManager renders the -// agent-manager's skill repositories wherever it keeps its own list: the -// chart's default range (>=2.22.0) and a hold below 2.24.0, on a chart with -// the skill-manager too. It refuses them where a hold puts the agent-manager -// at 2.24.0 or later (a candidate of it counted), which takes its skills from -// the skill-manager and on which the meta chart fails, and an entry naming -// the platform's own repository on a chart that lists it itself. +// agent-manager's skill repositories wherever it keeps its own list: a hold +// below 2.24.0, and a chart hold below 4.180.0 (its candidate that raised the +// default range counted), whose default range (>=2.22.0 on 4.179.0) starts +// below, on a chart with the skill-manager too. It refuses them where the +// agent-manager takes its skills from the skill-manager and the meta chart +// fails on the list: a hold puts the agent-manager at 2.24.0 or later (a +// candidate of it counted), or no hold of it and a meta chart that may be +// 4.180.0 or later, whose default range starts at 2.24.0 (3.0.0 on 4.181.0); +// and an entry naming the platform's own repository on a chart that lists it +// itself. func TestAgentManagerSkillRepositoriesBeforeTheSkillManager(t *testing.T) { withRepositories := func(candidates bool, versions map[string]any, repositories ...any) (map[string]any, map[string]string) { input, secrets := loadInput(t, shapeHubPrivateTarget) @@ -1891,7 +1899,14 @@ func TestAgentManagerSkillRepositoriesBeforeTheSkillManager(t *testing.T) { } return input, secrets } - for _, versions := range []map[string]any{nil, agentManagerBelowSkillManager, {keyComponents: map[string]any{componentAgentManager: ">=2.23.0 <3.0.0"}}, {keyChart: holdBelowSkillManager, keyComponents: map[string]any{componentAgentManager: holdAgentManagerViaSkillManager}}} { + for _, versions := range []map[string]any{ + agentManagerBelowSkillManager, + {keyComponents: map[string]any{componentAgentManager: ">=2.23.0 <3.0.0"}}, + {keyChart: holdBelowSkillManager, keyComponents: map[string]any{componentAgentManager: holdAgentManagerViaSkillManager}}, + {keyChart: ">=4.179.0 <4.180.0"}, + {keyChart: "4.180.0-rc.1"}, + {keyChart: "~4.181.0", keyComponents: map[string]any{componentAgentManager: ">=2.22.0 <2.24.0"}}, + } { input, secrets := withRepositories(true, versions, acmeSkills) if got := renderedPatch(t, input, secrets); !strings.Contains(got, " repositories:\n - "+acmeSkills+"\n") { t.Errorf("the agent-manager keeps its own list (%v), and the patch carries no agent-manager repositories:\n%s", versions, got) @@ -1911,12 +1926,26 @@ func TestAgentManagerSkillRepositoriesBeforeTheSkillManager(t *testing.T) { atFloor, atFloorSecrets := withRepositories(true, map[string]any{keyComponents: map[string]any{componentAgentManager: holdAgentManagerViaSkillManager}}, acmeSkills) candidate, candidateSecrets := withRepositories(true, map[string]any{keyComponents: map[string]any{componentAgentManager: ">=2.24.0-rc.6 <3.0.0"}}, acmeSkills) platform, platformSecrets := withRepositories(true, nil, acmeSkills, platformSkillsRepository+".git") + noHold, noHoldSecrets := withRepositories(false, nil, acmeSkills) + noHoldCandidates, noHoldCandidatesSecrets := withRepositories(true, nil, acmeSkills) + chartRelease, chartReleaseSecrets := withRepositories(false, map[string]any{keyChart: "~4.180.0"}, acmeSkills) + chartCandidate, chartCandidateSecrets := withRepositories(true, map[string]any{keyChart: "4.180.0-rc.2"}, acmeSkills) + chartRange, chartRangeSecrets := withRepositories(false, map[string]any{keyChart: ">=4.179.0 <5.0.0"}, acmeSkills) + const chartRefusal = "the meta chart this installation gets is 4.180.0 or later" requireRefusals(t, []refusalCase{ + {"no hold, stable releases only", noHold, noHoldSecrets, chartRefusal}, + {"no hold, release candidates", noHoldCandidates, noHoldCandidatesSecrets, chartRefusal}, + {"the chart held on 4.180", chartRelease, chartReleaseSecrets, chartRefusal}, + {"the chart held on the candidate that raised the range", chartCandidate, chartCandidateSecrets, chartRefusal}, + {"the chart held on a range that admits 4.180.0", chartRange, chartRangeSecrets, chartRefusal}, {"the agent-manager held at the skill-manager's release", atFloor, atFloorSecrets, repositoriesInput}, {"the agent-manager held from a candidate of it", candidate, candidateSecrets, repositoriesInput}, {"the platform's own repository", platform, platformSecrets, repositoriesInput + " entry 1"}, {"the platform's own repository on stable releases only", stablePlatform, stablePlatformSecrets, repositoriesInput + " entry 0"}, }) + if _, err := Render(noHold, noHoldSecrets, render.ModeCommit); err == nil || !strings.Contains(err.Error(), "move the list to the skill-manager's sources, skillManager.sources, and empty") { + t.Errorf("no hold: the refusal says not to move the list to skillManager.sources: %v", err) + } } // TestAgentModelsProbe lists, on the 4 line, the Agents of every namespace diff --git a/render/agentplatform/testdata/consumption/charts.yaml b/render/agentplatform/testdata/consumption/charts.yaml index ef7efa45..a817b68f 100644 --- a/render/agentplatform/testdata/consumption/charts.yaml +++ b/render/agentplatform/testdata/consumption/charts.yaml @@ -35,7 +35,7 @@ charts: - name: agent-platform line: "4" registry: gsoci.azurecr.io/charts/giantswarm/agent-platform - version: 4.180.2 + version: 4.181.0 # The meta chart hands its connectivity child the whole platform values, Secret # names included, so the test renders it too; it follows the meta chart's line. - name: agent-platform-connectivity @@ -45,7 +45,7 @@ charts: - name: agent-platform-connectivity line: "4" registry: gsoci.azurecr.io/charts/giantswarm/agent-platform-connectivity - version: 4.180.2 + version: 4.181.0 # The meta chart's children that read the platform Secrets, at the newest # versions inside the ranges the meta chart declares for them — per line where # the lines' ranges differ. renovate-custom.json5 bumps the 4 line's children in @@ -69,7 +69,7 @@ charts: - name: agent-manager line: "4" registry: gsoci.azurecr.io/charts/giantswarm/agent-manager - version: 2.24.0 + version: 3.0.3 # The meta chart's children the policy offers Giant Swarm-owned installations, # on the 4 line. - name: klaus-gateway @@ -99,7 +99,7 @@ charts: - name: agent-platform-operator line: "4" registry: gsoci.azurecr.io/charts/giantswarm/agent-platform-operator - version: 0.3.1 + version: 0.4.0 # The 4 line's serving slice (modelServing.enabled): the llm-d control plane and # the well-known LLMInferenceServiceConfigs, which the meta chart hands the same # platform values; its models Gateway renders in the connectivity chart.