[oslo] fix flake8-hacking inconsistences on xena/wallaby
Herve Beraud
hberaud at redhat.com
Tue Mar 23 11:00:42 UTC 2021
Hello Osloers,
As you surely recently observed patches proposed by the openstack bot to
configure wallaby fail with a flake8/hacking issue.
Here are some guideline to fix the problem the inconsistency:
- Patch pre-commit on master (now xena) (here is the patch:
https://gist.github.com/4383/6e96c836bb1b0e1e0e599a5106f43f1a)
- Once Xena is patched cherry-pick and backport these changes on Wallaby
- Rebase the openstack bot patches on the top of this cherry-pick (or wait
for the merge of the previous one patch)
You can copy the patch on oslo.db with the related commit message [1].
The root cause of the issue was that with the introduction of pre-commit we
started to define the version of flake8 to use. Previously this version was
defined by hacking's requirements.
Indeed a few months ago we added pre-commit to allow us to run checks with
git hooks and reduce the usage of our gates. These changes were
standardized and spread on all the scope of oslo [2].
However, during the design of these changes [3] and after some discussion
we decided to pin the version of flake8 to use, hence by doing this we
short circuited hacking on its management of flake8.
The solution to solve this issue is simply to trust hacking on its flake8
management. Hacking will pull the right version of flake8 and the
inconsistency will disappear. flake8 provides a pre-commit hook so it could
be seen and called as a local target.
[1] https://review.opendev.org/c/openstack/oslo.db/+/781470
[2] https://review.opendev.org/q/topic:%22oslo-pre-commit%22
[3]
https://review.opendev.org/q/topic:%22pre-commit%22+(status:open%20OR%20status:merged)+project:openstack/oslo.cache
--
Hervé Beraud
Senior Software Engineer at Red Hat
irc: hberaud
https://github.com/4383/
https://twitter.com/4383hberaud
-----BEGIN PGP SIGNATURE-----
wsFcBAABCAAQBQJb4AwCCRAHwXRBNkGNegAALSkQAHrotwCiL3VMwDR0vcja10Q+
Kf31yCutl5bAlS7tOKpPQ9XN4oC0ZSThyNNFVrg8ail0SczHXsC4rOrsPblgGRN+
RQLoCm2eO1AkB0ubCYLaq0XqSaO+Uk81QxAPkyPCEGT6SRxXr2lhADK0T86kBnMP
F8RvGolu3EFjlqCVgeOZaR51PqwUlEhZXZuuNKrWZXg/oRiY4811GmnvzmUhgK5G
5+f8mUg74hfjDbR2VhjTeaLKp0PhskjOIKY3vqHXofLuaqFDD+WrAy/NgDGvN22g
glGfj472T3xyHnUzM8ILgAGSghfzZF5Skj2qEeci9cB6K3Hm3osj+PbvfsXE/7Kw
m/xtm+FjnaywZEv54uCmVIzQsRIm1qJscu20Qw6Q0UiPpDFqD7O6tWSRKdX11UTZ
hwVQTMh9AKQDBEh2W9nnFi9kzSSNu4OQ1dRMcYHWfd9BEkccezxHwUM4Xyov5Fe0
qnbfzTB1tYkjU78loMWFaLa00ftSxP/DtQ//iYVyfVNfcCwfDszXLOqlkvGmY1/Y
F1ON0ONekDZkGJsDoS6QdiUSn8RZ2mHArGEWMV00EV5DCIbCXRvywXV43ckx8Z+3
B8qUJhBqJ8RS2F+vTs3DTaXqcktgJ4UkhYC2c1gImcPRyGrK9VY0sCT+1iA+wp/O
v6rDpkeNksZ9fFSyoY2o
=ECSj
-----END PGP SIGNATURE-----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20210323/fe6ef6b0/attachment.html>
More information about the openstack-discuss
mailing list