vatsrahul1001 commented on code in PR #74837:
URL: https://github.com/apache/airflow/pull/74837#discussion_r4294515512
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/connections.py:
##########
@@ -452,7 +452,8 @@ def enqueue_connection_test(
else:
effective_team = test_body.team_name
- auth_method: ResourceMethod = "PUT" if existing is not None and
test_body.commit_on_success else "POST"
+ commit_allows_update = existing is not None and test_body.commit_on_success
Review Comment:
Thanks for this. It looks like it covers the case where a test creates a
connection that someone else already created. I was wondering about the update
path, though. If a test is queued with `commit_on_success` for an existing
connection, can it still overwrite a newer version? Say A queues the test, B
edits the connection, and then A's test passes and writes over B's changes. The
same would happen if the connection gets deleted and re-created in between.
Is that something you're deliberately leaving for later? If so, a quick line
in the description or newsfragment would make that clear. Otherwise I think it
would need some kind of `updated_at` or version check when the test commits.
--
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]