-
Notifications
You must be signed in to change notification settings - Fork 4
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
CI: Enable testing with multiple python versions #16
Conversation
CI run with the above code changes: https://github.com/Shwetha-Acharya/sit-test-cases/actions/runs/5712217288/job/15475273867 |
Hi Shweta, Thanks for this commit. These CI checks are essentially for maintaining code quality and consistency and are run only when new code is being committed to the repository. |
Hi Sachin, For example, flake8 which is used in this CI can produce different results or behavior when used with different python versions. |
The tools flake8, black and mypy are mostly run in the CI environment which we control. Since these are used to maintain code consistency, we need to run it consistently against the same version of python. |
Hi Shwetha, I've asked @synarete to give his opinion on this case. He wrote the CI bits for the project and has more experience on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine. May save us in the future from potential edge-cases related to specific python version. Two minor comments:
- Use lower-case tokens for git-commit topic (
ci
instead ofCI
) - Commit message body has short lines. You may use up to 72-chars per line. If using
vim
as your git-editor, add the following lines to.vimrc
:
autocmd FileType gitcommit set colorcolumn=72
autocmd FileType gitcommit setlocal spell
db0ba4d
to
cfa6fbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/retest centos-ci/xfs |
Personally, I think the change is fine - but I would have approached it differently. I'm generally in favor of testing with multiple versions, because the language changes and what's on my desktop may differ from what platform(s) I am deploying on. However, I prefer to use the built in mechanisms of For stuff like this I lean to accepting the change, because it mainly will only affect contributors to the project, not a wide variety of consumers - but also iterate on it afterwards to improve/refine it for the project's needs. |
Why is the CI system still waiting on "Run python code checkers"? Just wondering if we are missing something else. |
This happens every time you change the structure of your CI jobs, anything defined as a required item in your branch protection rules it'll appear in the list, even if its not run. Since the patch adds a new matrix the job name is now |
Added three latest python versions to tox and CI. With this change code is always tested on multiple supported python versions. This change makes codebase more robust by supporting early detection of possible compatibility and version-specific issues. Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
@phlogistonjohn Thats a good idea! But I am still not convinced why should we test with oldest python version as it will be towards EOL(https://devguide.python.org/versions/). Testing three most recent supported verisons still seem sensible to me |
cfa6fbf
to
03dfa9e
Compare
Sorry I didn't mean to imply the oldest python version suppted by the python core team. I meant the oldest python version you/we want to support. So, if for instance we wanted to target Centos/RHEL 8 we would want to test on python 3.6 as our oldest version. But if we only mean to support centos/RHEL 9 we would test on python 3.9... and so on. |
oh okay got it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
This change ensures that we focus to stay compatible with three most recent python versions and helps in making the codebase more robust.