Skip to content
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

Run pre-commit-vauxoo in python 3.8 #203

Open
antonag32 opened this issue Jul 31, 2023 · 7 comments · May be fixed by #204
Open

Run pre-commit-vauxoo in python 3.8 #203

antonag32 opened this issue Jul 31, 2023 · 7 comments · May be fixed by #204

Comments

@antonag32
Copy link
Contributor

antonag32 commented Jul 31, 2023

Running pre-commit-vauxoo in different python versions may generate inconsistencies with the CI, which uses python3.8 (at least in most cases). Therefore t2d containers should run pre-commit-vauxoo in python3.8, instead of using the container's default python version.

@moylop260
Copy link
Collaborator

@ruiztulio

If we use this way should we create a custom image for each python version instead of using the current one

Is fine this for you?

@luisg123v
Copy link
Contributor

@moylop260

If we use this way should we create a custom image for each python version instead of using the current one

Why?

@moylop260
Copy link
Collaborator

pylint raises different errors based on python version

e.g. CurrentThreading vs current_threading

antonag32 added a commit to vauxoo-dev/travis2docker that referenced this issue Aug 4, 2023
Closes Vauxoo#203.

Running pre-commit-vauxoo in versions other than python3.8 can generate
inconsistencies between local dev containers and the CI. The new build
script for Deployv takes this into account and installls
pre-commit-vauxoo in a python3.8 interpreter.

This is useful for dev containers working on older odoo versions, in
which the default interpreter is not python3.8. If the default
interpreter is already python3.8, pre-commit-vauxoo is installed
directly in it.
@antonag32 antonag32 linked a pull request Aug 4, 2023 that will close this issue
antonag32 added a commit to vauxoo-dev/travis2docker that referenced this issue Aug 22, 2023
Closes Vauxoo#203.

pre-commit-vauxoo requires Python 3.7 or greater to run. Some containers
in Odoo 12 and below are using Python 3.6, as a workaround, if the
Python version detected is not suitable, Python 3.8 will be installed
and used for running pre-commit-vauxoo.
antonag32 added a commit to vauxoo-dev/travis2docker that referenced this issue Aug 22, 2023
Closes Vauxoo#203.

pre-commit-vauxoo requires Python 3.7 or greater to run. Some containers
in Odoo 12 and below are using Python 3.6, as a workaround, if the
Python version detected is not suitable, Python 3.8 will be installed
and used for running pre-commit-vauxoo.
@ruiztulio
Copy link

ruiztulio commented Oct 12, 2023

@moylop260 Sorry, github wasn't sending me the notifications.

You mean a container per python version only for the pre-commit job?

EDIT: If so, no problem, there is not much to change in that case.

@moylop260
Copy link
Collaborator

@moylop260 Sorry, github wasn't sending me the notifications.

You mean a container per python version only for the pre-commit job?

Yes, we are still maturing the idea

Otherwise, Could we use the quay.io customer image but installing pre-commit-vauxoo

Using this way we will use the exact python version than the project needs

But not sure yet since that it could require pre-install the packages in the production image (risky but faster) or install on-the-fly the packages (slow but safe)

Or install on-the-fly the packages using gitlab-caches

We even need to make the POCs

@ruiztulio
Copy link

@moylop260 I think it is better to have an image per python version.

We could use the customer image, but it will always be behind, or we will need a fixed image in the job which in turn will be like having a custom python image. Or install pre-commit-vauxoo in every job, so we can use the actual image.

But we already have an image that supports multiple python versions here. It is used to test DeployV we could use that as a base (maybe another branch?) and use the python_version variable to instantiate the proper environment.

In this way, we only would have a single image that can work for all customers with little extra work. What do you think?

@moylop260
Copy link
Collaborator

Using a image with different py versions could work

cc @antonag32 @luisg123v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants