Mic92 / nixpkgs-review

Review pull-requests on https://github.com/NixOS/nixpkgs
MIT License
350 stars 59 forks source link

Retrieve and save error logs eagerly #379

Open SomeoneSerge opened 7 months ago

SomeoneSerge commented 7 months ago

AFAIU, currently the build logs are retrieved during the Report generation, after all of the builds have been finished: https://github.com/Mic92/nixpkgs-review/blob/a45de7c827e41846a165bad226fdff15461d381f/nixpkgs_review/report.py#L133

In case of mass-rebuilds where a nixpkgs-review run might take a couple of days the build logs can get garbage-collected by that time, and nixpkgs-review would spit out empty files:

❯ bat logs/blender.log 
───────┬────────────────────────────────────────────────────────────────────────────────────────────
       │ File: logs/blender.log   <EMPTY>
Mic92 commented 7 months ago

Maybe we should just disable this step if we go over some threshold of packages?

Mic92 commented 7 months ago

We currently don't have a notification mechanism if an attribute is built.

SomeoneSerge commented 7 months ago

I thought nom displays the built and failed packages. Maybe json-internal includes some build result message?

Maybe we should just disable this step if we go over some threshold of packages?

The thing is, logs are the main reason I run nixpkgs-review 😅

Mic92 commented 7 months ago

Might be a solution. I haven't yet digged into how json-internal works. I know however that it's not reliable in nom when having remote builders. Some builds are reported pending also they already have finished.