I'm sorry to say it, but this proposal right just doesn't contain
enough detail to say what the actual changes to the code would be, and
what the impact would be
To take the one example you have so far:
def get_dag_run(self, dag_id, execution_date):
return self.db_client.get_dag_run(dag_id,execution_date)
So form this snippet I'm guessing it would be used like this:
dag_run = db_client.get_dag_run(dag_id, execution_date)
What type of object is returned?
Do we need one API method per individual query we have in the source?
Which components would use this new mode when it's enabled?
But what you haven't said the first thing about is what _other_ changes
would be needed in the code. To take a fairly simple example:
dag_run = db_client.get_dag_run(dag_id, execution_date)
dag_run.queued_at = timezone.now()
# How do I save this?
In short, you need to put a lot more detail into this before we can
even have an idea of the full scope of the change this proposal would
involve, and what code changes would be needed for compnents to work
with and without this setting enabled.
Ash
On Thu, Dec 2 2021 at 14:23:56 +0100, Mateusz Henc
<mh...@google.com.INVALID> wrote:
Hi,
I just added a new AIP for running some Airflow components in
DB-isolation mode, without direct access to the Airflow Database, but
they will use a new API for thi purpose.
PTAL:
<https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-44+Airflow+Database+API>
*Open question:*
I called it "Airflow Database API" - however I feel it could be more
than just an access layer for the database. So if you have a better
name, please let me know, I am happy to change it.
Best regards,
Mateusz Henc