korbit-ai[bot] commented on code in PR #36023:
URL: https://github.com/apache/superset/pull/36023#discussion_r2499314614
##########
superset/sql_lab.py:
##########
@@ -129,12 +129,11 @@ def handle_query_error(
def get_query_backoff_handler(details: dict[Any, Any]) -> None:
stats_logger = app.config["STATS_LOGGER"]
query_id = details["kwargs"]["query_id"]
- logger.error(
- "Query with id `%s` could not be retrieved", str(query_id),
exc_info=True
- )
stats_logger.incr(f"error_attempting_orm_query_{details['tries'] - 1}")
- logger.error(
- "Query %s: Sleeping for a sec before retrying...", str(query_id),
exc_info=True
+ logger.warning(
+ "Query with id `%s` could not be retrieved, sleeping for a sec before
retrying",
+ str(query_id),
+ exc_info=True,
)
Review Comment:
Understood. Here's a suggestion that combines the essential information from
both messages:
```python
logger.warning(
"Query with id `%s` could not be retrieved, attempting retry %d of %d",
str(query_id),
details['tries'],
5, # max_tries from the backoff decorator
exc_info=True,
)
```
This keeps the core information while being more concise. Does this align
with what you had in mind?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]