Skip to content

Avoid any modifications to the devfile in conversion to a DevWorkspace #22614

@amisevsk

Description

@amisevsk

Is your enhancement related to a problem? Please describe

We have some feature requests for adding the ability for DevWorkspaces to complete setup from a devfile automatically (e.g. #22491). This would involve the DevWorkspace patching itself to update its components, etc. to match a devfile within a cloned git repository.

However, this is currently difficult to do as DevWorkspaces set up via normal flows (e.g. the factory flow, etc.) are modified from the underlying devfile before being applied to the cluster.

Describe the solution you'd like

When creating a workspace from a devfile or repository with a devfile in it, we should implement conversion so that the contents of the original devfile are the same as the .spec.template field of the DevWorkspace, with any Che-specific settings (e.g. environment variables) added via container contributions. For example, in testing creation of a workspace from https://github.com/eclipse-che/che-dashboard/, I see the following environment variables added to each container:

  • CHE_DASHBOARD_URL
  • CHE_PLUGIN_REGISTRY_URL
  • CHE_PLUGIN_REGISTRY_INTERNAL_URL
  • CLUSTER_CONSOLE_URL
  • CLUSTER_CONSOLE_TITLE
  • OPENVSX_REGISTRY_URL

While these variables are necessary for running Che, they could be added to the main development container by including them in the injected editor (e.g. the Code DevWorkspaceTemplate)

Any cases where this isn't possible should be noted as requiring special handling or potential improvements in the DevWorkspace Operator.

Describe alternatives you've considered

No response

Additional context

Related: #22491

Metadata

Metadata

Assignees

Labels

area/dashboardarea/devfile-converterlibrary used to convert v1 to v2 or v2 to v1 devfilesarea/factory/dashboardIssues related to factories frontend (che user dashboard side)kind/enhancementA feature request - must adhere to the feature request template.severity/P2Has a minor but important impact to the usage or development of the system.team/AThis team is responsible for the Che Operator and all its operands as well as chectl and Hosted Che

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions