feat(extensions): Introduce fetch endpoints for configuration#740
Conversation
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
eb434f0 to
f116610
Compare
75e5555 to
7559164
Compare
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
3d08c10 to
3897b82
Compare
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
debsmita1
left a comment
There was a problem hiding this comment.
For a configuration like
extensions:
### Example for how to enable installation to a file.
installation:
enabled: true
# type: 'saveToSingleFile'
# saveToSingleFile:
# file: /Users/dsantra/Documents/rhdh-plugins/workspaces/marketplace/dynamic-plugins.yaml
The API throws an error saying
Installation is disabled under 'extensions.installation.enabled'.
If we are only support saving to a single file now, would it make sense to not have the type: 'saveToSingleFile' config property ?
We can add the type, once we support more installation types
For dynamic-plugin.yaml content containing a random string like xyz , I get a response like
{
"error": {
"name": "Error",
"message": "Installation is disabled under 'extensions.installation.enabled'.",
...
},
"request": {
"method": "GET",
"url": "/plugin/marketplace-plugin-demo/marketplace/configuration"
},
"response": {
"statusCode": 500
}
}
|
@debsmita1 sure, we can remove the type for now. The cases with invalid config should fall under 6. case, Marketplace installation feature is disabled, the log includes For the case when file is not specified although installation is enabled, we can change the behavior as well to throw an error and prevent plugin from starting up. |
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
I checked what we currently do with our RBAC plugin that consumes a
From our last working group call, what I have understood is, if the file is not specified, then we disable the @ShiranHi Could you help me with how we can show this in the UI so that we can guide the users on how to get rid of the error ? |
Yes, disabling the Install button on the configuration page would work, we can add a tooltip on hover to say "Plugin installation is disabled. Contact your administrator for assistance." |
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
debsmita1
left a comment
There was a problem hiding this comment.
Thank you @dzemanov !
I am able to test all the scenarios
Could you resolve the Sonarqube cloud issues ?
Tagging @PatAKnight for API review
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
|
@debsmita1 sonarqube issues are fixed, thank you for pointing them out! |
AndrienkoAleksandr
left a comment
There was a problem hiding this comment.
Tested, works fine. Reviewed, pr looks good to me. @dzemanov, Thank you for great code !
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
|
…-developer#740) * Introduce configuration get endpoints Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Add bulk-import to examples Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Return yaml format Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Do not throw error when config not found Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Disable installation if invalid config file instead of throwing Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Deduplicate configValidation Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Change namespace Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Disable line wrap Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Use array Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Return error objects Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Remove installation type Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Use set Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Return json from config endpoints Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Update api report Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Rename Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Fix sonarqube issues Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Add not found test cases Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Fix sonarqube issue to safely access value Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> * Introduce ConfigurationResponse type Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com> --------- Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>



Hey, I just made a Pull Request!
Introduces fetch endpoints for plugin configuration.
Fixes
Fixes RHIDP-6807
How to test
dynamic-plugins.yamlwith:extensions.installation.enabledis not set:extensions.installationto point to the dynamic-plugins.yaml fileShould return:
Should return
✔️ Checklist