potiuk commented on a change in pull request #6601: [AIRFLOW-6010] Remove
cyclic imports and pylint disables
URL: https://github.com/apache/airflow/pull/6601#discussion_r349865344
##########
File path: airflow/utils/db.py
##########
@@ -336,8 +336,12 @@ def resetdb():
Clear out the database
"""
from airflow import models
+ # We need to add this model manually to get reset working well
+ # noinspection PyUnresolvedReferences
+ from airflow.models.serialized_dag import SerializedDagModel # noqa: F401
Review comment:
It is somewhat annoying indeed but I think the benefits (for those using
pylint) by far outweight the duplicate comment annoyance.
The problem is that editorconfig won't solve it. It's the matter of using or
not the internal pycharm/intellij inspections rather than synchronising with
pylint. It is already fairly well synchronised. The problem is that Pycharm
(so far) has no link between their own inspections and equivalent pylint
errors, so disabling pylint warning cannot disable Pycharm's inspections. SO
thread here:
https://stackoverflow.com/questions/41979763/suppress-warning-for-both-pycharm-and-pylint
I have both PyCharm inspections turned on and Pylint warning integrated with
PyCharm. And the inspections in PyCharm are se much more useful than just
pylint warnings. You get the all-mighty 'Option + 1' command with corrective
actions - that helps you to make most of the corrections automagically -
including all refactorings, renamings of bad names, making the code clearer
(reversing ifs, simplifying conditions, extracting duplicate code) - all that
risk-free that you make a typo or mistake. And having the green checkmark when
you finished your work is super-reassuring, it's almost like an addiction to me
now.
That makes me fearless when it comes to refactoring/renaming and I think
fearless development is a key to fast evolving project like Airflow is.
Now side comments and some vision (sorry for spamming I just wanted to share
with both of you) ...
I have a mid-term vision that we will have another IDE friendly solution
that will replace PyCharm/IntelliJ and will provide everyone an option to use
consistent, free, cloud-development ready environment. I just do not want to
open it just yet (I have far too many things on my plate to open another
front). But I have a dream that one day we integrate VSCode (which is
currently the most popular IDE in the world and taking development environments
by storm) and endorse it as "default" dev environment - including all the
configuration and cloud-development method.
Microsoft after taking over Github does some great work there I believe
(surprisingly).
VSCode already supports [remote
development](https://code.visualstudio.com/blogs/2019/05/02/remote-development)
and it's from grounds up created in the way that you can commit project
configuration to the repo and have a single click installation of the whole
environment. It will also still work locally of course in the same way, but I
think it should be cloud-first.
That's why I am so much into Breeze and dockerised environment that
eventually we will be able (in Breeze 3.0 or so) make it so that the whole
development environment will run in the cloud somewhere (created and managed
automatically) and your local machine will have either just VSCode or even use
one in the cloud via browser. Microsoft recently announced Visual Studio Online
(https://techcrunch.com/2019/11/04/you-can-now-try-microsofts-web-based-version-of-visual-studio/)
and I am sure other cloud providers will shortly do something similar. And
ideally any developer who would like to develop Airflow and have access to some
- either local or remote - computing resources will be able to launch
fully-fledged environment from their own branch directly in the Github Repo
without any local configuration whatsoever - ideally using browser as the IDE.
I think we are really close to the advancements in the open-source
frameworks available, ubiquitous cloud computing, containers and open source
IDEs maturing, that this will soon be easy and possible even for such complex
projects as Airflow.
The dream is I really want to not to carry my laptop with me office-work
and keep the same consistent environment everywhere :). I want to have a
Chromebook Pixel experience for development. I would really love to get any
Chromebook (I have Pixel 3), login with my account and in a few moments have my
environment up and running and me being productive in it.
It happens already in many corporate environments with developers, but I
think we are very close to have something like that applicable even in
open-source projects like ours where we do not have control over the
infrastructure of contributors, but we can give them tools and setup consisting
of free and open-source components that are standard enough and ubiquitous
enough that it's a one-click solution for them to start using it. Most of those
people will have some computing available (remote, cloud, on-premises, in their
laptop).
We are going in circle for me - when I started my career we were working on
mainframes and it was super convenient when you did not have to lose hours when
your local PC broke or was stolen. Back then you could not work from home this
way (network/dial-ups :)) and it was internal-corporate only - now we are
entering the era when it becomes possible for everyone.
End of vision (and sorry if that was too long, I had to :) ).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services