Closed Bug 1946805 Opened 6 months ago Closed 6 months ago

Count is not being incremented properly when excluding bugs from the full list and therefore the export script is hanging

Categories

(bugzilla.mozilla.org :: Extensions, defect, P1)

Production

Tracking

()

RESOLVED FIXED

People

(Reporter: dkl, Assigned: dkl)

Details

Attachments

(1 file)

The new BMO ETL export script has a bug in that it does not properly increment the $count variable when encountering bugs that are to be skipped in the export. These include Legal bugs, etc. Then the while() loop runs forever as $count is always less than $total.

Bad code:

        if (any { $obj->product eq $_ } EXCLUDE_PRODUCTS) {
          $excluded_bugs{$obj->id} = 1;
          next;
        }

This should be instead:

        if (any { $obj->product eq $_ } EXCLUDE_PRODUCTS) {
          $excluded_bugs{$obj->id} = 1;
          $count++;
          next;
        }

I didn't not catch this unfortunately til we tried it in production as bugzilla-dev does not have any bugs to be excluded so the count was always correct.

Any other functions where we skip excluded bugs will also need to be update to increment $count so I will fix those as well.

Summary: push updated bugzilla.mozilla.org live → Count is not being incremented properly when excluding bugs from the full list and therefore the export script is hanging
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: