-
Notifications
You must be signed in to change notification settings - Fork 40
Download non-prerelease extensions ONLY by default #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…rk on acutally downloading them.
This pull will cause issues for #24 because only one version of the latest non-prerelease extension will be downloaded. Logic needs to be added to download all the targetTypes of the latest version. Use POST
{
"filters": [
{
"criteria": [
{
"filterType": 10,
"value": "redhat.java"
},
{
"filterType": 8,
"value": "Microsoft.VisualStudio.Code"
},
{
"filterType": 12,
"value": "4096"
}
],
"pageNumber": 1,
"pageSize": 50,
"sortBy": 0,
"sortOrder": 0
}
],
"assetTypes": [],
"flags": 950
} |
Hi, I advise to test the removal of the requests sessions, this should increase performence. from requests.adapters import HTTPAdapter, Retry
retries = Retry(total=5, backoff_factor=1, status_forcelist=[ 413, 429, 500, 501, 502, 503, 504, ], allowed_methods=["HEAD", "GET", "PUT", "DELETE", "OPTIONS", "TRACE"])
session = requests.session()
session.mount('https://', HTTPAdapter(max_retries=retries))
# session.get(...) |
@tomer953 I will test your recommendation in another pull request. I can probably run some timed tests for the different requests solutions as well in that pull request. |
Comments in #31 |
Takes care of #31 and downloads only non-prerelease versions of extensions.
Some other updates are:
session = requests.session()
in favor of using the the http method directly from therequests
object. This was an attempt to fix Failure while fetching extensions. #33.--prerelease-extensions
toggle to allow user to download prerelease extensions as well--vscode-version
arg to configure version used in User-Agent header. Defaults to 1.69.2, the latest version of VSCode as of today