You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/10/28 01:41:32 UTC

[GitHub] [airflow] wolfier opened a new issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

wolfier opened a new issue #11901:
URL: https://github.com/apache/airflow/issues/11901


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   These questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**: 1.10.12
   
   **What happened**:
   
   When I rename the dag_id, the new dag_id shows up in the UI but the old dag_id does not disappear and remains in the UI. 
   
   <!-- (please include exact error messages if you can) -->
   
   **What you expected to happen**:
   
   <!-- What do you think went wrong? -->
   
   When Airflow [lists out the python files](https://github.com/apache/airflow/blob/1.10.12/airflow/utils/file.py#L105-L161) and tries to [deactivate the deleted dags during dag processing](https://github.com/apache/airflow/blob/1.10.12/airflow/utils/dag_processing.py#L951-L955), the old DAG's file location is still in the list of the alive DAG location because the new DAG is now defined in the old DAG's python file. Even when you manually set is_active to False in the metastore, the dag processing process will set it back to True.
   
   This happens whether or not DAG serialization is enabled.
   
   **How to reproduce it**:
   <!---
   
   As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags.
   
   If you are using kubernetes, please attempt to recreate the issue using minikube or kind.
   
   ## Install minikube/kind
   
   - Minikube https://minikube.sigs.k8s.io/docs/start/
   - Kind https://kind.sigs.k8s.io/docs/user/quick-start/
   
   If this is a UI bug, please provide a screenshot of the bug or a link to a youtube video of the bug in action
   
   You can include images using the .md style of
   ![alt text](http://url/to/img.png)
   
   To record a screencast, mac users can use QuickTime and then create an unlisted youtube video with the resulting .mov file.
   
   --->
   
   I was able to reproduce it by following these steps:
   1. Add a python file in the dags folder and initialize the DAG
   2. Verify the dag shows up in the UI
   3. Change the dag_id in the same file to something else
   4. Verify the new dag shows up in the UI
   5. Both the old DAG and the new DAG are visible on the UI as well as the metadata db.
   
   ```
   āžœ  dags pwd
   /Users/alan/projects/astro/dags
   āžœ  dags ls
   wow.py
   ```
   ```python
   from datetime import datetime
   
   from airflow.models import DAG
   
   
   dag = DAG(
       dag_id='yay',
       schedule_interval='@once',
       start_date=datetime(2020, 1, 1),
       catchup=False
   )
   ```
   
   In the screenshot, both DAGs are marked as active but there only one DAG defined in `wow.py`.
   <img width="1502" alt="Screen Shot 2020-10-27 at 6 31 40 PM" src="https://user-images.githubusercontent.com/5952735/97380092-8cfb6480-1883-11eb-8315-1b386ffb00d8.png">
   
   
   **Anything else we need to know**:
   
   <!--
   
   How often does this problem occur? Once? Every time etc?
   
   Any relevant logs to include? Put them here in side a detail tag:
   <details><summary>x.log</summary> lots of stuff </details>
   
   -->
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] SamWheating commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
SamWheating commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-882946410


   But even then, as @leonsmith identified, a renamed DAG will be marked as active again on the next pass:
   https://github.com/apache/airflow/blob/3234527284ce01db67ba22c544f71ddaf28fa27e/airflow/models/dag.py#L2476-L2497
   
   Is the assumption that 1 file corresponds to 1 DAG still valid? That would contradict patterns such as the [DAG factory](https://github.com/ajbosco/dag-factory) which load many DAGs from a single `.py` file. 
   
   Anyways, maybe we should be leaving DAGs as deactivated if they haven't been parsed in a given interval? I'm happy to submit a fix for this and I'll have some time in the next few days, however I'd like some guidance from the maintainers on what is the intended behaviour / what are the supported patterns before I start šŸ˜„ 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] HaloKo4 edited a comment on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
HaloKo4 edited a comment on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-788164691


   if the expected behavior is to remove/rename the old dag_id how are we expected to read its past logs?
   This will require to also modify past log files in the disk otherwise they will be unaccessable.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] SamWheating commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
SamWheating commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-882942563






-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] leonsmith edited a comment on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
leonsmith edited a comment on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-788162128


   Started to debug this a little.
   
   Iā€™m thinking the problem is the wrong assumption that you can set `is_active=True` on any dags with the same file path.
   So the fix should be patching out the else statement here:
   https://github.com/apache/airflow/blob/1.10.12/airflow/models/dag.py#L1917
   
   I think `is_active` is set to `True` when the we call the `DagBag.sync_to_db` method when parsing the dags.
   
   Going to run a bit of a test & will update to see if that resolves the issue 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] leonsmith edited a comment on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
