Skip to content

fix(tests): resolve issue with 'exception' status raising failure of FAST container tests #606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 23, 2025

Conversation

aaronsteers
Copy link
Contributor

@aaronsteers aaronsteers commented Jun 23, 2025

Resolves Invalid status 'exception'. Expected 'succeed' or 'failed'.:

in

Thanks to @tolik0 for raising.

Summary by CodeRabbit

  • Chores

    • Added the Google Ads connector to the automated test suite to ensure it is tested during continuous integration.
  • Bug Fixes

    • Improved outcome status recognition in test models by accepting "exception" as a valid status equivalent to "failed".

Important

Auto-merge enabled.

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

@Copilot Copilot AI review requested due to automatic review settings June 23, 2025 16:11
@github-actions github-actions bot added the bug Something isn't working label Jun 23, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue in the FAST container tests by updating the expected outcome mapping to include an "exception" status.

  • Added a mapping for the "exception" status (same as "failed") to the ExpectedOutcome.
  • Updated the error message to indicate the new valid status, "exception".
Comments suppressed due to low confidence (2)

airbyte_cdk/test/models/outcome.py:35

  • [nitpick] The inline comment notes that 'exception' is the same as 'failed'. Consider adding a brief explanation for this mapping duplication to clarify its intent for future maintainers.
                "exception": ExpectedOutcome.EXPECT_EXCEPTION,  # same as 'failed'

airbyte_cdk/test/models/outcome.py:40

  • Verify that the updated error message aligns with any test assertions or external documentation. Adjust tests if they expect a different wording than the newly provided message.
            ) from ex

Copy link
Contributor

coderabbitai bot commented Jun 23, 2025

📝 Walkthrough

Walkthrough

The updates add the source-google-ads connector to the GitHub Actions CI test matrix and enhance the ExpectedOutcome enum to accept "exception" as a valid status string, mapping it to the EXPECT_EXCEPTION outcome. No other logic or interface changes are present.

Changes

File(s) Change Summary
.github/workflows/connector-tests.yml Added source-google-ads to the connectors test matrix for CI.
airbyte_cdk/test/models/outcome.py Allowed "exception" as a valid status string for ExpectedOutcome.from_status_str method.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHub Actions
    participant Connector Test Matrix

    Developer->>GitHub Actions: Push changes
    GitHub Actions->>Connector Test Matrix: Run tests (including source-google-ads)
    Connector Test Matrix-->>GitHub Actions: Report test results
    GitHub Actions-->>Developer: CI status (with source-google-ads included)
Loading
sequenceDiagram
    participant TestCase
    participant ExpectedOutcome

    TestCase->>ExpectedOutcome: from_status_str("exception")
    ExpectedOutcome-->>TestCase: Return EXPECT_EXCEPTION
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 37cf511 and 04a7c65.

📒 Files selected for processing (2)
  • .github/workflows/connector-tests.yml (1 hunks)
  • airbyte_cdk/test/models/outcome.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Check: source-shopify
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (Fast)
🔇 Additional comments (3)
airbyte_cdk/test/models/outcome.py (2)

35-35: LGTM! Nice addition of the "exception" status alias.

The mapping of "exception" to EXPECT_EXCEPTION makes perfect sense and aligns with the PR objective. The comment clarifying it's the same as "failed" is helpful too. This should resolve the FAST container test issues mentioned in the PR title.


38-40: Error message correctly updated to include the new status.

Good catch updating the error message to include "exception" as a valid option. This maintains consistency with the new functionality. The error message now properly reflects all three valid status strings, wdyt?

.github/workflows/connector-tests.yml (1)

77-78: Connector addition looks good and follows established patterns.

The source-google-ads connector is properly added to the test matrix with cdk_extra: n/a, which is consistent with other similar connectors like source-hardcoded-records and source-shopify. This should integrate smoothly into the existing CI pipeline, wdyt?

✨ Finishing Touches
  • 📝 Generate Docstrings

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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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

github-actions bot commented Jun 23, 2025

PyTest Results (Fast)

3 667 tests  ±0   3 656 ✅ ±0   6m 1s ⏱️ -1s
    1 suites ±0      11 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 9ac9514. ± Comparison against base commit 37cf511.

♻️ This comment has been updated with latest results.

@aaronsteers aaronsteers requested a review from dbgold17 June 23, 2025 16:23
@aaronsteers aaronsteers enabled auto-merge (squash) June 23, 2025 16:38
Copy link

PyTest Results (Full)

3 670 tests  ±0   3 659 ✅ ±0   17m 57s ⏱️ -4s
    1 suites ±0      11 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 9ac9514. ± Comparison against base commit 37cf511.

@aaronsteers aaronsteers merged commit 577f9a7 into main Jun 23, 2025
28 of 29 checks passed
@aaronsteers aaronsteers deleted the aj/fix/resolve-issue-with-excex branch June 23, 2025 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants