ci: Upload coverage to GitHub Code Quality#1036
ci: Upload coverage to GitHub Code Quality#1036Aaron ("AJ") Steers (aaronsteers) merged 10 commits into
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/1779860596-github-coverage-upload' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1779860596-github-coverage-upload'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. |
|
Warning Review limit reached
More reviews will be available in 3 minutes and 44 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe workflows declare explicit workflow- and job-level ChangesCode Coverage Reporting
Actionlint configuration
🎯 3 (Moderate) | ⏱️ ~20 minutes Would you like a suggested short commit message for these workflow edits, wdyt? 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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/python_pytest.yml (1)
22-25: ⚡ Quick winCould we scope
code-quality: writeto only the three coverage-upload jobs instead of workflow-wide, wdyt?Right now
code-quality: writeis granted to every job, includingdependency-analysis, which doesn’t need it. Moving that permission to job-level would tighten least-privilege with minimal churn.Suggested diff
permissions: contents: read - code-quality: write pull-requests: read jobs: pytest-fast: + permissions: + code-quality: write name: Pytest (Fast) @@ pytest-no-creds: + permissions: + code-quality: write name: Pytest (No Creds) @@ pytest: + permissions: + code-quality: write name: Pytest (All, Python ${{ matrix.python-version }}, ${{ matrix.os }})🤖 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 22 - 25, The workflow currently grants code-quality: write at the top-level permissions block, applying to every job; change this by removing or setting code-quality to read in the top-level permissions and instead add permissions: contents: read code-quality: write pull-requests: read under only the three coverage-upload job definitions (the jobs named coverage-upload-*, or whichever three coverage-upload job names appear) so that dependency-analysis and other jobs no longer get code-quality: write; update each coverage-upload job's job-level permissions field accordingly.
🤖 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/python_pytest.yml:
- Around line 22-25: The workflow currently grants code-quality: write at the
top-level permissions block, applying to every job; change this by removing or
setting code-quality to read in the top-level permissions and instead add
permissions: contents: read code-quality: write pull-requests: read under only
the three coverage-upload job definitions (the jobs named coverage-upload-*, or
whichever three coverage-upload job names appear) so that dependency-analysis
and other jobs no longer get code-quality: write; update each coverage-upload
job's job-level permissions field accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 320aa104-cc9b-44e8-9978-6891d64d36b0
📒 Files selected for processing (1)
.github/workflows/python_pytest.yml
Code Coverage OverviewLanguages: Python Python / code-coverage/pytest-fastThe overall coverage in the branch is 65%. Coverage data for the branch is not yet available. Show a code coverage summary of the most covered files.
Python / code-coverage/pytest-no-credsThe overall coverage in the branch is 65%. Coverage data for the branch is not yet available. Show a code coverage summary of the most covered files.
Python / code-coverage/pytestThe overall coverage in the branch is 71%. Coverage data for the branch is not yet available. Show a code coverage summary of the most covered files.
Updated |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/actionlint.yml (1)
22-22: ⚡ Quick winConsider adding a comment explaining this is temporary, wdyt?
Since the
code-qualitypermission scope is in public preview and not yet recognized by actionlint, it might be helpful to add an inline comment noting this ignore is temporary until actionlint adds support. This would help future maintainers understand why the ignore exists and when it can be removed.📝 Suggested comment addition
- name: Run actionlint uses: reviewdog/action-actionlint@95395aac8c053577d0bc67eb7b74936c660c6f66 # v1.67.0 with: + # Ignore code-quality permission warning until actionlint supports GitHub's public-preview scope actionlint_flags: -ignore 'unknown permission scope "code-quality"' github_token: ${{ secrets.GITHUB_TOKEN }}🤖 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/actionlint.yml at line 22, Add a brief inline comment explaining that the -ignore 'unknown permission scope "code-quality"' in the actionlint_flags is temporary because the code-quality permission is in public preview and currently unrecognized by actionlint; update the .github/workflows/actionlint.yml near the actionlint_flags entry (referencing actionlint_flags and the exact ignore string) to include a # comment indicating this can be removed once actionlint adds support and optionally include a link or note about when to re-evaluate.
🤖 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/actionlint.yml:
- Line 22: Add a brief inline comment explaining that the -ignore 'unknown
permission scope "code-quality"' in the actionlint_flags is temporary because
the code-quality permission is in public preview and currently unrecognized by
actionlint; update the .github/workflows/actionlint.yml near the
actionlint_flags entry (referencing actionlint_flags and the exact ignore
string) to include a # comment indicating this can be removed once actionlint
adds support and optionally include a link or note about when to re-evaluate.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: a0dda7b0-6a3b-41f5-a585-baecaab8061b
📒 Files selected for processing (2)
.github/workflows/actionlint.yml.github/workflows/python_pytest.yml
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/python_pytest.yml
There was a problem hiding this comment.
Pull request overview
This PR integrates the existing pytest coverage output with GitHub Code Quality while keeping the existing coverage artifacts.
Changes:
- Adds Code Quality coverage upload steps to pytest CI jobs.
- Narrows generated Cobertura XML reports to the
airbyte/*package scope. - Adds a temporary actionlint ignore for the preview
code-qualitypermission.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/python_pytest.yml |
Adds workflow/job permissions, filtered coverage XML generation, and Code Quality upload steps. |
.github/workflows/actionlint.yml |
Suppresses actionlint’s unsupported preview permission warning for code-quality. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
actions/upload-code-coverage@v1uploads for PyAirbyte's existing Cobertura XML reports from Pytest Fast, Pytest No Creds, and the representative full pytest matrix job.code-quality: writeto only the pytest jobs that upload coverage while keeping workflow-level read permissions forcontentsandpull-requests.airbyte/*package files so GitHub Code Quality does not report stdlib or test-helper paths.fail-on-error: false.code-qualitypermission scope until actionlint recognizes it upstream.Review & Testing Checklist for Human
Run Testsand actionlint workflows run once on this PR and confirm the Code Quality upload steps complete or produce actionable preview-period errors.Notes
yq e '.' .github/workflows/python_pytest.yml,yq e '.' .github/workflows/actionlint.yml, andgit diff --check.Devin session
Requested by: Aaron ("AJ") Steers (@aaronsteers)
Summary by CodeRabbit