jamulus icon indicating copy to clipboard operation
jamulus copied to clipboard

PyLint install fails during Code Style check

Open pljones opened this issue 1 year ago • 5 comments

Describe the bug

Running pip install --user "pylint < 3.0" fails with an error, causing the overall build to fail with a code style error.

To Reproduce

Raise a PR or run a the "Verify Python coding style" work flow (without --break-system-packages)

Expected behavior

pylint should be install and the check should run successfully (assuming not breakage in python code style).

Additional context

Raised on Discord (note, all old builds now gone):

[ 16:19 ] pljones: Anyone know why the python check fails? https://github.com/jamulussoftware/jamulus/actions/runs/11306641904/job/31447466526?pr=3394 [ 16:20 ] dtinth: recently-updated gh actions image breaks pip. just add --break-system-packages to the command should fix it. example https://github.com/dtinth/jamulus-php/commit/be02a7c6b78ab6fa736ca5a0c3d9041d5436e5a4 [ 16:24 ] pljones: So patch main with that, then revert? [ 17:13 ] pljones: Just patch for now. Is "pylint < 3.0" available on ubuntu-latest? My 24.04 LTS has only 3.0.3 available for apt; maybe it could use pipx rather than --break-system-packages?

$ apt list pylint
Listing... Done
pylint/noble,noble 3.0.3-2 all

pljones avatar Oct 12 '24 16:10 pljones

@pljones the fixes on main don't seem to fix the issue.

ann0see avatar Oct 19 '24 20:10 ann0see

What do you mean? Currently the build on main runs. Without the workaround, it didn't run. So the workaround on main is still there. The issue is that it's a work around and not a fix. Someone needs to work out what the fix is and implement it to close this issue.

pljones avatar Oct 20 '24 09:10 pljones

I meant that https://github.com/jamulussoftware/jamulus/actions/runs/11386428899/job/31678620735#step:3:1 shows that the coding style check does not run.

ann0see avatar Oct 20 '24 09:10 ann0see

Um, interesting... I wonder what changed.

pljones avatar Oct 21 '24 17:10 pljones

https://github.com/jamulussoftware/jamulus/actions/runs/11367998339/job/31622018160#step:3:2 ran okay...

https://github.com/jamulussoftware/jamulus/actions/workflows/coding-style-check.yml In fact, up until your last couple of builds, it looks to have been okay. I can only guess the action is using something that's not properly pinned.

Which, again, is why there's an issue with that action.

pljones avatar Oct 21 '24 17:10 pljones

The addition of --break-system-packages has been consistently failing, presumably due to the version of pip not recognising it.

So I reverted the relevant commit c1718a86f350aeab6ff6e98b42b598e92df7890c in a test branch and ran the action. It succeeded, so I wonder if the original problem that prompted this Issue to be raised has now gone away?

softins avatar Oct 24 '24 11:10 softins

I don't like it being unstable... I thought we generally pinned versions of the actions to avoid things like this? Or is it not the action itself?

pljones avatar Oct 24 '24 17:10 pljones

I don't see how it could be due to an external action, such as actions/checkout@v4. Our own job runs pip to obtain pylint, and it would appear that the version of pip that comes in the ubuntu-latest runner doesn't understand --break-system-packages, but also without that switch it does now correctly install pylint < 3.0.

I'm wondering if the original problem was a temporary glitch in the Python repositories with a broken dependency or something?

I would recommend taking the --break-system-packages out again, and then waiting until the original problem recurs, if indeed it does.

softins avatar Oct 25 '24 12:10 softins

#3415 raised to try the revert. https://github.com/jamulussoftware/jamulus/actions/runs/11521963146 manually run for revert.

pljones avatar Oct 25 '24 16:10 pljones

I believe this is fixed. Otherwise please re open

ann0see avatar Oct 31 '24 07:10 ann0see