WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
227134
[webkitcorepy] Retry downloads in Autoinstall
https://bugs.webkit.org/show_bug.cgi?id=227134
Summary
[webkitcorepy] Retry downloads in Autoinstall
Jonathan Bedard
Reported
2021-06-17 11:30:42 PDT
When Autoinstall fails to download a package, we should retry. Note that this retry doesn't extend to running the install operation, which shouldn't be flakey.
Attachments
Patch
(4.85 KB, patch)
2021-06-17 11:34 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch
(4.36 KB, patch)
2021-06-17 13:54 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-06-17 11:31:09 PDT
<
rdar://problem/79462182
>
Jonathan Bedard
Comment 2
2021-06-17 11:34:48 PDT
Created
attachment 431693
[details]
Patch
Aakash Jain
Comment 3
2021-06-17 13:23:34 PDT
Comment on
attachment 431693
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=431693&action=review
> Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:100 > + while count <= (AutoInstall.retry or 0):
Do we need 0 here, can we just ensure AutoInstall.retry is always valid?
> Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:114 > + if count > (AutoInstall.retry or 0):
Ditto
> Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:393 > + retry = 1
might be better to name it something like: number_of_retry
> Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:533 > + def set_retry(cls, retry):
This method seems unused
Jonathan Bedard
Comment 4
2021-06-17 13:38:56 PDT
Comment on
attachment 431693
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=431693&action=review
>> Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:100 >> + while count <= (AutoInstall.retry or 0): > > Do we need 0 here, can we just ensure AutoInstall.retry is always valid?
This is to make sure we behave correctly in case retry is "None", and given that the variable doesn't have an _, None feels like a reasonable value
>> Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:393 >> + retry = 1 > > might be better to name it something like: number_of_retry
Will change it's name
>> Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:533 >> + def set_retry(cls, retry): > > This method seems unused
It is at the moment, but given this is part of a library, it seems like something someone might one to change at some point in the future
Aakash Jain
Comment 5
2021-06-17 13:43:09 PDT
Comment on
attachment 431693
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=431693&action=review
>>> Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:100 >>> + while count <= (AutoInstall.retry or 0): >> >> Do we need 0 here, can we just ensure AutoInstall.retry is always valid? > > This is to make sure we behave correctly in case retry is "None", and given that the variable doesn't have an _, None feels like a reasonable value
we can change the default value of retry to 0
Jonathan Bedard
Comment 6
2021-06-17 13:49:12 PDT
(In reply to Aakash Jain from
comment #5
)
> Comment on
attachment 431693
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=431693&action=review
> > >>> Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:100 > >>> + while count <= (AutoInstall.retry or 0): > >> > >> Do we need 0 here, can we just ensure AutoInstall.retry is always valid? > > > > This is to make sure we behave correctly in case retry is "None", and given that the variable doesn't have an _, None feels like a reasonable value > > we can change the default value of retry to 0
I think we want the default value to be 1. The problem here is if a caller of the library sets "retry" (or "times_to_retry" as will be in the next patch) to "None". Actually, the solution here might be to drop the `set_retry` function, but keep doing something sane when we get a value of "None".
Jonathan Bedard
Comment 7
2021-06-17 13:54:49 PDT
Created
attachment 431718
[details]
Patch
EWS
Comment 8
2021-06-17 14:27:24 PDT
Committed
r279009
(
238934@main
): <
https://commits.webkit.org/238934@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 431718
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug