Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-13295

Undefined name 'index' in tests/util/workload_management.py

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 4.5.0
    • Impala 4.5.0
    • Test
    • None
    • ghx-label-10

    Description

      While testing the new version of script bin/jenkins/critique-gerrit-review.py to compare branch-4.4.0 and HEAD, it found an undefined name 'index' in tests/util/workload_management.py:

          assert value == expected, ('per-host fragment instances incorrect.'
              ' expected="{0}" actual="{1}"').format(expected, data[index])
      

      https://github.com/apache/impala/blob/589dbd6f1a1247c365fa794e5b7ed992c2e1f2ab/tests/util/workload_management.py#L274-L275

      This is due to this change only replace 'data[index]' with 'value' in the first line but forgot to do it in the second line:
      https://gerrit.cloudera.org/c/21358/11/tests/util/workload_management.py#274

      To avoid such issues in the future, we might need to improve flake8-diff to also look into several lines of codes around the changes.
      CC jasonmfehr, MikaelSmith, rizaon

      Attachments

        Activity

          People

            stigahuang Quanlong Huang
            stigahuang Quanlong Huang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: