Uh oh!
There was an error while loading. Please reload this page.
Allow non-string valid JSON values in Variable import. - #49844
Conversation
Uh oh!
There was an error while loading. Please reload this page.
shubhamraj-git
left a comment
There was a problem hiding this comment.
Thanks for the fix.
Some tests failures needs to be fixed.
tirkarthi
commented
Apr 28, 2025
It seems airflow-ctl is trying to do some work for non-primitive types in this case |
bugraoz93
commented
Apr 28, 2025
Thanks for the PR @tirkarthi and tagging! I will check this out in a couple of hours. |
bugraoz93
commented
Apr 28, 2025
#49917 this should fix it @tirkarthi :) |
pierrejeambrun
commented
Apr 29, 2025
Need to rebase and fix mypy before merging. (rebasing should fix the unrelated boto failure) |
tirkarthi
commented
Apr 29, 2025
VariableBody definition airflow/airflow-ctl/src/airflowctl/api/datamodels/generated.py Lines 831 to 841 in 61e45b2 Error |
tirkarthi
commented
Apr 29, 2025
Below code is getting auto generated and added to generated.py . Any help @bugraoz93 on how to fix this? Tried running pre-commit but it doesn't help. classJsonValue(RootModel[Any]):
root: Any |
To fix: You can just use that instead in line 666 variable=VariableBody.model_validate(
{"key": key, "value": value, "description": description},
) |
Dev-iL
commented
Apr 29, 2025
A similar fix might be needed in Connections: #49734 |
bugraoz93
commented
Apr 29, 2025
That generation is expected. We are syncing the
Thanks Pierre! Indeed, this should solve it. |
tirkarthi
commented
Apr 30, 2025
Thanks @pierrejeambrun and @bugraoz93 for the help on fixing the tests. Thanks everyone for the reviews. |
Backport failed to create: v3-0-test. View the failure log Run details
You can attempt to backport this manually by running: cherry_picker 61dfd44 v3-0-testThis should apply the commit to the v3-0-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continue |
(cherry picked from commit 61dfd44)
(cherry picked from commit 61dfd44)
tirkarthi
commented
May 1, 2025
Backport PR : #50063 |
Airflow 3.0 had the change to accept only string values as variable values during import through API that prohibited using int, list, etc that are valid JSON values. Airflow 3 cli accepts import of valid JSON without this restriction. The API should also accept valid JSON values.
Closes#49837