microsoft / microsoft/simple_ado

ADOGitClient class download_zip method not displaying progress bar

Open
#13 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
53
Forks
15
PR merge metrics
No merged PRs in 30d

Description

I believe this is due to the server in question responding without a content-length header because of chunked encoding.

I initially found your project in a roundabout way because of a similar issue with azure-devops-python-api where when pulling a tree zip, a Generator would be created, so there was no reasonable way to get a progress update bar going. The interface you've created is a lot simpler and easy to use, which is perfect for my purposes, and has made my development much more streamlined, but it would be nice to find a way to show a progress bar. For large mono-repos, a download can take quite some time.

Perhaps there is a way to recursively get all items from a tree via a given path and then calculate an approximate total size? I played a bit with hacking up download_zip to simply get all tree entries from a given path, ignoring content and grabbing metadata, and it did seem to have sizes returned. Perhaps if we summed these, we could simply pass them into the download_zip call and have that be the fall back if the content-length isn't provided?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the ADOGitClient.download_zip entry point and inspect how responses without a content-length header are handled. Review the proposed tree-entry metadata approach and its effect on progress reporting; done means large downloads show a useful progress bar even when the server uses chunked encoding. The issue names no file or test path.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.