This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 2c3f9e5f05d Do not dynamically add dag_doc.md when parsing the test
(#59933)
2c3f9e5f05d is described below
commit 2c3f9e5f05d9ee3e82a7acd54b45a96dc8ef7928
Author: Jarek Potiuk <[email protected]>
AuthorDate: Wed Dec 31 02:16:29 2025 +0100
Do not dynamically add dag_doc.md when parsing the test (#59933)
* Do not dynamically add dag_doc.md when parsing the test
The file should not be dynamically generated, as it is expected,
it should be just added to the repo.
* Apply suggestion from @potiuk
---
.../openlineage/tests/system/openlineage/dag_doc.md | 19 +++++++++++++++++++
.../openlineage/example_openlineage_docs_file_dag.py | 9 +--------
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/providers/openlineage/tests/system/openlineage/dag_doc.md
b/providers/openlineage/tests/system/openlineage/dag_doc.md
new file mode 100644
index 00000000000..398fe3b6c27
--- /dev/null
+++ b/providers/openlineage/tests/system/openlineage/dag_doc.md
@@ -0,0 +1,19 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+# MD doc file
diff --git
a/providers/openlineage/tests/system/openlineage/example_openlineage_docs_file_dag.py
b/providers/openlineage/tests/system/openlineage/example_openlineage_docs_file_dag.py
index ea274c02b5e..067a4937563 100644
---
a/providers/openlineage/tests/system/openlineage/example_openlineage_docs_file_dag.py
+++
b/providers/openlineage/tests/system/openlineage/example_openlineage_docs_file_dag.py
@@ -23,7 +23,6 @@ It checks:
from __future__ import annotations
-import os
from datetime import datetime
from airflow import DAG
@@ -32,12 +31,6 @@ from airflow.providers.standard.operators.bash import
BashOperator
from system.openlineage.expected_events import get_expected_event_file_path
from system.openlineage.operator import OpenLineageTestOperator
-# Create file at DAG parsing to make sure it's in the right place
-_FILE_PATH = "dag_doc.md"
-if not os.path.exists(_FILE_PATH):
- with open(_FILE_PATH, "w") as f:
- f.write("# MD doc file")
-
DAG_ID = "openlineage_docs_file_dag"
with DAG(
@@ -45,7 +38,7 @@ with DAG(
start_date=datetime(2021, 1, 1),
schedule=None,
catchup=False,
- doc_md=_FILE_PATH,
+ doc_md="dag_doc.md",
default_args={"retries": 0},
) as dag:
do_nothing_task = BashOperator(task_id="do_nothing_task",
bash_command="sleep 1;")