SamWheating opened a new pull request #18159:
URL: https://github.com/apache/airflow/pull/18159


   **Re:** Discussion in https://github.com/apache/airflow/issues/17889
   
   A few changes in this PR:
   
    - Update `Variable.set()` method to take a `description` argument. 
    - Update `Variable.setdefault()` method to take a `description` argument. 
    - Adding a `Variable.update()` method which will throw a `KeyError` if the 
Variable doesn't exist, and an `AttributeError` if it doesn't exist in the 
Database (since a non-metastore Variable can't be modified)
    - Improved logging around key collisions between different variable 
backends.
    - Updated documentation to warn users about key collisions between variable 
backends.
   
   If a user has a duplicated key in the metastore and an extra secrets 
backend, then updates to the Variable will update the value in the metastore, 
but reads will read the value in the additional backend. 
   
   This is still the case, but I've improved the logging when this happens and 
updated the documentation to warn users about this behaviour.
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)**
 for more information.
   In case of fundamental code change, Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals))
 is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party 
License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in 
[UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.md).
   


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