-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Labels
area/dogfoodingIndicates an issue on dogfooding (aka using Pipeline to test Pipeline)Indicates an issue on dogfooding (aka using Pipeline to test Pipeline)
Description
Parent
Part of #3121 β Migrate slash commands from GitHub Actions to dogfooding cluster
Summary
Create a Tekton Pipeline that implements the /retest command, replacing the GitHub Actions workflow _chatops_retest.yml.
Current Behavior (GHA)
The current workflow:
- Gets the PR's HEAD commit SHA
- Lists all check runs for that commit
- For each unique run ID, reruns failed jobs using
gh run rerun <id> --failed - Comments on failure, adds π reaction on success
Proposed Tekton Implementation
Pipeline Structure
Pipeline: slash-retest
βββ Task: retest
β βββ Get PR HEAD commit SHA via gh API
β βββ List check runs for the commit
β βββ Filter to failed runs
β βββ Rerun each failed run via `gh run rerun`
β βββ Add reaction to trigger comment
βββ Finally Task: report-status (on failure)
βββ Comment on PR with error details
Key Considerations
- Simplest of the three: Just API calls, no git operations needed
- GitHub API only: Uses
ghCLI to interact with GHA β no repo checkout needed - Permission model: The current GHA also allows the PR author to
/retest(not just write-access users). The slash routing enforces "write" but the retest workflow itself is more permissive. We may want to keep this behavior. - No workspace needed: Just needs a container with
ghCLI and theCHATOPS_TOKEN
Webhook Payload Fields Needed
From issue_comment event:
body.repository.full_nameβ repo to rerun checks forbody.issue.numberβ PR number (to get HEAD SHA)body.issue.pull_request.urlβ PR API URLbody.comment.idβ for adding reaction
Files to Create
tekton/ci/slash-commands/retest-pipeline.yamltekton/ci/slash-commands/retest-trigger.yaml
Acceptance Criteria
-
/retestreruns all failed GHA check runs for the PR's HEAD commit - Adds π reaction on success
- Comments on the PR if something goes wrong
- Handles PRs with no failed runs gracefully
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/dogfoodingIndicates an issue on dogfooding (aka using Pipeline to test Pipeline)Indicates an issue on dogfooding (aka using Pipeline to test Pipeline)
Type
Projects
Status
In Progress