ci(functional): run k3s smoke on pull requests - #1559
Conversation
Signed-off-by: Valeriy.Romanov <valeriy.romanov@acronis.com>
📝 WalkthroughWalkthroughThis change updates the functional-k3s.yml GitHub Actions workflow to trigger automatically on pull_request events targeting main (opened, synchronize, reopened, ready_for_review), and adds a concurrency policy that cancels in-progress runs for the same PR or ref. ChangesFunctional K3s Workflow Trigger
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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.
🧹 Nitpick comments (1)
.github/workflows/functional-k3s.yml (1)
11-13: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winConsider skipping runs for draft PRs.
With
openedandsynchronizeincluded alongsideready_for_review, this workflow will run for draft PRs as they're opened/pushed to, then run again when marked ready for review — doubling smoke-test executions for draft-first workflows. Consider gating the job(s) withif: github.event.pull_request.draft == falseto avoid this, unless draft-time feedback is intentional here.♻️ Suggested guard
jobs: <job-name>: + if: github.event_name != 'pull_request' || github.event.pull_request.draft == false runs-on: ...🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/functional-k3s.yml around lines 11 - 13, The functional-k3s workflow currently triggers on draft PR opens and updates as well as when marked ready, causing duplicate runs for draft-first flows. Update the workflow logic in the pull_request-triggered job(s) so they only execute when github.event.pull_request.draft is false, using the existing workflow/job structure in functional-k3s.yml to gate the smoke tests. Keep the trigger events as-is only if draft-time execution is still desired; otherwise, prevent the duplicate execution path by adding the draft check at the job level.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/functional-k3s.yml:
- Around line 11-13: The functional-k3s workflow currently triggers on draft PR
opens and updates as well as when marked ready, causing duplicate runs for
draft-first flows. Update the workflow logic in the pull_request-triggered
job(s) so they only execute when github.event.pull_request.draft is false, using
the existing workflow/job structure in functional-k3s.yml to gate the smoke
tests. Keep the trigger events as-is only if draft-time execution is still
desired; otherwise, prevent the duplicate execution path by adding the draft
check at the job level.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5abac64a-9c6c-4a86-9d08-80955e6c98b9
📒 Files selected for processing (1)
.github/workflows/functional-k3s.yml
Summary
Runs the functional K3s smoke workflow automatically for PR changes.
The workflow still supports manual
workflow_dispatch, but now also runs when a PR targetingmainis opened, updated, reopened, or marked ready for review.What changed
pull_requesttrigger for:openedsynchronizereopenedready_for_reviewSummary by CodeRabbit