leonsmith edited a comment on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-788162128


   Started to debug this a little.
   
   Iā€™m thinking the problem is the wrong assumption that you can set `is_active=True` on any dags with the same file path.
   So the fix should be patching out the else statement here:
   https://github.com/apache/airflow/blob/1.10.12/airflow/models/dag.py#L1917
   
   I think `is_active` is set to `True` when the we call the `DagBag.sync_to_db` method in the when parsing the dags.
   
   Going to run a bit of a test & will update to see if that resolves the issue 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] ashb commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
ashb commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-776661129


   > Hey @kaxil @ashb - are we going to fix it ? Or maybe it already is fixed with the serialization ?
   
   No, still remains to be fixed.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] wolfier commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
wolfier commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-835097746


   I'm down to investigate what @leonsmith has pointed but for the master branch.


-- 
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:
users@infra.apache.org



[GitHub] [airflow] HaloKo4 commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
HaloKo4 commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-788164691


   if the expected behavior is to remove/rename the old dag_id how are we expected to read its past logs?
   This will require to also modify files in the disk otherwise they will be unaccessable.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] jhtimmins commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
jhtimmins commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-833240817


   Hi @wolfier are you interested in submitting a fix for this?


-- 
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:
users@infra.apache.org



[GitHub] [airflow] leonsmith edited a comment on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
leonsmith edited a comment on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-788162128


   Started to debug this a little.
   
   Iā€™m thinking the problem is the wrong assumption that you can set `is_active=True` on any dags with the same file path.
   So the fix should be patching out the else statement here:
   https://github.com/apache/airflow/blob/1.10.12/airflow/models/dag.py#L1917
   
   I think `is_active` is set to `True` in the `DagBag.sync_to_db` func when parsing the dags.
   
   Going to run a bit of a test & will update to see if that resolves the issue 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] leonsmith edited a comment on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
leonsmith edited a comment on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-789007145


   So this also effects dynamic dags.
   
   
   ```python
   from datetime import datetime
   
   from airflow.models import DAG
   
   numbers = {1, 2, 3}
   
   for number in numbers:
       globals()[f'dag_{number}'] = DAG(
           dag_id=f'dag_{number}',
           schedule_interval='@once',
           start_date=datetime(2020, 1, 1),
           catchup=False
       )
   ```
   
   and then you switched numbers to a different set say "{1, 2}"
   `dag_3` will always appear as active still.
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] leonsmith edited a comment on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
leonsmith edited a comment on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-789007145






----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] PeterLambe commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
PeterLambe commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-834631260


   This bug is affecting our instance as well. Is there a workaround? Is it safe to press "Delete DAG" on the old DAG from the ui? 


-- 
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:
users@infra.apache.org



[GitHub] [airflow] SamWheating edited a comment on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
SamWheating edited a comment on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-882946410


   But even then, as @leonsmith identified, a renamed DAG will be marked as active again on the next pass:
   https://github.com/apache/airflow/blob/3234527284ce01db67ba22c544f71ddaf28fa27e/airflow/models/dag.py#L2476-L2497
   
   Is the assumption that 1 file corresponds to 1 DAG still valid? That would contradict patterns such as the [DAG factory](https://github.com/ajbosco/dag-factory) which load many DAGs from a single `.py` file. 
   
   Anyways, maybe we should be leaving DAGs as deactivated if they haven't been parsed in a given interval? I'm happy to submit a fix for this and I'll have some time in the next few days, however I'd like some guidance from the maintainers on what is the intended behaviour / what are the supported patterns before I start šŸ˜„ 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] SamWheating edited a comment on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
SamWheating edited a comment on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-882946410






-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] SamWheating commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
SamWheating commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-882942563


   šŸ‘‹ Hey there, I was looking into this issue a bit today and it looks like the code which deactivates stale DAGs will never be reached if the value of `scheduler.num_runs` isn't set. 
   
   From the source code:
   https://github.com/apache/airflow/blob/3234527284ce01db67ba22c544f71ddaf28fa27e/airflow/jobs/scheduler_job.py#L652-L664
   
   So that call to `run_scheduler_job` will only every break the loop _if_ the value of `scheduler.num_runs` is set (the default is -1, for an infinite loop):
   
   https://github.com/apache/airflow/blob/2fea4cdceaa12b3ac13f24eeb383af624aacb2e7/airflow/jobs/scheduler_job.py#L756-L762
   
   Is this intended behaviour, or something that should be fixed / better documented?
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] PeterLambe commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
PeterLambe commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-836848483


   Confirming that pressing "Delete DAG" on the old DAG will remove it from the metadata tables properly 


