Coder Social home page Coder Social logo

Comments (9)

etsauer avatar etsauer commented on August 29, 2024 1

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"?

from che.

AObuchow avatar AObuchow commented on August 29, 2024 1

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

from che.

etsauer avatar etsauer commented on August 29, 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

from che.

etsauer avatar etsauer commented on August 29, 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

from che.

vitaliy-guliy avatar vitaliy-guliy commented on August 29, 2024

Probably duplication of #22913

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

from che.

etsauer avatar etsauer commented on August 29, 2024

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

from che.

vitaliy-guliy avatar vitaliy-guliy commented on August 29, 2024

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

from che.

etsauer avatar etsauer commented on August 29, 2024

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

from che.

vitaliy-guliy avatar vitaliy-guliy commented on August 29, 2024

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.

from che.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.