Skip to content

ci: fix python skips#176

Merged
mangelajo merged 2 commits intomainfrom
fix-python-skips
Feb 4, 2026
Merged

ci: fix python skips#176
mangelajo merged 2 commits intomainfrom
fix-python-skips

Conversation

@mangelajo
Copy link
Member

@mangelajo mangelajo commented Jan 30, 2026

General workflow level skips don't work for github if you make PRs depending on any jobs from the workflow, the PR just keeps waiting and the job never shows up, this is a know limitation of github today.

The alternative that seems to work is to make individual jobs skipped based on rules, like in this case the detection of files being modified or not, this will make the job show as "skipped" and then it's ok that you add a rule to require the job for merging, when the job shows at skipped that is good enough for you to be able to merge the PR.

The intent of this PR is to optimize the usage of CI resources and the noise/clutter of too many CI runs.

Summary by CodeRabbit

  • Chores
    • Updated CI testing workflow: added a pre-check job that exposes a should_run output.
    • Test matrix now depends on that pre-check and runs only when should_run is true or on manual trigger.
    • Test job dependency chain adjusted to include the pre-check and matrix.
    • Push-trigger configuration no longer restricts runs by specific paths.
    • Final test-step treats skipped outcomes as failures unless should_run is true.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

Adds a new public changes job to .github/workflows/python-tests.yaml that sets an output should_run based on path filters; adjusts pytest-matrix and pytest jobs to depend on changes and conditionally run; removes push-path filters for python/** and protocol/** while preserving pull_request settings.

Changes

Cohort / File(s) Summary
Workflow
.github/workflows/python-tests.yaml
Added new public job changes with a paths-filter step that emits should_run; removed push paths for python/** and protocol/**; made pytest-matrix depend on changes and run when needs.changes.outputs.should_run == 'true' or workflow_dispatch; updated pytest to needs: [changes, pytest-matrix]; adjusted final-step to treat skipped results as failure unless needs.changes.outputs.should_run == 'true'; minor structural reordering of sections.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I sniffed the diff with twitching nose,
A tiny job now checks where changes rose,
Tests awaken only when code hops near,
Pipelines saved a hop, a skip, a cheer! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci: fix python skips' is specific and directly related to the main change: fixing Python CI job skipping logic by implementing path-based filters to address GitHub workflow dependency issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-python-skips

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist.


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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/python-tests.yaml:
- Around line 32-36: The paths-filter action uses a static base value that can
cause empty diffs on push; change the base input to use the pre-push commit SHA
for push events by referencing github.event.before instead of defaulting to
'main' (i.e., update the base key used by dorny/paths-filter), so that the
action compares changes against the pre-push state and the existing python
filters (python: - 'python/**' - '.github/workflows/python-tests.yaml') are
evaluated correctly.

@mangelajo mangelajo requested a review from evakhoni February 3, 2026 08:33
@mangelajo
Copy link
Member Author

rebased

This maintains the ability to create depending PRs on existing PRs and have the CI run on them.
Copy link
Contributor

@evakhoni evakhoni left a comment

Choose a reason for hiding this comment

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

so basically running dorny/paths-filter and then deciding based on it's results..
the only thing i can think about is what coderabbit already commented, so let's merge this one, and worst case we can follow up if an issue is actually observed.

@mangelajo mangelajo merged commit 6639ac7 into main Feb 4, 2026
19 checks passed
@evakhoni evakhoni deleted the fix-python-skips branch February 4, 2026 14:41
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