Skip to content

fix: invalidate plugin cache when (un)installing#666

Merged
mjh1 merged 1 commit intomainfrom
mh/cache
Mar 11, 2026
Merged

fix: invalidate plugin cache when (un)installing#666
mjh1 merged 1 commit intomainfrom
mh/cache

Conversation

@mjh1
Copy link
Copy Markdown
Contributor

@mjh1 mjh1 commented Mar 11, 2026

This means we can avoid waiting for a restart when we clear up plugins on remote inference disconnect

Summary by CodeRabbit

  • Bug Fixes
    • Improved plugin management reliability by ensuring plugin caches are properly cleared after installation, uninstallation, and reload operations. This ensures the system reflects plugin changes immediately without requiring manual intervention.

This means we can avoid waiting for a restart when we clear up plugins on remote inference disconnect

Signed-off-by: Max Holland <[email protected]>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 99259e64-dfe0-49dd-ae6a-9dde92d48d83

📥 Commits

Reviewing files that changed from the base of the PR and between 6fbf39e and 83282e4.

📒 Files selected for processing (1)
  • src/scope/server/app.py

📝 Walkthrough

Walkthrough

A new private helper function _invalidate_plugin_caches() is introduced to reset cached pipeline schemas and plugin lists. This function is invoked after plugin installation, uninstallation, and reload operations to ensure caches reflect current state.

Changes

Cohort / File(s) Summary
Cache Invalidation Helper
src/scope/server/app.py
Added _invalidate_plugin_caches() private function to reset _pipeline_schemas_cache and _plugins_list_cache to None. Function is called after plugin install, uninstall, and reload operations to guarantee cache freshness.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Caches cleared with a hop and a bound,
Plugins installed all around,
Fresh schemas bloom where they're sought,
No stale data here, not a thought!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: introducing cache invalidation for plugin operations (install/uninstall), which directly aligns with the implemented _invalidate_plugin_caches() function and its invocations.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch mh/cache

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

🚀 fal.ai Preview Deployment

App ID daydream/scope-pr-666--preview
WebSocket wss://fal.run/daydream/scope-pr-666--preview/ws
Commit 83282e4

Testing

Connect to this preview deployment by running this on your branch:

uv run build && SCOPE_CLOUD_APP_ID="daydream/scope-pr-666--preview/ws" uv run daydream-scope

🧪 E2E tests will run automatically against this deployment.

@github-actions
Copy link
Copy Markdown
Contributor

✅ E2E Tests passed

Status passed
fal App daydream/scope-pr-666--preview
Run View logs

Test Artifacts

Check the workflow run for screenshots.

@mjh1 mjh1 requested a review from emranemran March 11, 2026 16:49
@mjh1 mjh1 merged commit 5f6ee61 into main Mar 11, 2026
10 checks passed
@mjh1 mjh1 deleted the mh/cache branch March 11, 2026 16:57
gioelecerati pushed a commit that referenced this pull request Mar 11, 2026
This means we can avoid waiting for a restart when we clear up plugins on remote inference disconnect

Signed-off-by: Max Holland <[email protected]>
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