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

build(pylint-odoo): bump for v16 #198

Merged
merged 4 commits into from
Jul 24, 2023
Merged

Conversation

yajo
Copy link
Member

@yajo yajo commented May 30, 2023

Fixes the problem explained in OCA/report-print-send#328 (comment).

@legalsylvain
Copy link
Contributor

Test are failing, (or are cancelled). could you check ?

@yajo
Copy link
Member Author

yajo commented May 30, 2023 via email

Copy link
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@sbidoul
Copy link
Member

sbidoul commented May 30, 2023

Can we do that major version bump of pylint-odoo without risk? Are there not some checks that are removed from pylint-odoo 8 and moved to another project (https://github.com/OCA/odoo-pre-commit-hooks/)?

@yajo
Copy link
Member Author

yajo commented May 31, 2023

@moylop260 told me to do it, and he maintains the project, so I guess he knows what he says 😉

But well, friend could you please answer @sbidoul's doubt? Thanks!

@OCA-git-bot
Copy link

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@micheledic
Copy link

Amy news?

Copy link
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for @moylop260 answer, regarding @sbidoul remark that is legit.

@micheledic
Copy link

@moylop260 can you check?

@StefanRijnhart
Copy link
Member

pylint-odoo >= 8.0 includes OCA/pylint-odoo#396 which drops a lot of checks that have been 'migrated to https://github.com/OCA/odoo-pre-commit-hooks'. I can't find where this new linter is added to the OCA config. Do you have any idea?

@sbidoul
Copy link
Member

sbidoul commented Jun 19, 2023

@StefanRijnhart these new checks are not in this template yet AFAIK.

If we bump pylint-odoo to >=8, we need to add odoo-pre-commit-hooks to our .precommit-config.yaml, but we may also need to configure it to make sure we don't add new checks that would make existing branches red.

@StefanRijnhart
Copy link
Member

Tests fail because we lost support for Python 2.7

The support for python 2.7 will be removed on June 19. Related issue: actions/setup-python#672

@StefanRijnhart
Copy link
Member

Thanks @sbidoul for confirming! Any chance @yajo you could include the inclusion of the new linter here?

@yajo
Copy link
Member Author

yajo commented Jun 21, 2023

Added.

@SirTakobi SirTakobi mentioned this pull request Jun 21, 2023
@micheledic
Copy link

Any news? i d like to implement OCA/report-print-send#328

@ivs-cetmix
Copy link
Member

Can we provide any assistance to make it merged?

@StefanRijnhart
Copy link
Member

StefanRijnhart commented Jul 20, 2023

I think we want to be reasonably sure that no new checks are added. In my imagination, that implies checking out a large number of OCA repos locally, apply this change and run the pre-commit to get an idea of the impact. Let me see if I can get oca-clone-everything working again.

@StefanRijnhart
Copy link
Member

I ran this new pre-commit on all 16.0 OCA branches and I did not spot a large number of issues raised by it. In my comment above I suggested to adjust the indentation in the jinja template but I noticed that the template still leaves an empty line in the yaml configuration file that pre-commit will want to clean up anyway. That makes me less interested in fixing the indentation.

If anybody wants to double check, here is the output of the pre-commit run:
pre-commit-16-all.txt.zip

Co-authored-by: Stefan Rijnhart (Opener) <stefan@opener.am>
@yajo
Copy link
Member Author

yajo commented Jul 21, 2023

FWIW you don't have to be so much afraid of deploying changes to the template.

Remember: it's not like in the old days. Repo per repo, branch per branch, once the template is updated, if anything is violating a new linter, it will raise a ❌.

It's not like we're deploying a massive change by merging this.

@pedrobaeza
Copy link
Member

Is the CI failing something expected?

@StefanRijnhart
Copy link
Member

@yajo Well, I liked to have this confirmed before I took the responsability and approved this change.

@pedrobaeza Yes, Python 2.7 is gone. An attempt to revive it is #199.

@pedrobaeza
Copy link
Member

But seems to be not enough. Should we disable such CI?

@yajo
Copy link
Member Author

yajo commented Jul 24, 2023

I have removed the requirement for py2.7 job to allow unblocking this situation until properly fixed.

@micheledic
Copy link

tests ok, i guess should be merged, correct ?

@pedrobaeza
Copy link
Member

It seems the test is still red.

@micheledic
Copy link

It seems the test is still red.

The First test Is Red because there Is not support Fort python 2.7, i Guess It Is ok

@StefanRijnhart
Copy link
Member

@pedrobaeza Appreciating that there is already an initiative to get this test green again I think keeping it in its current red state is fine.

@pedrobaeza
Copy link
Member

I understood that @yajo remove such red. Should we merge with the red condition then?

@StefanRijnhart
Copy link
Member

@yajo removed the fail fast attribute which makes it possible to check the outcome of the other tests when the 2.7 test fails, which suffices.

@pedrobaeza
Copy link
Member

OK, I merge then.

@pedrobaeza pedrobaeza merged commit 450a800 into OCA:master Jul 24, 2023
7 of 8 checks passed
@yajo yajo deleted the bump-pylint-odoo branch July 25, 2023 10:17
@yajo
Copy link
Member Author

yajo commented Jul 25, 2023

I removed the python 2.7 from the requirements to merge PRs, that's why you were able to merge 😉

@micheledic
Copy link

Hello,
we need a new tag so we can update copier template on repos

@yajo
Copy link
Member Author

yajo commented Jul 27, 2023

@micheledic
Copy link

Updated report-print-send template
OCA/report-print-send#334

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 this pull request may close these issues.

None yet

9 participants