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
Move Kubernetes modules out of contrib to match 2.0 layout #8904
Conversation
Many k8soperator/k8sexecutor PRs need to be essentially recreated from scratch because git can no longer merge. I'm hoping to make a few PRs like this to bring 1-10 and master closer together |
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.
On my phone right now so can't easily check, but I think we need an import-shim to make any old imports in end-user code stay working
ebef081
to
14329ce
Compare
@ashb some point tomorrow I might need some help on this PR. I'm getting a bunch of flake8 failures that seem completely unrelated to any code changes I made so not sure if something is funky with 1-10-test |
@potiuk do you have any idea why all of these unrelated flake tests would fail?
|
That is most likely caused by the new version release of flake8 on May 12 that may have introduced extra checks ! - https://pypi.org/project/flake8/ |
Yep. It's very likely. I think we fixed similar problems in one of the commits in master. Looking at the requirements.txt Flake8 3.8.0 (and then 3.8.1 right after) has been released 12th of May. You simply need to fix those @dimberman |
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.
PR targets v1-10-test so needs to be backwards-compatible. So just needs to add original paths to keep it compatible otherwise LGTM
'Uploading {} to wasb://{} ' | ||
'as {}'.format(self.file_path, self.container_name, self.blob_name) |
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.
Was this changes because of a flake8 error ? We use %s
format for logs so that the arguments are passed properly when logging levels are changed
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.
Yes. This was because of flake8 errors.
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.
@kaxil any thoughts on what to do here? change them or set ignore flags?
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.
also if you're running .format on the string before it's even parsed does it even matter?
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.
Coz of #4804 (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.
@kaxil fixed
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.
The fix here is to do
self.log.info(
'Uploading %s to wasb://%s as %s',
self.file_path, self.container_name, self.blob_name)
That way if the logging level is disabled, no time is wasted formatting the string
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.
@ashb If possible I'd like to avoid making changes unrelated to the commit on this PR (especially since it's going straight to 1-10). Should we make a separate PR for fixing these logs/flake8 tests?
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.
Oh gotcha. I mean you are already changing this, so it's going to conflict anyway.
Potato potato.
31d03c6
to
a49aebb
Compare
@dimberman Needs rebasing now please. |
15e7728
to
c96119c
Compare
3a4e73c
to
2518ffb
Compare
get static checks to pass
Considering that the k8s executor is now supported by core committers, we should move it from contrib to the primary executor directory. Co-authored-by: Daniel Imberman <daniel@astronomer.io>
Considering that the k8s executor is now supported by core committers, we should move it from contrib to the primary executor directory. Co-authored-by: Daniel Imberman <daniel@astronomer.io>
Considering that the k8s executor is now supported by core committers, we should move it from contrib to the primary executor directory. Co-authored-by: Daniel Imberman <daniel@astronomer.io>
Moves k8s internal files out of the
contrib
folder without moving K8sPodOperator avoid any breaking changesMake 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.