-
Notifications
You must be signed in to change notification settings - Fork 277
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
Supporting installation of multiple artifacts for plugin components (related to Notifications) #1950
Comments
@qreshi Can we also look in to the option of bundling both the zip's in to one zip similar to PA / RCA? |
@bbarani I'm not too familiar with the PA/RCA plugins, are they two separate plugins that need to be installed in a particular order? Who would be the point of contact to understand that format? |
@qreshi I think you can contact @sruti1312 and get some ideas on how PA did this. Thanks. |
@sruti1312 Care you to give a description of your use case? I'd like to see if it's applicable here. Although, in general, installing the plugins in a certain order for producing a distribution is an infra issue, not an individual plugins necessarily. I'm fine with moving fast here but we should think of how to make the infra builds more flexible for handling this use case since I can imagine this can happen again since plugins are all about extensibility. |
Is the problem just that there are two ZIPs and they require to be installed in order? The manifest could very well accommodate a new section called |
I dont think its just a matter of installing 2 zips rather maintaining the lifecycle of 2 artifacts as well. We need to also think about the implications on users when we start publishing these artifacts for consumption (via Maven, S3 etc..). I would prefer to encapsulate all the dependencies within a zip to simplify it. |
Hm, what's the concern of maintaining these two exactly? They're in one repo so the maintenance is actually reduced (like all the operational overhead we have from version changes, etc.). As for publishing, as far as I'm aware, we upload to S3 based on the plugins that are in the output directory. The build script in the Notifications repo is outputting both plugins there so shouldn't that be taken care of? Even if we combined two separate zips into one zip, it's still two plugins and we would still need to ensure they install in a particular order. |
Alternatively, could we not also just have two entries in the manifest. They'd point to the same repo but the DB's suggestion is also an alternative to the same concept and I think I prefer that one since its intention is clearer, whereas my suggestion above is trying to retrofit the use case with minimal code changes. |
PA and PA-RCA are a bit different. PA-RCA is a dependency of PA plugin and separate process that runs in the node. Both the PA and PA-RCA jar are bundled into the single PA plugin jar and hence only PA is declared in the manifest. @qreshi They are not two separate plugins. PA is plugin and PA-RCA is separate process and hence not be installed in a particular order. |
Thanks for the explanation @sruti1312 Looks like we do want to support this use case from the manifest then. |
@qreshi Hey, I ass-u-me you're also looking to consolidate down to a single zip? |
I'm still not sure how two plugins in a single zip works. Conventionally we have 1 zip per plugin. So if we combined two plugins into a single zip, would it even work if we tried to install that zip via the OpenSearch cli? |
Picked #1957. |
Is your feature request related to a problem? Please describe
In preparation for 2.0 Preview, we'd like to add the Notifications plugin to the manifest so it begins being bundled in the distribution. The Notifications backend is a bit of an uncommon case in that there are two plugins (
opensearch-notifications
andopensearch-notifications-core
) that are being produced from the same repo. The latter needs to be installed first since the former extends it and both need to be installed to use Notifications. The current build process does not support this in a way that's as simple as just adding the repo to the manifest and ensuring the plugin build scripts produce the artifacts to the output directory.[More information is in the 'additional context' section below]
Describe the solution you'd like
We'd like for the infra build process to ensure that these two plugins are installed and in the correct order to ensure correct assembly of the distribution.
Describe alternatives you've considered
No response
Additional context
I checked out
opensearch-build
locally and tried testing the building and assembly process with Notifications. After adding it to the manifest file, I ran:The resulting output file showed that the Notification component was added with multiple plugin artifacts:
Question: Is the order of this list of plugins above random? (We'd like it to always be the order that it's in above if the plugins are iterated through in this order)
After building, I attempted to assemble:
At this point, it only installed the first plugin (
opensearch-notifications-core
) and completed:It appears this is because the install_plugin() function (which is called for each plugin component) retrieves the path of the plugins artifact but only takes the the first path.
One option could be to change this to
_get_real_paths
which returns a list of paths. We can then iterate through it ininstall_plugin()
and call the plugin installation for each path.The text was updated successfully, but these errors were encountered: