deepujain opened a new pull request, #64307:
URL: https://github.com/apache/airflow/pull/64307

   ## Summary
   `Variable.check_for_write_conflict` returned from inside its backend loop, 
so only the first non-metastore secrets backend was ever checked. That could 
hide write conflicts in later backends and let the database value be updated 
without the expected warning.
   
   ## Changes
   - **`airflow-core/src/airflow/models/variable.py`** -- moved the `return 
None` out of the backend loop so every configured secrets backend is checked 
before concluding that no conflict exists.
   - **`airflow-core/tests/unit/models/test_variable.py`** -- added a 
regression test that verifies later secrets backends are still consulted and 
can trigger the conflict warning.
   
   ## Test plan
   - [x] `ruff check airflow-core/src/airflow/models/variable.py 
airflow-core/tests/unit/models/test_variable.py`
   - [x] `ruff format --check airflow-core/src/airflow/models/variable.py 
airflow-core/tests/unit/models/test_variable.py`
   - [x] `uv run --project /Users/dejain/nvidia/oss/airflow-64060/airflow-core 
pytest 
/Users/dejain/nvidia/oss/airflow-64060/airflow-core/tests/unit/models/test_variable.py
 -xvs`
   
   Fixes #64060
   


-- 
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]

Reply via email to