lorri icon indicating copy to clipboard operation
lorri copied to clipboard

build queue is not debounced anymore

Open Profpatsch opened this issue 5 years ago • 5 comments

Describe the bug

When an event triggers a build, previously what happened was:

  • If there’s no build running, the build is started
  • If a build is already running, the build is queued iff there’s no other build queued for that file yet

To Reproduce Steps to reproduce the behavior:

Change a file multiple times and watch every change be translated in a (superfluous) evaluation

Expected behavior

Debounce the builds

$ lorri info current master


Profpatsch avatar Mar 03 '20 10:03 Profpatsch

This is especially painful if your evaluation does a bunch of IFD! :skull:

michaelpj avatar Mar 16 '20 17:03 michaelpj

I just changed branch on one of my lorri projects, and i tlooks like I see a

Apr 29 09:52:55 kirk lorri[20859]: Apr 29 09:52:55.362 INFO build status, message: BuildEvent(Started { nix_file: Shell("/home/jojo/project/shell.nix"), reason: FilesChanged(["/home/jojo/dfinity/project/sources.json"]) })

followed by BuildResults event for every single nix file in the project. This is probably the present bug, is it?

nomeata avatar Apr 29 '20 07:04 nomeata

@Profpatsch, could you clarify this bug report?

  • Is the "previous" behaviour the expected behaviour? If so, let's call it that.
  • In the observed behaviour, do you see simultaneous evaluations? Or do they pile up in a queue and then get evaluated one after another? This would help clarify the relationship between this issue and https://github.com/target/lorri/issues/389.

curiousleo avatar May 04 '20 09:05 curiousleo

* Or do they pile up in a queue and then get evaluated one after another?

^ this one

I did some preliminary refactoring a while ago, but didn’t come around to do the actual fix.

Profpatsch avatar May 04 '20 11:05 Profpatsch

I think this PR is an attempt at fixing this: https://github.com/target/lorri/pull/465

Nadrieril avatar Sep 17 '20 19:09 Nadrieril