mik-laj commented on a change in pull request #10677:
URL: https://github.com/apache/airflow/pull/10677#discussion_r482205398



##########
File path: airflow/cli/commands/dag_command.py
##########
@@ -378,6 +379,47 @@ def dag_list_dag_runs(args, dag=None):
     print(table)
 
 
+@provide_session
+@cli_utils.action_logging
+def generate_pod_yaml(args, session=None):
+    """Generates yaml files for each task in the DAG. Used for testing output 
of KubernetesExecutor"""
+
+    from airflow.executors.kubernetes_executor import 
AirflowKubernetesScheduler, KubeConfig
+    from airflow.kubernetes import pod_generator
+    from airflow.kubernetes.pod_generator import PodGenerator
+    from airflow.kubernetes.worker_configuration import WorkerConfiguration
+    execution_date = datetime.datetime(2020,11,3)
+    dag = get_dag(subdir=args.subdir, dag_id=args.dag_id)
+    yaml_output_path = args.output_path or "/tmp/airflow_generated_yaml/"

Review comment:
       Why one task in a separate file? Wouldn't it be more convenient if there 
was one file for each DAG? This will prevent you from having to write the data 
to a file, but you can display it on the screen.  Ideally, the YAML displayed 
on the screen should also have colors. Take a look: `airflow config list`.




----------------------------------------------------------------
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:
[email protected]


Reply via email to