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

Download and install missing plugins #3

Closed
Andrew-Morozko opened this issue Dec 20, 2023 · 2 comments
Closed

Download and install missing plugins #3

Andrew-Morozko opened this issue Dec 20, 2023 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@Andrew-Morozko
Copy link
Contributor

Andrew-Morozko commented Dec 20, 2023

Background

The templates might use the plugins that are not installed on the local FS. In this case, fabric should be able to download and install the plugins of the specified versions.

Design

  • when fabric executes, before the template execution, it populates the in-memory registry of available plugins from the plugins present in the FS cache (cache_local_path path set in global settings)
    • the local cache directory structure is <cache_local_path>/plugins/<data|content>/<name>/<version>/
  • if the template uses the data / content plugins not present in the cache, download and install the missing plugins:
    • read the list of plugins from plugin_versions from the global configuration (Support global configuration #5)
      • try fetching the appropriate (latest up to the ceiling) version of the plugin from the local mirror, if mirror_local_path is provided in the global settings. The path schema is <mirror_local_path>/<data|content>/<name>/<version>.zip
      • try fetching the appropriate (latest up to the ceiling) version of the plugin from the registry using base_url from the global config in the URL schema -- <base_url>/<data|content>/<name>/<version>.zip
    • if the archive is downloaded, unpack it into <cache_local_path>/plugins/<data|content>/<name>/<version>/ and update the in-memory plugins registry.
    • if no plugin found, error out and die

Some of the plugins must be built-in -- #13

References

@traut traut changed the title Plugin auto-update Download and install missing plugins Dec 21, 2023
@traut traut added the enhancement New feature or request label Dec 21, 2023
This was referenced Dec 25, 2023
@traut traut added this to the v0.2 milestone Dec 30, 2023
@traut
Copy link
Member

traut commented Jan 3, 2024

there might be a way here to use GitHub releases as a poor-man's plugin registry. Since we control fabric repo, we can pack / release various plugins under different tags (name + version?).

  • pros:
    • no need to manage additional infrastructure
    • release notes are built-in per release
  • cons:
    • releases page for the github project might get messy
    • plugin release process is a bit more complicated

Something to look into!

@traut
Copy link
Member

traut commented Jan 3, 2024

another note: I think the implicit automatic download of the latest version is a bad idea. I've updated the issue body with the step of explicitly defining the plugins used

@traut traut modified the milestones: v0.2, v0.3, v0.4 Feb 2, 2024
@dobarx dobarx closed this as completed Mar 8, 2024
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

No branches or pull requests

3 participants