-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
WIP Make plugin references without version use 'latest' implicitly #13414
Conversation
Changes necessary to make plugin references without a version specified, e.g. eclipse/che-theia to parse as 'eclipse/che-theia/latest' by default. As a side effect, this commit disables: - Validation of plugin references with a custom registry. This allows using direct links to meta.yamls (no need to have a path ending in publisher/name/version) but also works by arbitrarily splitting the URL into a 'registry' and 'id' - Devfile aliases and similar features are disabled for plugins from custom registries - Some tests that depend on having a custom registry specified are disabled until issue eclipse-che#13385 is resolved. Signed-off-by: Angel Misevski <amisevsk@redhat.com>
IMO it is highly conflicting with #13297 There will be no possibilty to specify registry directly in ID, it will be in separate field. |
@mshaposhnik could you please clarify why it is highly conflicting with #13297 ? Do you mean impl details because in terms of functionality I do not see any conflict. |
Both code & logic:
|
@mshaposhnik how are you planning to proceed with #13414 ? are you going to merge it for CR1 ? |
@ibuziuk we trying our best :) |
@mshaposhnik no sorry I meant your PR #13297 ? is it planned to be merged fairly soon?
I agree, so wondering when are you planning to merge the fix for #13104 and we could adjust the latest version support of it @amisevsk wdyt ? |
@ibuziuk yes i understood, we're solving last couple of problems (like setting memory limits and checking for default editors/plugins for those specified via reference) and will be ready to merge. |
@mshaposhnik I don't think the two PRs conflict on a logic level, in fact I think your PR complements this PR pretty well in the general case. The main purpose of this PR is to allow plugin IDs without PR #13297 simplifies this quite a bit actually, since it changes how plugin strings are written -- it would be easy to adapt this onto your open PR and this PR would probably become simpler. I'm fine with waiting for #13297 to be merged and reworking this one to fit in with it. That said, I'd appreciate comments on #13385, since I think using simple strings for plugins is becoming more and more of a problem and we should strongly consider moving away from it. |
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.
PR description says that it is still WIP, is it?
{ | ||
"editor_plugin_component/devfile_editor_plugins_components_with_invalid_memory_limit.yaml", | ||
"(/components/0/memoryLimit):The value must be of string type, but actual type is integer." | ||
}, | ||
{ | ||
"editor_plugin_component/devfile_editor_component_with_multiple_colons_in_id.yaml", | ||
"(/components/0/id):The string value must match the pattern \"^((https?://)[a-zA-Z0-9_\\-./]+/)?[a-z0-9_\\-.]+/[a-z0-9_\\-.]+/[a-z0-9_\\-.]+$\"." | ||
"(/components/0/id):The string value must match the pattern \"^((https?://)[a-zA-Z0-9_\\-./]+/)?[a-z0-9_\\-.]+/[a-z0-9_\\-.]+(/[a-z0-9_\\-.]+)?$\"." |
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.
Since we use slash instead of colon for separating version from name, this test case looks outdated. Could you consider removing it and add a new test case with invalid URL instead?
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.
👍
@sleshchenko I still consider it WIP because I'd like some discussion about the disabled/modified tests, and also it conflicts with #13297, and so may need to be significantly reworked. |
Then please consider adding |
It would need an approval first, so I'm not too worried ;) |
Closing PR as woefully out of date; this would need to be reworked with other plugin changes. |
What does this PR do?
related issue - #12937
Changes necessary to make plugin references without a version specified,
e.g.
eclipse/che-theia
to parse aseclipse/che-theia/latest
by default. As a side effect,this commit disables:
using direct links to meta.yamls (no need to have a path ending in
publisher/name/version) but also works by arbitrarily splitting the URL
into a 'registry' and 'id'
custom registries
disabled until issue Improve/fix parsing of plugins/editors attribute #13385 is resolved.
See also: #13385, since I believe that the way we handle plugin references is in sore need of improvement.
This plugin is still WIP but I would like comments/review, especially regarding how custom registries are handled.