Link: https://github.com/apache/airflow/blob/main/airflow/models/variable.py

Methods to migrate:

- val
- set 
- delete
- update

Note that get_variable_from_secrets shouls still be executed locally.

It may be better to first close https://github.com/apache/airflow/issues/28267
cls,
        key: str,
        value: Any,
        description: str | None = None,
        serialize_json: bool = False,
        session: Session = None,
    ):
        """
        Sets a value for an Airflow Variable with a given Key.
        This operation will overwrite an existing variable.
        :param key: Variable Key
        :param value: Value to set for the Variable
        :param description: Description of the Variable
        :param serialize_json: Serialize the value to a JSON string
        :param session: SQL Alchemy Sessions
        """
        
        cls.check_for_write_conflict(key)
        if serialize_json:
            stored_value = json.dumps(value, indent=2)
        else:
            stored_value = str(value)
        Variable.delete(key, session=session)
        session.add(Variable(key=key, val=stored_value, description=description))
        session.flush()
    @classmethod
    @provide_session
    def update(