Restart Workspace from Local Devfile command should be more informative when devfile is not valid #22913
Labels
area/editor/vscode
Issues related to the Code OSS editor of Che
kind/task
Internal things, technical debt, and to-do tasks to be performed.
severity/P2
Has a minor but important impact to the usage or development of the system.
team/B
This team is responsible for the Web Terminal, the DevWorkspace Operator and the IDEs.
Is your task related to a problem? Please describe
After changing the devfile by making it invalid, the Restart Workspace from Local Devfile command fails and it is expected, but the reason of the failure is not clear.
I've started the workspace via https://github.com/che-samples/web-nodejs-sample and made next changes in the devfile:
NOTE: value: true is not valid, it should be value: "true"
Describe the solution you'd like
It would be nice to see the reason of failure instead of Something went wrong for the 'Restart From Local Devfile' action: HttpError: HTTP request failed
Describe alternatives you've considered
maybe we should use devfile schema validator during the restart and show the real problem.
We've added the validator into devworkspace generator tool: eclipse-che/che-devfile-registry#796
Additional context
If vscode-yaml extension is installed in the workspace, it shows this problem in the editor:
![screenshot-nimbusweb me-2024 04 09-12_28_07](https://private-user-images.githubusercontent.com/1271546/320802901-785c7c51-3961-4a0e-a54c-8ff941195da7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzIzMjYsIm5iZiI6MTcyNDc3MjAyNiwicGF0aCI6Ii8xMjcxNTQ2LzMyMDgwMjkwMS03ODVjN2M1MS0zOTYxLTRhMGUtYTU0Yy04ZmY5NDExOTVkYTcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjdUMTUyMDI2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YWZmNzllNWI1NTc0MGU2YmY1YTlhODg4MDRmOTA5MGFlYTMyNDZlYmI0ZDFhYzZhNDkzMmIxNzE0ZjhmMDg3NCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.Ft6nWtMZzIKmKyOPgLSLYz5kiltAa-C0_WtTjcz_Yys)
The text was updated successfully, but these errors were encountered: