You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "kaxil (via GitHub)" <gi...@apache.org> on 2024/11/11 19:32:22 UTC
[PR] AIP-72: Add "XCom" endpoint for Execution API [airflow]
kaxil opened a new pull request, #43894:
URL: https://github.com/apache/airflow/pull/43894
closes https://github.com/apache/airflow/issues/43839
<!--
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.
-->
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
<!-- Please keep an empty line above the dashes. -->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] AIP-72: Add "XCom" GET endpoint for Execution API [airflow]
Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on code in PR #43894:
URL: https://github.com/apache/airflow/pull/43894#discussion_r1837748535
##########
airflow/api_fastapi/execution_api/routes/xcoms.py:
##########
@@ -0,0 +1,116 @@
+# 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
+
+import json
+import logging
+from typing import Annotated
+
+from fastapi import Depends, HTTPException, Query, status
+from sqlalchemy.orm import Session
+
+from airflow.api_fastapi.common.db.common import get_session
+from airflow.api_fastapi.common.router import AirflowRouter
+from airflow.api_fastapi.execution_api import datamodels, deps
+from airflow.models.xcom import BaseXCom
+
+# TODO: Add dependency on JWT token
+router = AirflowRouter(
+ responses={status.HTTP_404_NOT_FOUND: {"description": "XCom not found"}},
+)
+
+log = logging.getLogger(__name__)
+
+
+@router.get(
+ "/{dag_id}/{run_id}/{task_id}/{key}",
+ responses={
+ status.HTTP_401_UNAUTHORIZED: {"description": "Unauthorized"},
+ status.HTTP_403_FORBIDDEN: {"description": "Task does not have access to the XCom"},
+ },
+)
+def get_xcom(
+ dag_id: str,
+ run_id: str,
+ task_id: str,
+ key: str,
+ token: deps.TokenDep,
+ session: Annotated[Session, Depends(get_session)],
+ map_index: Annotated[int, Query()] = -1,
+) -> datamodels.XComResponse:
+ """Get an Airflow XCom from database - not other XCom Backends."""
+ if not has_xcom_access(key, token):
+ raise HTTPException(
+ status_code=status.HTTP_403_FORBIDDEN,
+ detail={
+ "reason": "access_denied",
+ "message": f"Task does not have access to XCom key '{key}'",
+ },
+ )
+
+ # We use `BaseXCom.get_many` to fetch XComs directly from the database, bypassing the XCom Backend.
+ # This avoids deserialization via the backend (e.g., from a remote storage like S3) and instead
+ # retrieves the raw serialized value from the database. By not relying on `XCom.get_many` or `XCom.get_one`
+ # (which automatically deserializes using the backend), we avoid potential
+ # performance hits from retrieving large data files into the API server.
+ query = BaseXCom.get_many(
+ run_id=run_id,
+ key=key,
+ task_ids=task_id,
+ dag_ids=dag_id,
+ map_indexes=map_index,
+ limit=1,
+ session=session,
+ )
+
+ result = query.with_entities(BaseXCom.value).first()
+
+ if result is None:
+ raise HTTPException(
+ status_code=status.HTTP_404_NOT_FOUND,
+ detail={
+ "reason": "not_found",
+ "message": f"XCom with key '{key}' not found for task '{task_id}' in DAG '{dag_id}'",
+ },
+ )
+
+ try:
+ xcom_value = BaseXCom.deserialize_value(result)
+ except json.JSONDecodeError:
+ raise HTTPException(
+ status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
Review Comment:
4xx is wrong error code here, this error isn't result of a client error. I guess 500 is the only suitable thing here.
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] AIP-72: Add "XCom" GET endpoint for Execution API [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on code in PR #43894:
URL: https://github.com/apache/airflow/pull/43894#discussion_r1837981889
##########
airflow/api_fastapi/execution_api/routes/__init__.py:
##########
@@ -17,10 +17,11 @@
from __future__ import annotations
from airflow.api_fastapi.common.router import AirflowRouter
-from airflow.api_fastapi.execution_api.routes import connections, health, task_instance, variables
+from airflow.api_fastapi.execution_api.routes import connections, health, task_instance, variables, xcoms
execution_api_router = AirflowRouter()
execution_api_router.include_router(connections.router, prefix="/connections", tags=["Connections"])
execution_api_router.include_router(health.router, tags=["Health"])
execution_api_router.include_router(task_instance.router, prefix="/task_instance", tags=["Task Instance"])
execution_api_router.include_router(variables.router, prefix="/variables", tags=["Variables"])
+execution_api_router.include_router(xcoms.router, prefix="/xcoms", tags=["XComs"])
Review Comment:
:) -- I changed my mind again -- going to make it plural โ so I donโt have to change it in future if we add list, collection get endpoints and the fact that Public API has it plural too, so for code consistency!
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] AIP-72: Add "XCom" GET endpoint for Execution API [airflow]
Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on code in PR #43894:
URL: https://github.com/apache/airflow/pull/43894#discussion_r1837735167
##########
airflow/api_fastapi/execution_api/routes/xcoms.py:
##########
@@ -0,0 +1,112 @@
+# 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
+
+import logging
+from typing import Annotated
+
+from fastapi import Depends, HTTPException, Query, status
+from sqlalchemy.orm import Session
+
+from airflow.api_fastapi.common.db.common import get_session
+from airflow.api_fastapi.common.router import AirflowRouter
+from airflow.api_fastapi.execution_api import datamodels, deps
+from airflow.models.xcom import BaseXCom
+
+# TODO: Add dependency on JWT token
+router = AirflowRouter(
+ responses={status.HTTP_404_NOT_FOUND: {"description": "XCom not found"}},
+)
+
+log = logging.getLogger(__name__)
+
+
+@router.get(
+ "/{dag_id}/{run_id}/{task_id}/{key}",
+ responses={
+ status.HTTP_401_UNAUTHORIZED: {"description": "Unauthorized"},
+ status.HTTP_403_FORBIDDEN: {"description": "Task does not have access to the XCom"},
+ },
+)
+def get_xcom(
+ dag_id: str,
+ run_id: str,
+ task_id: str,
+ key: str,
+ token: deps.TokenDep,
+ session: Annotated[Session, Depends(get_session)],
+ map_index: Annotated[int, Query()] = -1,
+ deserialize: Annotated[bool, Query()] = True,
+) -> datamodels.XComResponseSerialized | datamodels.XComResponseDeserialized:
+ """Get an Airflow XCom from database - not other XCom Backends."""
+ if not has_xcom_access(key, token):
+ raise HTTPException(
+ status_code=status.HTTP_403_FORBIDDEN,
+ detail={
+ "reason": "access_denied",
+ "message": f"Task does not have access to XCom key '{key}'",
+ },
+ )
+
+ query = BaseXCom.get_many(
Review Comment:
Oh yes, _that_.
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] AIP-72: Add "XCom" GET endpoint for Execution API [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on code in PR #43894:
URL: https://github.com/apache/airflow/pull/43894#discussion_r1837959630
##########
airflow/api_fastapi/execution_api/routes/xcoms.py:
##########
@@ -0,0 +1,116 @@
+# 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
+
+import json
+import logging
+from typing import Annotated
+
+from fastapi import Depends, HTTPException, Query, status
+from sqlalchemy.orm import Session
+
+from airflow.api_fastapi.common.db.common import get_session
+from airflow.api_fastapi.common.router import AirflowRouter
+from airflow.api_fastapi.execution_api import datamodels, deps
+from airflow.models.xcom import BaseXCom
+
+# TODO: Add dependency on JWT token
+router = AirflowRouter(
+ responses={status.HTTP_404_NOT_FOUND: {"description": "XCom not found"}},
+)
+
+log = logging.getLogger(__name__)
+
+
+@router.get(
+ "/{dag_id}/{run_id}/{task_id}/{key}",
+ responses={
+ status.HTTP_401_UNAUTHORIZED: {"description": "Unauthorized"},
+ status.HTTP_403_FORBIDDEN: {"description": "Task does not have access to the XCom"},
+ },
+)
+def get_xcom(
+ dag_id: str,
+ run_id: str,
+ task_id: str,
+ key: str,
+ token: deps.TokenDep,
+ session: Annotated[Session, Depends(get_session)],
+ map_index: Annotated[int, Query()] = -1,
+) -> datamodels.XComResponse:
+ """Get an Airflow XCom from database - not other XCom Backends."""
+ if not has_xcom_access(key, token):
+ raise HTTPException(
+ status_code=status.HTTP_403_FORBIDDEN,
+ detail={
+ "reason": "access_denied",
+ "message": f"Task does not have access to XCom key '{key}'",
+ },
+ )
+
+ # We use `BaseXCom.get_many` to fetch XComs directly from the database, bypassing the XCom Backend.
+ # This avoids deserialization via the backend (e.g., from a remote storage like S3) and instead
+ # retrieves the raw serialized value from the database. By not relying on `XCom.get_many` or `XCom.get_one`
+ # (which automatically deserializes using the backend), we avoid potential
+ # performance hits from retrieving large data files into the API server.
+ query = BaseXCom.get_many(
+ run_id=run_id,
+ key=key,
+ task_ids=task_id,
+ dag_ids=dag_id,
+ map_indexes=map_index,
+ limit=1,
+ session=session,
+ )
+
+ result = query.with_entities(BaseXCom.value).first()
+
+ if result is None:
+ raise HTTPException(
+ status_code=status.HTTP_404_NOT_FOUND,
+ detail={
+ "reason": "not_found",
+ "message": f"XCom with key '{key}' not found for task '{task_id}' in DAG '{dag_id}'",
+ },
+ )
+
+ try:
+ xcom_value = BaseXCom.deserialize_value(result)
+ except json.JSONDecodeError:
+ raise HTTPException(
+ status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
Review Comment:
๐ will change it. My initial thought was they (user of the client), might delete/change that entry somehow coz it isn't going to work. But I agree 500 is more apt
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] AIP-72: Add "XCom" GET endpoint for Execution API [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on code in PR #43894:
URL: https://github.com/apache/airflow/pull/43894#discussion_r1837961042
##########
airflow/api_fastapi/execution_api/routes/__init__.py:
##########
@@ -17,10 +17,11 @@
from __future__ import annotations
from airflow.api_fastapi.common.router import AirflowRouter
-from airflow.api_fastapi.execution_api.routes import connections, health, task_instance, variables
+from airflow.api_fastapi.execution_api.routes import connections, health, task_instance, variables, xcoms
execution_api_router = AirflowRouter()
execution_api_router.include_router(connections.router, prefix="/connections", tags=["Connections"])
execution_api_router.include_router(health.router, tags=["Health"])
execution_api_router.include_router(task_instance.router, prefix="/task_instance", tags=["Task Instance"])
execution_api_router.include_router(variables.router, prefix="/variables", tags=["Variables"])
+execution_api_router.include_router(xcoms.router, prefix="/xcoms", tags=["XComs"])
Review Comment:
Yeah I went back and forth on this. Reasoning was that `task_instance` was always ever going to operator on a single TI, while the other endpoints would operate on one or more of it (XCom, vars, conns etc).
I will make them singular for now.
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] AIP-72: Add "XCom" endpoint for Execution API [airflow]
Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on code in PR #43894:
URL: https://github.com/apache/airflow/pull/43894#discussion_r1837198147
##########
airflow/api_fastapi/execution_api/routes/xcoms.py:
##########
@@ -0,0 +1,112 @@
+# 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
+
+import logging
+from typing import Annotated
+
+from fastapi import Depends, HTTPException, Query, status
+from sqlalchemy.orm import Session
+
+from airflow.api_fastapi.common.db.common import get_session
+from airflow.api_fastapi.common.router import AirflowRouter
+from airflow.api_fastapi.execution_api import datamodels, deps
+from airflow.models.xcom import BaseXCom
+
+# TODO: Add dependency on JWT token
+router = AirflowRouter(
+ responses={status.HTTP_404_NOT_FOUND: {"description": "XCom not found"}},
+)
+
+log = logging.getLogger(__name__)
+
+
+@router.get(
+ "/{dag_id}/{run_id}/{task_id}/{key}",
+ responses={
+ status.HTTP_401_UNAUTHORIZED: {"description": "Unauthorized"},
+ status.HTTP_403_FORBIDDEN: {"description": "Task does not have access to the XCom"},
+ },
+)
+def get_xcom(
+ dag_id: str,
+ run_id: str,
+ task_id: str,
+ key: str,
+ token: deps.TokenDep,
+ session: Annotated[Session, Depends(get_session)],
+ map_index: Annotated[int, Query()] = -1,
+ deserialize: Annotated[bool, Query()] = True,
+) -> datamodels.XComResponseSerialized | datamodels.XComResponseDeserialized:
+ """Get an Airflow XCom from database - not other XCom Backends."""
+ if not has_xcom_access(key, token):
+ raise HTTPException(
+ status_code=status.HTTP_403_FORBIDDEN,
+ detail={
+ "reason": "access_denied",
+ "message": f"Task does not have access to XCom key '{key}'",
+ },
+ )
+
+ query = BaseXCom.get_many(
Review Comment:
We shouldn't use get_many
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] AIP-72: Add "XCom" GET endpoint for Execution API [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on code in PR #43894:
URL: https://github.com/apache/airflow/pull/43894#discussion_r1837282056
##########
airflow/api_fastapi/execution_api/routes/xcoms.py:
##########
@@ -0,0 +1,112 @@
+# 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
+
+import logging
+from typing import Annotated
+
+from fastapi import Depends, HTTPException, Query, status
+from sqlalchemy.orm import Session
+
+from airflow.api_fastapi.common.db.common import get_session
+from airflow.api_fastapi.common.router import AirflowRouter
+from airflow.api_fastapi.execution_api import datamodels, deps
+from airflow.models.xcom import BaseXCom
+
+# TODO: Add dependency on JWT token
+router = AirflowRouter(
+ responses={status.HTTP_404_NOT_FOUND: {"description": "XCom not found"}},
+)
+
+log = logging.getLogger(__name__)
+
+
+@router.get(
+ "/{dag_id}/{run_id}/{task_id}/{key}",
+ responses={
+ status.HTTP_401_UNAUTHORIZED: {"description": "Unauthorized"},
+ status.HTTP_403_FORBIDDEN: {"description": "Task does not have access to the XCom"},
+ },
+)
+def get_xcom(
+ dag_id: str,
+ run_id: str,
+ task_id: str,
+ key: str,
+ token: deps.TokenDep,
+ session: Annotated[Session, Depends(get_session)],
+ map_index: Annotated[int, Query()] = -1,
+ deserialize: Annotated[bool, Query()] = True,
+) -> datamodels.XComResponseSerialized | datamodels.XComResponseDeserialized:
+ """Get an Airflow XCom from database - not other XCom Backends."""
+ if not has_xcom_access(key, token):
+ raise HTTPException(
+ status_code=status.HTTP_403_FORBIDDEN,
+ detail={
+ "reason": "access_denied",
+ "message": f"Task does not have access to XCom key '{key}'",
+ },
+ )
+
+ query = BaseXCom.get_many(
Review Comment:
Added comment on why:
https://github.com/apache/airflow/blob/12f1cf2e8232146f534b915ad2ff5f0a456347da/airflow/api_fastapi/execution_api/routes/xcoms.py#L66-L70
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] AIP-72: Add "XCom" GET endpoint for Execution API [airflow]
Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on code in PR #43894:
URL: https://github.com/apache/airflow/pull/43894#discussion_r1837746284
##########
airflow/api_fastapi/execution_api/routes/__init__.py:
##########
@@ -17,10 +17,11 @@
from __future__ import annotations
from airflow.api_fastapi.common.router import AirflowRouter
-from airflow.api_fastapi.execution_api.routes import connections, health, task_instance, variables
+from airflow.api_fastapi.execution_api.routes import connections, health, task_instance, variables, xcoms
execution_api_router = AirflowRouter()
execution_api_router.include_router(connections.router, prefix="/connections", tags=["Connections"])
execution_api_router.include_router(health.router, tags=["Health"])
execution_api_router.include_router(task_instance.router, prefix="/task_instance", tags=["Task Instance"])
execution_api_router.include_router(variables.router, prefix="/variables", tags=["Variables"])
+execution_api_router.include_router(xcoms.router, prefix="/xcoms", tags=["XComs"])
Review Comment:
We should be consistent on our pluralization - task_instance is singular, all the rest are plural
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] AIP-72: Add "XCom" GET endpoint for Execution API [airflow]
Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on code in PR #43894:
URL: https://github.com/apache/airflow/pull/43894#discussion_r1837962008
##########
airflow/api_fastapi/execution_api/routes/__init__.py:
##########
@@ -17,10 +17,11 @@
from __future__ import annotations
from airflow.api_fastapi.common.router import AirflowRouter
-from airflow.api_fastapi.execution_api.routes import connections, health, task_instance, variables
+from airflow.api_fastapi.execution_api.routes import connections, health, task_instance, variables, xcoms
execution_api_router = AirflowRouter()
execution_api_router.include_router(connections.router, prefix="/connections", tags=["Connections"])
execution_api_router.include_router(health.router, tags=["Health"])
execution_api_router.include_router(task_instance.router, prefix="/task_instance", tags=["Task Instance"])
execution_api_router.include_router(variables.router, prefix="/variables", tags=["Variables"])
+execution_api_router.include_router(xcoms.router, prefix="/xcoms", tags=["XComs"])
Review Comment:
The single vs plural question in API design is one as old as REST.
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] AIP-72: Add "XCom" GET endpoint for Execution API [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on code in PR #43894:
URL: https://github.com/apache/airflow/pull/43894#discussion_r1837982113
##########
airflow/api_fastapi/execution_api/routes/__init__.py:
##########
@@ -17,10 +17,11 @@
from __future__ import annotations
from airflow.api_fastapi.common.router import AirflowRouter
-from airflow.api_fastapi.execution_api.routes import connections, health, task_instance, variables
+from airflow.api_fastapi.execution_api.routes import connections, health, task_instance, variables, xcoms
execution_api_router = AirflowRouter()
execution_api_router.include_router(connections.router, prefix="/connections", tags=["Connections"])
execution_api_router.include_router(health.router, tags=["Health"])
execution_api_router.include_router(task_instance.router, prefix="/task_instance", tags=["Task Instance"])
execution_api_router.include_router(variables.router, prefix="/variables", tags=["Variables"])
+execution_api_router.include_router(xcoms.router, prefix="/xcoms", tags=["XComs"])
Review Comment:
done in https://github.com/apache/airflow/pull/43894/commits/542a7034e18bbf35d1b7b6cc3cb538ad2ad0322b
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] AIP-72: Add "XCom" GET endpoint for Execution API [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil merged PR #43894:
URL: https://github.com/apache/airflow/pull/43894
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org