You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jroachgolf84 (via GitHub)" <gi...@apache.org> on 2025/12/08 02:24:54 UTC

[I] `.airflowignore`'d DAGs will visible in UI via `Assets`/`AssetEvents` [airflow]

jroachgolf84 opened a new issue, #59180:
URL: https://github.com/apache/airflow/issues/59180

   ### Apache Airflow version
   
   main (development)
   
   ### If "Other Airflow 2/3 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   When DAGs that previously outlet/scheduled by Assets are added to `.airflowignore`, these DAGs can still be navigated to (via a DAG run).
   
   ## Further Explanation
   
   * `dag_a` outlets to `asset_1`
   * `dag_b` has `schedule=[Asset("asset_1")]`
   * `dag_a` is executed which triggers `dag_b` via `asset_1` 
   * Then, both of these DAGs are added to the `.airflowignore` file
   
   **However, going back into the Airflow UI to `.../assets` allows for navigation to a DAG run for both of the ignored DAGs.**
   
   ### What you think should happen instead?
   
   If a DAG is included in the `.gitignore` file and is NOT visible in the UI, it should also remaining NOT visible (for any DAG runs) when going to triggering/scheduled DAG events.
   
   ### How to reproduce
   
   1. Author a `dag_a` and `dag_b` as shown below. 
   2. Leave `.airflowignore` empty.
   3. Turn on `dag_b`.
   4. Turn on `dag_a`.
   5. Validate that an `AssetEvent` for `asset_1` is generated.
   6. Update `.airflowignore` to include `dag_a` and `dag_b`.
   7. Restart local instance of Airflow.
   8. Validate that no DAGs are present in `localhost:28080/dags`.
   9. Navigate to the "Assets" view.
   10. Click on `asset_1`. You should then see a single `AssetEvent` with "Source"" = `dag_a` and "Triggered Dag Run" = `dag_b`.
   11. Click on the "Source" (`dag_a`). You should see a DAG run for the ignored `dag_a`.
   12. Go back, and click on the "Triggered DAG Run" (`dag_b`). You should see a DAG run for the ignored DAG.
   
   
   ### `dag_a`
   
   ```python
   from airflow.sdk import Asset, DAG, task
   
   
   with DAG(
       dag_id="dag_a",
       schedule="@once"
   ) as dag:
   
       @task(outlets=[Asset("asset_1")])
       def task_1():
           print("Running dag_a::task_1")
   
       task_1()
   
   ```
   
   
   ### `dag_b`
   
   ```python
   from airflow.sdk import Asset, DAG, task
   
   
   with DAG(
       dag_id="dag_b",
       schedule=[Asset("asset_1")]
   ) as dag:
   
       def task_1():
           print("Running dag_b::task_1")
   
       task_1()
   
   ```
   
   
   ### Operating System
   
   MacOS
   
   ### Versions of Apache Airflow Providers
   
   NA
   
   ### Deployment
   
   Other
   
   ### Deployment details
   
   Running on the main branch, locally.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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

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


Re: [I] `.airflowignore`'d DAGs visible in UI via `Assets`/`AssetEvents` [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #59180:
URL: https://github.com/apache/airflow/issues/59180#issuecomment-3628573526

   Likely wrong API queries @pierrejeambrun @ephraimbuddy  @uranusjr 


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


Re: [I] `.airflowignore`'d DAGs visible in UI via `Assets`/`AssetEvents` [airflow]

Posted by "Lohith625 (via GitHub)" <gi...@apache.org>.
Lohith625 commented on issue #59180:
URL: https://github.com/apache/airflow/issues/59180#issuecomment-3708973689

   Hi, 
   I’d like to try reproducing this locally and investigate where stale/ignored DAGs are still leaking through asset-related queries.
   Based on the discussion above, it sounds like the expected behavior is to consistently hide all entities (runs, asset events, etc.) related to stale DAGs.
   I’ll share findings or a proposal once I better understand where the filtering should happen.


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


Re: [I] `.airflowignore`'d DAGs visible in UI via `Assets`/`AssetEvents` [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun closed issue #59180: `.airflowignore`'d DAGs visible in UI via `Assets`/`AssetEvents`
URL: https://github.com/apache/airflow/issues/59180


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


Re: [I] `.airflowignore`'d DAGs will visible in UI via `Assets`/`AssetEvents` [airflow]

Posted by "jroachgolf84 (via GitHub)" <gi...@apache.org>.
jroachgolf84 commented on issue #59180:
URL: https://github.com/apache/airflow/issues/59180#issuecomment-3627352863

   cc: @potiuk, @jscheffl 


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


Re: [I] `.airflowignore`'d DAGs visible in UI via `Assets`/`AssetEvents` [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #59180:
URL: https://github.com/apache/airflow/issues/59180#issuecomment-3633660346

   > All related entities to a stale DAG should be removed from the UI?
   > 
   > Runs related to a Stale DAG shouldn't be ever displayed. Should we expand that to asset events etc and all other entities ?
   > 
   > Because that would be weird to block the redirect for 'runs' of staled DAG, but still show asset events produced by staled DAG. (same for xcoms and such).
   
   Yeah sounds reasonable. I definitely think it should be consistent, and hiding the stale dags and assets seems like best idea.


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


Re: [I] `.airflowignore`'d DAGs visible in UI via `Assets`/`AssetEvents` [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on issue #59180:
URL: https://github.com/apache/airflow/issues/59180#issuecomment-4144323170

   > All related entities to a stale DAG should be removed from the UI?
   
   I don't know if they should. A deleted dag still appears in the UI until user specifically click on delete and it removes the dag records from the database. Are we saying that this is not the desired behavior?


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


Re: [I] `.airflowignore`'d DAGs visible in UI via `Assets`/`AssetEvents` [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on issue #59180:
URL: https://github.com/apache/airflow/issues/59180#issuecomment-3633134669

   All related entities to a stale DAG should be removed from the UI?
   
   Runs related to a Stale DAG shouldn't be ever displayed. Should we expand that to asset events etc and all other entities ?
   
   Because that would be weird to block the redirect for 'runs' of staled DAG, but still show asset events produced by staled DAG. (same for xcoms and such).


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


Re: [I] `.airflowignore`'d DAGs visible in UI via `Assets`/`AssetEvents` [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on issue #59180:
URL: https://github.com/apache/airflow/issues/59180#issuecomment-5267655856

   Closing, now navigating to a dag/run/ti details page display a clear 'deactivated' banner to avoid confusions. Entities are still 'viewable' until these artifacts are cleared from the db.
   
   <img width="1922" height="933" alt="Image" src="https://github.com/user-attachments/assets/2815d1b2-8159-4466-bf90-39282ff8dae5" />


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