Skip to content

Conversation

aaronsteers
Copy link
Contributor

@aaronsteers aaronsteers commented Aug 27, 2025

Summary

This PR adds @pytest.mark.xfail markers to cloud integration tests that are failing with Status 403 permission errors. The tests fail because the API credentials don't have required WORKSPACE_READER permissions to access Airbyte Cloud job information. This prevents CI failures while the underlying permission issues are resolved in issue #764.

Changes:

  • Added xfail decorator to test_translate_cloud_job_to_sql_cache for Snowflake and BigQuery variants
  • Added minimal dummy comment to pyproject.toml to trigger CI

Review & Testing Checklist for Human

  • Verify permission error diagnosis: Confirm that the failing tests are indeed due to API permission issues (Status 403) and not actual code problems
  • Check issue tracking: Ensure issue Cloud tests failing with permission errors (Status 403) #764 properly tracks the resolution of the underlying permission problems
  • Confirm removal plan: Verify there's a clear process to remove these xfail markers once permissions are fixed

Notes

  • Tests now show as XFAIL instead of failures, preventing CI blockage
  • This is a temporary fix - the xfail markers should be removed once Cloud API permissions are properly configured
  • Local testing confirmed the xfail markers work correctly (tests show as expected failures)

Requested by: @aaronsteers for cloud test investigation
Session: https://app.devin.ai/sessions/55544c0ad1d84984b252650d469f4f9b

Summary by CodeRabbit

  • Chores

    • Triggered CI with a non-functional change; no impact on features, performance, or configuration.
  • Tests

    • Marked a cloud integration test as expected to fail due to external permission issues to stabilize CI; no changes to product behavior.

Important

Auto-merge enabled.

This PR is set to merge automatically when all requirements are met.

- Add @pytest.mark.xfail to test_translate_cloud_job_to_sql_cache for Snowflake and BigQuery variants
- These tests fail with Status 403 permission errors unrelated to code changes
- Add dummy comment to pyproject.toml to trigger CI testing
- Requested by @aaronsteers for cloud test investigation

Co-Authored-By: AJ Steers <[email protected]>
Copy link
Contributor

Original prompt from AJ Steers
@Devin - Can you create a dummy change and PR to PyAirbyte? I think some Cloud-related tests are failing. We should xfail them if they are unrelated to our code, and create a ticket in the repo to resolve.

Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

Testing This PyAirbyte Version

You 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/1756312930-xfail-cloud-tests' pyairbyte --help

# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1756312930-xfail-cloud-tests'

Helpful Resources

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /fix-pr - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test-pr - Runs tests with the updated PyAirbyte

Community Support

Questions? Join the #pyairbyte channel in our Slack workspace.

📝 Edit this welcome message.

@aaronsteers aaronsteers marked this pull request as ready for review August 27, 2025 17:22
@aaronsteers aaronsteers changed the title test: xfail cloud tests with permission errors (do not merge) test: xfail cloud tests with permission errors Aug 27, 2025
Copy link
Contributor

coderabbitai bot commented Aug 27, 2025

📝 Walkthrough

Walkthrough

A comment was added in pyproject.toml to trigger CI. One test in tests/integration_tests/cloud/test_cloud_sql_reads.py was marked xfail due to expected 403 permission errors. No production code or control flow changed.

Changes

Cohort / File(s) Summary
Build/Config
pyproject.toml
Inserted a no-op comment line before the version declaration to trigger CI; no semantic/config changes.
Tests (Cloud SQL reads)
tests/integration_tests/cloud/test_cloud_sql_reads.py
Added pytest xfail marker to test_translate_cloud_job_to_sql_cache (before its parametrize) due to expected Cloud API 403s; no test logic changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Would you like to also annotate the xfail with a link to the failing CI job or issue for traceability, wdyt?

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1756312930-xfail-cloud-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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 0

🧹 Nitpick comments (1)
tests/integration_tests/cloud/test_cloud_sql_reads.py (1)

96-98: Scope xfail to only the failing params (Snowflake/BigQuery) and reference issue #764?

Marking the whole test xfail can hide unrelated regressions. Would you move xfail onto the two affected pytest.param cases and keep it non-strict to avoid CI noise, wdyt?

-@pytest.mark.xfail(
-    reason="Cloud API permission errors: Status 403 - Caller does not have required WORKSPACE_READER permissions. Unrelated to code changes."
-)

Outside the selected lines, update the two params like this:

pytest.param(
    "c7b4d838-a612-495a-9d91-a14e477add51",
    SnowflakeCache,
    id="Faker->Snowflake",
    marks=pytest.mark.xfail(reason="403 WORKSPACE_READER missing; tracked in #764"),
),
pytest.param(
    "0e1d6b32-b8e3-4b68-91a3-3a314599c782",
    BigQueryCache,
    id="Faker->BigQuery",
    marks=pytest.mark.xfail(reason="403 WORKSPACE_READER missing; tracked in #764"),
),
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between be50b70 and 39ecc5c.

📒 Files selected for processing (2)
  • pyproject.toml (1 hunks)
  • tests/integration_tests/cloud/test_cloud_sql_reads.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.11, Windows)
  • GitHub Check: Pytest (All, Python 3.10, Windows)
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Pytest (No Creds)
  • GitHub Check: Pytest (Fast)
🔇 Additional comments (1)
pyproject.toml (1)

10-10: No-op CI nudge looks fine.

This comment won’t affect packaging or dynamic versioning; safe to leave in the draft and drop before merge, wdyt?

@aaronsteers aaronsteers enabled auto-merge (squash) August 27, 2025 17:23
Copy link

PyTest Results (Fast Tests Only, No Creds)

301 tests  ±0   301 ✅ ±0   4m 11s ⏱️ -1s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 39ecc5c. ± Comparison against base commit be50b70.

Copy link

PyTest Results (Full)

364 tests  ±0   348 ✅  - 2   18m 43s ⏱️ +48s
  1 suites ±0    16 💤 +2 
  1 files   ±0     0 ❌ ±0 

Results for commit 39ecc5c. ± Comparison against base commit be50b70.

This pull request skips 2 tests.
tests.integration_tests.cloud.test_cloud_sql_reads ‑ test_translate_cloud_job_to_sql_cache[Faker->BigQuery]
tests.integration_tests.cloud.test_cloud_sql_reads ‑ test_translate_cloud_job_to_sql_cache[Faker->Snowflake]

@aaronsteers aaronsteers merged commit 58dbaf0 into main Aug 27, 2025
25 of 27 checks passed
@aaronsteers aaronsteers deleted the devin/1756312930-xfail-cloud-tests branch August 27, 2025 18:16
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.

1 participant