Skip to content

ci(functional): run k3s smoke on pull requests - #1559

Merged
BlackCelebrant merged 1 commit into
constructorfabric:mainfrom
BlackCelebrant:functional-k3s-pr-trigger
Jul 2, 2026
Merged

ci(functional): run k3s smoke on pull requests#1559
BlackCelebrant merged 1 commit into
constructorfabric:mainfrom
BlackCelebrant:functional-k3s-pr-trigger

Conversation

@BlackCelebrant

@BlackCelebrant BlackCelebrant commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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 targeting main is opened, updated, reopened, or marked ready for review.

What changed

  • Added pull_request trigger for:
    • opened
    • synchronize
    • reopened
    • ready_for_review
  • Added workflow concurrency so superseded runs for the same PR are cancelled.

Summary by CodeRabbit

  • Chores
    • Automated a validation workflow for pull requests targeting the main branch.
    • Reduced duplicate workflow runs by cancelling older in-progress runs when a new update is pushed.

Signed-off-by: Valeriy.Romanov <valeriy.romanov@acronis.com>
@BlackCelebrant
BlackCelebrant requested a review from a team as a code owner July 2, 2026 05:23
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This 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.

Changes

Functional K3s Workflow Trigger

Layer / File(s) Summary
Add pull_request trigger and concurrency control
.github/workflows/functional-k3s.yml
Adds a pull_request trigger scoped to the main branch with opened/synchronize/reopened/ready_for_review event types, and a concurrency group keyed by PR number or ref with cancel-in-progress: true.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

  • constructorfabric/insight#1513: Adds/implements the same functional-k3s.yml smoke workflow that this PR modifies with pull_request triggers and concurrency settings.

Suggested reviewers: ktursunov

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: making the K3s smoke workflow run on pull requests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/functional-k3s.yml (1)

11-13: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Consider skipping runs for draft PRs.

With opened and synchronize included alongside ready_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) with if: github.event.pull_request.draft == false to 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

📥 Commits

Reviewing files that changed from the base of the PR and between 947720c and c05ccfe.

📒 Files selected for processing (1)
  • .github/workflows/functional-k3s.yml

@BlackCelebrant
BlackCelebrant merged commit c91ba98 into constructorfabric:main Jul 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants