Devfile editor in the dashboard displays multi-line commands incorrectly
See original GitHub issueDescribe the bug
Devfile editor breaks the devfile when it has at last one multi-line command. In fact, your devfile still stay unchanged and valid unless you make changes
Steps to reproduce
- Create a workspace from a devfile containing at least one multi-line command
- Refresh the browser, go to devfile editor, scroll to the command
Expected behavior
See the video for details https://youtu.be/jwoDaM_d24Q
Devfile to test
# Copyright (c) 2020 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# See: https://sipb.mit.edu/doc/safe-shell/
apiVersion: 1.0.0
metadata:
name: buildkit-tooling-dev
projects:
- name: che-sidecar-kubernetes-tooling
source:
location: 'https://github.com/che-dockerfiles/che-sidecar-kubernetes-tooling'
type: git
branch: '1.1.0'
components:
# This section will be changed on Che buildkit plugin
- type: dockerimage
image: quay.io/vgulyy/buildkit:0.7.1
alias: buildkit-dev
mountSources: true
memoryLimit: 2Gi
volumes:
- name: buildkit-share
containerPath: /home/user/.local/share/buildkit
- name: buildkit-lib
containerPath: /var/lib/buildkit
commands:
#
# Generate config.json with credentials to the Container Registry
#
- name: '1.1 Specify Container Registry'
actions:
- workdir: /projects/che-sidecar-kubernetes-tooling
type: exec
command: |
read -p "Container Registry: " REGISTRY &&
echo -n $REGISTRY > $HOME/.docker/registry &&
read -p "User: " USER &&
echo -n $USER > $HOME/.docker/user &&
read -s -p "Password: " PASSWORD &&
echo -e "\nGenerating \e[93m$HOME/.docker/config.json\e[0m..." &&
auth=`echo -n $USER:$PASSWORD | base64` &&
echo -e '{"auths": {"'$REGISTRY'": {"auth": "'$auth'"}}}' > $HOME/.docker/config.json &&
echo -e "\e[32mDone.\e[0m"
component: buildkit-dev
#
# Builds image with Kubernetes plugin
#
- name: '1.2 Build and Push the image'
actions:
- workdir: /projects/che-sidecar-kubernetes-tooling
type: exec
command: |
REGISTRY=`cat $HOME/.docker/registry`
USER=`cat $HOME/.docker/user`
IMAGE=$REGISTRY/$USER/che-sidecar-kubernetes-tooling:dev-buildkit
echo -e "Building \e[93m$IMAGE\e[0m..."
buildctl-daemonless.sh build \
--frontend=dockerfile.v0 \
--local context=. \
--local dockerfile=. \
--output type=image,name=$IMAGE,push=true &&
echo -e "\e[32mDone.\e[0m"
component: buildkit-dev
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Sprint 188 (05-08-2020 - 25-08-2020) Controller Team - HackMD
Devfile Editor bug fixing. Devfile editor in the dashboard displays multi-line commands incorrectly 15999; Wrong order of versions in completion in Devfile ...
Read more >End-user Guide Red Hat CodeReady Workspaces 2.9
Navigate to the CodeReady Workspaces Dashboard. Select the workspace in which the problem happened. Switch to the Devfile tab. In the components section...
Read more >OpenShift Container Platform 4.11 release notes
Display operand instances for all managed namespaces on the Installed Operator page. With this update, the Operator → Installed Operator page will show...
Read more >Dashboard Editor - Cherwell Support
Dashboard Editor · Toolbar: Displays common commands for formatting the appearance and behaviors of a Dashboard and its Widgets. · Widget list: Lists...
Read more >IBM Spectrum Scale 4.2: Problem Determination Guide
The GPFS log frequently shows problems on one node that actually originated on another ... class for I/O-intensive, potentially long-running GPFS commands, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tsmaeder in both variants the editor displays wrong content. After saving the devfile you will not be able to run the command.
The OpenShift console works in the way proposed by @akurinnoy and I like that way. So, before saving (user input):
After saving any multi-line scalars are replaced with literal: