Repository navigation
Conversation
|
Is anything I can do with failed checks? |
auvipy
left a comment
There was a problem hiding this comment.
you would need to add tests and fix the failing ones, due to this proposed change, also we have to figure out if this is the right choice we are going to merge
|
@auvipy did you to figured this out? |
|
You have to make the CI green first for your PR |
Why should I write test if this PR won't be merged? |
|
I didn’t mean that, pr with tests have a higher chance to get merged as they are easier to review |
There was a problem hiding this comment.
Pull request overview
This PR aims to make the extra={'data': ...} logging payload for LOG_RECEIVED safe for JSON-style formatters by avoiding non-JSON-serializable objects (notably datetime in req.eta).
Changes:
- Import
safe_reprto stringifyreq.etabefore placing it in the logging context. - Update the
LOG_RECEIVEDcontext to logetaas a safe string representation.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| 'id': req.id, | ||
| 'name': req.name, | ||
| 'args': req.argsrepr, | ||
| 'kwargs': req.kwargsrepr, | ||
| 'eta': req.eta, | ||
| 'eta': safe_repr(req.eta), |
Description
Users can define more suitable
logging.Formatterfor logging in applications."data"inextrashould be safe for logging in different formats like keysargsreprandkwargsrepr.We use json formatter for logging and
json.dumpsfails withTypeError: Object of type datetime is not JSON serializable.Of course we can deal with it with
But it's not consistent with
argsreprandkwargsrepr.