vincbeck commented on code in PR #41414:
URL: https://github.com/apache/airflow/pull/41414#discussion_r1714370999
##########
airflow/api_internal/endpoints/rpc_api_endpoint.py:
##########
@@ -237,7 +237,8 @@ def internal_airflow_api(body: dict[str, Any]) ->
APIResponse:
response = json.dumps(output_json) if output_json is not None else
None
log.info("Sending response: %s", response)
return Response(response=response, headers={"Content-Type":
"application/json"})
- except AirflowException as e: # In case of AirflowException transport the
exception class back to caller
+ # In case of AirflowException or other selective known types transport the
exception class back to caller
Review Comment:
nit
```suggestion
# In case of AirflowException or other selective known types, transport
the exception class back to caller
```
##########
airflow/models/variable.py:
##########
@@ -167,6 +166,35 @@ def set(
This operation overwrites 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: Session
+ """
+ Variable._set(
+ key=key, value=value, description=description,
serialize_json=serialize_json, session=session
+ )
+ # invalidate key in cache for faster propagation
+ # we cannot save the value set because it's possible that it's
shadowed by a custom backend
+ # (see call to check_for_write_conflict above)
+ SecretCache.invalidate_variable(key)
Review Comment:
Should we do it only if DB isolation mode is on? It seems we dont need to do
that if there is direct access to DB
--
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]