astronomer / astro-cli

CLI that makes it easy to create, test and deploy Airflow DAGs to Astronomer
https://www.astronomer.io
Other
341 stars 70 forks source link

Allow users to add dag_integrity_exceptions.txt to ignore errors #1613

Closed collinmcnulty closed 2 months ago

collinmcnulty commented 3 months ago

Description

Sometime a DAG doesn't parse in a CI pipeline for a reason that is ok. This provides a way to make that exception just for one dag file instead of having to use -f. What I'm not sure of right now is how to put this code such that astro dev parse is what's affected, as we were using an existing astro project.

๐Ÿงช Functional Testing

I wrote a dag that doesn't parse, made sure it failed astro dev parse. Then added it to tests/dag_integrity_exceptions.txt and it didn't fail to astro dev parse anymore.

๐Ÿ“‹ Checklist

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.55%. Comparing base (976d2d4) to head (e728c5f). Report is 33 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1613 +/- ## ======================================= Coverage 86.55% 86.55% ======================================= Files 114 114 Lines 15935 15936 +1 ======================================= + Hits 13792 13793 +1 Misses 1288 1288 Partials 855 855 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

collinmcnulty commented 2 months ago

@sunkickr I don't know how to make this pass the codecov test

sunkickr commented 2 months ago

@collinmcnulty we should also make astro dev init create the file .astro/dag_integrity_exceptions.txt for users. If it was just an empty text file would that be okay?