Skip to content

[DO NOT MERGE] test(memory-monitor): aggressive thresholds + tighter intervals for fleet testing#998

Closed
devin-ai-integration[bot] wants to merge 1 commit intodevin/1776796633-lower-memory-thresholdsfrom
devin/1776878708-test-aggressive-memory-thresholds
Closed

[DO NOT MERGE] test(memory-monitor): aggressive thresholds + tighter intervals for fleet testing#998
devin-ai-integration[bot] wants to merge 1 commit intodevin/1776796633-lower-memory-thresholdsfrom
devin/1776878708-test-aggressive-memory-thresholds

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Summary

🚨 DO NOT MERGE — this branch exists only to stress-test fail-fast behavior on real connectors by lowering thresholds and tightening check intervals so the monitor trips on workloads that would normally stay well under the production gates. It is stacked on top of #995 (devin/1776796633-lower-memory-thresholds) for direct comparison.

Aggressive test-only values in airbyte_cdk/utils/memory_monitor.py:

Knob main #995 (production-track) This branch (test)
_CRITICAL_THRESHOLD 0.98 0.95 0.80
_ANON_SHARE_OF_USAGE_THRESHOLD 0.85 0.85 0.75
_HIGH_PRESSURE_THRESHOLD 0.95 0.90 0.50
_DEFAULT_CHECK_INTERVAL 5000 5000 100
_HIGH_PRESSURE_CHECK_INTERVAL 100 100 5

Tests updated to match the aggressive values (36 unit tests in unit_tests/utils/test_memory_monitor.py pass locally; ruff / format / mypy clean).

Notes

  • Branches off devin/1776796633-lower-memory-thresholds, so the diff is only the aggressive delta. The humanized byte formatting, startup config log, and docstring cleanups from fix(memory-monitor): lower fail-fast thresholds and humanize diagnostic messages #995 are inherited.
  • Intended usage: build a CDK prerelease from this branch and pin it on a high-memory actor (or the test connectors the team is using to reproduce the silent-OOM class) to observe:
    • Whether the trace now surfaces on workloads that previously silent-failed.
    • False-positive rate — how often the tighter anon-share gate (75%) raises on workloads that are healthy.
    • Overhead of check_interval=100 (and 5 once high pressure latches).
  • The top of the constants block carries an inline # WARNING: DO NOT MERGE banner so a stray merge attempt is obvious in review.

Review & Testing Checklist for Human

  • Confirm this PR stays in draft and is never merged to main.
  • After testing, either (a) pull validated numbers into fix(memory-monitor): lower fail-fast thresholds and humanize diagnostic messages #995 and close this, or (b) close this unchanged.
  • If you want different aggressive values, tell Devin — all five knobs are isolated to memory_monitor.py:_CRITICAL_THRESHOLD / _ANON_SHARE_OF_USAGE_THRESHOLD / _HIGH_PRESSURE_THRESHOLD / _DEFAULT_CHECK_INTERVAL / _HIGH_PRESSURE_CHECK_INTERVAL.

Link to Devin session: https://app.devin.ai/sessions/45e85918168d472d9e4e6e134a134fbc

…r intervals for fleet testing

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/1776878708-test-aggressive-memory-thresholds#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/1776878708-test-aggressive-memory-thresholds

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
Copy link
Copy Markdown
Contributor

Patrick Nilan (pnilan) commented Apr 22, 2026

/prerelease

Prerelease Job Info

This job triggers the publish workflow with default arguments to create a prerelease.

Prerelease job started... Check job output.

✅ Prerelease workflow triggered successfully.

View the publish workflow run: https://github.com/airbytehq/airbyte-python-cdk/actions/runs/24792917452

@github-actions
Copy link
Copy Markdown

PyTest Results (Fast)

4 034 tests  ±0   4 023 ✅ ±0   7m 44s ⏱️ -5s
    1 suites ±0      11 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit fed5c22. ± Comparison against base commit 5a054f8.

@github-actions
Copy link
Copy Markdown

PyTest Results (Full)

4 037 tests  ±0   4 025 ✅ ±0   11m 17s ⏱️ -7s
    1 suites ±0      12 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit fed5c22. ± Comparison against base commit 5a054f8.

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