Skip to content
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

Improve plugin backward compatibility #4716

Conversation

lc0rp
Copy link
Contributor

@lc0rp lc0rp commented Jun 16, 2023

Background

Legacy zipped plugins don't load on 0.4.1, and instead emit a "plugin not configured" warning. The reason appears to be the move from class-based config keys to directory-based config keys.

This PR enables class-based config keys for zipped plugins, which allows legacy plugins to load.

Changes

Updated the code that checks whether a zipped plugin is configured to do so within the plugin load loop, where the class name is available, and updated the emitted debug and warning logs.

Documentation

No change to docs as this is the legacy behavior.

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes.
  • I have run the following commands against my code to ensure it passes our linters:
    black .
    isort .
    mypy
    autoflake --remove-all-unused-imports --recursive --ignore-init-module-imports --ignore-pass-after-docstring autogpt tests --in-place

@lc0rp lc0rp changed the title Release v0.4.0 (#4539) Improve plugin backward compatibility Jun 16, 2023
@lc0rp lc0rp merged commit e02105e into Significant-Gravitas:Release-v0.4.1 Jun 16, 2023
@lc0rp lc0rp deleted the Increase-backward-compatibility-for-zipped-plugins branch June 16, 2023 11:29
@lc0rp lc0rp added this to the v0.4.1 Release milestone Jun 16, 2023
waynehamadi pushed a commit to waynehamadi/Auto-GPT that referenced this pull request Jun 17, 2023
waynehamadi pushed a commit to waynehamadi/Auto-GPT that referenced this pull request Jun 17, 2023
waynehamadi added a commit that referenced this pull request Jun 17, 2023
* Use JSON for command signature

Signed-off-by: Merwane Hamadi <[email protected]>

* Improve plugin backward compatibility (#4716)

* Fixed plugin test

Signed-off-by: Merwane Hamadi <[email protected]>

* Fix Docker-CI

Signed-off-by: Merwane Hamadi <[email protected]>

* Put back commands, clean typing and signatures

Signed-off-by: Merwane Hamadi <[email protected]>

---------

Signed-off-by: Merwane Hamadi <[email protected]>
Co-authored-by: Erik Peterson <[email protected]>
Co-authored-by: Luke K (pr-0f3t) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant