ci: add shared report-scheduled-failure reusable workflow - #5
Conversation
Every official FalkorDB client repo carries a byte-identical copy of the `report-scheduled-failure` job that alerts the drivers team when the nightly run against `falkordb/falkordb:edge` breaks. Eight copies across seven repos means any change to the message, the fallback behaviour or the webhook secret has to be made eight times. Host it once here as a `workflow_call` reusable workflow so the clients can call it in ~8 lines. The job body is unchanged; only the tracking issue title is parametrised, since JFalkorDB's canary uses its own title. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis change adds a reusable GitHub Actions workflow for scheduled ChangesScheduled failure reporting
Estimated code review effort: 3 (Moderate) | ~15–30 minutes Sequence Diagram(s)sequenceDiagram
participant Workflow as report-scheduled-failure.yml
participant GoogleChat
participant GitHubIssues
alt Google Chat webhook is configured
Workflow->>GoogleChat: Post scheduled failure details
else Webhook is not configured
Workflow->>GitHubIssues: Find matching open tracking issue
Workflow->>GitHubIssues: Create or comment on tracking issue
end
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds a reusable workflow_call workflow to centralize the “report scheduled failure” job that notifies (or falls back to a tracking issue) when nightly client runs against falkordb/falkordb:edge fail, reducing duplicated CI logic across FalkorDB client repositories.
Changes:
- Introduces a new reusable workflow for reporting scheduled failures via Google Chat webhook, with a tracking-issue fallback.
- Adds an input (
issue-title) to allow per-repo customization of the fallback tracking issue title. - Declares
DRIVERS_GOOGLE_CHAT_WEBHOOK_URLas an optional secret for callers to pass viasecrets: inherit.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| number=$(gh issue list --state open --search "$TITLE in:title" --json number,title \ | ||
| --jq "map(select(.title == \"$TITLE\")) | .[0].number // empty") |
Summary
Every official FalkorDB client carries its own copy of the
report-scheduled-failurejob that alerts the drivers team when the nightly run againstfalkordb/falkordb:edgebreaks. There are 8 copies across 7 repos:.github/workflows/node.js.yml.github/workflows/test.yml.github/workflows/go.yml.github/workflows/coverage.yml,.github/workflows/integration-tests.yml.github/workflows/php.yml.github/workflows/version-canary.yml.github/workflows/dotnet.yml7 of the 8 are byte-identical; JFalkorDB's differs only in the tracking issue title. Changing the alert message, the issue fallback or the webhook secret today means editing eight files, and they have already started to drift.
This adds the job once as a
workflow_callreusable workflow. Reusable workflows in a public repo can be called by any repo in the org, and thegithubcontext inside a called workflow belongs to the caller, so the repository name, workflow name and run URL in the alert stay correct without being passed in.Changes
.github/workflows/report-scheduled-failure.yml, a reusable (workflow_call) workflow.DRIVERS_GOOGLE_CHAT_WEBHOOK_URLis unset.issue-titleinput (defaultCI is failing against falkordb/falkordb:edge), so JFalkorDB's canary keeps its own title.DRIVERS_GOOGLE_CHAT_WEBHOOK_URLis declared as an optional secret; callers passsecrets: inherit.Callers keep the
needs:/if:gating locally, since only they know which jobs must have failed:permissions: issues: writehas to stay in the caller: a called workflow can only downgrade the caller's token, never upgrade it.Callers reference
@mainrather than a pinned SHA so a fix here reaches every client without eight follow-up PRs — the whole point of the change. This is a first-party repo in the same org, so the supply-chain tradeoff of an unpinned ref does not apply the way it does for third-party actions.Testing
actionlintpasses on the new file.issue-titleinput and theneeds:/if:keys that stay in the callers.Memory / Performance Impact
N/A — CI configuration only.
Related Issues
N/A
Summary by CodeRabbit