[go: up one dir, main page]

Skip to content

Validate only container component should have gl/inject-editor attribute

MR: Pending

Description

Currently, we support 2 types of components in a devfile - container and volumes. The gl/inject-editor attribute is used to identify which container component should be injected with the editor. However, when we make this check in our code, we do not check whether it is a container component; we only check for the presence of this attribute in any of the components. Thus, there is a possibility that someone could define the attribute in a volume component which would break this - https://gitlab.com/gitlab-org/gitlab/-/blob/5848f31b815919f481ca1a9e1c6b91a694608f98/ee/lib/remote_development/workspaces/create/post_flatten_devfile_validator.rb#L60

Acceptance Criteria

  • When check for the existing of gl/inject-editor attribute in the devfile, only check for container components.

Technical Requirements

TODO: Fill out or delete [If applicable, please list out any technical requirements for this feature/enhancement.]

Design Requirements

TODO: Fill out or delete [If applicable, please provide a link to the design specifications for this feature/enhancement.]

Impact Assessment

TODO: Fill out or delete [Please describe the impact this feature/enhancement will have on the user experience and/or the product as a whole.]

User Story

TODO: Fill out or delete [Provide a user story to illustrate the use case for this feature/enhancement. Include examples to help communicate the intended functionality.]

Edited by Vishal Tak