emacs-eldev / eldev

Elisp development tool
https://emacs-eldev.github.io/eldev/
GNU General Public License v3.0
226 stars 17 forks source link

eldev running into issues and causing build failures #52

Closed Trevoke closed 2 years ago

Trevoke commented 2 years ago

Hello! I'm using eldev both locally and in my Github Actions to guarantee that my package remains green. For a while now, though, the build has been failing, and I have no idea why. I could use your help in troubleshooting this.

https://github.com/Trevoke/org-gtd.el/runs/3927553474 https://github.com/Trevoke/org-gtd.el/runs/3927553546 https://github.com/Trevoke/org-gtd.el/runs/3927553615

(related: https://github.com/Trevoke/org-gtd.el/issues/66 )

doublep commented 2 years ago

This is what I see in the logs (I checked only the latest failure):

[00:15.712]  [2/7] Installing package ‘org-edna’ (1.1.2) from ‘gnu’...
[00:15.712]  File ‘https://elpa.gnu.org/packages/org-edna-1.1.2.tar’ is not cached, retrieving...
[00:15.871]  https://elpa.gnu.org/packages/org-edna-1.1.2.tar: Bad Request
[00:15.871]  When accessing package archive ‘gnu’
...
[00:15.871]  Finished erroneously on Mon Oct 18 14:02:39 2021

This appears to be a problem with GNU ELPA, and apparently it is already gone, I successfully ran $ eldev clean all; eldev test locally, which installed org-edna without problems.

In other words, I guess if you rerun the workflow, it will work now.

Maybe Eldev should include an option to auto-retry after certain errors with a delay, to be used on CI servers.

By the way, logs on GitHub are mixed up when both stderr and stdout are written to. I tried reporting this (https://github.com/isaacs/github/issues/1981), but no success.

Trevoke commented 2 years ago

Hello! Thanks for the quick reply and test.

One of the workflows (emacs 27.1) worked, and then failed after all the tests passed: https://github.com/Trevoke/org-gtd.el/runs/3929538140

The other two (emacs 26.1, emacs 26.3) showed failures again when retrieving from elpa:

[00:15.053]  File ‘https://elpa.gnu.org/packages/org-edna-1.1.2.tar’ is not cached, retrieving...
[00:15.218]  Finished erroneously on Mon Oct 18 16:54:44 2021
[00:15.218]  When accessing package archive ‘gnu’
Error: Process completed with exit code 1.

So I think it's not just a transient error.

doublep commented 2 years ago

Reproduced:

$ eldev clean all global-cache; EMACS=emacs-26.1 eldev -dt prepare

Apparently depends on Emac version.

doublep commented 2 years ago

The bug is reproducible on Emacs 26 if installing at least two packages: Org and whatever else (fails on the second). I don't know if it is about Org or its size/time spent (it's really a bigger one). Probably best way to reproduce from e.g. Eldev working directory:

$ eldev clean .eldev global-cache; EMACS=emacs-26.3 eldev -dt -S "(eldev-use-package-archive 'gnu)" -S "(eldev-add-extra-dependencies 'x 'org-edna '(org (9 5)))" prepare x

This seems to be a workaround: add (clrhash url-http-open-connections) before the call to package-install-from-archive. It looks ugly as hell, but it works for me. Do you think I should just commit it? Maybe only if (< emacs-major-version 27)? I hate discussing something with Emacs-devel, because it takes weeks if you even get a reply at all. Besides, this is about older versions anyway.

Trevoke commented 2 years ago

Wow, good find.

I think you might want to just commit it with the version check, it sounds like a pretty significant bug that impacts whoever is using eldev with org as a dependency... And you can reach out to emacs-devel afterwards with no rush and no pressure?

doublep commented 2 years ago

I released 0.9.3 with this workaround. Tell me if it helps (you need to wait till Melpa Stable picks it up).

Trevoke commented 2 years ago

My build is green! Finally! You're my hero, thank you!