Skip to content

Fix double list emptying GitLab diff report generator

Petar Prokić requested to merge pprokic-gitlab-diff-report-fix into master

REMOVE IF ALREADY PART OF ISSUE DESCRIPTION

Overview

The GitLab diff report is currently broken i.e. returning false positives.

The is_endpoint_valid function of basediff.py is emptying each API endpoint generator response and returning an empty list.

This is happening by calling list() on 2 occasions, is_error_message_present and on return.

As a result the source list is empty ([]) and the destination is not even called.

And to mask it even further the default empty_diff returns accuracy = 1, so the e2e tests never fail. We should still be able to distinguish between actually no results or no individual diff as a 1 and and actual diff

Tasks

  • Avoid emptying the API endpoint response generator
  • Make no diff action return 1 and actual 1.0
  • Update docs if needed (workflow, runbooks, README, migration metrics, etc.)

Acceptance Criteria

  • Existing UTs pass locally
Edited by Petar Prokić

Merge request reports