Opened 21 months ago

Closed 20 months ago

Last modified 20 months ago

#32107 closed Bug (fixed)

ProtectedError/RestrictedError raised from Collector.collect contains iterators.

Reported by: Kwist Owned by: Hasan Ramezani
Component: Database layer (models, ORM) Version: 3.1
Severity: Release blocker Keywords: database delete ProtectedError RestrictedError
Cc: Hasan Ramezani 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 Kwist)

#27852

("Cannot delete some instances of model 'A' because they are referenced through protected foreign keys: 'A.protect', 'B.protect'.", <itertools.chain object at 0x7f96b5cb6c40>)

As a result, the repr of exception in Sentry is not informative.

Attachments (1)

objects.patch (3.4 KB) - added by Kwist 21 months ago.
Patch

Download all attachments as: .zip

Change History (7)

Changed 21 months ago by Kwist

Attachment: objects.patch added

Patch

comment:1 Changed 21 months ago by Kwist

Description: modified (diff)
Summary: repr of ProtectedError/RestrictedError raised from Collector.collect is not fully informativeProtectedError/RestrictedError raised from Collector.collect has iterator as protected_objects/restricted_objects

comment:2 Changed 21 months ago by Mariusz Felisiak

Cc: Hasan Ramezani added
Severity: NormalRelease blocker
Summary: ProtectedError/RestrictedError raised from Collector.collect has iterator as protected_objects/restricted_objectsProtectedError/RestrictedError raised from Collector.collect contains iterators.
Triage Stage: UnreviewedAccepted
Type: Cleanup/optimizationBug
Version: master3.1

comment:3 Changed 20 months ago by Hasan Ramezani

Has patch: set
Owner: changed from nobody to Hasan Ramezani
Status: newassigned

comment:4 Changed 20 months ago by Mariusz Felisiak

Triage Stage: AcceptedReady for checkin

comment:5 Changed 20 months ago by Mariusz Felisiak <felisiak.mariusz@…>

Resolution: fixed
Status: assignedclosed

In 3b1746d5:

Fixed #32107 -- Fixed ProtectedError.protected_objects and RestrictedError.restricted_objects.

Regression in 4ca5c565f4dc9e97845036e86416abc5cfde766c and
ab3cbd8b9a315911248227208630a020cedca08f.

Thanks Vitaliy Yelnik for the report.

comment:6 Changed 20 months ago by Mariusz Felisiak <felisiak.mariusz@…>

In 2212927:

[3.1.x] Fixed #32107 -- Fixed ProtectedError.protected_objects and RestrictedError.restricted_objects.

Regression in 4ca5c565f4dc9e97845036e86416abc5cfde766c and
ab3cbd8b9a315911248227208630a020cedca08f.

Thanks Vitaliy Yelnik for the report.

Backport of 3b1746d5194778fab15c15dd14c212e0912ec8f3 from master

Note: See TracTickets for help on using tickets.
Back to Top