Brunda10 commented on code in PR #54597:
URL: https://github.com/apache/airflow/pull/54597#discussion_r2372854961
##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_variables.py:
##########
@@ -1064,6 +1109,38 @@ class TestBulkVariables(TestVariableEndpoint):
},
id="test_repeated_actions",
),
+ pytest.param(
+ {
+ "actions": [
+ {
+ "action": "create",
+ "entities": [
+ {"key": "var1", "value": "initial",
"description": "Initial Description"}
+ ],
+ "action_on_existence": "fail",
+ },
+ {
+ "action": "update",
+ "entities": [
+ {"key": "var1", "value": "updated",
"description": "Updated Description"}
+ ],
+ "update_mask": ["value"],
+ "action_on_non_existence": "fail",
+ },
+ {
+ "action": "delete",
+ "entities": ["var1"],
+ "action_on_non_existence": "fail",
+ },
+ ]
+ },
+ {
+ "create": {"success": ["var1"], "errors": []},
+ "update": {"success": ["var1"], "errors": []},
+ "delete": {"success": ["var1"], "errors": []},
+ },
+ id="test_variable_dependent_actions_with_update_mask",
+ ),
Review Comment:
Thanks @jason810496.
I’ve updated the function to block updates on non_update_fields and return a
400 error. Please review and let me know if any further changes are needed.
--
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]