Repository navigation
airflowctl: initialize extra for create assets event - #55744
Conversation
Recent Commits on fix/airflowctl-create-event branch: |
bugraoz93
left a comment
There was a problem hiding this comment.
Thanks a lot for the fix! I think we can separate and merge the fix quicker :)
dea192b to
cbd3055
Compare
|
Update: I’ve scoped this PR to the single-line client fix. |
bugraoz93
left a comment
There was a problem hiding this comment.
Thanks for the update! That should be enough. No need to include tests, we already have tests here
. What is happening for the bug couldn't be caught with the unit tests. We will implement integration tests in another issue soon. That's why for the test part, we don't need to follow up on unit test sideThere was a problem hiding this comment.
(airflow) bugra@dev:~/PycharmProjects/airflow$ airflowctl assets create-event --asset-id=1
2025-09-17 22:52:40 [warning ] Server error [airflowctl.api.client] extra={'detail': [{'type': 'dict_type', 'loc': ['body', 'extra'], 'msg': 'Input should be a valid dictionary', 'input': None}]}
Server response error: Client error message: {'detail': [{'type': 'dict_type', 'loc': ['body', 'extra'], 'msg': 'Input should be a valid dictionary', 'input': None}]}
Client error, Please check the command and its parameters. If you need help, run the command with --help.
I don't think this resolves the bug. I have tested locally, but I still get the above error. I think that part can stay without /. If you check the entire file, config is the only one that has the / at the beginning. I think that doesn't follow the convention, even though it is working (I believe it is handled by the client). So I think it really doesn't change anything to have the / there
You can test your changes by running Breeze and the API server. You can also use airflowctl with uv sync and test it locally.
cbd3055 to
c3555b0
Compare
- Add guard in create_event method to ensure extra is never null - Change path from 'assets/events' to '/assets/events' for consistency - Prevents DB/UI issues when extra field is None
… masking schema changes)
f979927 to
65b9c54
Compare
|
We need to merge this fix, so I added a couple of changes there. Thanks for the PR! I will merge once it is green |
If any job turns red, I’ll take a look and fix only what the failing log shows. |
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Align airflowctl with the FastAPI contract for POST
/assets/events.What
"/assets/events"inAssetsOperations.create_event(was"assets/events").airflow-ctl/tests/test_create_event_client.pyCreateAssetEventsBody→AssetEventResponse).Why
airflowctlin sync with API + models (pairs with the POST/assetswork).Related: #55697
Companion: #55702
Verify