-
Notifications
You must be signed in to change notification settings - Fork 26
Check plugins' extensions for conflicts during metadata broker #93
Conversation
Codecov Report
@@ Coverage Diff @@
## master #93 +/- ##
==========================================
+ Coverage 73.81% 74.13% +0.31%
==========================================
Files 13 14 +1
Lines 634 661 +27
==========================================
+ Hits 468 490 +22
- Misses 157 161 +4
- Partials 9 10 +1
Continue to review full report at Codecov.
|
Good idea, error message needs work.
You should identify WHY it's a conflict... if both k8s and os plugins use the same 1.0.9 version of k8s-tools, then why is it a conflict? I'd suggest something more like:
Also is your call to action even doable?
eg., if you have a devfile which loads a couple plugins (like k8s and yml), how can you reorganize the devfile to load only ONE version of an extension? Do you need to rebuild the plugin registry to not list more than one extension? What if we remodel the plugin registry so that it no longer has this 1:1:N mapping of 1 plugin definition to 1 sidecar to N vsix files? If things we 1:1:1 then a user would just enable or disable plugins without having to know about extensions. Or even better... could we add vsix files directly as plugins without the need to wrap them in extra metadata and a sidecar? (I suspect no, but thought it might be worth considering for SOME simple no-runtime-needed extensions like the yaml one.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
512f5e4
to
391364a
Compare
Updated the log message to be a little cleaner:
|
@nickboldt I think you're imagining my fixup is better than it actually is :) This PR just checks if two plugins use the exact same dependency (including source URL). As for suggesting a better remediation than "turn one of these off", there's not much we can do at the moment. At least the warning will give us something to work off of in bug reports. Your example
will not even be noticed by this PR. Further improvements depend on eclipse-che/che#15376 and is a part of eclipse-che/che#15966. Note also that for most of our plugins, the relationship would be strict subsets (e.g. the extensions in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a good step so I would merge it ASAP
My only remaining confusion w/ the updated warning message is that it talks about "conflicting dependencies" but the dependencies are to the SAME plugin... so why is that conflicting? If the issue is that the user has multiple references to |
It's because you can only deploy one instance of plugin. Deploying pluginA on sidecar1 and pluginA on sidecar2 is an error ( pluginA being a dependency on some other plugins for example) |
So which sidecar gets the plugin? First come first plugged? Alphabetical? Random hash? Explanation makes sense but isn't clear from the statement of "conflicting dependencies" and a newb user might ask the same question I am. Not blocking push, just wondering if we want to better explain the reason for the conflict, eg.,
|
It's random |
A few change proposals to the warning text (otherwise LGTM):
cc @beaumorley for the message wording |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 after new message changes.
Is it possible to paste the final message here? |
@beaumorley With Mario's suggested changes, an example output for the broker, shown during workspace startup, would be
|
thanks @amisevsk lgtm! |
To warn the user of issues with multiple plugins depending on the same extension, add a step to metadata brokering to detect extensions used by mutliple plugins and print a warning. Current approach is very limited, as it depends on extension URLs matching, so some cases are misse Signed-off-by: Angel Misevski <amisevsk@redhat.com>
28726d7
to
e93e689
Compare
What does this PR do?
During metadata brokering process, check plugins for conflicting extensions (i.e. two plugins use the same extension), and warn user in case of conflict.
Sample output:
The current approach is limited to matching URLs; as a result it can miss some conflicts (e.g. different URLs for the same extension or different versions of the same extension).
Additionally, due to eclipse-che/che#15758, sometimes the order of messages can sometimes be confused slightly.
What issues does this PR fix or reference?
Component of eclipse-che/che#15966