kitproj / kit

Kit makes your dev loop crazy fast
48 stars 2 forks source link

`yarn install` task sometimes runs indefinitely inside of Kit #48

Open agilgur5 opened 1 year ago

agilgur5 commented 1 year ago

Summary

I'm not really sure why this is happening, but when Node deps change, sometimes a task that does yarn install will just run indefinitely and never finish inside of Kit.

Details

The ui-deps task in Argo Workflows runs yarn install and several times I have noticed it just run for many minutes, at which point I just Ctrl+C to kill it. Then I run yarn install manually outside of Kit, and it installs everything fine within 30s. When I run Kit again after the manual yarn install, Kit will run fine.

yarn install always runs something, but it basically no-ops when there's nothing to install.

Hypothesis

I have a feeling this may be because of the auto-updating progress indicator that Yarn has. Kit seems to not capture it properly in its logs, and so maybe it's failing to see it finish? I think this requires a TTY or something (I forget the exact terminology and shell semantics here, but similar to docker -t. See also this SO Answer on shell output buffering)

Example

For example, in the below Kit run:

■ go-deps    waiting  waiting for mutex "downloads"
■ install    waiting  
■ build-cont waiting  
■ port-forwa waiting  [9000] 
■ controller waiting  [9090] 
■ build-argo waiting  
■ server     waiting  [2746] 
■ ui-deps    running  warning " > swagger-ui-react@4.19.1" has incorrect peer dependency "react-dom@>=17.0.0".
■ ui         waiting  [8080] 

ui-deps will have the same message indefinitely. Enabling debug logging with "4+Enter" shows no logs either. That message is the last message before Yarn's installation progress indicator, which is a self-updating message (i.e. it does not output new lines, it continuously updates the same log line) of the form: ####------ 4/10 (but longer), where the percentage of hashes and the number represents progress.

agilgur5 commented 1 year ago

Potentially related to #44, but not sure if they're actually related

agilgur5 commented 10 months ago

For reference, this has happened many times, and is potentially the single most impacting bug in my usage of kit. Sometimes it runs fine, but only when the install is short. When it's longer, it seems to just run indefinitely -- I let it go for like 15 min once and it was still hanging when I came back

alexec commented 4 months ago

Hi @agilgur5 I did not notice any of your issues for last year. Sorry about that. I'm revisiting this tools (which I thought was feature complete, but maybe not) and trying to find the best tool to use, I want to compare with Tilt, DevSpace and similar.

I think that Kit needs at least two things done to it:

LMK if you have time to talk.

agilgur5 commented 4 months ago
  • A user interface like Tilt for new users. I think their UI is cool, especially the ability to run custom tasks.

They're definitely interesting features. I recommended a terminal-based UI in #54 as well, which are becoming more common with tools like k9s, especially in the Go ecosystem.

LMK if you have time to talk.

Sure I can make some time. I can send you my calendar or vice-versa via CNCF Slack DM