Skip to content

Conversation

@ashb
Copy link
Member

@ashb ashb commented Apr 8, 2025

And, like I should have done in #48888, add tests this time.

The issue was caused by me misunderstanding how Cadwyn works, the
instructions_to_migrate_to_previous_version only affect the OpenAPI schema,
but since the change in this case results in an "invalid" model being
returned, we have to write our own migration for the data.

For those curious, the error without this migration function is:

fastapi.exceptions.ResponseValidationError: 1 validation errors:
{'type': 'extra_forbidden', 'loc': ('response', 'dag_run', 'consumed_asset_events'), 'msg': 'Extra inputs are not permitted', 'input': []}


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
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 airflow-core/newsfragments.

And, like I should have done in apache#48888, add tests this time.

The issue was caused by me misunderstanding how Cadwyn works, the
`instructions_to_migrate_to_previous_version` only affect the OpenAPI schema,
but since the change in this case results in an "invalid" model being
returned, we have to write our own migration for the data.

For those curious, the error without this migration function is:

> fastapi.exceptions.ResponseValidationError: 1 validation errors:
>  {'type': 'extra_forbidden', 'loc': ('response', 'dag_run', 'consumed_asset_events'), 'msg': 'Extra inputs are not permitted', 'input': []}
@ashb ashb requested review from amoghrajesh and kaxil as code owners April 8, 2025 13:51
@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Apr 8, 2025
@ashb
Copy link
Member Author

ashb commented Apr 8, 2025

Spotted by @feluelle

Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok sounds good

@ashb ashb merged commit ea456d8 into apache:main Apr 8, 2025
96 checks passed
@ashb ashb deleted the fixup-execapi-migration-and-test branch April 8, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants