Skip to content

Use node-gyp compatible version of Python in runner for test workflow #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 22, 2022
Merged

Use node-gyp compatible version of Python in runner for test workflow #19

merged 1 commit into from
Nov 22, 2022

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Nov 10, 2022

The node-gyp dependency of this project uses a Python script.

Previously, the test GitHub Actions workflow was not configured to install a specific version of Python, so whichever version of Python 3.x that was pre-installed on the GitHub Actions runner machine was used.

The documentation for the [email protected] version used by this project indicates the newest supported Python version is 3.8:

https://github.com/nodejs/node-gyp/tree/v7.1.2#installation

Clearly newer versions did work because the workflow has been running with Python 3.10. However, the macos-latest runner was updated to using Python 3.11 and the script now fails when npm install is ran in the project:

https://github.com/arduino/arduino-serial-plotter-webapp/actions/runs/3428463267/jobs/5714559323#step:4:122

ValueError: invalid mode: 'rU' while trying to load binding.

The solution is to install a specific version of Python for use in the runner. It seems safest to use the newest version explicitly stated as supported by the [email protected] documentation, so Python 3.8 is installed.

The node-gyp dependency of this project uses a Python script.

Previously, the test GitHub Actions workflow was not configured to install a specific version of Python, so whichever
version of Python 3.x that was pre-installed on the GitHub Actions runner machine was used.

The documentation for the [email protected] version used by this project indicates the newest supported Python version is
3.8. Clearly newer versions did work because the workflow has been running with Python 3.10. However, the macos-latest
runner was updated to using Python 3.11 and the script now fails when `npm install` is ran in the project:

ValueError: invalid mode: 'rU' while trying to load binding.

The solution is to install a specific version of Python. It seems safest to use the newest version explicitly stated as
supported by the [email protected] documentation, so Python 3.8 is installed.
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: infrastructure Related to project infrastructure labels Nov 10, 2022
@per1234 per1234 self-assigned this Nov 10, 2022
@per1234 per1234 merged commit 22c6952 into arduino:main Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant