Skip to content

chore: remove unused psutil & rapidfuzz dependencies, make google-cloud-secret-manager optional 'dev' extra (WASM compatibility prep) #670

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link
Contributor

feat: make psutil, rapidfuzz, and google-cloud-secret-manager optional for WASM compatibility

Summary

This PR makes the airbyte-cdk package compatible with WASM environments like Pyodide by moving problematic binary dependencies to optional extras groups. The main changes:

  • Removed unused dependencies: psutil and rapidfuzz were marked as TODO for removal and are not used in core declarative manifest execution
  • Moved secret manager to dev extras: google-cloud-secret-manager is moved to the dev extras group since it's only needed for development/secret management features
  • Created new extras groups: Added system extra for psutil/rapidfuzz and updated dev extra to include google-cloud-secret-manager
  • Updated dependency tracking: Modified deptry configuration comments to reflect the new optional status

These changes enable pip install airbyte-cdk to work in Pyodide without requiring binary dependencies that can't be compiled to WASM.

Review & Testing Checklist for Human

⚠️ HIGH PRIORITY (4 items) - This affects core library dependencies

  • Test WASM compatibility: Actually verify that await micropip.install("airbyte-cdk") works in Pyodide without errors
  • Verify psutil/rapidfuzz are truly unused: Search codebase for any imports or usage of these packages in core functionality
  • Test secret manager functionality: Ensure that moving google-cloud-secret-manager to dev extras doesn't break any secret management features used in production
  • Run full CI pipeline: Complete the interrupted poetry run poe check-ci to ensure no regressions in test suite

Recommended test plan:

  1. Install the modified package in a Pyodide environment and verify it loads without errors
  2. Test declarative manifest connector execution to ensure core functionality still works
  3. Test with pip install airbyte-cdk[dev] to verify secret manager functionality still works when explicitly installed

Diagram

Loading
%%{ init : { "theme" : "default" }}%%
graph TD
    pyproject["pyproject.toml<br/>(Main Config)"]:::major-edit
    poetry_lock["poetry.lock<br/>(Generated)"]:::major-edit
    schema["declarative_component_schema.py<br/>(Auto-formatted)"]:::minor-edit
    
    main_deps["Main Dependencies<br/>(Required for all installs)"]:::context
    dev_extra["dev extras<br/>(Development features)"]:::context
    system_extra["system extras<br/>(System monitoring)"]:::context
    
    
    pyproject --> main_deps
    pyproject --> dev_extra
    pyproject --> system_extra
    
    main_deps -.->|"REMOVED"| psutil_old["psutil"]:::removed
    main_deps -.->|"REMOVED"| rapidfuzz_old["rapidfuzz"]:::removed
    main_deps -.->|"MOVED"| gcs_old["google-cloud-secret-manager"]:::removed
    
    dev_extra -->|"ADDED"| gcs_new["google-cloud-secret-manager"]:::context
    system_extra -->|"ADDED"| psutil_new["psutil (optional)"]:::context
    system_extra -->|"ADDED"| rapidfuzz_new["rapidfuzz (optional)"]:::context
    
    subgraph Legend
        L1[Major Edit]:::major-edit
        L2[Minor Edit]:::minor-edit  
        L3[Context/No Edit]:::context
        L4[Removed]:::removed
    end
    
    classDef major-edit fill:#90EE90
    classDef minor-edit fill:#87CEEB
    classDef context fill:#FFFFFF
    classDef removed fill:#FFB6C1

Notes

  • The serpyco-rs dependency refactor was explicitly deferred to a separate session as requested
  • Auto-formatting changes to declarative_component_schema.py were applied automatically during the dependency update process
  • This change enables the core use case of running declarative manifest connectors in browser environments via WASM
  • Link to Devin run: https://app.devin.ai/sessions/affe8bd4352a4b78a9733ad1c01bdb69
  • Requested by: @aaronsteers

Sorry, something went wrong.

devin-ai-integration bot and others added 2 commits July 23, 2025 21:21
…l for WASM compatibility

- Remove psutil and rapidfuzz from main dependencies (marked as unused)
- Move google-cloud-secret-manager to dev extras group
- Add new 'system' extras group for psutil and rapidfuzz
- Update deptry configuration comments to reflect optional status

This enables airbyte-cdk to be installed in WASM environments like Pyodide
by making problematic binary dependencies optional.

Co-Authored-By: AJ Steers <[email protected]>
Automatic code formatting applied during dependency update process.
Includes line wrapping and copyright header removal.

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

Original prompt from AJ Steers:

@Devin - what options exist for running Python applications in the browser, compiling to WASM or using some other option

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

Sorry, something went wrong.

@github-actions github-actions bot added the enhancement New feature or request label Jul 23, 2025
Copy link

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

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/1753304576-wasm-compatibility-deps#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/1753304576-wasm-compatibility-deps

Helpful Resources

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
  • /poe <command> - Runs any poe command in the CDK environment

📝 Edit this welcome message.

devin-ai-integration bot and others added 3 commits July 23, 2025 21:29
Address PR feedback from @aaronsteers to fully remove psutil and rapidfuzz
rather than making them optional dependencies. These packages are unused
and were marked as TODO for removal.

Changes:
- Remove psutil and rapidfuzz from optional dependencies
- Remove 'system' extras group (no longer needed)
- Update deptry comments to reflect complete removal
- Keep google-cloud-secret-manager in dev extras as requested

Co-Authored-By: AJ Steers <[email protected]>
@aaronsteers aaronsteers changed the title feat: make psutil, rapidfuzz, and google-cloud-secret-manager optional for WASM compatibility chore: remove unused psutil & rapidfuzz dependencies, make google-cloud-secret-manager optional for WASM compatibility Jul 23, 2025
@aaronsteers aaronsteers changed the title chore: remove unused psutil & rapidfuzz dependencies, make google-cloud-secret-manager optional for WASM compatibility chore: remove unused psutil & rapidfuzz dependencies, make google-cloud-secret-manager optional 'dev' extra (WASM compatibility prep) Jul 23, 2025
Copy link

PyTest Results (Fast)

3 700 tests  ±0   3 689 ✅ ±0   6m 20s ⏱️ -24s
    1 suites ±0      11 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 20a43d6. ± Comparison against base commit 51cfea5.

Copy link

PyTest Results (Full)

3 703 tests  ±0   3 692 ✅ ±0   18m 5s ⏱️ -6s
    1 suites ±0      11 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 20a43d6. ± Comparison against base commit 51cfea5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant