amoghrajesh commented on code in PR #50117:
URL: https://github.com/apache/airflow/pull/50117#discussion_r2108806777


##########
airflow-core/src/airflow/api_fastapi/execution_api/versions/v2025_05_21.py:
##########
@@ -0,0 +1,37 @@
+# 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 Optional
+
+from cadwyn import VersionChange, schema
+from pydantic import Field
+
+from airflow.api_fastapi.execution_api.routes.xcoms import 
GetXComSliceFilterParams
+
+
+class RemoveGetXcomFilterParamsOffset(VersionChange):
+    """Remove 'offset' from GetXcomFilterParams."""
+
+    description = __doc__
+
+    instructions_to_migrate_to_previous_version = (
+        schema(GetXComSliceFilterParams)
+        .field("offset")
+        .existed_as(type=Optional[int], info=Field(default=None)),
+    )

Review Comment:
   If thats the case, we can probably have to handle the request structure in 
cadwyn for the get xcom endpoint



##########
task-sdk/src/airflow/sdk/api/client.py:
##########
@@ -470,7 +471,27 @@ def get_sequence_item(
                     },
                 )
             raise
-        return XComResponse.model_validate_json(resp.read())
+        return XComSequenceIndexResponse.model_validate_json(resp.read())
+
+    def get_sequence_slice(
+        self,
+        dag_id: str,
+        run_id: str,
+        task_id: str,
+        key: str,
+        start: int | None,
+        stop: int | None,
+        step: int | None,

Review Comment:
   Oh i see. Just trying to add a default so that every client caller doesn't 
have to manually pass in that information



##########
task-sdk/src/airflow/sdk/api/datamodels/_generated.py:
##########
@@ -25,9 +25,9 @@
 from typing import Annotated, Any, Final, Literal
 from uuid import UUID
 
-from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, JsonValue
+from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, JsonValue, 
RootModel
 
-API_VERSION: Final[str] = "2025-05-20"
+API_VERSION: Final[str] = "2025-05-21"

Review Comment:
   This can be handled by the RM but since we know the release date for 3.0.2 
(tentative), could we change this to 03 June?



##########
airflow-core/src/airflow/api_fastapi/execution_api/versions/v2025_05_21.py:
##########
@@ -0,0 +1,37 @@
+# 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 Optional
+
+from cadwyn import VersionChange, schema
+from pydantic import Field
+
+from airflow.api_fastapi.execution_api.routes.xcoms import 
GetXComSliceFilterParams
+
+
+class RemoveGetXcomFilterParamsOffset(VersionChange):
+    """Remove 'offset' from GetXcomFilterParams."""
+
+    description = __doc__
+
+    instructions_to_migrate_to_previous_version = (
+        schema(GetXComSliceFilterParams)
+        .field("offset")
+        .existed_as(type=Optional[int], info=Field(default=None)),
+    )

Review Comment:
   Actually now that I think of it, is offset relevant anymore for the GetXcom 
endpoint? We should safely be able to remove that change and make it only 
handle "single" map index tasks, right? -1 map index as param only.



-- 
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]

Reply via email to