Skip to content
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

"Restart from local devfile" option resulting in http error #23031

Closed
etsauer opened this issue Jul 9, 2024 · 9 comments
Closed

"Restart from local devfile" option resulting in http error #23031

etsauer opened this issue Jul 9, 2024 · 9 comments
Assignees
Labels
area/editor/vscode Issues related to the Code OSS editor of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.

Comments

@etsauer
Copy link

etsauer commented Jul 9, 2024

Describe the bug

When I update my devfile and hit the "restart from local devfile" option, I get a pop-up in vscode that says "Failed to update Devfile. HttpError: HTTP request failed". I've been unable to find any more info in the IDE output tab, Problems tab, or pod logs about this issue.

Che version

7.81

Steps to reproduce

  1. Spin up this workspace: https://github.com/etsauer/devhub-plugin
  2. Make a change to the devfile (I was adding a poststart task)
  3. Click the che logo, then select "restart workspace from local devfile"

Expected behavior

Work space restarts, and the page reloads

Runtime

OpenShift

Screenshots

No response

Installation method

OperatorHub

Environment

Linux

Eclipse Che Logs

No response

Additional context

No response

@etsauer etsauer added the kind/bug Outline of a bug - must adhere to the bug report template. label Jul 9, 2024
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Jul 9, 2024
@etsauer
Copy link
Author

etsauer commented Jul 9, 2024

Here is all the version info from the Dashboard:

Dashboard Version 7.86.1
Server Version 3.14 @ 95f3e #3 :: Eclipse Che Dashboard 7.86.0 @ 4278a
Username user1
Browser Name chrome
Browser Version 126.0.0
Browser OS Windows 10

@etsauer
Copy link
Author

etsauer commented Jul 9, 2024

I've tried doign a clean restart of the workspace, both using the "restart workspace" option from within the IDE, and the stop/start options from the Dashboard. The workspace restarts cleanly in both cases, but it doesn't change the "restart from local devfile" behavior

@ibuziuk ibuziuk added area/editor/vscode Issues related to the Code OSS editor of Che severity/P1 Has a major impact to usage or development of the system. labels Jul 9, 2024
@vitaliy-guliy
Copy link
Contributor

Probably duplication of #22913

@etsauer could could you share the repo or even the devfile with your changes before the restart?

@etsauer
Copy link
Author

etsauer commented Jul 9, 2024

Devfile is linked above. Only change I made was I added - load-project-envs at the end under events.preStart

@vitaliy-guliy
Copy link
Contributor

I'm not sure we can fix it on the editor side.

I did a fork of the repository from issue description https://github.com/vitaliy-guliy/devhub-plugin
then added - load-project-envs at the end of the devfile https://github.com/vitaliy-guliy/devhub-plugin/blob/main/devfile.yaml#L63
and tried to create a workspace from https://github.com/vitaliy-guliy/devhub-plugin

Screenshot from 2024-07-09 17-46-20

@etsauer
Copy link
Author

etsauer commented Jul 9, 2024

So is the problem here that che doesn't support multiple preStart tasks?

@etsauer
Copy link
Author

etsauer commented Jul 9, 2024

Ok, I figured it out... from the error message above,

1 error occurred:
	* preStart type events are invalid: 
load-project-envs should either map to an apply command or a composite command with apply commands

and from reading about the different event types, I figured out that you can't have exec type commands listed in a preStart hook because at that point, there's no container to execute our commands in. So only apply type commands are valid in the preStart phase. I moved my command into a postStart event instead and everything works.

Here's the resulting devfile that works. https://github.com/etsauer/devhub-plugin/pull/4/files

So... could the topic for this issue move to, "how can we get the error message above to display in the IDE pop-up as well"?

@dkwon17 dkwon17 removed the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Jul 9, 2024
@vitaliy-guliy
Copy link
Contributor

So... could the topic for this issue move to, "how can we get the error message above to display in the IDE pop-up as well"?

Yes. I partially fixed it here che-incubator/che-code#363
But it seems it's not fully done.

@vitaliy-guliy vitaliy-guliy self-assigned this Jul 17, 2024
@AObuchow
Copy link

@vitaliy-guliy Resolving this issue might also help debug #23045 more easily

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/vscode Issues related to the Code OSS editor of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
Status: ✅ Done
Development

No branches or pull requests

6 participants