Repository navigation
ci: render every component on a schedule against main and the latest releases #1377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,153 @@ | ||
| # Renders every component chart with the values the meta chart forwards to it, | ||
| # against main and the latest patch of the last three minor releases, every six | ||
| # hours. A component range floats within its major, so a component release | ||
| # changes what an already published agent-platform release installs without an | ||
| # agent-platform commit; the PR and tag pipelines never see that. | ||
| # | ||
| # Each ref is judged by its own values and its own test code: main runs | ||
| # `make verify-components-charts verify-examples`, a release tag runs | ||
| # `make verify-release-floors verify-examples` (the strict run, no fallback for | ||
| # an unreleased component). A red ref opens or comments on one issue per ref, | ||
| # a green one closes it. docs/ci.md says how to respond. | ||
| name: component-render-schedule | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '23 */6 * * *' | ||
| workflow_dispatch: | ||
| inputs: | ||
| refs: | ||
| description: Refs to render, space-separated (default main and the latest patch of the last three minors) | ||
| required: false | ||
| pull_request: | ||
| paths: | ||
| - '.github/workflows/component-render-schedule.yaml' | ||
|
|
||
| permissions: {} | ||
|
|
||
| concurrency: | ||
| group: component-render-schedule-${{ github.event.pull_request.number || github.ref }} | ||
|
marians marked this conversation as resolved.
Resolved
|
||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| refs: | ||
| name: Pick the refs to render | ||
| runs-on: ubuntu-26.04 | ||
| permissions: | ||
| contents: read | ||
| outputs: | ||
| refs: ${{ steps.pick.outputs.refs }} | ||
| steps: | ||
| - name: main and the latest patch of the last three minors | ||
| id: pick | ||
| env: | ||
| REFS: ${{ inputs.refs }} | ||
| REPO: ${{ github.repository }} | ||
| run: | | ||
| set -euo pipefail | ||
| if [ -n "${REFS:-}" ]; then | ||
| read -r -a picked <<<"$REFS" | ||
| else | ||
| tags="$(git ls-remote --tags --refs "https://github.com/$REPO" 'v*' \ | ||
| | sed 's#.*refs/tags/##' | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V)" | ||
| mapfile -t releases < <(awk -F. '{ last[$1"."$2] = $0 } END { for (m in last) print last[m] }' <<<"$tags" | sort -V | tail -n 3) | ||
|
marians marked this conversation as resolved.
Resolved
|
||
| picked=(main "${releases[@]}") | ||
| fi | ||
| json="$(jq -cn '$ARGS.positional' --args "${picked[@]}")" | ||
| echo "refs=$json" >> "$GITHUB_OUTPUT" | ||
| echo "rendering: ${picked[*]}" | ||
|
|
||
| render: | ||
| name: Render ${{ matrix.ref }} | ||
| needs: refs | ||
| runs-on: ubuntu-26.04 | ||
| timeout-minutes: 30 | ||
| permissions: | ||
| contents: read | ||
| issues: write | ||
|
marians marked this conversation as resolved.
Resolved
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| ref: ${{ fromJSON(needs.refs.outputs.refs) }} | ||
|
marians marked this conversation as resolved.
Resolved
|
||
| steps: | ||
| - name: Check out ${{ matrix.ref }} | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: ${{ matrix.ref }} | ||
| persist-credentials: false | ||
| - name: Install helm | ||
| uses: giantswarm/install-binary-action@5bef88f65012037dd836117c8d344b21bb559854 # v4.1.0 | ||
| with: | ||
| binary: helm | ||
| # The pin of .circleci/custom.yml's test-ingress-modes. | ||
| version: "3.17.3" | ||
| download_url: "https://get.helm.sh/helm-v${version}-linux-amd64.tar.gz" | ||
| tarball_binary_path: "linux-amd64/helm" | ||
| smoke_test: "${binary} version --short" | ||
| - name: Install PyYAML | ||
|
marians marked this conversation as resolved.
Resolved
|
||
| run: | | ||
| sudo timeout 180 apt-get update -qq | ||
| sudo timeout 180 apt-get install -y -qq python3-yaml | ||
| python3 -c 'import yaml' | ||
| - name: Render every component with the forwarded values | ||
| id: render | ||
| env: | ||
| REF: ${{ matrix.ref }} | ||
| run: | | ||
| set -o pipefail | ||
| if [ "$REF" = main ]; then | ||
| targets=(verify-components-charts verify-examples) | ||
| else | ||
| targets=(verify-release-floors verify-examples) | ||
| fi | ||
| make "${targets[@]}" 2>&1 | tee "$RUNNER_TEMP/render.log" | ||
|
marians marked this conversation as resolved.
Resolved
|
||
| - name: Summarize the refusal | ||
| if: failure() && steps.render.outcome == 'failure' | ||
| run: | | ||
| { | ||
| echo '```' | ||
| sed -n '/^FAIL/,$p' "$RUNNER_TEMP/render.log" | head -n 60 | ||
|
marians marked this conversation as resolved.
Resolved
|
||
| echo '```' | ||
| } > "$RUNNER_TEMP/fail.md" | ||
| if [ "$(wc -l < "$RUNNER_TEMP/fail.md")" -le 2 ]; then | ||
| { echo '```'; tail -n 40 "$RUNNER_TEMP/render.log"; echo '```'; } > "$RUNNER_TEMP/fail.md" | ||
| fi | ||
| cat "$RUNNER_TEMP/fail.md" >> "$GITHUB_STEP_SUMMARY" | ||
| - name: Open, update or close the issue for ${{ matrix.ref }} | ||
| if: always() && github.event_name != 'pull_request' && (steps.render.outcome == 'success' || steps.render.outcome == 'failure') | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| GH_REPO: ${{ github.repository }} | ||
| REF: ${{ matrix.ref }} | ||
| OUTCOME: ${{ steps.render.outcome }} | ||
| RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
| run: | | ||
| set -euo pipefail | ||
| if [ "$REF" = main ]; then | ||
| title="agent-platform main branch chart doesn't render" | ||
| else | ||
| title="agent-platform release $REF chart doesn't render" | ||
| fi | ||
| number="$(gh issue list --state open --label team/bumblebee --search "\"$title\" in:title" \ | ||
|
marians marked this conversation as resolved.
Resolved
|
||
| --json number,title --jq "map(select(.title == \"$title\"))[0].number // empty")" | ||
|
marians marked this conversation as resolved.
Resolved
|
||
| if [ "$OUTCOME" = success ]; then | ||
| if [ -n "$number" ]; then | ||
| gh issue close "$number" --comment "Every component renders again on \`$REF\`: $RUN_URL" | ||
| fi | ||
| exit 0 | ||
| fi | ||
| body="$(cat <<EOF | ||
| @giantswarm/team-bumblebee a component chart refuses the values agent-platform \`$REF\` forwards to it, so installations that reconcile this release now fail. | ||
|
marians marked this conversation as resolved.
Resolved
|
||
|
|
||
| Run: $RUN_URL | ||
|
|
||
| $(cat "$RUNNER_TEMP/fail.md") | ||
|
|
||
| How to respond: [docs/ci.md](https://github.com/$GH_REPO/blob/main/docs/ci.md#scheduled-component-render). | ||
| EOF | ||
| )" | ||
| if [ -n "$number" ]; then | ||
| gh issue comment "$number" --body "$body" | ||
|
marians marked this conversation as resolved.
Resolved
|
||
| else | ||
| gh issue create --title "$title" --label team/bumblebee --body "$body" | ||
|
marians marked this conversation as resolved.
Resolved
|
||
| fi | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # CI | ||
|
|
||
| | Pipeline | When | What it runs | | ||
| | --- | --- | --- | | ||
| | CircleCI `test-ingress-modes` | Every pull request | `make verify-all`: every render assertion, including `verify-components-charts` and `verify-examples`. | | ||
| | CircleCI `verify-release-floors` | Every release tag, before the charts are pushed | `make verify-release-floors`: the strict run of `verify-components-charts`, which refuses a range or a BOM pin that resolves to no published chart. | | ||
| | GitHub Actions `component-render-schedule` | Every six hours, and by hand | The component render below, against `main` and published releases. | | ||
|
|
||
| ## Scheduled component render | ||
|
|
||
| Each `components.*.versionRange` floats within its major, so a component release changes what an already published agent-platform release installs, without any agent-platform commit. The pull request and tag pipelines run before that component release and cannot see it. | ||
|
|
||
| [`component-render-schedule`](../.github/workflows/component-render-schedule.yaml) closes that gap. Every six hours it checks out `main` and the latest patch of the three highest minor releases, resolves every component range the way Flux does today, pulls the charts, and renders each one with the values the meta chart forwards to it. Each ref runs its own targets, with its own values: | ||
|
|
||
| - `main`: `make verify-components-charts verify-examples` | ||
| - a release tag: `make verify-release-floors verify-examples` | ||
|
|
||
| This catches a component that refuses the forwarded values: a closed values schema that no longer accepts a key, a `fail` guard in a template, a required value the meta chart does not set. It does not catch components that render but do not work together, or anything that only shows on a running cluster. | ||
|
|
||
| To render other refs, run the workflow by hand with the `refs` input, for example `gh workflow run component-render-schedule.yaml -f refs="v4.175.1"`. | ||
|
|
||
| ### When an issue opens | ||
|
|
||
| A red ref opens the issue *agent-platform release `<version>` chart doesn't render* (or *agent-platform main branch chart doesn't render*), labelled `team/bumblebee`. Later red runs comment on it, and the next green run closes it. The issue names the component, the version its range resolved to, and the refusal. | ||
|
|
||
| Installations that reconcile that release into the new component version fail. Respond in one of these ways: | ||
|
|
||
| - Fix the meta chart on `main`: forward values the new component accepts, or cap the range below the breaking version. Then release a patch, and when an older minor that installations still run is affected, a patch of that minor too. | ||
| - Have the component restore what it removed in a patch release, when the refusal is a breaking change inside a major. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.