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

QA pins #98

Open
ale-rt opened this issue Sep 7, 2022 · 3 comments
Open

QA pins #98

ale-rt opened this issue Sep 7, 2022 · 3 comments

Comments

@ale-rt
Copy link
Member

ale-rt commented Sep 7, 2022

When using qa.cfg we miss quite a lot of pins.
That causes the GHA to break all of a sudden.

It took me quite a lot of time to add the proper pins that span through Plone 5.1/Python2.7 to Plone 6, so I am sharing this here:

Probably those pins should be added to the relevant plone-*.cfg files.

@mauritsvanrees
Copy link
Member

@wesleybl has been adding various pins during the years. Do you have an opinion here?

I guess the reasoning so far was that it is fine to get updated packages, so we get improvements in say flake8. But they should not cause version conflicts, which I guess is what your problem was. When that happens, we can add maximum or exact versions, especially for older Python or Plone versions.

Note that there are more ways to check (and fix) code quality these days:

Also for running gh-actions with tox I have created https://github.com/collective/tox-action

@ale-rt
Copy link
Member Author

ale-rt commented Sep 7, 2022

Those are cool stuff, but lot of add on rely on the code analysis installed by this buildout.
Personally I whink the way to is https://pre-commit.com/.
It works on your repo and it works on GHA adding just two lines, see e.g.: https://github.com/collective/zpretty/blob/master/.github/workflows/tests.yml#L36-L37

@wesleybl
Copy link
Member

wesleybl commented Sep 7, 2022

I think if the package is a direct or indirect dependency of plone.recipe.codeanalysis [recommended], and the problem is that newer versions have removed Python 2 support, they should be pinned to qa.cfg.

If the problem is a conflict with the version pinned in Plone, it should be pinned in plone-*.cfg.

We also have to be careful not to pin things that are specific to our package. In such cases, it is better to pin to the package itself.

@ale-rt some packages you pinned in the example buildout are already pinned in qa.cfg or plone-*.cfg.

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

No branches or pull requests

3 participants