Skip to content

ci: Use pyenv for the lint task #26548

@maflcko

Description

@maflcko

Currently the lint task uses Ubuntu Bionic, to be able to pin the python version to 3.6. However, this is problematic:

  • While unlikely to happen soon, with the "Ubuntu Pro" stuff, it is unclear when Bionic is going to shut down
  • This requires workarounds like
    # Temporary workaround for https://github.com/bitcoin/bitcoin/pull/26130#issuecomment-1260499544

This should be fixed by switching to pyenv to pin the version, then bumping to Jammy to remove the git workaround.

I am not familiar with pyenv, which is why I created this issue, but apparently it is possible, see for example https://github.com/fanquake/core-review/blob/abf055db20c388e56185404ac03c7304f3905e39/docker/lint.dockerfile#L35

Edit: As a warning, the lint entry point is undocumented and may be unsafe, so run everything in a VM to be safe. Entry point:

- ./ci/lint_run_all.sh

Useful skills:

  • Bash, Python, Pyenv, Ubuntu apt

Want to work on this issue?

For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions