Skip to content

Commit da29b1a

Browse files
github-actions[bot]ColtenOuOvatsrahul1001
authored
[v3-3-test] Document the 409 from XCom create and drop a duplicated condition (#70992) (#71128)
(cherry picked from commit 64683c9) Co-authored-by: Jyun-An Chen <jun930436@gmail.com> Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
1 parent 985c5a8 commit da29b1a

4 files changed

Lines changed: 15 additions & 4 deletions

File tree

‎airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6858,6 +6858,12 @@ paths:
68586858
schema:
68596859
$ref: '#/components/schemas/HTTPExceptionResponse'
68606860
description: Not Found
6861+
'409':
6862+
content:
6863+
application/json:
6864+
schema:
6865+
$ref: '#/components/schemas/HTTPExceptionResponse'
6866+
description: Conflict
68616867
'422':
68626868
description: Validation Error
68636869
content:

‎airflow-core/src/airflow/api_fastapi/core_api/routes/public/xcom.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ def get_xcom_entries(
237237
[
238238
status.HTTP_400_BAD_REQUEST,
239239
status.HTTP_404_NOT_FOUND,
240+
status.HTTP_409_CONFLICT,
240241
]
241242
),
242243
dependencies=[
@@ -269,10 +270,9 @@ def create_xcom_entry(
269270

270271
# Validate Dag Run ID
271272
if not dag_run:
272-
if not dag_run:
273-
raise HTTPException(
274-
status.HTTP_404_NOT_FOUND, f"Dag Run with ID: `{dag_run_id}` not found for dag: `{dag_id}`"
275-
)
273+
raise HTTPException(
274+
status.HTTP_404_NOT_FOUND, f"Dag Run with ID: `{dag_run_id}` not found for dag: `{dag_id}`"
275+
)
276276

277277
# Check existing XCom
278278
already_existing_query = XComModel.get_many(

‎airflow-core/src/airflow/ui/openapi-gen/requests/services.gen.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4140,6 +4140,7 @@ export class XcomService {
41404140
401: 'Unauthorized',
41414141
403: 'Forbidden',
41424142
404: 'Not Found',
4143+
409: 'Conflict',
41434144
422: 'Validation Error'
41444145
}
41454146
});

‎airflow-core/src/airflow/ui/openapi-gen/requests/types.gen.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7757,6 +7757,10 @@ export type $OpenApiTs = {
77577757
* Not Found
77587758
*/
77597759
404: HTTPExceptionResponse;
7760+
/**
7761+
* Conflict
7762+
*/
7763+
409: HTTPExceptionResponse;
77607764
/**
77617765
* Validation Error
77627766
*/

0 commit comments

Comments
 (0)