sst / sst

Build full-stack apps on your own infrastructure.
https://sst.dev
MIT License
24.07k stars 1.86k forks source link

fix: skip send to partial channel on diff #5880

Open jamesgibbons92 opened 1 month ago

jamesgibbons92 commented 1 month ago

Resolves https://github.com/sst/sst/issues/5856

partial channel was filling up during sst diff but this channel is not consumed in this mode due to this go routine:

    go func() {
        if input.Command == "diff" {
            return
        }
        for {
            select {
            case <-partialContext.Done():
                partialDone <- nil
                return
            case <-partial:
                workdir.PushPartial(update.ID)
            case <-time.After(time.Second * 5):
                workdir.PushPartial(update.ID)
                continue
            }
        }
    }()

so once the buffer hit 1000 it started blocking and causes the command to hang indefinitely.