openshift-eng / elliott

Apache License 2.0
15 stars 28 forks source link

[RHELWF-7726] increase page size to 1000 #449

Closed Ximinhan closed 1 year ago

Ximinhan commented 1 year ago

elliott verify-attached-bugs will raise such an error message

On advisory 103179, CVE-2022-30322 is associated with Brew components openshift-enterprise-cli-alt-container, ose-insights-operator-container without a tracker bug. You may need to explicitly exclude those Brew components from the CVE mapping or attach the corresponding tracker bugs.
On advisory 103179, CVE-2022-30323 is associated with Brew components kuryr-controller-container, ose-azure-disk-csi-driver-container without a tracker bug. You may need to explicitly exclude those Brew components from the CVE mapping or attach the corresponding tracker bugs.
On advisory 103179, CVE-2022-26945 is associated with Brew components cluster-monitoring-operator-container, ose-network-metrics-daemon-container without a tracker bug. You may need to explicitly exclude those Brew components from the CVE mapping or attach the corresponding tracker bugs.
Some bug problems were listed above. Please investigate.

it looks like pagination is not correctly working as expected, the mapping info is on page 2 the issue is pagination on the server is not correctly ordered, ticket to this bug is RHELWF-7726

this PR increases the page size to the maximum value of 1000 to reduce the odds of this error

openshift-bot commented 1 year ago

Build #1

GLOB sdist-make: /mnt/workspace/jenkins/working/art-tools_elliott_PR-449/setup.py
py38 create: /mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/py38
py38 installdeps: -rrequirements-dev.txt
py38 inst: /mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/.tmp/package/1/rh-elliott-2.0.14.dev163+gb156851.zip
py38 installed: aiodns==3.0.0,aiohttp==3.8.3,aiosignal==1.2.0,astroid==2.12.11,async-timeout==4.0.2,attrs==22.1.0,Brotli==1.0.9,cchardet==2.1.7,certifi==2022.9.24,cffi==1.15.1,charset-normalizer==2.1.1,click==8.1.3,coverage==6.5.0,cryptography==38.0.1,decorator==5.1.1,defusedxml==0.7.1,dill==0.3.5.1,distlib==0.3.6,errata-tool @ git+http://github.com/thegreyd/errata-tool.git@bad2cb9c3321a1179f018cd9ddcf1d51d634290b,filelock==3.8.0,flake8==5.0.4,flexmock==0.11.3,frozenlist==1.3.1,future==0.18.2,gssapi==1.8.1,idna==3.4,iniconfig==1.1.1,isort==5.10.1,jira==3.4.1,jsonpath-rw==1.4.0,koji==1.30.1,krb5==0.4.0,lazy-object-proxy==1.7.1,mccabe==0.7.0,mock==4.0.3,multidict==6.0.2,mypy==0.982,mypy-extensions==0.4.3,oauthlib==3.2.1,packaging==21.3,platformdirs==2.5.2,pluggy==1.0.0,ply==3.11,py==1.11.0,pycares==4.2.2,pycodestyle==2.9.1,pycparser==2.21,pyflakes==2.5.0,pygit2==1.10.1,pylint==2.15.4,pyparsing==3.0.9,pyspnego==0.6.0,pytest==7.1.3,python-bugzilla==3.2.0,python-dateutil==2.8.2,PyYAML==6.0,requests==2.28.1,requests-gssapi==1.2.3,requests-kerberos==0.14.0,requests-oauthlib==1.3.1,requests-toolbelt==0.10.0,rh-elliott @ file:///mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/.tmp/package/1/rh-elliott-2.0.14.dev163%2Bgb156851.zip,ruamel.yaml==0.17.21,ruamel.yaml.clib==0.2.6,semver==2.13.0,setuptools-scm==7.0.5,six==1.16.0,tenacity==8.1.0,tomli==2.0.1,tomlkit==0.11.5,tox==3.26.0,typing_extensions==4.4.0,urllib3==1.26.12,virtualenv==20.16.5,wrapt==1.14.1,yarl==1.8.1
py38 run-test-pre: PYTHONHASHSEED='3135943618'
py38 run-test: commands[0] | coverage run --branch --source elliottlib -m unittest discover -t . -s tests/
...............................................BZ 9 is ignored because its status was MODIFIED at the moment of sweep cutoff (2021-06-30 12:30:00), however its status changed back to ['ASSIGNED'] afterwards
...................No flaw bugs could be found for these trackers: {'OCPBUGS-2'}
...changed 123 from status1 to status2
.123 is already on status1
.changed 123 from status1 to status2
..changed 123 from status1 to status2
.123 is already on status1
.changed 123 from status1 to status2
......................./mnt/workspace/jenkins/working/art-tools_elliott_PR-449/tests/test_errata_async.py:120: RuntimeWarning: coroutine 'AsyncErrataAPI.get_cve_package_exclusions' was never awaited
  async for item in api.get_cve_package_exclusions(1):
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
E.../mnt/workspace/jenkins/working/art-tools_elliott_PR-449/elliottlib/errata_async.py:39: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
  resp.raise_for_status()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
....F............................................................
======================================================================
ERROR: test_get_cve_package_exclusions (tests.test_errata_async.TestAsyncErrataAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/py38/lib/python3.8/site-packages/mock/mock.py", line 1346, in patched
    return func(*newargs, **newkeywargs)
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-449/tests/test_errata_async.py", line 124, in test_get_cve_package_exclusions
    actual = get_event_loop().run_until_complete(_call())
  File "/usr/lib64/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-449/tests/test_errata_async.py", line 120, in _call
    async for item in api.get_cve_package_exclusions(1):
TypeError: 'async for' requires an object with __aiter__ method, got coroutine

======================================================================
FAIL: test_get_advisory_cve_package_exclusions (tests.test_errata_async.TestAsyncErrataUtils)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/py38/lib/python3.8/site-packages/mock/mock.py", line 1346, in patched
    return func(*newargs, **newkeywargs)
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-449/tests/test_errata_async.py", line 143, in test_get_advisory_cve_package_exclusions
    self.assertEqual(actual, expected)
AssertionError: {} != {'CVE-2099-1': {'a': 1, 'b': 2}, 'CVE-2099-2': {'c': 3}}
- {}
+ {'CVE-2099-1': {'a': 1, 'b': 2}, 'CVE-2099-2': {'c': 3}}

----------------------------------------------------------------------
Ran 165 tests in 0.725s

FAILED (failures=1, errors=1)
ERROR: InvocationError for command /mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/py38/bin/coverage run --branch --source elliottlib -m unittest discover -t . -s tests/ (exited with code 1)
___________________________________ summary ____________________________________
ERROR:   py38: commands failed
openshift-bot commented 1 year ago

Build #2

GLOB sdist-make: /mnt/workspace/jenkins/working/art-tools_elliott_PR-449/setup.py
py38 inst-nodeps: /mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/.tmp/package/1/rh-elliott-2.0.14.dev164+gd6bd172.zip
py38 installed: aiodns==3.0.0,aiohttp==3.8.3,aiosignal==1.2.0,astroid==2.12.11,async-timeout==4.0.2,attrs==22.1.0,Brotli==1.0.9,cchardet==2.1.7,certifi==2022.9.24,cffi==1.15.1,charset-normalizer==2.1.1,click==8.1.3,coverage==6.5.0,cryptography==38.0.1,decorator==5.1.1,defusedxml==0.7.1,dill==0.3.5.1,distlib==0.3.6,errata-tool @ git+http://github.com/thegreyd/errata-tool.git@bad2cb9c3321a1179f018cd9ddcf1d51d634290b,filelock==3.8.0,flake8==5.0.4,flexmock==0.11.3,frozenlist==1.3.1,future==0.18.2,gssapi==1.8.1,idna==3.4,iniconfig==1.1.1,isort==5.10.1,jira==3.4.1,jsonpath-rw==1.4.0,koji==1.30.1,krb5==0.4.0,lazy-object-proxy==1.7.1,mccabe==0.7.0,mock==4.0.3,multidict==6.0.2,mypy==0.982,mypy-extensions==0.4.3,oauthlib==3.2.1,packaging==21.3,platformdirs==2.5.2,pluggy==1.0.0,ply==3.11,py==1.11.0,pycares==4.2.2,pycodestyle==2.9.1,pycparser==2.21,pyflakes==2.5.0,pygit2==1.10.1,pylint==2.15.4,pyparsing==3.0.9,pyspnego==0.6.0,pytest==7.1.3,python-bugzilla==3.2.0,python-dateutil==2.8.2,PyYAML==6.0,requests==2.28.1,requests-gssapi==1.2.3,requests-kerberos==0.14.0,requests-oauthlib==1.3.1,requests-toolbelt==0.10.0,rh-elliott @ file:///mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/.tmp/package/1/rh-elliott-2.0.14.dev164%2Bgd6bd172.zip,ruamel.yaml==0.17.21,ruamel.yaml.clib==0.2.6,semver==2.13.0,setuptools-scm==7.0.5,six==1.16.0,tenacity==8.1.0,tomli==2.0.1,tomlkit==0.11.5,tox==3.26.0,typing_extensions==4.4.0,urllib3==1.26.12,virtualenv==20.16.5,wrapt==1.14.1,yarl==1.8.1
py38 run-test-pre: PYTHONHASHSEED='2232621921'
py38 run-test: commands[0] | coverage run --branch --source elliottlib -m unittest discover -t . -s tests/
...............................................BZ 9 is ignored because its status was MODIFIED at the moment of sweep cutoff (2021-06-30 12:30:00), however its status changed back to ['ASSIGNED'] afterwards
...................No flaw bugs could be found for these trackers: {'OCPBUGS-2'}
...changed 123 from status1 to status2
.123 is already on status1
.changed 123 from status1 to status2
..changed 123 from status1 to status2
.123 is already on status1
.changed 123 from status1 to status2
.........................................................................................
----------------------------------------------------------------------
Ran 164 tests in 0.704s

OK
py38 run-test: commands[1] | coverage report
Name                                              Stmts   Miss Branch BrPart  Cover
-----------------------------------------------------------------------------------
elliottlib/__init__.py                                8      2      2      1    70%
elliottlib/assembly.py                               92      9     54      7    89%
elliottlib/assertion.py                              11      0      6      0   100%
elliottlib/brew.py                                  328    188    134      5    36%
elliottlib/bug/__init__.py                            0      0      0      0   100%
elliottlib/build_finder.py                          114     12     74     15    86%
elliottlib/bzutil.py                                733    289    310     16    57%
elliottlib/cincinnati.py                             21     21      4      0     0%
elliottlib/cli/__init__.py                            0      0      0      0   100%
elliottlib/cli/__main__.py                          272    272     72      0     0%
elliottlib/cli/add_metadata_cli.py                   33     33      4      0     0%
elliottlib/cli/advisory_commons_cli.py               90     90     38      0     0%
elliottlib/cli/advisory_drop_cli.py                  21     21      2      0     0%
elliottlib/cli/advisory_images_cli.py                14     14      2      0     0%
elliottlib/cli/advisory_impetus_cli.py               22     22      6      0     0%
elliottlib/cli/attach_bugs_cli.py                    37     37     18      0     0%
elliottlib/cli/attach_cve_flaws_cli.py              129     64     56      9    46%
elliottlib/cli/change_state_cli.py                   44     44     16      0     0%
elliottlib/cli/cli_opts.py                           15      0     17      0   100%
elliottlib/cli/common.py                             48     12      6      1    69%
elliottlib/cli/create_cli.py                         70     70     20      0     0%
elliottlib/cli/create_placeholder_cli.py             40     40     12      0     0%
elliottlib/cli/create_textonly_cli.py                51     51      8      0     0%
elliottlib/cli/find_bugs_blocker_cli.py              43      4     10      3    87%
elliottlib/cli/find_bugs_qe_cli.py                   36      4      6      0    90%
elliottlib/cli/find_bugs_sweep_cli.py               193     30    106     19    80%
elliottlib/cli/find_builds_cli.py                   255    188    169      2    20%
elliottlib/cli/get_golang_versions_cli.py            56     21     32      5    50%
elliottlib/cli/list_cli.py                           17     17      4      0     0%
elliottlib/cli/puddle_advisories_cli.py              37     37     10      0     0%
elliottlib/cli/remove_bugs_cli.py                    50      8     14      6    78%
elliottlib/cli/repair_bugs_cli.py                    61      5     26      6    87%
elliottlib/cli/rhcos_cli.py                          97     97     54      0     0%
elliottlib/cli/rpmdiff_cli.py                       102    102     34      0     0%
elliottlib/cli/tag_builds_cli.py                    128    128     62      0     0%
elliottlib/cli/tarball_sources_cli.py                83     83     26      0     0%
elliottlib/cli/validate_rhsa.py                      42     42     12      0     0%
elliottlib/cli/verify_attached_bugs_cli.py          237     82    153     17    58%
elliottlib/cli/verify_attached_operators_cli.py     120     86     55      0    19%
elliottlib/cli/verify_cvp_cli.py                    162    162     78      0     0%
elliottlib/constants.py                              52      0      0      0   100%
elliottlib/cvp.py                                   216    216    113      0     0%
elliottlib/dotconfig.py                              54     11     30      6    75%
elliottlib/errata.py                                323    208    146      4    32%
elliottlib/errata_async.py                          107     16     36      6    83%
elliottlib/exceptions.py                             12      0      0      0   100%
elliottlib/exectools.py                              84     13     24      3    83%
elliottlib/gitdata.py                               171    137     76      0    14%
elliottlib/imagecfg.py                               21      2      0      0    90%
elliottlib/logutil.py                                 9      1      2      1    82%
elliottlib/metadata.py                              154     43     76     18    67%
elliottlib/model.py                                 105     22     30      2    79%
elliottlib/openshiftclient.py                        34     34      8      0     0%
elliottlib/pushd.py                                  21      0      2      0   100%
elliottlib/resultsdb.py                              28     28      4      0     0%
elliottlib/rhcos.py                                  51     51     12      0     0%
elliottlib/rpm_utils.py                              30     14     16      5    46%
elliottlib/rpmcfg.py                                  5      2      0      0    60%
elliottlib/rpmdiff.py                                31      0      0      0   100%
elliottlib/runtime.py                               278    202    106      2    22%
elliottlib/tarball_sources.py                        90     61     34      0    30%
elliottlib/util.py                                  303    168    112      9    41%
-----------------------------------------------------------------------------------
TOTAL                                              6091   3616   2539    168    38%
py38 run-test: commands[2] | flake8
___________________________________ summary ____________________________________
  py38: commands succeeded
  congratulations :)
openshift-bot commented 1 year ago

Build #3

GLOB sdist-make: /mnt/workspace/jenkins/working/art-tools_elliott_PR-449@2/setup.py
py38 create: /mnt/workspace/jenkins/working/art-tools_elliott_PR-449@2/.tox/py38
py38 installdeps: -rrequirements-dev.txt
py38 inst: /mnt/workspace/jenkins/working/art-tools_elliott_PR-449@2/.tox/.tmp/package/1/rh-elliott-2.0.14.dev164+gd6bd172.zip
py38 installed: aiodns==3.0.0,aiohttp==3.8.3,aiosignal==1.2.0,astroid==2.12.11,async-timeout==4.0.2,attrs==22.1.0,Brotli==1.0.9,cchardet==2.1.7,certifi==2022.9.24,cffi==1.15.1,charset-normalizer==2.1.1,click==8.1.3,coverage==6.5.0,cryptography==38.0.1,decorator==5.1.1,defusedxml==0.7.1,dill==0.3.5.1,distlib==0.3.6,errata-tool @ git+http://github.com/thegreyd/errata-tool.git@bad2cb9c3321a1179f018cd9ddcf1d51d634290b,filelock==3.8.0,flake8==5.0.4,flexmock==0.11.3,frozenlist==1.3.1,future==0.18.2,gssapi==1.8.1,idna==3.4,iniconfig==1.1.1,isort==5.10.1,jira==3.4.1,jsonpath-rw==1.4.0,koji==1.30.1,krb5==0.4.0,lazy-object-proxy==1.7.1,mccabe==0.7.0,mock==4.0.3,multidict==6.0.2,mypy==0.982,mypy-extensions==0.4.3,oauthlib==3.2.1,packaging==21.3,platformdirs==2.5.2,pluggy==1.0.0,ply==3.11,py==1.11.0,pycares==4.2.2,pycodestyle==2.9.1,pycparser==2.21,pyflakes==2.5.0,pygit2==1.10.1,pylint==2.15.4,pyparsing==3.0.9,pyspnego==0.6.0,pytest==7.1.3,python-bugzilla==3.2.0,python-dateutil==2.8.2,PyYAML==6.0,requests==2.28.1,requests-gssapi==1.2.3,requests-kerberos==0.14.0,requests-oauthlib==1.3.1,requests-toolbelt==0.10.0,rh-elliott @ file:///mnt/workspace/jenkins/working/art-tools_elliott_PR-449%402/.tox/.tmp/package/1/rh-elliott-2.0.14.dev164%2Bgd6bd172.zip,ruamel.yaml==0.17.21,ruamel.yaml.clib==0.2.6,semver==2.13.0,setuptools-scm==7.0.5,six==1.16.0,tenacity==8.1.0,tomli==2.0.1,tomlkit==0.11.5,tox==3.26.0,typing_extensions==4.4.0,urllib3==1.26.12,virtualenv==20.16.5,wrapt==1.14.1,yarl==1.8.1
py38 run-test-pre: PYTHONHASHSEED='1621511595'
py38 run-test: commands[0] | coverage run --branch --source elliottlib -m unittest discover -t . -s tests/
...............................................BZ 9 is ignored because its status was MODIFIED at the moment of sweep cutoff (2021-06-30 12:30:00), however its status changed back to ['ASSIGNED'] afterwards
...................No flaw bugs could be found for these trackers: {'OCPBUGS-2'}
...changed 123 from status1 to status2
.123 is already on status1
.changed 123 from status1 to status2
..changed 123 from status1 to status2
.123 is already on status1
.changed 123 from status1 to status2
.........................................................................................
----------------------------------------------------------------------
Ran 164 tests in 0.727s

OK
py38 run-test: commands[1] | coverage report
Name                                              Stmts   Miss Branch BrPart  Cover
-----------------------------------------------------------------------------------
elliottlib/__init__.py                                8      2      2      1    70%
elliottlib/assembly.py                               92      9     54      7    89%
elliottlib/assertion.py                              11      0      6      0   100%
elliottlib/brew.py                                  328    188    134      5    36%
elliottlib/bug/__init__.py                            0      0      0      0   100%
elliottlib/build_finder.py                          114     12     74     15    86%
elliottlib/bzutil.py                                733    289    310     16    57%
elliottlib/cincinnati.py                             21     21      4      0     0%
elliottlib/cli/__init__.py                            0      0      0      0   100%
elliottlib/cli/__main__.py                          272    272     72      0     0%
elliottlib/cli/add_metadata_cli.py                   33     33      4      0     0%
elliottlib/cli/advisory_commons_cli.py               90     90     38      0     0%
elliottlib/cli/advisory_drop_cli.py                  21     21      2      0     0%
elliottlib/cli/advisory_images_cli.py                14     14      2      0     0%
elliottlib/cli/advisory_impetus_cli.py               22     22      6      0     0%
elliottlib/cli/attach_bugs_cli.py                    37     37     18      0     0%
elliottlib/cli/attach_cve_flaws_cli.py              129     64     56      9    46%
elliottlib/cli/change_state_cli.py                   44     44     16      0     0%
elliottlib/cli/cli_opts.py                           15      0     17      0   100%
elliottlib/cli/common.py                             48     12      6      1    69%
elliottlib/cli/create_cli.py                         70     70     20      0     0%
elliottlib/cli/create_placeholder_cli.py             40     40     12      0     0%
elliottlib/cli/create_textonly_cli.py                51     51      8      0     0%
elliottlib/cli/find_bugs_blocker_cli.py              43      4     10      3    87%
elliottlib/cli/find_bugs_qe_cli.py                   36      4      6      0    90%
elliottlib/cli/find_bugs_sweep_cli.py               193     30    106     19    80%
elliottlib/cli/find_builds_cli.py                   255    188    169      2    20%
elliottlib/cli/get_golang_versions_cli.py            56     21     32      5    50%
elliottlib/cli/list_cli.py                           17     17      4      0     0%
elliottlib/cli/puddle_advisories_cli.py              37     37     10      0     0%
elliottlib/cli/remove_bugs_cli.py                    50      8     14      6    78%
elliottlib/cli/repair_bugs_cli.py                    61      5     26      6    87%
elliottlib/cli/rhcos_cli.py                          97     97     54      0     0%
elliottlib/cli/rpmdiff_cli.py                       102    102     34      0     0%
elliottlib/cli/tag_builds_cli.py                    128    128     62      0     0%
elliottlib/cli/tarball_sources_cli.py                83     83     26      0     0%
elliottlib/cli/validate_rhsa.py                      42     42     12      0     0%
elliottlib/cli/verify_attached_bugs_cli.py          237     82    153     17    58%
elliottlib/cli/verify_attached_operators_cli.py     120     86     55      0    19%
elliottlib/cli/verify_cvp_cli.py                    162    162     78      0     0%
elliottlib/constants.py                              52      0      0      0   100%
elliottlib/cvp.py                                   216    216    113      0     0%
elliottlib/dotconfig.py                              54     11     30      6    75%
elliottlib/errata.py                                323    208    146      4    32%
elliottlib/errata_async.py                          107     16     36      6    83%
elliottlib/exceptions.py                             12      0      0      0   100%
elliottlib/exectools.py                              84     13     24      3    83%
elliottlib/gitdata.py                               171    137     76      0    14%
elliottlib/imagecfg.py                               21      2      0      0    90%
elliottlib/logutil.py                                 9      1      2      1    82%
elliottlib/metadata.py                              154     43     76     18    67%
elliottlib/model.py                                 105     22     30      2    79%
elliottlib/openshiftclient.py                        34     34      8      0     0%
elliottlib/pushd.py                                  21      0      2      0   100%
elliottlib/resultsdb.py                              28     28      4      0     0%
elliottlib/rhcos.py                                  51     51     12      0     0%
elliottlib/rpm_utils.py                              30     14     16      5    46%
elliottlib/rpmcfg.py                                  5      2      0      0    60%
elliottlib/rpmdiff.py                                31      0      0      0   100%
elliottlib/runtime.py                               278    202    106      2    22%
elliottlib/tarball_sources.py                        90     61     34      0    30%
elliottlib/util.py                                  303    168    112      9    41%
-----------------------------------------------------------------------------------
TOTAL                                              6091   3616   2539    168    38%
py38 run-test: commands[2] | flake8
___________________________________ summary ____________________________________
  py38: commands succeeded
  congratulations :)
vfreex commented 1 year ago

I created https://issues.redhat.com/browse/RHELWF-7726. As a workaround for this specific advisory, we can increase the page size to a value like 600 (or some large value, needs tests) to avoid pagination.

Ximinhan commented 1 year ago

Increasing the size can't avoid the issue, we should get all content in one request to avoid pagination

openshift-bot commented 1 year ago

Build #4

GLOB sdist-make: /mnt/workspace/jenkins/working/art-tools_elliott_PR-449/setup.py
py38 inst-nodeps: /mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/.tmp/package/1/rh-elliott-2.0.14.dev166+gf292392.zip
py38 installed: aiodns==3.0.0,aiohttp==3.8.3,aiosignal==1.2.0,astroid==2.12.11,async-timeout==4.0.2,attrs==22.1.0,Brotli==1.0.9,cchardet==2.1.7,certifi==2022.9.24,cffi==1.15.1,charset-normalizer==2.1.1,click==8.1.3,coverage==6.5.0,cryptography==38.0.1,decorator==5.1.1,defusedxml==0.7.1,dill==0.3.5.1,distlib==0.3.6,errata-tool @ git+http://github.com/thegreyd/errata-tool.git@bad2cb9c3321a1179f018cd9ddcf1d51d634290b,filelock==3.8.0,flake8==5.0.4,flexmock==0.11.3,frozenlist==1.3.1,future==0.18.2,gssapi==1.8.1,idna==3.4,iniconfig==1.1.1,isort==5.10.1,jira==3.4.1,jsonpath-rw==1.4.0,koji==1.30.1,krb5==0.4.0,lazy-object-proxy==1.7.1,mccabe==0.7.0,mock==4.0.3,multidict==6.0.2,mypy==0.982,mypy-extensions==0.4.3,oauthlib==3.2.1,packaging==21.3,platformdirs==2.5.2,pluggy==1.0.0,ply==3.11,py==1.11.0,pycares==4.2.2,pycodestyle==2.9.1,pycparser==2.21,pyflakes==2.5.0,pygit2==1.10.1,pylint==2.15.4,pyparsing==3.0.9,pyspnego==0.6.0,pytest==7.1.3,python-bugzilla==3.2.0,python-dateutil==2.8.2,PyYAML==6.0,requests==2.28.1,requests-gssapi==1.2.3,requests-kerberos==0.14.0,requests-oauthlib==1.3.1,requests-toolbelt==0.10.0,rh-elliott @ file:///mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/.tmp/package/1/rh-elliott-2.0.14.dev166%2Bgf292392.zip,ruamel.yaml==0.17.21,ruamel.yaml.clib==0.2.6,semver==2.13.0,setuptools-scm==7.0.5,six==1.16.0,tenacity==8.1.0,tomli==2.0.1,tomlkit==0.11.5,tox==3.26.0,typing_extensions==4.4.0,urllib3==1.26.12,virtualenv==20.16.5,wrapt==1.14.1,yarl==1.8.1
py38 run-test-pre: PYTHONHASHSEED='183725489'
py38 run-test: commands[0] | coverage run --branch --source elliottlib -m unittest discover -t . -s tests/
...............................................BZ 9 is ignored because its status was MODIFIED at the moment of sweep cutoff (2021-06-30 12:30:00), however its status changed back to ['ASSIGNED'] afterwards
.....................No flaw bugs could be found for these trackers: {'OCPBUGS-2'}
...changed 123 from status1 to status2
.123 is already on status1
.changed 123 from status1 to status2
..changed 123 from status1 to status2
.123 is already on status1
.changed 123 from status1 to status2
.........................................................................................
----------------------------------------------------------------------
Ran 166 tests in 0.724s

