Support public Buildkite pipelines in pr-buildkite-detective#427
Support public Buildkite pipelines in pr-buildkite-detective#427
Conversation
- Make BUILDKITE_API_TOKEN secret optional (required: false) - Add buildkite.com to network allowed list for public page access - Add Step 2b fallback: discover build URLs from PR commit statuses, fetch public Buildkite build pages via web-fetch for log analysis - Update example.yml, trigger, and README to document optional token Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
- Rephrase ambiguous 'Do not stop' to 'Proceed with the public pipeline fallback' - Remove fragile GitHub HTML scraping fallback for URL discovery - Specify concrete job log URL pattern instead of ambiguous alternatives Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... 📒 Files selected for processing (2)
✏️ Tip: You can disable in-progress messages and the fortune message in your review settings. 📝 WalkthroughWalkthroughThe PR modifies the Buildkite Detective workflow to make the Changes
Sequence DiagramsequenceDiagram
actor GHA as GitHub Action
participant Chk as Token Check
participant MCP as Buildkite MCP API
participant Pub as Buildkite Public Pages
GHA->>Chk: Check BUILDKITE_API_TOKEN
alt Token Available
Chk-->>GHA: Token present
GHA->>MCP: Request build & job logs via MCP
MCP-->>GHA: Return logs (detailed)
else Token Unavailable
Chk-->>GHA: Token absent
GHA->>Pub: Discover & fetch public build page
Pub-->>GHA: Return HTML
GHA->>Pub: Parse & extract logs
Pub-->>GHA: Return logs (public)
end
GHA-->>GHA: Process logs
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly Related PRs
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| required: true | ||
| BUILDKITE_API_TOKEN: | ||
| required: true | ||
| required: false |
There was a problem hiding this comment.
[HIGH] Runtime workflow artifact is not regenerated
This change makes BUILDKITE_API_TOKEN optional in the source .md, but the compiled workflow used at runtime still requires it (.github/workflows/gh-aw-pr-buildkite-detective.lock.yml:87-89 still has required: true). The same lock file also still lacks buildkite.com in its allowlist (allowed_domains at line 603), so the new public fallback cannot actually run when triggered via trigger-pr-buildkite-detective.yml (which calls the lock file).
Please regenerate and commit the corresponding .lock.yml artifact so the behavior change is effective.
|
/ai please address pr feedback |
|
I investigated the requested PR feedback and confirmed the blocker is in I cannot push a fix from this run because workflow-file edits under What is this? | From workflow: Mention in PR Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
This PR updates
pr-buildkite-detectiveto support public Buildkite pipelines whenBUILDKITE_API_TOKENis not configured, while preserving the existing Buildkite MCP flow when a token is available.Changes
BUILDKITE_API_TOKENoptional (required: false) in.github/workflows/gh-aw-pr-buildkite-detective.md.buildkite.comto the workflow network allowlist so public Buildkite pages can be fetched.Resolve event contextstep that normalizes event data intoBK_EVENT_*environment variables, and switched prompt context to those variables.target_url, fetch the public build page, identify failed jobs, then fetch job logs.BUILDKITE_API_TOKENis optional for public pipelines.Public fallback flow (Step 2b)
Validation
make lintpasses.make compilepasses.Fixes #423