-
Notifications
You must be signed in to change notification settings - Fork 2
feat(workflows): add ingress dynamic routing for obs and docs #1104
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
+2,518
−1,208
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
651bf1e
feat(workflows): add ingress dynamic routing for obs and docs
fr4nc1sc0-r4m0n 6332a87
fix(automerge): restore verify and dependency-collection job gates
fr4nc1sc0-r4m0n e1cfd07
feat(client-trigger): fire-and-forget dispatch with PR status link
fr4nc1sc0-r4m0n 837e356
Require ingress-token-policy only where create-token runs
fr4nc1sc0-r4m0n df69fea
Prevent infinite workflow_run re-dispatch in trigger-docs-aw
fr4nc1sc0-r4m0n b070d80
Merge main into feat/dynamic-routing-v4 with APM resolve integration
fr4nc1sc0-r4m0n 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,14 @@ | ||
| --- | ||
| description: Client workflow templates live under remote-workflow-template only | ||
| description: Client workflows — `.github/remote-workflow-template/obs/` | ||
| alwaysApply: true | ||
| --- | ||
|
|
||
| # Client workflows — `.github/remote-workflow-template/obs/` | ||
|
|
||
| **Do not** add a monolithic `.github/workflows/oblt-aw.yml` entrypoint (removed). | ||
| **Do not** add per-workflow `trigger-oblt-aw-*.yml` client entrypoints. | ||
|
|
||
| **Where to change consumer entrypoints:** [`.github/remote-workflow-template/obs/.github/workflows/trigger-oblt-aw-*.yml`](.github/remote-workflow-template/obs/.github/workflows/) only. Distribution installs that tree into target repositories. | ||
| **Where to change consumer entrypoints:** [`.github/remote-workflow-template/obs/.github/workflows/trigger-oblt-aw.yml`](.github/remote-workflow-template/obs/.github/workflows/trigger-oblt-aw.yml) and [`.github/remote-workflow-template/obs/.github/workflows/oblt-aw.yml`](.github/remote-workflow-template/obs/.github/workflows/oblt-aw.yml) only. Distribution installs that tree into target repositories. | ||
|
|
||
| **Control-plane reusables** live under `.github/workflows/oblt-aw-*.yml` and `.github/workflows/docs-aw-*.yml` (shared prelude: `aw-prelude.yml`). **Do not** edit consumer copies under target repos from this repository except via distribution. | ||
| **Control-plane reusables** live under `.github/workflows/oblt-aw-*.yml` (ingress: `oblt-aw-ingress.yml`; shared prelude: `aw-prelude.yml`). **Do not** edit consumer copies under target repos from this repository except via distribution. | ||
|
|
||
| **Docs:** [docs/workflows/oblt-aw-client-template.md](docs/workflows/oblt-aw-client-template.md), [CONTRIBUTING.md](CONTRIBUTING.md). |
61 changes: 61 additions & 0 deletions
61
.github/remote-workflow-template/docs/.github/workflows/docs-aw.yml
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,61 @@ | ||
| name: Docs Agentic Workflow Entrypoint | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| trigger-source: | ||
| description: Client trigger workflow file that dispatched this run | ||
| required: true | ||
| type: string | ||
| event-name: | ||
| description: Original github.event_name from the trigger | ||
| required: true | ||
| type: string | ||
| event-action: | ||
| description: Original github.event.action from the trigger | ||
| required: false | ||
| type: string | ||
| default: '' | ||
| event-payload-json: | ||
| description: JSON-encoded original github.event from the trigger | ||
| required: true | ||
| type: string | ||
| caller-ref: | ||
| description: Original github.ref from the trigger | ||
| required: true | ||
| type: string | ||
| caller-sha: | ||
| description: Original github.sha from the trigger | ||
| required: true | ||
| type: string | ||
| caller-run-id: | ||
| description: Original github.run_id from the trigger | ||
| required: true | ||
| type: string | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: docs-aw-entrypoint-${{ github.event.inputs.event-name }}-${{ github.event.inputs.caller-run-id }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| ingress: | ||
| permissions: | ||
| actions: write | ||
| contents: read | ||
| id-token: write | ||
| issues: read | ||
| pull-requests: read | ||
| uses: elastic/oblt-aw/.github/workflows/docs-aw-ingress.yml@main # ratchet:exclude | ||
| with: | ||
| trigger-source: ${{ github.event.inputs.trigger-source }} | ||
| ingress-event-name: ${{ github.event.inputs.event-name }} | ||
| ingress-event-action: ${{ github.event.inputs.event-action }} | ||
| ingress-event-payload-json: ${{ github.event.inputs.event-payload-json }} | ||
| caller-ref: ${{ github.event.inputs.caller-ref }} | ||
| caller-sha: ${{ github.event.inputs.caller-sha }} | ||
| caller-run-id: ${{ github.event.inputs.caller-run-id }} | ||
| secrets: | ||
| COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} |
31 changes: 0 additions & 31 deletions
31
.github/remote-workflow-template/docs/.github/workflows/trigger-docs-aw-ai-menu.yml
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
...ub/remote-workflow-template/docs/.github/workflows/trigger-docs-aw-pr-ai-menu-collect.yml
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
.github/remote-workflow-template/docs/.github/workflows/trigger-docs-aw-pr-ai-menu.yml
This file was deleted.
Oops, something went wrong.
83 changes: 83 additions & 0 deletions
83
.github/remote-workflow-template/docs/.github/workflows/trigger-docs-aw.yml
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,83 @@ | ||
| name: Docs Agentic Workflow Trigger | ||
|
|
||
| # Distributed to repositories in config/docs/active-repositories.json. | ||
|
|
||
| on: | ||
| issues: | ||
| types: [opened] | ||
| issue_comment: | ||
| types: [edited] | ||
| pull_request: | ||
| types: [opened, reopened, synchronize, ready_for_review] | ||
| workflow_run: | ||
| workflows: [Docs Agentic Workflow Trigger] | ||
| types: [completed] | ||
| workflow_dispatch: | ||
| inputs: | ||
| issue_number: | ||
| description: Issue number for Docs AI issue menu (manual refresh). | ||
| required: false | ||
| type: string | ||
| pull_request_number: | ||
| description: Pull request number for Docs PR AI menu (manual refresh). | ||
| required: false | ||
| type: string | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: docs-aw-trigger-${{ github.event.pull_request.number || github.event.issue.number || github.event.workflow_run.id || github.event.schedule || github.sha }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| dispatch-entrypoint: | ||
| if: >- | ||
| github.event_name != 'workflow_run' || | ||
| ( | ||
| github.event.workflow_run.conclusion == 'success' && | ||
| github.event.workflow_run.event == 'pull_request' | ||
| ) | ||
| permissions: | ||
| actions: write | ||
| statuses: write | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - name: Dispatch docs-aw entrypoint | ||
| id: dispatch | ||
| uses: benc-uk/workflow-dispatch@31e2b3319479a63f0ab15bf800eff9e913504e26 # v1.3.2 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| workflow: docs-aw.yml | ||
| inputs: | | ||
| { | ||
| "trigger-source": ${{ toJSON(github.workflow) }}, | ||
| "event-name": ${{ toJSON(github.event_name) }}, | ||
| "event-action": ${{ toJSON(github.event.action || '') }}, | ||
| "event-payload-json": ${{ toJSON(toJSON(github.event)) }}, | ||
| "caller-ref": ${{ toJSON(github.ref) }}, | ||
| "caller-sha": ${{ toJSON(github.sha) }}, | ||
| "caller-run-id": ${{ toJSON(github.run_id) }} | ||
| } | ||
|
|
||
| - name: Post entrypoint run link on PR commit | ||
| if: >- | ||
| github.event_name == 'pull_request' || | ||
| (github.event_name == 'workflow_run' && | ||
| github.event.workflow_run.event == 'pull_request') | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| HEAD_SHA: >- | ||
| ${{ github.event.pull_request.head.sha || | ||
| github.event.workflow_run.head_sha }} | ||
| RUN_URL: ${{ steps.dispatch.outputs.runUrlHtml }} | ||
| STATUS_CONTEXT: docs-aw/entrypoint | ||
| run: | | ||
| gh api \ | ||
| --method POST \ | ||
| "/repos/${GITHUB_REPOSITORY}/statuses/${HEAD_SHA}" \ | ||
| -f state=success \ | ||
| -f target_url="${RUN_URL}" \ | ||
| -f description='docs-aw entrypoint dispatched (open run for progress)' \ | ||
| -f context="${STATUS_CONTEXT}" | ||
62 changes: 62 additions & 0 deletions
62
.github/remote-workflow-template/obs/.github/workflows/oblt-aw.yml
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,62 @@ | ||
| name: Observability Agentic Workflow Entrypoint | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| trigger-source: | ||
| description: Client trigger workflow file that dispatched this run | ||
| required: true | ||
| type: string | ||
| event-name: | ||
| description: Original github.event_name from the trigger | ||
| required: true | ||
| type: string | ||
| event-action: | ||
| description: Original github.event.action from the trigger | ||
| required: false | ||
| type: string | ||
| default: '' | ||
| event-payload-json: | ||
| description: JSON-encoded original github.event from the trigger | ||
| required: true | ||
| type: string | ||
| caller-ref: | ||
| description: Original github.ref from the trigger | ||
| required: true | ||
| type: string | ||
| caller-sha: | ||
| description: Original github.sha from the trigger | ||
| required: true | ||
| type: string | ||
| caller-run-id: | ||
| description: Original github.run_id from the trigger | ||
| required: true | ||
| type: string | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: oblt-aw-entrypoint-${{ github.event.inputs.event-name }}-${{ github.event.inputs.caller-run-id }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| ingress: | ||
| permissions: | ||
| actions: write | ||
| contents: read | ||
| id-token: write | ||
| issues: read | ||
| pull-requests: read | ||
| uses: elastic/oblt-aw/.github/workflows/oblt-aw-ingress.yml@main # ratchet:exclude | ||
| with: | ||
| trigger-source: ${{ github.event.inputs.trigger-source }} | ||
| ingress-event-name: ${{ github.event.inputs.event-name }} | ||
| ingress-event-action: ${{ github.event.inputs.event-action }} | ||
| ingress-event-payload-json: ${{ github.event.inputs.event-payload-json }} | ||
| caller-ref: ${{ github.event.inputs.caller-ref }} | ||
| caller-sha: ${{ github.event.inputs.caller-sha }} | ||
| caller-run-id: ${{ github.event.inputs.caller-run-id }} | ||
| secrets: | ||
| COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} | ||
| BUILDKITE_API_TOKEN: ${{ secrets.BUILDKITE_LOGS_API_TOKEN }} |
18 changes: 0 additions & 18 deletions
18
.github/remote-workflow-template/obs/.github/workflows/trigger-oblt-aw-agent-suggestions.yml
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
.github/remote-workflow-template/obs/.github/workflows/trigger-oblt-aw-autodoc.yml
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
.github/remote-workflow-template/obs/.github/workflows/trigger-oblt-aw-automerge.yml
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
.github/remote-workflow-template/obs/.github/workflows/trigger-oblt-aw-dependency-review.yml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.