Skip to content

Updater: No download progress hooks #1057

Closed

Description

@jku

Description of feature request:
For large downloads an interactive client would typically want to provide progress information (progress bar or just a running percentage or count of bytes). tuf.Updater could provide functionality that enables this.

The practical case I'm looking at is pip which currently uses the progress module while downloading chunks with requests module. If tuf support is added to pip, it will lose the progress indication functionality.

Current behavior:
The downloads are done in chunks already but there does not seem to be any way to add hooks into the download loop.

Expected behavior:
Updater could e.g. call an optional hook function with some progress data periodically. At a minimum the number of bytes downloaded so far should be available.

Activity

  1. lukpueh commented on Jun 29, 2020

    @lukpueh
    Member

    Thanks for the great feature request, @jku! Let me cross-reference with this general updater stack clean-up issue (#841) and another issue that touches the networking aspects (#932).

  2. jku commented on Jul 2, 2020

    @jku
    MemberAuthor

    When/if this is fixed, the default download settings should be re-evaluated:

    CHUNK_SIZE = 400000 #bytes
    MIN_AVERAGE_DOWNLOAD_SPEED = 50 #bytes/second
    SOCKET_TIMEOUT = 4 #seconds
    

    A large download at 50b/sec seems to mean one progress update every two hours which would not be very interactive.

    Of course the values also mean that a server sending a large file 1 b every 4 seconds would only get flagged as slow retrieval attack after 18 days of downloading... so maybe these values could be re-evaluated anyway.

    Joshua pointed out #932 as related

  3. added this to the milestone on Jul 7, 2020
  4. removed this from the milestone on Sep 8, 2020
  5. jku commented on Nov 13, 2020

    @jku
    MemberAuthor

    This would be deprecated with #1213 updater: abstract out the network IO

  6. added
    clientRelated to the client (updater) implementation
    on Nov 27, 2020
  7. joshuagl commented on Apr 7, 2021

    @joshuagl
    Member

    Resolved obsolete by #1213

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clientRelated to the client (updater) implementationenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions