Skip to content

Commit 78ecc2c

Browse files
committed
Merge remote-tracking branch 'origin/main' into HEAD
* origin/main: (21 commits) feat(default-agent): make the General Assistant proactive (#1399) fix(connectivity): bound MCPServer descriptions, mirror kagent's and describe mcp-kubernetes (#1398) feat: support agent-manager 3.x and on-demand GitHub grants (#1375) feat(default-agent): tag the General Assistant general and platform (#1397) feat(connectivity): describe the kagent MCPServer for the developer portal (#1390) docs(skills): guard agent creation against silent wrong keys, skipped listings and wrong model routes (#1392) fix(network-policies): admit only the owning Gateway's Envoy proxy, not every Envoy pod (#1394) chore: move the ATS default and the docs example ModelConfig to Claude Sonnet 5.5 (#1395) refactor(organizations): one source for agent-platform-operator's names in both charts (#1389) feat(agent-manager): take agent-manager 2.24.0 or later, for the Dev Portal's organization pages (#1371) feat(helm): annotate component HelmReleases and OCIRepositories with the owning team (#1385) fix(skill-manager): reach the login provider on a private installation (#1384) fix(skill-manager): take the OAuth client from muster's login, like the other managers (#1381) ci: render every component on a schedule against main and the latest releases (#1377) docs(skills): show a sign-in muster refuses instead of calling core_auth_login (#1376) chore(deps): update gsoci.azurecr.io/giantswarm/agent-manager docker tag to v2.24.0 (#1370) test(organizations): wait for every admission policy and RBAC object before the dry runs (#1373) fix(tenants): let every organization member read its members (#1369) feat: ship the default agent (General Assistant) and the platform skills with the chart (#1265) test(organizations): prove that an organization admin's Secret delete never answers with the Secret, and pin the admin mirrors (#1366) ... # Conflicts: # helm/agent-platform/README.md # helm/agent-platform/examples/customer-bom.yaml # helm/agent-platform/templates/_helpers.tpl # helm/agent-platform/values.yaml
2 parents c465c0d + 4802e1a commit 78ecc2c

102 files changed

Lines changed: 6054 additions & 388 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.circleci/custom.yml‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@
2626
# generator gates the release push on, the way image.preBuildJob gates the
2727
# image). A release refused this way is recovered by rerunning the tag's
2828
# workflow from failed once the component chart is out, without a new tag.
29+
# - stamp-release-commit (tags only): hack/stamp-release-commit.sh writes the
30+
# tag's commit into helm/agent-platform/agents/ (the default agent's skill
31+
# pins; the agent chart refuses a tag) and persists it to the workspace,
32+
# which the generated push-chart-release attaches over its checkout before
33+
# packaging: it requires the stamp through verify-release-floors and
34+
# push-connectivity-chart-release. Unstamped (branch builds) the default
35+
# agent renders without skills; make verify-default-agent
36+
# simulates the step.
37+
#
38+
# The same render on a schedule, against main and the latest releases, is the
39+
# GitHub Actions workflow component-render-schedule (docs/ci.md).
2940
#
3041
# The agent-platform-crds chart has been RETIRED — every component now ships
3142
# its own CRDs (app-owned CRDs), so there is no longer a CRD-bundle chart to
@@ -81,6 +92,24 @@ jobs:
8192
# `helm dependency build`.
8293
command: make verify-all
8394

95+
stamp-release-commit:
96+
docker:
97+
- image: cimg/base:current
98+
resource_class: small
99+
steps:
100+
- checkout
101+
- run:
102+
name: stamp the tag's commit into the chart (hack/stamp-release-commit.sh)
103+
command: |
104+
commit=$(git rev-parse HEAD)
105+
[ "$commit" = "$CIRCLE_SHA1" ] || { echo "checked out $commit, the pipeline's commit is $CIRCLE_SHA1" >&2; exit 1; }
106+
hack/stamp-release-commit.sh "$commit"
107+
grep -cF "commit: \"$commit\"" helm/agent-platform/agents/default-agent/values.yaml
108+
- persist_to_workspace:
109+
root: .
110+
paths:
111+
- helm/agent-platform/agents
112+
84113
verify-release-floors:
85114
# The tag pipeline's gate (giantswarm/agent-platform#624). Same image and the
86115
# same bounded, retried installs as test-ingress-modes, without kyverno: the
@@ -118,7 +147,19 @@ workflows:
118147
# pushes of the tag wait on it — the connectivity push below by its
119148
# requires, the generated push-chart-release through the generator's
120149
# chart release gate (gen.ci.chartReleaseGateJob).
150+
- stamp-release-commit:
151+
filters:
152+
tags:
153+
only: /^v.*/
154+
branches:
155+
ignore: /.*/
156+
121157
- verify-release-floors:
158+
# Carries the stamp to push-chart-release (through
159+
# push-connectivity-chart-release): a chart pushed without it would pin
160+
# no skills.
161+
requires:
162+
- stamp-release-commit
122163
filters:
123164
tags:
124165
only: /^v.*/
Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
# Renders every component chart with the values the meta chart forwards to it,
2+
# against main and the latest patch of the last five minor releases, every six
3+
# hours. A component range floats within its major, so a component release
4+
# changes what an already published agent-platform release installs without an
5+
# agent-platform commit; the PR and tag pipelines never see that.
6+
#
7+
# Each ref is judged by its own values and its own test code: main runs
8+
# `make verify-components-charts verify-examples`, a release tag runs
9+
# `make verify-release-floors verify-examples` (the strict run, no fallback for
10+
# an unreleased component). The report job keeps one issue per failing ref.
11+
# docs/ci.md says how to respond.
12+
name: component-render-schedule
13+
14+
on:
15+
schedule:
16+
- cron: '23 */6 * * *'
17+
workflow_dispatch:
18+
inputs:
19+
refs:
20+
description: Refs to render, space-separated (default main and the latest patch of the last five minors)
21+
required: false
22+
pull_request:
23+
paths:
24+
- '.github/workflows/component-render-schedule.yaml'
25+
26+
permissions: {}
27+
28+
concurrency:
29+
group: component-render-schedule-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
30+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
31+
32+
env:
33+
MINORS: 5
34+
35+
jobs:
36+
refs:
37+
name: Pick the refs to render
38+
runs-on: ubuntu-26.04
39+
permissions:
40+
contents: read
41+
outputs:
42+
refs: ${{ steps.pick.outputs.refs }}
43+
steps:
44+
- name: main and the latest patch of the last minors
45+
id: pick
46+
env:
47+
REFS: ${{ inputs.refs }}
48+
REPO: ${{ github.repository }}
49+
run: |
50+
set -euo pipefail
51+
if [ -n "${REFS:-}" ]; then
52+
read -r -a picked <<<"$REFS"
53+
else
54+
tags="$(git ls-remote --tags --refs "https://github.com/$REPO" 'v*' \
55+
| sed 's#.*refs/tags/##' | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V)"
56+
mapfile -t releases < <(awk -F. '{ last[$1"."$2] = $0 } END { for (m in last) print last[m] }' <<<"$tags" | sort -V | tail -n "$MINORS")
57+
picked=(main "${releases[@]}")
58+
fi
59+
json="$(jq -cn '$ARGS.positional' --args "${picked[@]}")"
60+
echo "refs=$json" >> "$GITHUB_OUTPUT"
61+
echo "rendering: ${picked[*]}"
62+
63+
render:
64+
name: Render ${{ matrix.ref }}
65+
needs: refs
66+
runs-on: ubuntu-26.04
67+
timeout-minutes: 30
68+
permissions:
69+
contents: read
70+
strategy:
71+
fail-fast: false
72+
matrix:
73+
ref: ${{ fromJSON(needs.refs.outputs.refs) }}
74+
env:
75+
# The checks print `ok:` lines to stdout and their FAIL to stderr: unbuffered,
76+
# the log keeps them in order.
77+
PYTHONUNBUFFERED: "1"
78+
steps:
79+
- name: Check out ${{ matrix.ref }}
80+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
81+
with:
82+
ref: ${{ matrix.ref }}
83+
persist-credentials: false
84+
- name: Install helm
85+
uses: giantswarm/install-binary-action@5bef88f65012037dd836117c8d344b21bb559854 # v4.1.0
86+
with:
87+
binary: helm
88+
# The pin of .circleci/custom.yml's test-ingress-modes.
89+
version: "3.17.3"
90+
download_url: "https://get.helm.sh/helm-v${version}-linux-amd64.tar.gz"
91+
tarball_binary_path: "linux-amd64/helm"
92+
smoke_test: "${binary} version --short"
93+
- name: Install PyYAML
94+
run: |
95+
for attempt in 1 2 3; do
96+
python3 -c 'import yaml' 2>/dev/null && break
97+
(sudo timeout 180 apt-get update -qq && sudo timeout 180 apt-get install -y -qq python3-yaml) && break
98+
echo "apt attempt $attempt failed or stalled; retrying" >&2; sleep 15
99+
done
100+
python3 -c 'import yaml'
101+
- name: Render every component with the forwarded values
102+
id: render
103+
env:
104+
REF: ${{ matrix.ref }}
105+
run: |
106+
set -o pipefail
107+
if [ "$REF" = main ]; then
108+
targets=(verify-components-charts verify-examples)
109+
else
110+
targets=(verify-release-floors verify-examples)
111+
fi
112+
# -k: every target reports, not only the first that fails.
113+
make -k "${targets[@]}" 2>&1 | tee "$RUNNER_TEMP/render.log"
114+
- name: Classify the result
115+
if: always()
116+
env:
117+
REF: ${{ matrix.ref }}
118+
OUTCOME: ${{ steps.render.outcome }}
119+
run: |
120+
set -euo pipefail
121+
log="$RUNNER_TEMP/render.log"
122+
touch "$log"
123+
mkdir -p result
124+
# refused: a component chart refuses the forwarded values (what breaks
125+
# installations); unreleased: main's Chart.yaml annotation is stale;
126+
# failed: anything else (setup, the registry, the check itself).
127+
if [ "$OUTCOME" = success ]; then
128+
kind=success
129+
elif grep -q -E 'rejects the values (the meta chart forwards to it|the example gives it)' "$log"; then
130+
kind=refused
131+
elif grep -q 'run `make sync-unreleased`' "$log"; then
132+
kind=unreleased
133+
else
134+
kind=failed
135+
fi
136+
# The FAIL blocks, without the lines that change from run to run.
137+
{ grep -E -A6 '^FAIL' "$log" || tail -n 40 "$log"; } | head -n 80 > result/excerpt.txt
138+
echo "$kind" > result/kind
139+
echo "$REF" > result/ref
140+
if [ "$kind" != success ]; then
141+
{ echo "### $REF: $kind"; echo '```'; cat result/excerpt.txt; echo '```'; } >> "$GITHUB_STEP_SUMMARY"
142+
fi
143+
- name: Keep the result for the report
144+
if: always()
145+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
146+
with:
147+
name: result-${{ strategy.job-index }}
148+
path: result/
149+
retention-days: 7
150+
151+
report:
152+
name: Open, update or close the issues
153+
needs: [refs, render]
154+
if: always() && github.event_name != 'pull_request' && needs.refs.result == 'success'
155+
runs-on: ubuntu-26.04
156+
permissions:
157+
issues: write
158+
steps:
159+
# An App token, unlike GITHUB_TOKEN, lets the issue's events start the
160+
# board workflows and the team mention notify. The workflow token is the
161+
# fallback when the App is not available or may not write issues.
162+
- name: Generate giantswarm-release token
163+
id: app-token
164+
continue-on-error: true
165+
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
166+
with:
167+
client-id: ${{ secrets.RELEASE_BOT_CLIENT_ID }}
168+
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
169+
permission-issues: write
170+
- name: Collect the results
171+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
172+
with:
173+
pattern: result-*
174+
path: results
175+
- name: Report every ref
176+
env:
177+
GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
178+
GH_REPO: ${{ github.repository }}
179+
REFS: ${{ needs.refs.outputs.refs }}
180+
SCHEDULED: ${{ github.event_name == 'schedule' }}
181+
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
182+
run: |
183+
set -euo pipefail
184+
title_of() {
185+
if [ "$1" = main ]; then echo "agent-platform main branch chart doesn't render"
186+
else echo "agent-platform release $1 chart doesn't render"; fi
187+
}
188+
open="$(gh issue list --state open --label team/bumblebee --limit 500 --json number,title)"
189+
number_of() {
190+
TITLE="$1" jq -r 'map(select(.title == env.TITLE))[0].number // empty' <<<"$open"
191+
}
192+
193+
mapfile -t refs < <(jq -r '.[]' <<<"$REFS")
194+
for ref in "${refs[@]}"; do
195+
dir="$( (grep -l -x -F -- "$ref" results/*/ref 2>/dev/null || true) | head -n 1 | xargs -r dirname)"
196+
if [ -n "$dir" ]; then
197+
kind="$(cat "$dir/kind")"; excerpt="$(cat "$dir/excerpt.txt")"
198+
else
199+
kind=failed; excerpt="The render job reported no result: it failed before the render ran."
200+
fi
201+
title="$(title_of "$ref")"
202+
number="$(number_of "$title")"
203+
if [ "$kind" = success ]; then
204+
[ -z "$number" ] || gh issue close "$number" --comment "Every component renders again on \`$ref\`: $RUN_URL"
205+
continue
206+
fi
207+
if [ "$ref" = main ]; then where="the next release"; else where="installations that reconcile \`$ref\`"; fi
208+
case "$kind" in
209+
refused) what="A component chart refuses the values agent-platform \`$ref\` forwards to it: $where now fail to install or upgrade that component." ;;
210+
unreleased) what="\`main\`'s \`agent-platform.giantswarm.io/unreleased\` annotation no longer matches the registry: run \`make sync-unreleased\` on \`main\`. Installations are not affected." ;;
211+
*) what="The render check for \`$ref\` could not finish (setup, the registry or the check itself). This does not say that installations fail; look at the run." ;;
212+
esac
213+
signature="$(printf '%s\n%s' "$kind" "$excerpt" | sha256sum | cut -c1-16)"
214+
report="$(printf '%s\n\nRun: %s\n\n```\n%s\n```\n\nHow to respond: [docs/ci.md](https://github.com/%s/blob/main/docs/ci.md#scheduled-component-render).\n\n<!-- render-signature: %s -->' \
215+
"$what" "$RUN_URL" "$excerpt" "$GH_REPO" "$signature")"
216+
if [ -z "$number" ]; then
217+
gh issue create --title "$title" --label team/bumblebee --body "$(printf '@giantswarm/team-bumblebee %s' "$report")"
218+
continue
219+
fi
220+
# A new comment only when the failure changed: the same refusal
221+
# every six hours says nothing new.
222+
last="$(gh issue view "$number" --json body,comments \
223+
--jq '[.body, (.comments[].body)] | map(select(contains("render-signature"))) | last // ""')"
224+
if [[ "$last" != *"render-signature: $signature"* ]]; then
225+
gh issue comment "$number" --body "$report"
226+
fi
227+
done
228+
229+
# A ref the schedule no longer renders (a newer patch or minor took its
230+
# place, or it was rendered once by hand) never turns green: close its
231+
# issue so the open ones are the refs that are still checked.
232+
if [ "$SCHEDULED" = true ]; then
233+
TITLES="$(for ref in "${refs[@]}"; do title_of "$ref"; done | jq -R . | jq -sc .)" \
234+
jq -r '(env.TITLES | fromjson) as $t
235+
| .[] | select(.title | test("^agent-platform (release v[0-9.]+|main branch) chart doesn.t render$"))
236+
| select(.title as $x | $t | index($x) | not) | .number' <<<"$open" \
237+
| while read -r stale; do
238+
gh issue close "$stale" --comment "The schedule no longer renders this ref (a newer patch or minor took its place): $RUN_URL. Reopen it if installations still run it."
239+
done
240+
fi

‎AGENTS.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,8 @@ placement* section, kept in its internal plans repository.
3939
golden flags, with a comment saying why, and asserted by a `verify-*` target of its own.
4040
- A change that moves the committed renders under `tests/golden/` on purpose runs
4141
`make golden-update` and commits the diff, which is what a reviewer reads.
42+
43+
## Platform skills
44+
45+
- A change that alters what an agent or a person can do, see or configure on the platform updates
46+
the affected skills in `skills/` in the same pull request; `make verify-skills` checks their layout.

0 commit comments

Comments
 (0)