Skip to content

Commit 5007806

Browse files
authored
Add possibility to run DAGs from system tests and see DAGs logs (#17868)
1 parent 9befaee commit 5007806

99 files changed

Lines changed: 264 additions & 89 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

airflow/providers/google/cloud/example_dags/example_automl_tables.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def get_target_column_spec(columns_specs: List[Dict], column_name: str) -> str:
8484
# Example DAG to create dataset, train model_id and deploy it.
8585
with models.DAG(
8686
"example_create_and_deploy",
87-
schedule_interval=None, # Override to match your needs
87+
schedule_interval='@once', # Override to match your needs
8888
start_date=days_ago(1),
8989
user_defined_macros={
9090
"get_target_column_spec": get_target_column_spec,
@@ -196,7 +196,7 @@ def get_target_column_spec(columns_specs: List[Dict], column_name: str) -> str:
196196
# Example DAG for AutoML datasets operations
197197
with models.DAG(
198198
"example_automl_dataset",
199-
schedule_interval=None, # Override to match your needs
199+
schedule_interval='@once', # Override to match your needs
200200
start_date=days_ago(1),
201201
user_defined_macros={"extract_object_id": extract_object_id},
202202
) as example_dag:
@@ -264,7 +264,7 @@ def get_target_column_spec(columns_specs: List[Dict], column_name: str) -> str:
264264

265265
with models.DAG(
266266
"example_gcp_get_deploy",
267-
schedule_interval=None, # Override to match your needs
267+
schedule_interval='@once', # Override to match your needs
268268
start_date=days_ago(1),
269269
tags=["example"],
270270
) as get_deploy_dag:
@@ -289,7 +289,7 @@ def get_target_column_spec(columns_specs: List[Dict], column_name: str) -> str:
289289

290290
with models.DAG(
291291
"example_gcp_predict",
292-
schedule_interval=None, # Override to match your needs
292+
schedule_interval='@once', # Override to match your needs
293293
start_date=days_ago(1),
294294
tags=["example"],
295295
) as predict_dag:

airflow/providers/google/cloud/example_dags/example_azure_fileshare_to_gcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
'retries': 1,
3737
'retry_delay': timedelta(minutes=5),
3838
},
39-
schedule_interval=None,
39+
schedule_interval='@once',
4040
start_date=datetime(2018, 11, 1),
4141
tags=['example'],
4242
) as dag:

airflow/providers/google/cloud/example_dags/example_bigquery_dts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
with models.DAG(
6666
"example_gcp_bigquery_dts",
67-
schedule_interval=None, # Override to match your needs
67+
schedule_interval='@once', # Override to match your needs
6868
start_date=days_ago(1),
6969
tags=['example'],
7070
) as dag:

airflow/providers/google/cloud/example_dags/example_bigquery_operations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
with models.DAG(
5959
"example_bigquery_operations",
60-
schedule_interval=None, # Override to match your needs
60+
schedule_interval='@once', # Override to match your needs
6161
start_date=days_ago(1),
6262
tags=["example"],
6363
) as dag:
@@ -238,10 +238,10 @@
238238

239239
with models.DAG(
240240
"example_bigquery_operations_location",
241-
schedule_interval=None, # Override to match your needs
241+
schedule_interval='@once', # Override to match your needs
242242
start_date=days_ago(1),
243243
tags=["example"],
244-
):
244+
) as dag_with_location:
245245
create_dataset_with_location = BigQueryCreateEmptyDatasetOperator(
246246
task_id="create_dataset_with_location",
247247
dataset_id=LOCATION_DATASET_NAME,

airflow/providers/google/cloud/example_dags/example_bigquery_queries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
with models.DAG(
6767
dag_id,
68-
schedule_interval=None, # Override to match your needs
68+
schedule_interval='@once', # Override to match your needs
6969
start_date=days_ago(1),
7070
tags=["example"],
7171
user_defined_macros={"DATASET": DATASET_NAME, "TABLE": TABLE_1},

airflow/providers/google/cloud/example_dags/example_bigquery_sensors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
with models.DAG(
5656
dag_id,
57-
schedule_interval=None, # Override to match your needs
57+
schedule_interval='@once', # Override to match your needs
5858
start_date=days_ago(1),
5959
tags=["example"],
6060
user_defined_macros={"DATASET": DATASET_NAME, "TABLE": TABLE_NAME},

airflow/providers/google/cloud/example_dags/example_bigquery_to_bigquery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
with models.DAG(
3939
"example_bigquery_to_bigquery",
40-
schedule_interval=None, # Override to match your needs
40+
schedule_interval='@once', # Override to match your needs
4141
start_date=days_ago(1),
4242
tags=["example"],
4343
) as dag:

airflow/providers/google/cloud/example_dags/example_bigtable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080

8181
with models.DAG(
8282
'example_gcp_bigtable_operators',
83-
schedule_interval=None, # Override to match your needs
83+
schedule_interval='@once', # Override to match your needs
8484
start_date=days_ago(1),
8585
tags=['example'],
8686
) as dag:

airflow/providers/google/cloud/example_dags/example_cloud_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
with models.DAG(
7878
"example_gcp_cloud_build",
7979
default_args=dict(start_date=dates.days_ago(1)),
80-
schedule_interval=None,
80+
schedule_interval='@once',
8181
tags=['example'],
8282
) as dag:
8383
# [START howto_operator_create_build_from_storage]

airflow/providers/google/cloud/example_dags/example_cloud_memorystore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979

8080
with models.DAG(
8181
"gcp_cloud_memorystore_redis",
82-
schedule_interval=None, # Override to match your needs
82+
schedule_interval='@once', # Override to match your needs
8383
start_date=dates.days_ago(1),
8484
tags=['example'],
8585
) as dag:
@@ -255,7 +255,7 @@
255255

256256
with models.DAG(
257257
"gcp_cloud_memorystore_memcached",
258-
schedule_interval=None, # Override to match your needs
258+
schedule_interval='@once', # Override to match your needs
259259
start_date=dates.days_ago(1),
260260
tags=['example'],
261261
) as dag_memcache:

0 commit comments

Comments
 (0)