amoghrajesh commented on code in PR #61729:
URL: https://github.com/apache/airflow/pull/61729#discussion_r2811157364
##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -15,7 +15,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-"""The entrypoint for the actual task execution process."""
Review Comment:
Why this change?
##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -1489,25 +1488,51 @@ def _send_error_email_notification(
if subject_template_file and Path(subject_template_file).exists():
subject = Path(subject_template_file).read_text()
else:
- # Fallback to default
- subject = "Airflow alert: {{ti}}"
+ # Try to load from built-in template files
+ default_subject_template = (
+ Path(__file__).parent.parent.parent.parent
+ / "airflow-core"
+ / "src"
+ / "airflow"
+ / "templates"
+ / "email"
+ / "task_failure_subject.txt"
+ )
Review Comment:
We shouldn't do this now that we are heading towards reducing dependencies
between airflow-core and task-sdk. Reading from airflow-core at the moment is a
no-go.
Not just that, when the libraries are installed with pypi, this might not be
the path
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]