[Django] #22258: Show progress during dumpdata and loaddata

258 views
Skip to first unread message

Django

unread,
Mar 12, 2014, 3:00:56 PM3/12/14
to django-...@googlegroups.com
#22258: Show progress during dumpdata and loaddata
--------------------------------------------+--------------------
Reporter: Gwildor | Owner: nobody
Type: New feature | Status: new
Component: Core (Management commands) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------------+--------------------
In response of ticket #22251, I'm opening this as a separate issue like
requested. You can read the need for this option there, but shortly
speaking, the commands as they are now are not user friendly at all. The
commands can go on for a very long time, depending on your database size,
without giving any clue of its state and progress.

If and when #22257 is implemented, the commands could start by collecting
amount of rows to progress, and periodically printing the progress to the
console. This way the user can make a fair estimate on when the commands
are done and whether they are actually still running.

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

Django

unread,
Mar 20, 2014, 3:11:16 PM3/20/14
to django-...@googlegroups.com
#22258: Show progress during dumpdata and loaddata
-------------------------------------+-------------------------------------

Reporter: Gwildor | Owner: nobody
Type: New feature | Status: new
Component: Core (Management | Version: master
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0


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

Django

unread,
Mar 23, 2014, 12:45:03 PM3/23/14
to django-...@googlegroups.com
#22258: Show progress during dumpdata and loaddata
-------------------------------------+-------------------------------------

Reporter: Gwildor | Owner: nobody
Type: New feature | Status: new
Component: Core (Management | Version: master
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by anubhav9042):

We can add the patch given #22257, then as posted there:
I think we can keep default as stdout and and for this, we can do the
following:

- When -o is not used, let the data be printed to stdout, as the data is
printing people can see it and I don't think any progress display is
required there.

- When -o will be used, then we can display progress percentage or
something like that.

backwards compatibilty is there, also issue here is also addressed.
thoughts?

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

Django

unread,
Mar 23, 2014, 8:44:30 PM3/23/14
to django-...@googlegroups.com
#22258: Show progress during dumpdata and loaddata
-------------------------------------+-------------------------------------

Reporter: Gwildor | Owner: nobody
Type: New feature | Status: new
Component: Core (Management | Version: master
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by russellm):

Before we get too carried away here, someone needs to explain how it's
going to be implemented. json.dumps and lxml don't provide progress APIs
AFAIK.

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

Django

unread,
Mar 24, 2014, 9:18:36 AM3/24/14
to django-...@googlegroups.com
#22258: Show progress during dumpdata and loaddata
-------------------------------------+-------------------------------------

Reporter: Gwildor | Owner: nobody
Type: New feature | Status: new
Component: Core (Management | Version: master
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by anubhav9042):

Well I am attaching a simple diff just for JSON. It does very simply does
the job of displaying progress(random not actual), but we can think along
similar lines like we could calculate total no. of objects and then print
progress accurately depending upon no of objects serialized.

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

Django

unread,
Oct 11, 2014, 11:03:28 AM10/11/14
to django-...@googlegroups.com
#22258: Show progress during dumpdata and loaddata
-------------------------------------+-------------------------------------
Reporter: Gwildor | Owner: mrfuxi
Type: New feature | Status: assigned

Component: Core (Management | Version: master
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by mrfuxi):

* owner: nobody => mrfuxi
* status: new => assigned


Comment:

I was thinking of adding some kind of utility to allow showing progress
from any management command.

As far as I looked (loading data) there is no clean way of showing % of
progress because of generators/reading streams from files, so progress
like during tests. For data load it might be possible to show proper
progress bar.

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

Django

unread,
Jul 21, 2015, 5:27:20 PM7/21/15
to django-...@googlegroups.com
#22258: Show progress during dumpdata and loaddata
-------------------------------------+-------------------------------------
Reporter: Gwildor | Owner: mrfuxi
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by claudep):

* has_patch: 0 => 1
* needs_tests: 0 => 1


Comment:

188a2418807f661eedfc675731521f2f46a3c49a (#21652) added progress
information for loaddata.

This PR is adding progress report for dumpdata:
https://github.com/django/django/pull/5032

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

Django

unread,
Jul 22, 2015, 3:37:10 PM7/22/15
to django-...@googlegroups.com
#22258: Show progress during dumpdata and loaddata
-------------------------------------+-------------------------------------
Reporter: Gwildor | Owner: mrfuxi
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
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 claudep):

* needs_tests: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/22258#comment:7>

Django

unread,
Jul 23, 2015, 9:11:37 AM7/23/15
to django-...@googlegroups.com
#22258: Show progress during dumpdata
-------------------------------------+-------------------------------------
Reporter: Gwildor | Owner: mrfuxi
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | 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 timgraham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/22258#comment:8>

Django

unread,
Jul 24, 2015, 12:38:51 PM7/24/15
to django-...@googlegroups.com
#22258: Show progress during dumpdata
-------------------------------------+-------------------------------------
Reporter: Gwildor | Owner: mrfuxi
Type: New feature | Status: closed

Component: Core (Management | Version: master
commands) |
Severity: Normal | 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 Claude Paroz <claude@…>):

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


Comment:

In [changeset:"c296e55dc6a697c7e4d4be92b954633cda4a79b1" c296e55]:
{{{
#!CommitTicketReference repository=""
revision="c296e55dc6a697c7e4d4be92b954633cda4a79b1"
Fixed #22258 -- Added progress status for dumpdata when outputting to file

Thanks Gwildor Sok for the report and Tim Graham for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22258#comment:9>

Django

unread,
Sep 9, 2015, 2:36:25 PM9/9/15
to django-...@googlegroups.com
#22258: Show progress during dumpdata
-------------------------------------+-------------------------------------
Reporter: Gwildor | Owner: mrfuxi
Type: New feature | Status: closed
Component: Core (Management | Version: master
commands) |
Severity: Normal | 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 Tim Graham <timograham@…>):

In [changeset:"eaa3c883450f3c7ea939992ed075257bbac3d8b2" eaa3c88]:
{{{
#!CommitTicketReference repository=""
revision="eaa3c883450f3c7ea939992ed075257bbac3d8b2"
Refs #22258 -- Fixed an unclosed temporary file in fixtures test.

This prevented the temporary directory from being removed
on Windows.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22258#comment:10>

Reply all
Reply to author
Forward
0 new messages