AutoGPT
AutoGPT copied to clipboard
Enable denylist handling for plugins
Background
Currently, only ALLOWLISTED_PLUGINS read from env.
As more plugins are created, you have to click "n" for each plugin you don't want to use - enabling DENYLISTED_PLUGINS will increase usability.
There is another PR: 3254 enables this env variable, but also changes the env variable and Config field names, making it potentially more disruptive to users.
Changes
Instead of only reading in the allowlist, the code has been updated to check for a DENYLISTED_PLUGINS environment variable and, if found, populate a plugins_denylist attribute on the Config class with its contents.
Documentation
The plugin documentation in the plugin repo will need to be updated to mention this setting. I'll do that as a separate PR.
Test Plan
I have tested with existing tests and local manual testing. Existing tests cover this change.
PR Quality Checklist
- [X] My pull request is atomic and focuses on a single change.
- [X] I have thoroughly tested my changes with multiple different prompts.
- [X] I have considered potential risks and mitigations for my changes.
- [X] I have documented my changes clearly and comprehensively.
- [X] I have not snuck in any "extra" small tweaks changes
No new tests
- Existing tests cover this change.
- Additionally, the Config singleton would be affected, which could lead to other tests failing.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| docs | ⬜️ Ignored (Inspect) | Visit Preview | May 4, 2023 2:09am |
Codecov Report
Patch coverage: 77.77% and project coverage change: +0.03 :tada:
Comparison is base (
911cea7) 60.92% compared to head (2ce62bc) 60.96%.
Additional details and impacted files
@@ Coverage Diff @@
## master #3688 +/- ##
==========================================
+ Coverage 60.92% 60.96% +0.03%
==========================================
Files 72 72
Lines 3294 3302 +8
Branches 541 542 +1
==========================================
+ Hits 2007 2013 +6
- Misses 1150 1151 +1
- Partials 137 138 +1
| Impacted Files | Coverage Δ | |
|---|---|---|
| autogpt/config/config.py | 74.85% <50.00%> (-0.76%) |
:arrow_down: |
| autogpt/plugins.py | 75.36% <100.00%> (+0.92%) |
:arrow_up: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.