-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: tighten plugin context API considerably
This is a fairly major refactor, geared at stabilising and limiting the surface area of the plugin API, and getting closer to only passing primitive values to plugin actions, as opposed to framework code. The only user facing change here is changing the currently unused `get/set/delete config` to more expressly handle user secrets management, dropping the notion of namespaced configuration in favour of plugin-managed secrets. Other notable changes: - Most of PluginContext has been split into a separate ActionHelper, which is only accessible internally via the `garden.actions`. Plugins can thus no longer affect workflows imperatively. - Because of the above, we now pass Module objects to actions directly, simplifying flows somewhat and getting rid of some race condition issues. - A lot of internal code that used to receive a PluginContext, now just receives a Garden instance. - The PluginContext is now initialised with a provider, and includes it, removing the separate `env` and `provider` action params. - I discovered that Command args and opts were not type-safe anymore, so I needed to fix a couple of things there along the way, and cleaned up a bit as well. - I added thorough documentation to the plugin schema, along with full input parameter schemas for every action, as well as tests for the ActionHelper and those schemas. - Some handlers have been renamed, and some schemas updated slightly for clarity and consistency. Next steps: Generate documentation for providers and better docs for plugin module types via the `describeType` action handler.
- Loading branch information
Showing
103 changed files
with
2,780 additions
and
2,272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.