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

5828.1 Backend provision for uploading and installing plugin #5924

Open
wants to merge 3 commits into
base: 5827-Backend-plugin-table
Choose a base branch
from

Conversation

andreievg
Copy link
Collaborator

@andreievg andreievg commented Jan 7, 2025

Fixes #5828

πŸ‘©πŸ»β€πŸ’» What does this PR do?

  • Add bundling for plugins, similar to the reports
  • Change upload plugin to be a generic 'upload' endpoint that return file_id (to be used with follow up graphql queries and mutations to check upload and insert it
  • Add uploadedPluginInfo and InstallUploadedPlugin graphql endpoints

Limited info is returned currently by uploadedPluginInfo endpoint, the idea is it would be indicator to the user of what will be imported (didn't want to expand too much atm)

πŸ’Œ Any notes for the reviewer?

Versioning will be added at some point, similar to report where report id would be code + version), this would be done by bundler

There is still a follow up PRs for

1 - Frontend UI for importing plugins
2 - Binding plugins via processors (so that after sync it's available) and on startup
3 - Versioning

πŸ§ͺ Testing

Go through tests in amc.js, and see how it effects database (with backend_plugin table and amc calulcation).

πŸ“ƒ Documentation

  • Part of an epic: documentation will be completed for the feature as a whole
  • No documentation required: no user facing changes or a bug fix which isn't a change in behaviour
  • These areas should be updated or checked:
    1.
    2.

@github-actions github-actions bot added this to the v2.5.0 milestone Jan 7, 2025
@github-actions github-actions bot added enhancement New feature or request Team Ruru πŸ¦‰ Andrei, Roxy, Ferg feature: plugin labels Jan 7, 2025
@andreievg andreievg changed the title 5828.1-Backend-provision-for-uploading-and-installing-plugin 5828.1 Backend provision for uploading and installing plugin Jan 7, 2025
@jmbrunskill jmbrunskill self-assigned this Jan 8, 2025
@roxy-dao roxy-dao modified the milestones: v2.5.0, V2.5.0-RC1 Jan 8, 2025
Copy link
Contributor

@jmbrunskill jmbrunskill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good to me.
Feels like there's a bit of refinement to go, will be nice to test it out once the UI is there and sync.

Haven't tested sync at all as I assume that can wait till the next PR to use processors...

#[error("Failed to open manifest file {0}")]
CannotOpenManifestFile(PathBuf, #[source] std::io::Error),
#[error("Failed to parse manifest file {0}")]
CannotManifestFile(PathBuf, #[source] serde_json::Error),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CannotManifestFile(PathBuf, #[source] serde_json::Error),
CannotReadManifestFile(PathBuf, #[source] serde_json::Error),


// This endpoint can be use for uploading files before they need to be processed (via graphql endpoint)

#[post("/upload")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[post("/upload")]
#[post("/config_upload")]

Note sure the best wording but I think upload is a bit too generic...

@jmbrunskill jmbrunskill modified the milestones: V2.5.0-RC2, v2.6.0 Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature: plugin Team Ruru πŸ¦‰ Andrei, Roxy, Ferg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants