Quanlong Huang created IMPALA-13295:
---------------------------------------

             Summary: Undefined name 'index' in 
tests/util/workload_management.py
                 Key: IMPALA-13295
                 URL: https://issues.apache.org/jira/browse/IMPALA-13295
             Project: IMPALA
          Issue Type: Bug
          Components: Test
            Reporter: Quanlong Huang
            Assignee: Quanlong Huang


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:
{code:python}
    assert value == expected, ('per-host fragment instances incorrect.'
        ' expected="{0}" actual="{1}"').format(expected, data[index])
{code}
[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]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to