Skip to content

fix(memory-monitor): raise system_error instead of transient_error on critical memory threshold - #1005

Merged
Patrick Nilan (pnilan) merged 1 commit into
mainfrom
devin/1777475498-memory-monitor-system-error
Apr 29, 2026
Merged

Patrick Nilan (pnilan) merged 1 commit into
mainfrom
devin/1777475498-memory-monitor-system-error

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Changes the FailureType raised by MemoryMonitor when exceeding the critical memory threshold from transient_error to system_error.

An OOM-level memory exhaustion is an unexpected internal failure, not a transient issue that will resolve on retry. Classifying it as system_error gives the platform accurate signal for how to handle the failure.

Changes

  • airbyte_cdk/utils/memory_monitor.py: Changed failure_type=FailureType.transient_error to failure_type=FailureType.system_error in the critical threshold exception, and updated the class docstring accordingly.
  • unit_tests/utils/test_memory_monitor.py: Updated the test assertion to expect FailureType.system_error.

Review & Testing Checklist for Human

  • Verify that downstream platform behavior correctly handles system_error from the memory monitor (e.g., retry policies, user-facing messaging)

Notes

Requested by Patrick Nilan (@pnilan).

Link to Devin session: https://app.devin.ai/sessions/5aa5b30d63484e35bd4314b32fac0f54

Note

Auto-merge may have been disabled. Please check the PR status to confirm.

Important

Auto-merge enabled.

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

… critical memory threshold

Co-Authored-By: patrick.nilan@airbyte.io <patrick.nilan@airbyte.io>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 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

@github-actions

Copy link
Copy Markdown

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

Testing This CDK Version

You can test this version of the CDK using the following:

# Run the CLI from this branch:
uvx 'git+https://github.com/airbytehq/airbyte-python-cdk.git@devin/1777475498-memory-monitor-system-error#egg=airbyte-python-cdk[dev]' --help

# Update a connector to use the CDK from this branch ref:
cd airbyte-integrations/connectors/source-example
poe use-cdk-branch devin/1777475498-memory-monitor-system-error

PR Slash Commands

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

  • /autofix - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test - Runs connector tests with the updated CDK
  • /prerelease - Triggers a prerelease publish with default arguments
  • /poe build - Regenerate git-committed build artifacts, such as the pydantic models which are generated from the manifest JSON schema in YAML.
  • /poe <command> - Runs any poe command in the CDK environment
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

@pnilan
Patrick Nilan (pnilan) marked this pull request as ready for review April 29, 2026 15:15
Copilot AI review requested due to automatic review settings April 29, 2026 15:15
@pnilan
Patrick Nilan (pnilan) enabled auto-merge (squash) April 29, 2026 15:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates MemoryMonitor to classify critical near-OOM memory conditions as system_error (instead of transient_error) so the platform receives an accurate signal for non-retriable internal failures.

Changes:

  • Update MemoryMonitor critical-threshold AirbyteTracedException to use FailureType.system_error.
  • Update MemoryMonitor docstring to reflect the new failure classification.
  • Update the unit test assertion to expect FailureType.system_error.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
airbyte_cdk/utils/memory_monitor.py Switches critical memory-threshold exception failure type to system_error and updates documentation accordingly.
unit_tests/utils/test_memory_monitor.py Adjusts the fail-fast test to assert system_error for critical memory exhaustion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown

PyTest Results (Fast)

4 040 tests  ±0   4 029 ✅ ±0   8m 4s ⏱️ +15s
    1 suites ±0      11 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit d480f9b. ± Comparison against base commit 9842d33.

@pnilan
Patrick Nilan (pnilan) enabled auto-merge (squash) April 29, 2026 15:23
@github-actions

Copy link
Copy Markdown

PyTest Results (Full)

4 043 tests  ±0   4 031 ✅ ±0   11m 30s ⏱️ +42s
    1 suites ±0      12 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit d480f9b. ± Comparison against base commit 9842d33.

@pnilan
Patrick Nilan (pnilan) merged commit 886fcf8 into main Apr 29, 2026
39 checks passed
@pnilan
Patrick Nilan (pnilan) deleted the devin/1777475498-memory-monitor-system-error branch April 29, 2026 15:25
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