canonical / github-runner-operator

github-runner-operator - charm repository.
Apache License 2.0
9 stars 19 forks source link

Some charm builds break due to NodeJS v12 in Jammy-based runners #236

Closed alnvdl-work closed 2 days ago

alnvdl-work commented 8 months ago

Bug Description

The charmcraft templates use pyright for running static type checks on the charm.

However, pyright >= 1.1.352 does not work with NodeJS v12, that ships with Ubuntu 22.04. See: https://github.com/microsoft/pyright/issues/7365

The workaround we found is pinning pyright in tox.ini:

deps =
    pyright==1.1.351

But that's unfortunately not a viable long-term solution, since NodeJS v12 has been unsupported for a long time now.

We did not install NodeJS in our workflows, so I'm assuming it's coming from the runners setup by this charm, correct?

Would it be possible to source NodeJS in the runners from a different, more up-to-date source (e.g., a snap)?

To Reproduce

Try to run tox on any charm that follows the charmcraft templates or uses pyright.

Environment

Official IS-maintained GitHub runners.

Relevant log output

-

Additional context

No response

cbartz commented 8 months ago

It seems we have to update node on the image to match the gh hosted ones: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#language-and-runtime

cbartz commented 2 days ago

@jdkandersson What is your opinion, I think we should add packages if there is a high demand from multiple users, so I would advise @alnvdl-work to continue with his workflow approach.

jdkandersson commented 2 days ago

Yes I think that is reasonable for now