ci: allow manual coverage test workflow runs - #1038
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksTesting This PyAirbyte VersionYou can test this version of PyAirbyte using the following: # Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1779900001-coverage-workflow-dispatch-pyairbyte' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1779900001-coverage-workflow-dispatch-pyairbyte'PR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful ResourcesCommunity SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
📝 WalkthroughWalkthroughThe pytest workflow now supports manual runs via ChangesWorkflow Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/python_pytest.yml (1)
172-174:⚠️ Potential issue | 🟠 Major | ⚡ Quick winThe
pytestjob won't run on manual dispatch - should we includeworkflow_dispatchin the condition?The conditional here only allows the job to run on pushes to
mainor PRs from non-fork repos. When you manually trigger the workflow viaworkflow_dispatch,github.event_namewill be'workflow_dispatch', which doesn't match either condition, so this job will be skipped.Since the PR's goal is to allow manual coverage refreshes and this job produces the main coverage upload (lines 252-259), this seems like it might not work as intended. Wdyt about updating the condition to include workflow_dispatch events?
🔧 Proposed fix
if: > (github.event_name == 'push' && github.ref == 'refs/heads/main') || - (github.event.pull_request.head.repo.fork == false) + (github.event.pull_request.head.repo.fork == false) || + (github.event_name == 'workflow_dispatch')🤖 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/python_pytest.yml around lines 172 - 174, The job's if condition currently checks only for pushes to main and PRs from non-fork repos, so it will skip when manually triggered; update the conditional expression used for the pytest job to also allow github.event_name == 'workflow_dispatch' (or otherwise include workflow_dispatch in the allowed events) so manual runs will execute the pytest job and produce the coverage upload; modify the existing conditional that references github.event_name and github.event.pull_request.head.repo.fork to include the workflow_dispatch case.
🤖 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.
Outside diff comments:
In @.github/workflows/python_pytest.yml:
- Around line 172-174: The job's if condition currently checks only for pushes
to main and PRs from non-fork repos, so it will skip when manually triggered;
update the conditional expression used for the pytest job to also allow
github.event_name == 'workflow_dispatch' (or otherwise include workflow_dispatch
in the allowed events) so manual runs will execute the pytest job and produce
the coverage upload; modify the existing conditional that references
github.event_name and github.event.pull_request.head.repo.fork to include the
workflow_dispatch case.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 23aebcb2-ad1d-4b88-a53d-d9ef630789ee
📒 Files selected for processing (1)
.github/workflows/python_pytest.yml
d9f652f
into
main
There was a problem hiding this comment.
Pull request overview
Adds workflow_dispatch trigger to the Run Tests workflow and updates the full pytest job's gating condition to also run on manual dispatch, enabling maintainers to manually refresh coverage uploads.
Changes:
- Add
workflow_dispatch: {}to workflow triggers. - Include
github.event_name == 'workflow_dispatch'in thepytestjob'sifcondition.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
workflow_dispatchto the PyAirbyteRun Testsworkflow.mainor non-fork PRs.maincoverage data is missing/stale or when a PR needs a coverage refresh after unrelatedmainchanges.Review & Testing Checklist for Human
Run Testsworkflow shows a manual "Run workflow" option after merge.mainand confirm GitHub Code Quality receives the coverage upload.Notes
yq eparsed the workflow,yq e '.on.workflow_dispatch'returns{}, andgit diff --checkpassed.actionlintis not installed in this VM, so I could not run it locally.Devin session
Requested by: Aaron ("AJ") Steers (@aaronsteers)
Summary by CodeRabbit