-
Notifications
You must be signed in to change notification settings - Fork 16.3k
All classes in backport providers are now importable in Airflow 1.10 #8991
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
All classes in backport providers are now importable in Airflow 1.10 #8991
Conversation
f030935 to
2812bb2
Compare
8422b01 to
441b604
Compare
|
I think I nailed it with import tests for backport packages. I removed all the README changes from code changes so that it will be easier to review that one. I will regenerate the READMES again in the separate commit on top of that one. I implemented all the refactorings that were needed in automated way using Bowler. I actually started to like Bowler :). I got to the point however that I had to refactor it - we had one huge method that did everything - so I separated all the refactoring code out from setup_backport_packages and I converted it into a separate class (this way Query was easier to build as a field in the class rather than passing the query around. @turbaszek -> you might want to take a look and see if you are ok with that, but I think the way it is done now is much more readable - we have separate refactoring methods for separate classes. Now - we also have two separate scripts for testing packages - one is to install them one-by-one for airflow 1.10 and see if they can be installed and the second one installs all of them, finds all the relevant classes and imports them (and fails if some of those imports fail). It's done rather neatly and for us It is I think a great tool to keep backport packages usable in the future - as those tests will be running continuously in CI with every PR. @BasPH -> it was a really good idea. I see some of the changes coming (like functional DAGs) might unknowingly destroy the backward compatibility of provider packages (similar to lineage changes for Papermill) - but with this test, it will be a lot harder to introduce such problems. One last comment for Papermill - it's AUTO lineage feature caused import of examples to fail (yes - we are also checking the examples!), So I added info that AUTO lineage will not work in 1.10 (and I updated the example so that it behaves correctly in Airflow 1.10 as well) @bolkedebruin - you might want to take a look at this part to see if I did not introduce any problems. |
571c445 to
f2e885b
Compare
6b9debc to
d25d854
Compare
d25d854 to
290d2eb
Compare
scripts/ci/in_container/kubernetes/app/templates/configmaps.template.yaml
Outdated
Show resolved
Hide resolved
8a078a0 to
0fadc3e
Compare
|
Hey @ashb I think you were the last one with comments - I pushed the last fixup with all the resulting explanations and changes and I hope the build will succeed this time - I had only one datacatalog example change that was failing. Please take a look - I have two more changes that are follow - up from that one - the sooner we merge it, the earlier I can cut RC3. The only unresolved comment is about using stdout instead of print - which I am not sure why. IMHO print in python3 is much better than stdout or stderr because it's now a function and it even has the file parameter where you can pass file=sys.stderr to it, and you do not have use all those unneeded "\n"s. I understand it is not a blocker, but I would still love to know what's the rationale for using stdout now that we switched to python 3 ? |
0fadc3e to
71c7cf7
Compare
|
All Green @ashb |
I I mean we should do |
Based on https://docs.python.org/3/library/functions.html#print , the default value of
|
I am saying, we are printing errors to stdout, which is "wrong". Errors should be printed on stderr. |
I haven't followed the PR just read the line :D "I mean we should do print(..., file=sys.stdout) for anything that is an "error", hence my comment ;) |
|
@potiuk Argh, sorry, my previous comment said stdout when I meant stderr. |
3a4b2cd to
8010554
Compare
8010554 to
22ce507
Compare
ashb
left a comment
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.
Looking good Jarek!
Make sure to mark the boxes below before creating PR: [x]
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.