OK
py38 run-test: commands[1] | coverage report
Name                                              Stmts   Miss Branch BrPart  Cover
-----------------------------------------------------------------------------------
elliottlib/__init__.py                                8      2      2      1    70%
elliottlib/assembly.py                               92      9     54      7    89%
elliottlib/assertion.py                              11      0      6      0   100%
elliottlib/brew.py                                  328    188    134      5    36%
elliottlib/bug/__init__.py                            0      0      0      0   100%
elliottlib/build_finder.py                          114     12     74     15    86%
elliottlib/bzutil.py                                746    290    316     19    57%
elliottlib/cincinnati.py                             21     21      4      0     0%
elliottlib/cli/__init__.py                            0      0      0      0   100%
elliottlib/cli/__main__.py                          272    272     72      0     0%
elliottlib/cli/add_metadata_cli.py                   33     33      4      0     0%
elliottlib/cli/advisory_commons_cli.py               90     90     38      0     0%
elliottlib/cli/advisory_drop_cli.py                  21     21      2      0     0%
elliottlib/cli/advisory_images_cli.py                14     14      2      0     0%
elliottlib/cli/advisory_impetus_cli.py               22     22      6      0     0%
elliottlib/cli/attach_bugs_cli.py                    37     37     18      0     0%
elliottlib/cli/attach_cve_flaws_cli.py              129     64     56      9    46%
elliottlib/cli/change_state_cli.py                   44     44     16      0     0%
elliottlib/cli/cli_opts.py                           15      0     17      0   100%
elliottlib/cli/common.py                             48     12      6      1    69%
elliottlib/cli/create_cli.py                         70     70     20      0     0%
elliottlib/cli/create_placeholder_cli.py             40     40     12      0     0%
elliottlib/cli/create_textonly_cli.py                51     51      8      0     0%
elliottlib/cli/find_bugs_blocker_cli.py              43      4     10      3    87%
elliottlib/cli/find_bugs_qe_cli.py                   36      4      6      0    90%
elliottlib/cli/find_bugs_sweep_cli.py               193     30    106     19    80%
elliottlib/cli/find_builds_cli.py                   255    188    169      2    20%
elliottlib/cli/get_golang_versions_cli.py            56     21     32      5    50%
elliottlib/cli/list_cli.py                           17     17      4      0     0%
elliottlib/cli/puddle_advisories_cli.py              37     37     10      0     0%
elliottlib/cli/remove_bugs_cli.py                    50      8     14      6    78%
elliottlib/cli/repair_bugs_cli.py                    61      5     26      6    87%
elliottlib/cli/rhcos_cli.py                          97     97     54      0     0%
elliottlib/cli/rpmdiff_cli.py                       102    102     34      0     0%
elliottlib/cli/tag_builds_cli.py                    128    128     62      0     0%
elliottlib/cli/tarball_sources_cli.py                83     83     26      0     0%
elliottlib/cli/validate_rhsa.py                      42     42     12      0     0%
elliottlib/cli/verify_attached_bugs_cli.py          238     82    155     17    59%
elliottlib/cli/verify_attached_operators_cli.py     120     86     55      0    19%
elliottlib/cli/verify_cvp_cli.py                    162    162     78      0     0%
elliottlib/constants.py                              52      0      0      0   100%
elliottlib/cvp.py                                   216    216    113      0     0%
elliottlib/dotconfig.py                              54     11     30      6    75%
elliottlib/errata.py                                323    208    146      4    32%
elliottlib/errata_async.py                          107     16     36      6    83%
elliottlib/exceptions.py                             12      0      0      0   100%
elliottlib/exectools.py                              84     13     24      3    83%
elliottlib/gitdata.py                               171    137     76      0    14%
elliottlib/imagecfg.py                               21      2      0      0    90%
elliottlib/logutil.py                                 9      1      2      1    82%
elliottlib/metadata.py                              154     43     76     18    67%
elliottlib/model.py                                 105     22     30      2    79%
elliottlib/openshiftclient.py                        34     34      8      0     0%
elliottlib/pushd.py                                  21      0      2      0   100%
elliottlib/resultsdb.py                              28     28      4      0     0%
elliottlib/rhcos.py                                  51     51     12      0     0%
elliottlib/rpm_utils.py                              30     14     16      5    46%
elliottlib/rpmcfg.py                                  5      2      0      0    60%
elliottlib/rpmdiff.py                                31      0      0      0   100%
elliottlib/runtime.py                               278    202    106      2    22%
elliottlib/tarball_sources.py                        90     61     34      0    30%
elliottlib/util.py                                  303    168    112      9    41%
-----------------------------------------------------------------------------------
TOTAL                                              6105   3617   2547    171    38%
py38 run-test: commands[2] | flake8
___________________________________ summary ____________________________________
  py38: commands succeeded
  congratulations :)
Ximinhan commented 1 year ago

I don't want to wait for a long time for the server side to solve it. We can solve our current issue through this pr

Ximinhan commented 1 year ago

all right, I didn't mean the current approach is wrong, but almost every time I saw this issue if we need the second page we can increase the page size to the maximum value of 1000 if the result count is over 1000 we will see this again

openshift-bot commented 1 year ago

Build #5

GLOB sdist-make: /mnt/workspace/jenkins/working/art-tools_elliott_PR-449/setup.py
py38 inst-nodeps: /mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/.tmp/package/1/rh-elliott-2.0.14.dev165+ge7b63e5.zip
py38 installed: aiodns==3.0.0,aiohttp==3.8.3,aiosignal==1.2.0,astroid==2.12.11,async-timeout==4.0.2,attrs==22.1.0,Brotli==1.0.9,cchardet==2.1.7,certifi==2022.9.24,cffi==1.15.1,charset-normalizer==2.1.1,click==8.1.3,coverage==6.5.0,cryptography==38.0.1,decorator==5.1.1,defusedxml==0.7.1,dill==0.3.5.1,distlib==0.3.6,errata-tool @ git+http://github.com/thegreyd/errata-tool.git@bad2cb9c3321a1179f018cd9ddcf1d51d634290b,filelock==3.8.0,flake8==5.0.4,flexmock==0.11.3,frozenlist==1.3.1,future==0.18.2,gssapi==1.8.1,idna==3.4,iniconfig==1.1.1,isort==5.10.1,jira==3.4.1,jsonpath-rw==1.4.0,koji==1.30.1,krb5==0.4.0,lazy-object-proxy==1.7.1,mccabe==0.7.0,mock==4.0.3,multidict==6.0.2,mypy==0.982,mypy-extensions==0.4.3,oauthlib==3.2.1,packaging==21.3,platformdirs==2.5.2,pluggy==1.0.0,ply==3.11,py==1.11.0,pycares==4.2.2,pycodestyle==2.9.1,pycparser==2.21,pyflakes==2.5.0,pygit2==1.10.1,pylint==2.15.4,pyparsing==3.0.9,pyspnego==0.6.0,pytest==7.1.3,python-bugzilla==3.2.0,python-dateutil==2.8.2,PyYAML==6.0,requests==2.28.1,requests-gssapi==1.2.3,requests-kerberos==0.14.0,requests-oauthlib==1.3.1,requests-toolbelt==0.10.0,rh-elliott @ file:///mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/.tmp/package/1/rh-elliott-2.0.14.dev165%2Bge7b63e5.zip,ruamel.yaml==0.17.21,ruamel.yaml.clib==0.2.6,semver==2.13.0,setuptools-scm==7.0.5,six==1.16.0,tenacity==8.1.0,tomli==2.0.1,tomlkit==0.11.5,tox==3.26.0,typing_extensions==4.4.0,urllib3==1.26.12,virtualenv==20.16.5,wrapt==1.14.1,yarl==1.8.1
py38 run-test-pre: PYTHONHASHSEED='2466834663'
py38 run-test: commands[0] | coverage run --branch --source elliottlib -m unittest discover -t . -s tests/
...............................................BZ 9 is ignored because its status was MODIFIED at the moment of sweep cutoff (2021-06-30 12:30:00), however its status changed back to ['ASSIGNED'] afterwards
.....................No flaw bugs could be found for these trackers: {'OCPBUGS-2'}
...changed 123 from status1 to status2
.123 is already on status1
.changed 123 from status1 to status2
..changed 123 from status1 to status2
.123 is already on status1
.changed 123 from status1 to status2
.......................F.../mnt/workspace/jenkins/working/art-tools_elliott_PR-449/elliottlib/errata_async.py:39: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
  resp.raise_for_status()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
