andreahlert opened a new pull request, #61625: URL: https://github.com/apache/airflow/pull/61625
Closes: #52771 When `Variable.get()` is called with a `default` value and the variable is not found, the error-level log message causes unnecessary log spam and false alerts in monitoring systems like Sentry. **Changes:** - Lower the log level in `VariableOperations.get()` (API client layer) from `error` to `debug`, consistent with `ConnectionOperations.get()` which already uses `debug` for the same scenario - Add a `debug` log in `Variable.get()` (definitions layer) when falling back to the default value, so there is still visibility into the fallback behavior - Add tests covering both the default fallback case and the raise-when-no-default case This follows the direction suggested in the review of #52846: the API client layer should not log at error level for what is a normal flow when a default is provided. The log level change at the client layer also matches the existing pattern used by `ConnectionOperations.get()`. -- 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]
