dstandish opened a new pull request #21806:
URL: https://github.com/apache/airflow/pull/21806


   I think we can call this attribute `dag_run_id` without suffering too much 
ambiguity, principally because _dag_ does  not, strictly speaking, have a 
`run_id`; it's the dag _run_ that has a `run_id`.
   
   For a long time, the codebase has used `dag_run_id` or "dagrun id" to refer 
to the dagrun.run_id column.
   
   As of recently, we now have `dagrun_id` alongside `dag_run_id` -- the former 
is supposed to refer to `DagRun.id` and the latter to `DagRun.run_id`.  But 
personally I think that retains too much ambiguity.  When reading it, you're 
not sure if it maybe is just a typo, or what exactly it is / how it is 
different from dag_run_id.  And it doesn't obey standard camel-to-snake 
conversion.
   
   I think we can do a better job of reducing ambiguity by using, wherever 
possible, `run_id` to mean `DagRun.run_id` and `dag_run_id` to mean the integer 
PK. (i don't think we have to resort to the painfully verbose `dag run run id`).
   
   So, this PR hopes to rename `dagrun_id` to `dag_run_id`, and tries to 
replace any old references to "dag run id" to simply "run id".
   
   The one wrinkle is the API.  There are references to "dag_run_id".  What 
I've done here is leave that alone.  We could think  of the DagRun.id as 
internal, and not user-facing from the rest API perspective.  We could consider 
deprecating / renaming this param, but I'm considering that out of scope since 
it's already been out there and is unaffected by the recent changes (which this 
PR hopes to address before they go out in 2.3.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to