pierrejeambrun commented on code in PR #44277: URL: https://github.com/apache/airflow/pull/44277#discussion_r1856872243
########## airflow/api_fastapi/core_api/routes/public/extra_links.py: ########## @@ -0,0 +1,85 @@ +# 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. + +from __future__ import annotations + +from typing import TYPE_CHECKING, Annotated + +from fastapi import Depends, HTTPException, Request, status +from sqlalchemy.orm import Session +from sqlalchemy.sql import select + +from airflow.api_fastapi.common.db.common import get_session +from airflow.api_fastapi.common.router import AirflowRouter +from airflow.api_fastapi.core_api.datamodels.extra_links import ExtraLinksResponse +from airflow.api_fastapi.core_api.openapi.exceptions import create_openapi_http_exception_doc +from airflow.exceptions import TaskNotFound + +if TYPE_CHECKING: + from sqlalchemy.orm.session import Session + + from airflow.models import DAG + + +extra_links_router = AirflowRouter( + tags=["Extra Links"], prefix="/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/links" +) + + +@extra_links_router.get( + "", + responses=create_openapi_http_exception_doc([status.HTTP_404_NOT_FOUND]), + tags=["TaskInstances"], Review Comment: This should be `Task Instance` ![Screenshot 2024-11-25 at 17 00 32](https://github.com/user-attachments/assets/8160cf69-e659-4a78-9dc8-51766c674f56) ![Screenshot 2024-11-25 at 17 00 40](https://github.com/user-attachments/assets/4e0a7e4e-643a-4aee-ab38-7ec942c4678d) -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org