Closed zachliu closed 1 month ago
Can I pick this up? This would be my first issue
Assigned.
i want to help fix this because i need both the dag examples and the airflow sync-perm --include-dags -v
command
can someone point me to the right direction?
it looks like airflow cli such as sync-perm
evaluates the plugins differently?
or simply because this import
https://github.com/apache/airflow/blob/ab3429c3189ceb244eb3d78062159859dbe611ce/airflow/example_dags/example_workday_timetable.py#L21
is in the wrong place?
oh :hankey::hankey::hankey: the example dags are loaded everywhere else (webserver
, scheduler
, triggerer
) EXCEPT my worker
nodes :sweat_smile:
Apache Airflow version
2.10.0
If "Other Airflow 2 version" selected, which one?
2.10.1
What happened?
This PR does make sure the plugin is loaded when
load_examples = True
. And the example DAG itself runs ok. No "Broken Dag" import errors or anything. The UI -> Admin -> Plugins shows the 3 plugins from theexample_dags/plugins
However, both the
sync-perm
cli and theplugins
cli don't agree with it. When executingairflow sync-perm --include-dags -v
, it always errors out on this example dag:and when executing
airflow plugins -o table -v
, the 3 plugins fromexample_dags/plugins
are not in the output table.When I set
load_examples = False
, thesync-perm
andplugin
work fine without any errors.The only way that I can run both this example DAG and the cli commands is:
load_examples = False
airflow/example_dags/plugins/workday.py
to my ownairflow/plugins
(in myairflow.cfg
, i haveplugins_folder = /usr/local/airflow/plugins
)from workday import AfterWorkdayTimetable
What you think should happen instead?
Airflow CLI
sync-perm
should be able to process this example DAG.How to reproduce
load_examples = True
airflow sync-perm --include-dags -v
Operating System
Debian GNU/Linux 10 (buster)
Versions of Apache Airflow Providers
No response
Deployment
Other Docker-based deployment
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct