Skip to content

feat: agent.tags rendered as the ui.giantswarm.io/tags annotation - #119

Merged
QuentinBisson merged 3 commits into
mainfrom
feat/agent-tags
Nov 3, 2026
Merged

QuentinBisson merged 3 commits into
mainfrom
feat/agent-tags

Conversation

@Rotfuks

@Rotfuks Rotfuks commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Adds optional free-form tags to agents, so the portal can search and filter by them.

  • agent.tags (default []) is rendered as the annotation ui.giantswarm.io/tags, comma-joined, and omitted when empty.
  • Schema: items match ^[a-z0-9]+(-[a-z0-9]+)*$, at most 63 characters each (tag.schema.json), unique, at most 50.
  • annotations refuses ui.giantswarm.io/display-name, icon-url and tags, so those keys only come from the validated agent.* values.
  • Tests cover set, unset, uppercase, duplicate, 64 characters, empty string, 51 tags and 50 tags.

Release order: this chart, then agent-manager (bumps its embedded chart), then backstage.

Refs giantswarm/giantswarm#38901

Free-form, optional keywords for finding agents in the portal.
Lowercase alphanumerics and hyphens, at most 63 characters each,
unique, at most 50 per agent.

Refs giantswarm/giantswarm#38901
@circleci-architect

circleci-architect Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Published Helm chart agent

2.4.9-rfc9b44eft20261103143240h5928888
Chart agent
Version 2.4.9-rfc9b44eft20261103143240h5928888
OCI reference oci://gsoci.azurecr.io/charts/giantswarm/agent:2.4.9-rfc9b44eft20261103143240h5928888
Digest sha256:025bc199dd247afd05c222aada89fb2dc34be196a9adecb2da3db5c68b9d7cc0
Registry public — gsoci.azurecr.io
Git catalog giantswarm-test-catalog (index)
Pull this chart
helm pull oci://gsoci.azurecr.io/charts/giantswarm/agent --version 2.4.9-rfc9b44eft20261103143240h5928888

Posted by architect-orb · build 1582 · commit 5928888 · updated in place on every push

@QuentinBisson QuentinBisson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Schema and helm unittests cover the format, the 50-tag limit and duplicates. Merge first and cut the release, since agent-manager#279 needs to embed it.

@Rotfuks

Rotfuks commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Note on the 50-tag cap: muster, the portal and gs-backend accept an unchanged or shortened list over 50, because a hand edit can store one there. Agents don't need that exemption. Every write path (agent-manager, GitOps values, hand-edited HelmReleases) is validated against this schema, so an agent can never hold more than 50 tags. maxItems: 50 stays here as the single source; agent-manager reads it from the embedded chart (giantswarm/agent-manager#279).

@Rotfuks
Rotfuks marked this pull request as ready for review November 3, 2026 14:14
@Rotfuks
Rotfuks requested a review from a team as a code owner November 3, 2026 14:15
@QuentinBisson
QuentinBisson merged commit d269885 into main Nov 3, 2026
11 checks passed
@QuentinBisson
QuentinBisson deleted the feat/agent-tags branch November 3, 2026 14:50
QuentinBisson added a commit to giantswarm/agent-manager that referenced this pull request Nov 3, 2026
…d list_skills (#279)

* feat: tags on agents and skills, with a tags filter on list_agents and list_skills

Agents: tags on create/update/get/list (REST and MCP), stored as the
ui.giantswarm.io/tags annotation via the agent chart's agent.tags;
get_info capability tags. Skills: tags from SKILL.md metadata.tags.
list_agents and list_skills filter by tags (any of them). Readers drop
malformed tags; the chart schema validates writes.

Requires agent chart 2.5.0 (giantswarm/agent#119); the embedded chart
bump follows its release.

Refs giantswarm/giantswarm#38901

* fix(tags): refuse a malformed list filter and match tags in linear time

list_agents and list_skills answered an MCP tags argument of another type
than a string or a list of strings with every item; they now refuse it as
invalid. Normalize and the filters use sets, so a long tags query no longer
costs quadratic time.

* fix(agents): report the tags capability only when the chart takes agent.tags

get_info reported tags as available on every installation, but a chart
whose schema does not declare agent.tags refuses every write that sets them.

* refactor(skills): drop parseFrontmatter, which has no production caller

* refactor(agents): set or delete a values list with one helper

setOrDeleteList is the list counterpart of setOrDelete; tags, egress and
egressPolicyRefs use it in mergedValues and BuildValues.

* fix(tags): take the tag rule from the agent chart and read tags from the values

The tag rule is no longer copied here: the chart package loads it next to
the values schema, from the chart's tag.schema.json (pattern, maxLength)
and agent.tags maxItems. serve and migrate hand the embedded chart's rule
to the agents service and the skills discoverer. A chart without one (the
embedded 2.4.0) takes no tags: agents and skills read none and
capabilities.tags is false. Tests use tagstest, a copy of the 2.5.0
tag.schema.json, until the embedded chart is bumped.

An agent's tags are read from its release's agent.tags, which an update
writes, before the Agent's annotation, so get_agent and the list_agents
filter reflect an update at once; the annotation stays the fallback when
the values carry no agent block.

The tags filter moves into Service.List and Service.ListSkills, one
implementation for REST and MCP; FilterByTags and FilterSkillsByTags are
gone. Tool, OpenAPI and changelog texts no longer restate the rule.

* chore: embed agent chart 2.5.0

Signed-off-by: Dominik Schmidle <dominik@giantswarm.io>

* fix(tags): keep the annotation's tags when valuesFrom can carry agent.tags

---------

Signed-off-by: Dominik Schmidle <dominik@giantswarm.io>
Co-authored-by: QuentinBisson <quentin@giantswarm.io>
Co-authored-by: Quentin Bisson <quentin.bisson@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants