Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
release-train: develop -> staging#540
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
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
9c5c75f
refactor(resources): read the envelope constants from the contract, k…
shujaatTracebloc 749ea3a
fix(534): drop the unretried apt-get from a required check (#537)
LukasWodka 96d57d3
feat(resources): stamp `resources set` as a human choice (backend#222…
shujaatTracebloc c246912
feat(telemetry): the CLI validated events and delivered none (backend…
LukasWodka 858ad3b
feat(telemetry): the CLI now drains the installer's spool too (backen…
LukasWodka af22d8f
chore(shell): drop the pipe into early-closing readers (backend#2264)…
LukasWodka 10c1583
fix(resources): a same-ceiling `resources set` must not require --yes…
saadqbal c1e918f
fix(delete): stop the exit-path telemetry write re-creating the wiped…
saadqbal 96fdeac
fix(fmt): the formatter gates walked the working tree, not the repo (…
saadqbal 0617338
fix(cli): resolve the backend env once per invocation, not once per r…
saadqbal 1642780
chore(deps): bump golang.org/x/text in the golang-x group (#530)
dependabot[bot] e8af6f1
fix(telemetry): the token lookup used a key profiles are not stored u…
LukasWodka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
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
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,147 @@ | ||
| name: Envelope contract drift (cross-repo) | ||
| # internal/resources/envelope_contract.json is VENDORED from | ||
| # tracebloc/client-runtime (backend#2220, RFC-BACKEND-664 §P0). client-runtime | ||
| # owns the training-envelope arithmetic | ||
| # (node_sizing.envelope_from_allocatable); this repo, the bash installer and its | ||
| # PowerShell twin are readers of it. Before that consolidation the same policy | ||
| # was typed out in all three, none derived from the others — and they disagreed: | ||
| # set.go ranked candidate nodes (cpu, memory) while the bash installer ranked | ||
| # them (memory, cpu), so on a cluster of 8c/16Gi + 4c/32Gi `resources set` and | ||
| # the installer anchored on DIFFERENT nodes. | ||
| # | ||
| # Unlike the installers, Go needs no generator: the contract is embedded verbatim | ||
| # with go:embed, so the vendored artifact is byte-identical to upstream and this | ||
| # gate is a plain diff. internal/resources/contract_test.go replays the | ||
| # contract's golden vectors through MaxRunCores/MaxRunGiB on every PR; this job | ||
| # is the other half — it catches the contract itself going stale. | ||
| # | ||
| # Pin, don't float (scripts/.client-runtime-ref), exactly as this repo already | ||
| # does for tracebloc/client and tracebloc/data-ingestors: an unrelated upstream | ||
| # commit must not redden every open CLI PR, and the weekly run catches a pin gone | ||
| # stale enough to matter. | ||
| # | ||
| # FAIL-CLOSED. client-runtime is private, so this needs a token GITHUB_TOKEN | ||
| # cannot provide; when it cannot read upstream the job FAILS rather than warning | ||
| # and exiting 0. A check that never executed must not report as a passing one — | ||
| # the activation-phase fail-open cli#536 had to remove from the backend-fixtures | ||
| # gate for exactly this reason. | ||
| on: | ||
| schedule: | ||
| - cron: "0 6 * * 1" # weekly Monday, offset from chart-drift (05:00) | ||
| workflow_dispatch: | ||
| pull_request: | ||
| branches: [develop, main] | ||
| paths: | ||
| - "internal/resources/**" | ||
| - "scripts/.client-runtime-ref" | ||
| - ".github/workflows/envelope-contract-drift.yml" | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| envelope-contract: | ||
| timeout-minutes: 10 | ||
| name: Envelope contract gate (pinned client-runtime ref) | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout this CLI ref | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| path: cli | ||
| - name: Resolve the pinned client-runtime ref | ||
| id: pin | ||
| # First non-comment, non-blank line of scripts/.client-runtime-ref — the | ||
| # same convention .client-ref and .data-ingestors-ref use. Shape is | ||
| # validated (SHA/branch/tag characters only, no "..") before it reaches | ||
| # the checkout action. | ||
| run: | | ||
| ref="$(grep -vE '^[[:space:]]*(#|$)' cli/scripts/.client-runtime-ref | head -1 | tr -d '[:space:]')" | ||
| if [ -z "$ref" ]; then | ||
| echo "::error file=scripts/.client-runtime-ref::no ref found — the first non-comment line must be a commit SHA" | ||
| exit 1 | ||
| fi | ||
| if ! printf '%s' "$ref" | grep -qE '^[A-Za-z0-9][A-Za-z0-9._/-]*$' || printf '%s' "$ref" | grep -q '\.\.'; then | ||
| echo "::error file=scripts/.client-runtime-ref::invalid ref shape: $ref" | ||
| exit 1 | ||
| fi | ||
| echo "ref=$ref" >> "$GITHUB_OUTPUT" | ||
| - name: Mint a read-only installation token for client-runtime | ||
| id: token | ||
| # Least privilege per the backend#2157 sweep: named `repositories`, not | ||
| # owner-wide, and contents:read only — this job reads two files. | ||
| uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 | ||
| with: | ||
| app-id: ${{ secrets.RELEASE_TRAIN_APP_ID }} | ||
| private-key: ${{ secrets.RELEASE_TRAIN_APP_PRIVATE_KEY }} | ||
| owner: ${{ github.repository_owner }} | ||
| repositories: client-runtime | ||
| permission-contents: read | ||
| - name: Checkout tracebloc/client-runtime @ pinned ref | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| repository: tracebloc/client-runtime | ||
| ref: ${{ steps.pin.outputs.ref }} | ||
| token: ${{ steps.token.outputs.token }} | ||
| path: client-runtime | ||
| persist-credentials: false | ||
| - name: The vendored contract matches upstream, byte for byte | ||
| env: | ||
| PINNED_REF: ${{ steps.pin.outputs.ref }} | ||
| run: | | ||
| upstream="client-runtime/envelope_contract.json" | ||
| vendored="cli/internal/resources/envelope_contract.json" | ||
| if [ ! -f "$upstream" ]; then | ||
| echo "::error::$upstream is missing at $PINNED_REF — has the contract moved or been renamed?" | ||
| exit 1 | ||
| fi | ||
| if ! diff -u "$vendored" "$upstream"; then | ||
| echo "::error file=internal/resources/envelope_contract.json::the vendored envelope contract has drifted from tracebloc/client-runtime@$PINNED_REF" | ||
| echo "" | ||
| echo "To adopt the upstream change:" | ||
| echo " 1. cp <client-runtime>/envelope_contract.json internal/resources/" | ||
| echo " 2. update the SHA in scripts/.client-runtime-ref" | ||
| echo " 3. go test ./internal/resources/... # the golden vectors WILL have moved" | ||
| echo "" | ||
| echo "If the overhead or the floors moved, that is a FLEET envelope change" | ||
| echo "(backend#2167, RFC-BACKEND-664 L0) — not a re-vendor. Say so on the PR." | ||
| exit 1 | ||
| fi | ||
| echo "vendored contract matches client-runtime@$PINNED_REF" | ||
| - name: Upstream's own goldens are not stale against its own arithmetic | ||
| # A vendored contract can match upstream byte-for-byte while UPSTREAM's | ||
| # vectors have gone stale against upstream's code — in which case we are | ||
| # faithfully mirroring a lie. Re-derive them from client-runtime's own | ||
| # generator and require no diff. Pure-python, no cluster, no deps. | ||
| run: | | ||
| cd client-runtime | ||
| if [ ! -f scripts/gen_envelope_vectors.py ]; then | ||
| echo "::error::client-runtime@${{ steps.pin.outputs.ref }} has no scripts/gen_envelope_vectors.py — the contract's provenance cannot be verified" | ||
| exit 1 | ||
| fi | ||
| python3 scripts/gen_envelope_vectors.py | ||
| if ! git diff --exit-code -- envelope_contract.json; then | ||
| echo "::error::client-runtime@${{ steps.pin.outputs.ref }} carries goldens that its own generator does not reproduce." | ||
| echo "The pinned ref is not self-consistent — fix it upstream, then re-vendor and re-pin here." | ||
| exit 1 | ||
| fi | ||
| echo "upstream goldens reproduce from upstream code" | ||
| - name: Set up Go | ||
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | ||
| with: | ||
| go-version-file: cli/go.mod | ||
| cache: true | ||
| cache-dependency-path: cli/go.sum | ||
| - name: The CLI still agrees with the contract it vendored | ||
| run: | | ||
| cd cli | ||
| go test ./internal/resources/... -run 'Contract|Golden|DecisionA|Overhead|FloorText' -v |
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| 0.10.9 | ||
| 0.10.10 |
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
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.