Repository navigation
ci: restore per-PR CI on main (drop the trunk gate) #1957
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
Changes from all commits
49169fb
0709d98
b2547e2
6be62f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -5,14 +5,14 @@ on: | |||||
| paths: | ||||||
| - 'packages/utils/cli-registry.yaml' | ||||||
| branches: | ||||||
| [main] | ||||||
| - main | ||||||
| - 'feature/**' | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Keep feature branches out of this auto-commit push trigger, or use an explicitly authorized revalidation trigger; Prompt for AI agents
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed together with the Devin comment: codegen-models pushes are main-only.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Removing the (Based on your team's feedback about restricting PR CI to same-repository trunk-to-main PRs.) Prompt for AI agents |
||||||
| pull_request: | ||||||
| paths: | ||||||
| - 'packages/utils/cli-registry.yaml' | ||||||
|
|
||||||
| jobs: | ||||||
| codegen: | ||||||
| if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') | ||||||
| runs-on: ubuntu-latest | ||||||
| permissions: | ||||||
| contents: write | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -9,12 +9,13 @@ name: Fleet E2E | |||||
| # engine build), which rust-cache amortises on warm runs. The 20-minute job | ||||||
| # timeout is a cold-build ceiling, not the matrix runtime. | ||||||
|
|
||||||
| # NOTE on branches: CI runs only on this repository's `trunk` -> `main` PR and | ||||||
| # on pushes to `main` (see the job `if:`). Feature branches, including | ||||||
| # `feat/fleet-*`, merge into `trunk` without CI. | ||||||
| # NOTE on branches: the fleet stack is developed on `feat/fleet-*` branches that | ||||||
| # merge into each other before `main`, so the trigger must include them — gating | ||||||
| # on `[main]` alone leaves this job inert for the entire feature stack (it would | ||||||
| # only run after something reaches main). Update to `[main]` once the stack lands. | ||||||
| on: | ||||||
| push: | ||||||
| branches: [main] | ||||||
| branches: [main, 'feat/fleet-**'] | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The new Prompt for AI agents
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed: fleet-e2e's push trigger stays
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Removing the job (Based on your team's feedback about restricting PR CI to same-repository PRs.) Prompt for AI agents
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed: the trunk gate is replaced by a same-repository check rather than removed, so fork PRs still do not run fleet-e2e (or the other heavy jobs). |
||||||
| paths: | ||||||
| - 'packages/fleet/**' | ||||||
| - 'packages/cli/**' | ||||||
|
|
@@ -53,7 +54,6 @@ env: | |||||
|
|
||||||
| jobs: | ||||||
| fleet-e2e: | ||||||
| if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') | ||||||
| name: Two-node fleet matrix | ||||||
| runs-on: ubuntu-latest | ||||||
| timeout-minutes: 20 | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -18,14 +18,11 @@ concurrency: | |||||
|
|
||||||
| jobs: | ||||||
| changes: | ||||||
| if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') | ||||||
| uses: ./.github/workflows/detect-changes.yml | ||||||
| install-test: | ||||||
| name: Install Test (Node ${{ matrix.node-version }}) | ||||||
| needs: changes | ||||||
| if: >- | ||||||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||||||
| (needs.changes.outputs.node_changed == 'true') | ||||||
| if: needs.changes.outputs.node_changed == 'true' | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Dropping the same-repository check lets fork PRs into Prompt for AI agents
Suggested change
|
||||||
| runs-on: ubuntu-latest | ||||||
| strategy: | ||||||
| matrix: | ||||||
|
|
@@ -86,9 +83,7 @@ jobs: | |||||
| fresh-install: | ||||||
| name: Fresh Install (Node ${{ matrix.node-version }}) | ||||||
| needs: changes | ||||||
| if: >- | ||||||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||||||
| (needs.changes.outputs.node_changed == 'true') | ||||||
| if: needs.changes.outputs.node_changed == 'true' | ||||||
| runs-on: ubuntu-latest | ||||||
| strategy: | ||||||
| matrix: | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,14 +21,11 @@ env: | |
|
|
||
| jobs: | ||
| changes: | ||
| if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') | ||
| uses: ./.github/workflows/detect-changes.yml | ||
| validate: | ||
| name: Build & Validate | ||
| needs: changes | ||
| if: >- | ||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||
| (needs.changes.outputs.node_changed == 'true') | ||
| if: needs.changes.outputs.node_changed == 'true' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: Prompt for AI agents
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not an issue:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This drops the only head-branch restriction on Prompt for AI agents |
||
| runs-on: ubuntu-latest | ||
| env: | ||
| NPM_CONFIG_FUND: false | ||
|
|
@@ -202,9 +199,7 @@ jobs: | |
| publish-fresh-install-build: | ||
| name: Publish Fresh Install Build | ||
| needs: changes | ||
| if: >- | ||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||
| (needs.changes.outputs.node_changed == 'true') | ||
| if: needs.changes.outputs.node_changed == 'true' | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| NPM_CONFIG_FUND: false | ||
|
|
@@ -253,8 +248,9 @@ jobs: | |
| # provisioning an undeletable workspace; other same-repository PRs and | ||
| # main pushes must reuse the CI workspace. | ||
| if: >- | ||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||
| (needs.changes.outputs.node_changed == 'true' && github.actor != 'dependabot[bot]' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)) | ||
| needs.changes.outputs.node_changed == 'true' && | ||
| github.actor != 'dependabot[bot]' && | ||
| (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) | ||
| runs-on: macos-latest | ||
| env: | ||
| NPM_CONFIG_FUND: false | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,8 +31,8 @@ jobs: | |
| build: | ||
| name: ${{ github.event_name == 'pull_request' && 'Validate PR-head Linux broker' || 'Build exact Linux broker' }} | ||
| if: >- | ||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||
| (github.event_name != 'pull_request_target' || github.event.pull_request.head.repo.full_name == github.repository) | ||
| github.event_name != 'pull_request_target' || | ||
| github.event.pull_request.head.repo.full_name == github.repository | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This runs the broker build for same-repository (Based on your team's feedback about requiring the main base for relayflow-pr-proof-broker pull requests.) Prompt for AI agents |
||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| steps: | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -17,15 +17,12 @@ env: | |||||||||
|
|
||||||||||
| jobs: | ||||||||||
| changes: | ||||||||||
| if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') | ||||||||||
| uses: ./.github/workflows/detect-changes.yml | ||||||||||
|
|
||||||||||
| rust-test: | ||||||||||
| name: Rust Tests (${{ matrix.os }}) | ||||||||||
| needs: changes | ||||||||||
| if: >- | ||||||||||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||||||||||
| (needs.changes.outputs.rust_changed == 'true') | ||||||||||
| if: needs.changes.outputs.rust_changed == 'true' | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Removing the same-repo Prompt for AI agents
Suggested change
|
||||||||||
| runs-on: ${{ matrix.os }} | ||||||||||
| strategy: | ||||||||||
| fail-fast: false | ||||||||||
|
|
@@ -45,9 +42,7 @@ jobs: | |||||||||
| relay-pty-windows-test: | ||||||||||
| name: Relay PTY Synchronization Tests (windows-latest) | ||||||||||
| needs: changes | ||||||||||
| if: >- | ||||||||||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||||||||||
| (needs.changes.outputs.rust_changed == 'true') | ||||||||||
| if: needs.changes.outputs.rust_changed == 'true' | ||||||||||
| runs-on: windows-latest | ||||||||||
| timeout-minutes: 10 | ||||||||||
| steps: | ||||||||||
|
|
@@ -67,9 +62,7 @@ jobs: | |||||||||
| rust-cross-compile: | ||||||||||
| name: Cross-compile check (${{ matrix.target }}) | ||||||||||
| needs: changes | ||||||||||
| if: >- | ||||||||||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||||||||||
| (needs.changes.outputs.rust_changed == 'true') | ||||||||||
| if: needs.changes.outputs.rust_changed == 'true' | ||||||||||
| runs-on: ${{ matrix.os }} | ||||||||||
| strategy: | ||||||||||
| fail-fast: false | ||||||||||
|
|
@@ -103,9 +96,7 @@ jobs: | |||||||||
| rust-clippy: | ||||||||||
| name: Clippy (${{ matrix.os }}) | ||||||||||
| needs: changes | ||||||||||
| if: >- | ||||||||||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||||||||||
| (needs.changes.outputs.rust_changed == 'true') | ||||||||||
| if: needs.changes.outputs.rust_changed == 'true' | ||||||||||
| runs-on: ${{ matrix.os }} | ||||||||||
| strategy: | ||||||||||
| fail-fast: false | ||||||||||
|
|
@@ -124,9 +115,7 @@ jobs: | |||||||||
| rust-fmt: | ||||||||||
| name: Format | ||||||||||
| needs: changes | ||||||||||
| if: >- | ||||||||||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||||||||||
| (needs.changes.outputs.rust_changed == 'true') | ||||||||||
| if: needs.changes.outputs.rust_changed == 'true' | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@v4 | ||||||||||
|
|
@@ -138,9 +127,7 @@ jobs: | |||||||||
| sdk-check: | ||||||||||
| name: SDK TypeScript Check | ||||||||||
| needs: changes | ||||||||||
| if: >- | ||||||||||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||||||||||
| (needs.changes.outputs.node_changed == 'true') | ||||||||||
| if: needs.changes.outputs.node_changed == 'true' | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@v4 | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,9 +20,7 @@ jobs: | |||||
| name: Auto-format Rust code | ||||||
| runs-on: ubuntu-latest | ||||||
| # Only run on same-repo PRs where the bot can push back formatting commits. | ||||||
| if: >- | ||||||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||||||
| (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) | ||||||
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: This gate now also matches Dependabot PRs, which get a read-only Prompt for AI agents
Suggested change
|
||||||
| permissions: | ||||||
| contents: write | ||||||
| steps: | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,16 +21,13 @@ concurrency: | |
|
|
||
| jobs: | ||
| changes: | ||
| if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') | ||
| uses: ./.github/workflows/detect-changes.yml | ||
|
|
||
| # NPM audit for known vulnerabilities | ||
| npm-audit: | ||
| name: NPM Audit | ||
| needs: changes | ||
| if: >- | ||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||
| (needs.changes.outputs.node_changed == 'true') | ||
| if: needs.changes.outputs.node_changed == 'true' | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
|
|
@@ -60,9 +57,7 @@ jobs: | |
| dependency-review: | ||
| name: Dependency Review | ||
| runs-on: ubuntu-latest | ||
| if: >- | ||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||
| (github.event_name == 'pull_request') | ||
| if: github.event_name == 'pull_request' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: (Based on your team's feedback about trunk-gated PR CI limited to same-repository PRs.) Dropping the gates also drops the Prompt for AI agents |
||
| # This job requires the dependency graph to be enabled in repo settings | ||
| # Make it non-blocking until that's configured | ||
| continue-on-error: true | ||
|
|
@@ -82,9 +77,7 @@ jobs: | |
| codeql: | ||
| name: CodeQL Analysis | ||
| needs: changes | ||
| if: >- | ||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||
| (needs.changes.outputs.node_changed == 'true') | ||
| if: needs.changes.outputs.node_changed == 'true' | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| security-events: write | ||
|
|
@@ -111,7 +104,6 @@ jobs: | |
|
|
||
| # Secret scanning (check for accidentally committed secrets) | ||
| secrets-scan: | ||
| if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') | ||
| name: Secret Scanning | ||
| runs-on: ubuntu-latest | ||
| # Make non-blocking - review findings manually | ||
|
|
@@ -143,9 +135,7 @@ jobs: | |
| license-check: | ||
| name: License Compliance | ||
| needs: changes | ||
| if: >- | ||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||
| (needs.changes.outputs.node_changed == 'true') | ||
| if: needs.changes.outputs.node_changed == 'true' | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,6 @@ concurrency: | |
|
|
||
| jobs: | ||
| stress-test-orchestrator: | ||
| if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') | ||
| name: Orchestrator Stress Tests | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
|
|
@@ -79,7 +78,6 @@ jobs: | |
| fi | ||
|
|
||
| stress-test-orchestrator-integration: | ||
| if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main') | ||
| name: Orchestrator Integration Stress Tests | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
|
|
@@ -163,9 +161,7 @@ jobs: | |
| name: Stress Test Summary | ||
| needs: [stress-test-orchestrator, stress-test-orchestrator-integration] | ||
| runs-on: ubuntu-latest | ||
| if: >- | ||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (github.head_ref == 'trunk' && github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'main')) && | ||
| (always()) | ||
| if: always() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This removes the trunk-to-main gate, so stress tests now run on every PR to Prompt for AI agents |
||
|
|
||
| steps: | ||
| - name: Download all artifacts | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Generated models leave PR checks failed
For a
feature/**PR missing generated models,codegencommits the fix after PR checks start. The bot'sGITHUB_TOKENpush triggers no replacement PR checks, leaving the corrected PR with failed checks.Learn more
The workflow has both a push job that commits generated models and a pull-request job that fails if those models are missing. GitHub starts the PR job for the original head while the push job generates and commits a fix on the feature branch. The PR job checks the original merge commit, so it fails. GitHub does not create new workflow runs for a push made with the default
GITHUB_TOKEN; the corrected branch therefore has no fresh PR validation.Example: A contributor pushes a registry edit on
feature/new-cliwithout updatingmodels.py. The push job addsmodels.py, but the already-started PR job fails against the old head. No new PR run starts for the bot commit.Recommended fix: Do not auto-commit generated files on feature branches using
GITHUB_TOKEN; require the contributor to commit them so normal PR checks rerun. Alternatively arrange an explicitly authorized revalidation trigger for bot commits and verify that branch protection sees checks on the resulting head.Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in the rebuilt branch: rather than reverting, this now keeps main's main-only push trigger for codegen-models (no
feature/**push), so a codegen commit never lands mid-PR without fresh checks.