-
Notifications
You must be signed in to change notification settings - Fork 55
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
Implicitly set merge-contribution:true
on first template component
#993
Comments
One grey area with implicitly including the For example, in our default "theia-next" sample, DWO would attempt to inject into the Currently, I believe DWO internally flattens contributions + plugin components into one list of components to start, so this behavior would be present with the theia-next-contributions sample One of the reasons we defaulted to explicit opt-in, implicit opt-out is to be sure a workspace can be started (assuming the default image for unmerged components is suitable for running the injected component). With implicit injection, adding e.g. a busybox container to the workspace will cause startup to likely fail -- though this may not be a use case we care to support. There are two solutions I can see here:
|
I am not 100% sure I have understood the problem so apologies if what I am saying doesn't make sense. My understanding:
From my point of view, DevWorkspaces with no components should be considered invalid. For the Devfile we may want to be more permissive and allow component-less: Che, or any other tool that generates the DW, would be responsible to add the default component (this case is similar to a recent customer case). |
That's a valid option; currently devfiles with no components whatsoever are valid in order to allow for the flow "create a devfile, add components after creation". Additionally, from a "resolved workspace" perspective, the Regarding
In order to support a smoother transition to using contributions instead of plugin components, the |
This commit introduces 3 changes to the container contribution mechanism: 1. The `controller.devfile.io/merge-contribution` component attribute is no longer required in order to define a target for container contributions. The first container component in a devworkspace (that is not imported by a plugin or parent devworkspace) is automatically selected as a merge target if the `controller.devfile.io/container-contribution` is used on at least one other devworkspace component. However, if the `controller.devfile.io/merge-contribution` attribute is set to `true` for a container component, it will be selected as a target for container contributions. 2. Users can opt-out a container component from being implcitly selected as a container contribution merge target by setting the `controller.devfile.io/merge-contribution` attributete to false. 3. If a devworkspace has multiple container components with the `controller.devfile.io/merge-contribution` attribute set to true, the workspace fails. Fix devfile#993 Signed-off-by: Andrew Obuchowicz <[email protected]>
This commit introduces 3 changes to the container contribution mechanism: 1. The `controller.devfile.io/merge-contribution` component attribute is no longer required in order to define a target for container contributions. The first container component in a DevWorkspace (that is not imported by a plugin or parent DevWorkspace) is automatically selected as a merge target if the `controller.devfile.io/container-contribution` is used on at least one other DevWorkspace component. However, if the `controller.devfile.io/merge-contribution` attribute is set to `true` for a container component, it will be selected as a target for container contributions. 2. Users can opt out a container component from being implicitly selected as a container contribution merge target by setting the `controller.devfile.io/merge-contribution` attribute to false. 3. If a DevWorkspace has multiple container components with the `controller.devfile.io/merge-contribution` attribute set to true, the workspace fails. Fix devfile#993 Signed-off-by: Andrew Obuchowicz <[email protected]>
This commit introduces 3 changes to the container contribution mechanism: 1. The `controller.devfile.io/merge-contribution` component attribute is no longer required in order to define a target for container contributions. The first container component in a DevWorkspace (that is not imported by a plugin or parent DevWorkspace) is automatically selected as a merge target if the `controller.devfile.io/container-contribution` is used on at least one other DevWorkspace component. However, if the `controller.devfile.io/merge-contribution` attribute is set to `true` for a container component, it will be selected as a target for container contributions. 2. Users can opt out a container component from being implicitly selected as a container contribution merge target by setting the `controller.devfile.io/merge-contribution` attribute to false. 3. If a DevWorkspace has multiple container components with the `controller.devfile.io/merge-contribution` attribute set to true, the workspace fails. Fix devfile#993 Signed-off-by: Andrew Obuchowicz <[email protected]>
This commit introduces 3 changes to the container contribution mechanism: 1. The `controller.devfile.io/merge-contribution` component attribute is no longer required in order to define a target for container contributions. The first container component in a DevWorkspace (that is not imported by a plugin or parent DevWorkspace) is automatically selected as a merge target if the `controller.devfile.io/container-contribution` is used on at least one other DevWorkspace component. However, if the `controller.devfile.io/merge-contribution` attribute is set to `true` for a container component, it will be selected as a target for container contributions. 2. Users can opt out a container component from being implicitly selected as a container contribution merge target by setting the `controller.devfile.io/merge-contribution` attribute to false. 3. If a DevWorkspace has multiple container components with the `controller.devfile.io/merge-contribution` attribute set to true, the workspace fails. Fix devfile#993 Signed-off-by: Andrew Obuchowicz <[email protected]>
This commit introduces 3 changes to the container contribution mechanism: 1. The `controller.devfile.io/merge-contribution` component attribute is no longer required in order to define a target for container contributions. The first container component in a DevWorkspace (that is not imported by a plugin or parent DevWorkspace) is automatically selected as a merge target if the `controller.devfile.io/container-contribution` is used on at least one other DevWorkspace component. However, if the `controller.devfile.io/merge-contribution` attribute is set to `true` for a container component, it will be selected as a target for container contributions. 2. Users can opt out a container component from being implicitly selected as a container contribution merge target by setting the `controller.devfile.io/merge-contribution` attribute to false. 3. If a DevWorkspace has multiple container components with the `controller.devfile.io/merge-contribution` attribute set to true, the workspace fails. Fix #993 Signed-off-by: Andrew Obuchowicz <[email protected]>
The problem
Currently both a
contribution
and the attributecontroller.devfile.io/merge-contribution: true
are required to properly "inject" an IDE in workspace Pod:Considered that:
merge-contribution
attribute makes sense in a Che scenario but not in odo or dev console scenarios (yet) so we should not specify it in registry.devfile.io.we should define a convention to apply contributions when that's not explicitly specified in the template/devfile.
A proposal
merge-contribution
attribute, the contribution should be applied to the first container component.merge-contribution
tofalse
to avoid contributions to that component.merge-contributions: true
is invalid: the devworkspace controller should return an error if multiple components havemerge-contribution
explicitly set totrue
.The text was updated successfully, but these errors were encountered: