Opened 99 minutes ago

Last modified 79 minutes ago

#36951 assigned Bug

task_finished signal logs "NoneType: None" when no exception is raised

Reported by: Jacob Walls Owned by: Elias Hernandis
Component: Tasks Version: 6.0
Severity: Release blocker Keywords:
Cc: Jake Howard Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Jacob Walls)

The test provided on PR #20722 demonstrates that faux exceptions are logged as NoneType: None by the log_task_finished signal handler:

======================================================================
FAIL: test_successful_task_no_none_type_in_logs (tasks.test_immediate_backend.ImmediateBackendTestCase.test_successful_task_no_none_type_in_logs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jwalls/django/tests/tasks/test_immediate_backend.py", line 238, in test_successful_task_no_none_type_in_logs
    self.assertNotIn("NoneType", log_output)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'NoneType' unexpectedly found in 'INFO:django.tasks:Task id=1yKnLbcmTGMEUfj0B1JG0766LDM1Sono path=tasks.tasks.noop_task state=SUCCESSFUL\nNoneType: None'

----------------------------------------------------------------------

Change History (5)

comment:1 by Jacob Walls, 98 minutes ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Jacob Walls, 98 minutes ago

Opening the ticket as a courtesy, accepting as a triager.

comment:3 by Jacob Walls, 97 minutes ago

Needs documentation: set
Triage Stage: Ready for checkinAccepted

comment:4 by Jake Howard, 89 minutes ago

Description: modified (diff)
Has patch: set

comment:5 by Jacob Walls, 79 minutes ago

Description: modified (diff)
Needs documentation: unset
Summary: log_task_finished signal logs "NoneType: None" when no exception is raisedtask_finished signal logs "NoneType: None" when no exception is raised
Triage Stage: AcceptedReady for checkin
Note: See TracTickets for help on using tickets.
Back to Top