Skip to content

Conversation

@mnonnenmacher
Copy link
Contributor

Add support for configuration plugin options for advisor and reporter plugins in the UI.
The forms are generated from the plugin descriptors and take default values and plugin config templates into account.

Example for advisor plugins:

image

Example for reporter plugins:

image

This is a first version that will help to identify required improvements and missing functionality.

@lamppu @Etsija This is still a draft but a review would already be welcome, just ignore the first few Kotlin commits which I will also commit separately.

Add a function to get the hierarchy for a repository.

Signed-off-by: Martin Nonnenmacher <[email protected]>
Add a function that returns all secrets that are available in the
context of a hierarchy.

Signed-off-by: Martin Nonnenmacher <[email protected]>
Add a route that returns all secrets that are available in the context
of a repository, including those defined for the product and
organization the repository belongs to.

This route will be used to populate dropdowns to select secrets when
triggering an ORT run via the UI.

The new dependency of on the `RepositoryService` which depends on the
`AuthorizationService` also requires to configure a mock
`AuthenticationService` for integration tests that do not require
authentication.

Signed-off-by: Martin Nonnenmacher <[email protected]>
Prepare for partly generating the form schema by converting the
`createRunFormSchema` constant to a function.

Signed-off-by: Martin Nonnenmacher <[email protected]>
Dynamically generate the schema and form inputs for advisor plugin
options.

The handling of default values from templates and secret options will be
added in follow-up commits.

Signed-off-by: Martin Nonnenmacher <[email protected]>
Use the default values from the `PreconfiguredPluginDescriptor` for the
advisor plugin options.

Signed-off-by: Martin Nonnenmacher <[email protected]>
If a plugin config template sets an option to a fixed value, disable the
form input. Also show an explanatory text.

Signed-off-by: Martin Nonnenmacher <[email protected]>
For plugin options of the type 'SECRET', show a dropdown with all
secrets available in the context of the repository. If no secrets are
available, or if the selected secret does not exist, show an error
message.

Signed-off-by: Martin Nonnenmacher <[email protected]>
The function will be reused for other plugin types.

Signed-off-by: Martin Nonnenmacher <[email protected]>
Extract the function that was used for the advisor plugins to make it
reusable for other plugin types.

Signed-off-by: Martin Nonnenmacher <[email protected]>
Add form inputs to configure all reporter plugin options when triggering
an ORT run, similar to how it was previously implemented for advisor
plugins.

This change makes the `deduplicateDependencyTree` option obsolete
because it can now be configured directly in the plugins supporting it.
It also makes the default values for the report output formats obsolete
because they can now be configured with plugin config templates.

Signed-off-by: Martin Nonnenmacher <[email protected]>
@Etsija
Copy link
Contributor

Etsija commented Sep 8, 2025

create-run-utils is quite long and would probably be best to refactor into separate files now.

@Etsija
Copy link
Contributor

Etsija commented Sep 14, 2025

@mnonnenmacher I'm planning on continuing the query client refactoring down the runs/ route. As you are heavily refactoring some of the ORT run creation code, I'm going to try and avoid that. What files especially do I need to keep my hands off from when refactoring?

@mnonnenmacher
Copy link
Contributor Author

@mnonnenmacher I'm planning on continuing the query client refactoring down the runs/ route. As you are heavily refactoring some of the ORT run creation code, I'm going to try and avoid that. What files especially do I need to keep my hands off from when refactoring?

@Etsija Just go for it and let me know when you are done, I already have to redo large parts of this PR due to merge conflicts I introduced myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants