[pw-ci] [PATCH] series_db_lib: set downloaded to false

Aaron Conole aconole at redhat.com
Wed Oct 27 12:58:53 UTC 2021


Michael Santana <msantana at redhat.com> writes:

> On Tue, Oct 26, 2021 at 2:32 PM Aaron Conole <aconole at redhat.com> wrote:
>>
>> Commit e16b2ffea1d2 ("pw-ci: allow for downloads to fail") introduced the
>> download retry mechanism, but never set an initial value.  This caused
>> the partial series available mechanism never to select the series for
>> reconsideration.  Explicitly set this value to "0" and force the
>> incomplete series detection to consider series that weren't previously
>> available.
> What is inside a database entry column when it hasn't been
> initialized? does it default to set something like "NULL" as opposed
> to literal 0 (at least when INTEGER)?

It's empty string, which isn't expected.

> In any case, I ack from me
> Acked-by: Michael Santana <msantana at redhat.com>

Thanks.  Applied.

>>
>> Fixes: e16b2ffea1d2 ("pw-ci: allow for downloads to fail")
>> Signed-off-by: Aaron Conole <aconole at redhat.com>
>> Reported-by: Ilya Maximets <i.maximets at ovn.org>
>> Reported-by: Michael Santana <msantana at redhat.com>
>> ---
>>  series_db_lib.sh | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/series_db_lib.sh b/series_db_lib.sh
>> index 07a2075..6c2d98e 100644
>> --- a/series_db_lib.sh
>> +++ b/series_db_lib.sh
>> @@ -152,7 +152,7 @@ function series_db_add_false() {
>>      local submitter_email="$6"
>>      local completed="$7"
>>
>> -    echo "insert into series(series_id, series_project, series_url, series_submitter, series_email, series_submitted, series_completed, series_instance) values (${id}, \"${project}\", \"${url}\", \"${submitter_name}\", \"${submitter_email}\", \"false\", \"${completed}\", \"${instance}\");" | series_db_execute
>> +    echo "insert into series(series_id, series_project, series_url, series_submitter, series_email, series_submitted, series_completed, series_instance, series_downloaded) values (${id}, \"${project}\", \"${url}\", \"${submitter_name}\", \"${submitter_email}\", \"false\", \"${completed}\", \"${instance}\", \"0\");" | series_db_execute
>>  }
>>
>>  function series_id_exists() {
>> --
>> 2.31.1
>>



More information about the Pwci mailing list