-- 
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:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-731425615


   This needs fixing in Master and is not that critical, so will fix it in 2.0.0


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] kaxil closed issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
kaxil closed issue #11901:
URL: https://github.com/apache/airflow/issues/11901


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-788168138


   For now, you will have to just use a different file for the new (or renamed) DAG.
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] mattforbes-gr commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
mattforbes-gr commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-776325090


   I believe this is still an issue with serialized dags. We are dynamically generating dags and had to resort to randomizing our dag py file name to force stale serialized dags to be deleted.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] SamWheating edited a comment on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
SamWheating edited a comment on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-882946410






-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] SamWheating commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
SamWheating commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-882942563






-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] leonsmith commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
leonsmith commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-789007145


   So this also effects dynamic dags.
   
   
   ```python
   from datetime import datetime
   
   from airflow.models import DAG
   
   numbers = {1, 2, 3}
   
   for number in numbers:
       dag = DAG(
           dag_id=f'dag_{number}',
           schedule_interval='@once',
           start_date=datetime(2020, 1, 1),
           catchup=False
       )
   ```
   
   and then you switched numbers to a different set say "{1, 2}"
   `dag_3` will always appear as active still.
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] SamWheating edited a comment on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
SamWheating edited a comment on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-882946410


   But even then, as @leonsmith identified, a renamed DAG will be marked as active again on the next pass:
   https://github.com/apache/airflow/blob/3234527284ce01db67ba22c544f71ddaf28fa27e/airflow/models/dag.py#L2476-L2497
   
   Is the assumption that 1 file corresponds to 1 DAG still valid? That would contradict patterns such as the [DAG factory](https://github.com/ajbosco/dag-factory) which load many DAGs from a single `.py` file. 
   
   Anyways, maybe we should be leaving DAGs as deactivated if they haven't been parsed in a given interval?
   
   I'm happy to submit a fix for this (and I'll have some free time in the next few days) however I'd like some guidance from the maintainers on what exactly is the intended behaviour / supported patterns before I start šŸ˜„ 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] SamWheating edited a comment on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
SamWheating edited a comment on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-882942563


   šŸ‘‹ Hey there, I was looking into this issue a bit today and it looks like the code which deactivates stale DAGs (DAGs which have not been recently parsed) will never be reached if the value of `scheduler.num_runs` isn't set. 
   
   From the source code:
   https://github.com/apache/airflow/blob/3234527284ce01db67ba22c544f71ddaf28fa27e/airflow/jobs/scheduler_job.py#L652-L664
   
   So that call to `run_scheduler_job` will only every break the loop _if_ the value of `scheduler.num_runs` is set (the default is -1, for an infinite loop):
   
   https://github.com/apache/airflow/blob/2fea4cdceaa12b3ac13f24eeb383af624aacb2e7/airflow/jobs/scheduler_job.py#L756-L762
   
   Is this intended behaviour, or something that should be fixed / better documented?
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] leonsmith commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
leonsmith commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-788162128


   Started to debug this a little.
   
   Iā€™m thinking the problem is the wrong assumption that you can set is_active=True on any dags with the same file path.
   So the fix should be patching out the else statement here:
   https://github.com/apache/airflow/blob/1.10.12/airflow/models/dag.py#L1917
   
   I think `is_active` is set to `True` when the we call the DagBag `sync_to_db` method in the when parsing the dags.
   
   Going to run a bit of a test & will update to see if that resolves the issue 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] leonsmith edited a comment on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
leonsmith edited a comment on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-788162128


   Started to debug this a little.
   
   Iā€™m thinking the problem is the wrong assumption that you can set `is_active=True` on any dags with the same file path.
   So the fix should be patching out the else statement here:
   https://github.com/apache/airflow/blob/1.10.12/airflow/models/dag.py#L1917
   
   I think `is_active` is set to `True` when the we call the DagBag `sync_to_db` method in the when parsing the dags.
   
   Going to run a bit of a test & will update to see if that resolves the issue 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #11901: DAGs remain in the UI after renaming the dag_id in the same python file

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-739816591


   Hey @kaxil @ashb - are we going to fix it ? Or maybe it already is fixed with the serialization ?


----------------------------------------------------------------
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:
users@infra.apache.org