-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
[AIRFLOW-5226] Consistent licences for all jinja templates #5828
[AIRFLOW-5226] Consistent licences for all jinja templates #5828
Conversation
38a6e8f
to
3ca1a87
Compare
d69701a
to
ae203ae
Compare
Bumping up . It's rather small change but adds too our lineup of static checks |
ae203ae
to
db60342
Compare
Should be good to go @ashb :)\ |
Ping here. |
Geee. It's far too easy to make those duplicate licences. I think we should fork the licence plugin and make it so that it will try to find if there is an imperfect match and fail the build rather than add licence in this case (with some helpful comment added like "Please delete the licence so that we can add it properly). WDYT @mik-laj @ashb ? . It's mostly a transition problem (because people will start creating new files and copy licences from existing files) but in case there are other means of adding licences (for example plugins in their IDEs) we might end up with a lot of duplicated licences. |
db60342
to
5c46224
Compare
All should be fixed now. |
I don't think this is a big problem. The duplicate license is very large and easy to see in new files. I think, it is over engineering, but let's wait what time shows. |
3de5e82
to
39d00b6
Compare
I actually thought it's not that difficult, and it was not. Along the way I fixed a few annoyances with the pre-commit insert-licences. (fuzzy matching, inserting after shebang/ possibility to disable license inserting via comment in the file). I added all tests/documentation and opened PR to Lucas-C's repository (Lucas-C/pre-commit-hooks#12) - hopefully it will make it into 1.1.7 release of his plugin. For now I switched the licence plugins to my fork. |
4e6a0d7
to
ad6c81c
Compare
ad6c81c
to
4ae7c76
Compare
Are you OK to merge @mik-laj @ashb. I solved the problem of duplicate licences now - the modified version of the insert-license plugin is now taken from my repo and it's much smarter now + it informs which files were modified + you can disable license insertion for files via appropriate comment. Lots of tests added . I tested it on the parent of this commit and it correctly added new licenses and TODOs where licences were inconsistent with this comment:
It will prevent committing until you delete all offending licenses and re-insert licenses. |
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
(cherry picked from commit afa7180)
(cherry picked from commit afa7180)
(cherry picked from commit afa7180)
(cherry picked from commit afa7180)
Make sure you have checked all steps below.
Jira
Description
Tests
Commits
Documentation
Code Quality
flake8