[Django] #30523: StatReloader does not update file times if notify_file_changed() is triggered

7 views
Skip to first unread message

Django

unread,
May 28, 2019, 2:20:20 PM5/28/19
to django-...@googlegroups.com
#30523: StatReloader does not update file times if notify_file_changed() is
triggered
-----------------------------------------+------------------------
Reporter: Tom Forbes | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
If notify_file_changed is triggered then the files mtime is not updated.
This can cause notify_file_changed() to be triggered many times if a
translation is changed.

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

Django

unread,
May 28, 2019, 2:23:49 PM5/28/19
to django-...@googlegroups.com
#30523: StatReloader does not update file times if notify_file_changed() is
triggered
----------------------------+--------------------------------------
Reporter: Tom Forbes | Owner: Tom Forbes
Type: Bug | Status: assigned
Component: Utilities | Version: 2.2
Severity: Normal | 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 Tom Forbes):

* status: new => assigned
* component: Uncategorized => Utilities
* owner: nobody => Tom Forbes
* has_patch: 0 => 1
* type: Uncategorized => Bug
* stage: Unreviewed => Accepted


Comment:

Patch: https://github.com/django/django/pull/11419

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

Django

unread,
May 29, 2019, 2:58:36 AM5/29/19
to django-...@googlegroups.com
#30523: StatReloader does not update file times if notify_file_changed() is
triggered.

----------------------------+--------------------------------------
Reporter: Tom Forbes | Owner: Tom Forbes
Type: Bug | Status: assigned
Component: Utilities | Version: 2.2
Severity: Normal | 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 felixxm):

* stage: Accepted => Unreviewed


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

Django

unread,
May 29, 2019, 2:59:21 AM5/29/19
to django-...@googlegroups.com
#30523: StatReloader does not update file times if notify_file_changed() is
triggered.
---------------------------------+--------------------------------------

Reporter: Tom Forbes | Owner: Tom Forbes
Type: Bug | Status: assigned
Component: Utilities | Version: 2.2
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 felixxm):

* severity: Normal => Release blocker


* stage: Unreviewed => Accepted


Comment:

Regression in 6754bffa2b2df15a741008aa611c1bb0e8dff22b (2.2.1).

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

Django

unread,
May 29, 2019, 3:42:30 AM5/29/19
to django-...@googlegroups.com
#30523: StatReloader does not update file times if notify_file_changed() is
triggered.
---------------------------------+--------------------------------------
Reporter: Tom Forbes | Owner: Tom Forbes
Type: Bug | Status: closed
Component: Utilities | Version: 2.2
Severity: Release blocker | Resolution: fixed
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 Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"480492fe70b0bb7df61c00854dc8535c9d21ba64" 480492fe]:
{{{
#!CommitTicketReference repository=""
revision="480492fe70b0bb7df61c00854dc8535c9d21ba64"
Fixed #30523 -- Fixed updating file modification times on seen files in
auto-reloader when using StatReloader.

Previously we updated the file mtimes if the file has not been seen
before - i.e on the first iteration of the loop.

If the mtime has been changed we triggered the notify_file_changed()
method which in all cases except the translations will result in the
process being terminated. To be strictly correct we need to update the
mtime for either branch of the conditional.

Regression in 6754bffa2b2df15a741008aa611c1bb0e8dff22b.
}}}

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

Django

unread,
May 29, 2019, 3:43:58 AM5/29/19
to django-...@googlegroups.com
#30523: StatReloader does not update file times if notify_file_changed() is
triggered.
---------------------------------+--------------------------------------
Reporter: Tom Forbes | Owner: Tom Forbes
Type: Bug | Status: closed
Component: Utilities | Version: 2.2
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
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:"7089502b98f80e8dc1c8f6e85fb0620809aec30e" 7089502b]:
{{{
#!CommitTicketReference repository=""
revision="7089502b98f80e8dc1c8f6e85fb0620809aec30e"
[2.2.x] Fixed #30523 -- Fixed updating file modification times on seen


files in auto-reloader when using StatReloader.

Previously we updated the file mtimes if the file has not been seen
before - i.e on the first iteration of the loop.

If the mtime has been changed we triggered the notify_file_changed()
method which in all cases except the translations will result in the
process being terminated. To be strictly correct we need to update the
mtime for either branch of the conditional.

Regression in 6754bffa2b2df15a741008aa611c1bb0e8dff22b.

Backport of 480492fe70b0bb7df61c00854dc8535c9d21ba64 from master
}}}

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

Reply all
Reply to author
Forward
0 new messages