As the title says, this PR aims to address #26548 by switching the lint CI job from ubuntu's bionic base image which has python 3.6.5 to ubuntu jammy and use pyenv to install the correct python version as dictated in the project's .python-version file.
DISCLAIMER: This PR is a copy of #26572 as there were issues with that PR and how merging and squashing from the master branch were done