[Django] #33855: System check calls are unnecessary in test worker initialization.

13 views
Skip to first unread message

Django

unread,
Jul 18, 2022, 2:36:13 AM7/18/22
to django-...@googlegroups.com
#33855: System check calls are unnecessary in test worker initialization.
---------------------------------------------+------------------------
Reporter: Mariusz Felisiak | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 4.1
Severity: Release blocker | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc added calling system checks to
initialization of each test worker. I don't see any reason to do this, it
slows down tests (`check` is called with all `databases` for each alias
and once more in `DiscoverRunner.run_tests()`) and can cause crashes as
some checks require database access.

It seems that it was added to satisfy
`check_framework.tests.ChecksRunDuringTests.test_registered_check_did_run`
on `spawn`. IMO we can skip this test on `spawn`.

--
Ticket URL: <https://code.djangoproject.com/ticket/33855>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 18, 2022, 2:47:43 AM7/18/22
to django-...@googlegroups.com
#33855: System check calls are unnecessary in test worker initialization.
-----------------------------------+--------------------------------------

Reporter: Mariusz Felisiak | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 4.1
Severity: Release blocker | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------

Comment (by Mariusz Felisiak):

This also partly explains why tests on MySQL have become so slow.

--
Ticket URL: <https://code.djangoproject.com/ticket/33855#comment:1>

Django

unread,
Jul 18, 2022, 2:58:48 AM7/18/22
to django-...@googlegroups.com
#33855: System check calls are unnecessary in test worker initialization.
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: Bug | Status: assigned

Component: Testing framework | Version: 4.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* owner: nobody => Mariusz Felisiak
* status: new => assigned
* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/15852 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/33855#comment:2>

Django

unread,
Jul 19, 2022, 2:55:19 AM7/19/22
to django-...@googlegroups.com
#33855: System check calls are unnecessary in test worker initialization.
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: Bug | Status: assigned
Component: Testing framework | Version: 4.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/33855#comment:3>

Django

unread,
Jul 19, 2022, 3:07:36 AM7/19/22
to django-...@googlegroups.com
#33855: System check calls are unnecessary in test worker initialization.
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: Bug | Status: assigned
Component: Testing framework | Version: 4.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/33855#comment:4>

Django

unread,
Jul 19, 2022, 3:45:32 AM7/19/22
to django-...@googlegroups.com
#33855: System check calls are unnecessary in test worker initialization.
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed

Component: Testing framework | Version: 4.1
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"24effbceb871e71d3bc320b91252f743714722df" 24effbce]:
{{{
#!CommitTicketReference repository=""
revision="24effbceb871e71d3bc320b91252f743714722df"
Fixed #33855 -- Removed unnecessary system check calls from test worker
initialization.

Regression in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33855#comment:5>

Django

unread,
Jul 19, 2022, 3:46:14 AM7/19/22
to django-...@googlegroups.com
#33855: System check calls are unnecessary in test worker initialization.
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed
Component: Testing framework | Version: 4.1
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"710af68dee4abaaec7a9817c0c44fe8782525d4e" 710af68d]:
{{{
#!CommitTicketReference repository=""
revision="710af68dee4abaaec7a9817c0c44fe8782525d4e"
[4.1.x] Fixed #33855 -- Removed unnecessary system check calls from test
worker initialization.

Regression in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc.
Backport of 24effbceb871e71d3bc320b91252f743714722df from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33855#comment:6>

Reply all
Reply to author
Forward
0 new messages