lando / lando

A development tool for all your projects that is fast, easy, powerful and liberating
https://lando.dev
GNU General Public License v3.0
4.01k stars 544 forks source link

Event "before-end" doesn't execute anything #3711

Open acha5066 opened 1 month ago

acha5066 commented 1 month ago

I debugged the available events by running lando start -vvv | grep "emitting" and noticed that the before-end event is fired right at the last moment. I tried to use this to execute a script but it appears nothing happens.

To test this, I executed my custom script with the post-start event and set -xe at the top of my script so I can see it is executing. It is executed with post-start but this happens too early, before the service that appserver depends on is ready. Nothing happens with before-end.

I'm not sure why before-end doesn't execute :thinking: but I actually think a post-healthcheck event that fires after all services have been checked would be better here.

As a temporary workaround I've added a delay to my script to wait for the service to be ready.

Using Lando version v3.20.8

reynoldsalec commented 2 weeks ago

Interesting, I'm going to throw a Lando 4 tag on this in case it's helpful for thinking about Lando 4 architecture...guessing since most energy is going towards working on v4 that there won't be much action here for looking at the events functionality in v3, but definitely thanks for pointing this out @acha5066 and glad you found a workaround, even if it's not ideal.