................................................................
======================================================================
FAIL: test_get_cve_package_exclusions (tests.test_errata_async.TestAsyncErrataAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/py38/lib/python3.8/site-packages/mock/mock.py", line 1346, in patched
    return func(*newargs, **newkeywargs)
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-449/tests/test_errata_async.py", line 125, in test_get_cve_package_exclusions
    _make_request.assert_awaited_with(ANY, 'GET', '/api/v1/cve_package_exclusion', params={'filter[errata_id]': '1', 'page[number]': 3, 'page[size]': 300})
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/py38/lib/python3.8/site-packages/mock/mock.py", line 257, in wrapper
    return getattr(mock.mock, attr)(*args, **kwargs)
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/py38/lib/python3.8/site-packages/mock/mock.py", line 2233, in assert_awaited_with
    raise AssertionError(_error_message()) from cause
AssertionError: expected await not found.
Expected: _make_request(<ANY>, 'GET', '/api/v1/cve_package_exclusion', params={'filter[errata_id]': '1', 'page[number]': 3, 'page[size]': 300})
Actual: _make_request(<elliottlib.errata_async.AsyncErrataAPI object at 0x7f205cf896d0>, 'GET', '/api/v1/cve_package_exclusion', params={'filter[errata_id]': '1', 'page[number]': 3, 'page[size]': 1000})

----------------------------------------------------------------------
Ran 167 tests in 0.775s

FAILED (failures=1)
ERROR: InvocationError for command /mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/py38/bin/coverage run --branch --source elliottlib -m unittest discover -t . -s tests/ (exited with code 1)
___________________________________ summary ____________________________________
ERROR:   py38: commands failed
openshift-bot commented 1 year ago

Build #6

GLOB sdist-make: /mnt/workspace/jenkins/working/art-tools_elliott_PR-449/setup.py
py38 inst-nodeps: /mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/.tmp/package/1/rh-elliott-2.0.14.dev165+g1ff2a27.zip
py38 installed: aiodns==3.0.0,aiohttp==3.8.3,aiosignal==1.2.0,astroid==2.12.11,async-timeout==4.0.2,attrs==22.1.0,Brotli==1.0.9,cchardet==2.1.7,certifi==2022.9.24,cffi==1.15.1,charset-normalizer==2.1.1,click==8.1.3,coverage==6.5.0,cryptography==38.0.1,decorator==5.1.1,defusedxml==0.7.1,dill==0.3.5.1,distlib==0.3.6,errata-tool @ git+http://github.com/thegreyd/errata-tool.git@bad2cb9c3321a1179f018cd9ddcf1d51d634290b,filelock==3.8.0,flake8==5.0.4,flexmock==0.11.3,frozenlist==1.3.1,future==0.18.2,gssapi==1.8.1,idna==3.4,iniconfig==1.1.1,isort==5.10.1,jira==3.4.1,jsonpath-rw==1.4.0,koji==1.30.1,krb5==0.4.0,lazy-object-proxy==1.7.1,mccabe==0.7.0,mock==4.0.3,multidict==6.0.2,mypy==0.982,mypy-extensions==0.4.3,oauthlib==3.2.1,packaging==21.3,platformdirs==2.5.2,pluggy==1.0.0,ply==3.11,py==1.11.0,pycares==4.2.2,pycodestyle==2.9.1,pycparser==2.21,pyflakes==2.5.0,pygit2==1.10.1,pylint==2.15.4,pyparsing==3.0.9,pyspnego==0.6.0,pytest==7.1.3,python-bugzilla==3.2.0,python-dateutil==2.8.2,PyYAML==6.0,requests==2.28.1,requests-gssapi==1.2.3,requests-kerberos==0.14.0,requests-oauthlib==1.3.1,requests-toolbelt==0.10.0,rh-elliott @ file:///mnt/workspace/jenkins/working/art-tools_elliott_PR-449/.tox/.tmp/package/1/rh-elliott-2.0.14.dev165%2Bg1ff2a27.zip,ruamel.yaml==0.17.21,ruamel.yaml.clib==0.2.6,semver==2.13.0,setuptools-scm==7.0.5,six==1.16.0,tenacity==8.1.0,tomli==2.0.1,tomlkit==0.11.5,tox==3.26.0,typing_extensions==4.4.0,urllib3==1.26.12,virtualenv==20.16.5,wrapt==1.14.1,yarl==1.8.1
py38 run-test-pre: PYTHONHASHSEED='1830660895'
py38 run-test: commands[0] | coverage run --branch --source elliottlib -m unittest discover -t . -s tests/
...............................................BZ 9 is ignored because its status was MODIFIED at the moment of sweep cutoff (2021-06-30 12:30:00), however its status changed back to ['ASSIGNED'] afterwards
.....................No flaw bugs could be found for these trackers: {'OCPBUGS-2'}
...changed 123 from status1 to status2
.123 is already on status1
.changed 123 from status1 to status2
..changed 123 from status1 to status2
.123 is already on status1
.changed 123 from status1 to status2
........................../mnt/workspace/jenkins/working/art-tools_elliott_PR-449/elliottlib/errata_async.py:39: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
  resp.raise_for_status()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
................................................................
----------------------------------------------------------------------
Ran 167 tests in 0.699s

OK
py38 run-test: commands[1] | coverage report
Name                                              Stmts   Miss Branch BrPart  Cover
-----------------------------------------------------------------------------------
elliottlib/__init__.py                                8      2      2      1    70%
elliottlib/assembly.py                               92      9     54      7    89%
elliottlib/assertion.py                              11      0      6      0   100%
elliottlib/brew.py                                  328    188    134      5    36%
elliottlib/bug/__init__.py                            0      0      0      0   100%
elliottlib/build_finder.py                          114     12     74     15    86%
elliottlib/bzutil.py                                746    290    316     19    57%
elliottlib/cincinnati.py                             21     21      4      0     0%
elliottlib/cli/__init__.py                            0      0      0      0   100%
elliottlib/cli/__main__.py                          272    272     72      0     0%
elliottlib/cli/add_metadata_cli.py                   33     33      4      0     0%
elliottlib/cli/advisory_commons_cli.py               90     90     38      0     0%
elliottlib/cli/advisory_drop_cli.py                  21     21      2      0     0%
elliottlib/cli/advisory_images_cli.py                14     14      2      0     0%
elliottlib/cli/advisory_impetus_cli.py               22     22      6      0     0%
elliottlib/cli/attach_bugs_cli.py                    37     37     18      0     0%
elliottlib/cli/attach_cve_flaws_cli.py              129     64     56      9    46%
elliottlib/cli/change_state_cli.py                   44     44     16      0     0%
elliottlib/cli/cli_opts.py                           15      0     17      0   100%
elliottlib/cli/common.py                             48     12      6      1    69%
elliottlib/cli/create_cli.py                         70     70     20      0     0%
elliottlib/cli/create_placeholder_cli.py             40     40     12      0     0%
elliottlib/cli/create_textonly_cli.py                51     51      8      0     0%
elliottlib/cli/find_bugs_blocker_cli.py              43      4     10      3    87%
elliottlib/cli/find_bugs_qe_cli.py                   36      4      6      0    90%
elliottlib/cli/find_bugs_sweep_cli.py               193     30    106     19    80%
elliottlib/cli/find_builds_cli.py                   255    188    169      2    20%
elliottlib/cli/get_golang_versions_cli.py            56     21     32      5    50%
elliottlib/cli/list_cli.py                           17     17      4      0     0%
elliottlib/cli/puddle_advisories_cli.py              37     37     10      0     0%
elliottlib/cli/remove_bugs_cli.py                    50      8     14      6    78%
elliottlib/cli/repair_bugs_cli.py                    61      5     26      6    87%
elliottlib/cli/rhcos_cli.py                          97     97     54      0     0%
elliottlib/cli/rpmdiff_cli.py                       102    102     34      0     0%
elliottlib/cli/tag_builds_cli.py                    128    128     62      0     0%
elliottlib/cli/tarball_sources_cli.py                83     83     26      0     0%
elliottlib/cli/validate_rhsa.py                      42     42     12      0     0%
elliottlib/cli/verify_attached_bugs_cli.py          238     82    155     17    59%
elliottlib/cli/verify_attached_operators_cli.py     120     86     55      0    19%
elliottlib/cli/verify_cvp_cli.py                    162    162     78      0     0%
elliottlib/constants.py                              52      0      0      0   100%
elliottlib/cvp.py                                   216    216    113      0     0%
elliottlib/dotconfig.py                              54     11     30      6    75%
elliottlib/errata.py                                323    208    146      4    32%
elliottlib/errata_async.py                          107      6     38      6    92%
elliottlib/exceptions.py                             12      0      0      0   100%
elliottlib/exectools.py                              84     13     24      3    83%
elliottlib/gitdata.py                               171    137     76      0    14%
elliottlib/imagecfg.py                               21      2      0      0    90%
elliottlib/logutil.py                                 9      1      2      1    82%
elliottlib/metadata.py                              154     43     76     18    67%
elliottlib/model.py                                 105     22     30      2    79%
elliottlib/openshiftclient.py                        34     34      8      0     0%
elliottlib/pushd.py                                  21      0      2      0   100%
elliottlib/resultsdb.py                              28     28      4      0     0%
elliottlib/rhcos.py                                  51     51     12      0     0%
elliottlib/rpm_utils.py                              30     14     16      5    46%
elliottlib/rpmcfg.py                                  5      2      0      0    60%
elliottlib/rpmdiff.py                                31      0      0      0   100%
elliottlib/runtime.py                               278    202    106      2    22%
elliottlib/tarball_sources.py                        90     61     34      0    30%
elliottlib/util.py                                  303    168    112      9    41%
-----------------------------------------------------------------------------------
TOTAL                                              6105   3607   2549    171    38%
py38 run-test: commands[2] | flake8
___________________________________ summary ____________________________________
  py38: commands succeeded
  congratulations :)
vfreex commented 1 year ago

@Ximinhan There is nothing we can do if the result count exceeds 1000. It has to be fixed in the server.