openshift-eng / elliott

Apache License 2.0
15 stars 28 forks source link

Make approximate_cutoff_timestamp function async #519

Closed locriandev closed 1 year ago

openshift-bot commented 1 year ago

Build #1

GLOB sdist-make: /mnt/workspace/jenkins/working/art-tools_elliott_PR-519/setup.py
py38 create: /mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38
py38 installdeps: -rrequirements-dev.txt, -rrequirements.txt
py38 inst: /mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/.tmp/package/1/rh-elliott-2.0.15.dev15+g27cc35f.zip
py38 installed: aiodns==3.0.0,aiohttp==3.8.4,aiosignal==1.3.1,astroid==2.14.2,async-timeout==4.0.2,asynctest==0.13.0,attrs==22.2.0,Brotli==1.0.9,cachetools==5.3.0,cchardet==2.1.7,certifi==2022.12.7,cffi==1.15.1,chardet==5.1.0,charset-normalizer==3.0.1,click==8.1.3,colorama==0.4.6,coverage==7.2.1,decorator==5.1.1,defusedxml==0.7.1,dill==0.3.6,distlib==0.3.6,errata-tool==1.30.0,exceptiongroup==1.1.0,filelock==3.9.0,flake8==6.0.0,flexmock==0.11.3,frozenlist==1.3.3,future==0.18.3,gssapi==1.8.2,idna==3.4,iniconfig==2.0.0,isort==5.12.0,jira==3.4.1,jsonpath-rw==1.4.0,koji==1.32.0,lazy-object-proxy==1.9.0,mccabe==0.7.0,mock==5.0.1,multidict==6.0.4,mypy==1.0.1,mypy-extensions==1.0.0,oauthlib==3.2.2,packaging==23.0,platformdirs==3.0.0,pluggy==1.0.0,ply==3.11,pycares==4.3.0,pycodestyle==2.10.0,pycparser==2.21,pyflakes==3.0.1,pygit2==1.10.1,pylint==2.16.2,pyproject_api==1.5.0,pytest==7.2.1,python-bugzilla==3.2.0,python-dateutil==2.8.2,PyYAML==6.0,requests==2.28.2,requests-gssapi==1.2.3,requests-oauthlib==1.3.1,requests-toolbelt==0.10.1,rh-elliott @ file:///mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/.tmp/package/1/rh-elliott-2.0.15.dev15%2Bg27cc35f.zip,ruamel.yaml==0.17.21,ruamel.yaml.clib==0.2.7,semver==2.13.0,setuptools-scm==7.1.0,six==1.16.0,tenacity==8.2.2,tomli==2.0.1,tomlkit==0.11.6,tox==4.4.6,typing_extensions==4.5.0,urllib3==1.26.14,virtualenv==20.20.0,wrapt==1.15.0,yarl==1.8.2
py38 run-test-pre: PYTHONHASHSEED='1610681635'
py38 run-test: commands[0] | coverage run --branch --source elliottlib -m unittest discover -t . -s tests/
....................................F./usr/lib64/python3.8/unittest/case.py:704: RuntimeWarning: coroutine 'approximate_cutoff_timestamp' was never awaited
  outcome.errors.clear()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
........Cannot find any corresponding flaw bugs for these trackers: [13]. These trackers do not have a valid whiteboard component value: [12].
..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
.....................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....Bug(s) ['OCPBUGS-6', 'OCPBUGS-4', 'OCPBUGS-5'] have CVE in description but do not have TrackerBug labels. Please investigate.
.............................................
======================================================================
FAIL: test_approximate_cutoff_timestamp (tests.test_bzutil.TestBZUtil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/tests/test_bzutil.py", line 423, in test_approximate_cutoff_timestamp
    self.assertEqual(datetime(2021, 7, 2, 2, 0, 0, 0, tzinfo=timezone.utc).timestamp(), actual)
AssertionError: 1625191200.0 != <coroutine object approximate_cutoff_timestamp at 0x7f42df4ec940>

======================================================================
FAIL: test_find_bugs_sweep_brew_event (tests.test_find_bugs_sweep_cli.FindBugsSweepTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.8/unittest/async_case.py", line 65, in _callTestMethod
    self._callMaybeAsync(method)
  File "/usr/lib64/python3.8/unittest/async_case.py", line 84, in _callMaybeAsync
    ret = func(*args, **kwargs)
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/mock/mock.py", line 1417, in patched
    return func(*newargs, **newkeywargs)
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/tests/test_find_bugs_sweep_cli.py", line 144, in test_find_bugs_sweep_brew_event
    self.fail(t)
AssertionError: Traceback (most recent call last):

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/testing.py", line 408, in invoke
    return_value = cli.main(args=args or (), prog_name=prog_name, **extra)

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/decorators.py", line 38, in new_func
    return f(get_current_context().obj, *args, **kwargs)

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/elliottlib/cli/common.py", line 111, in wrapper
    return asyncio.get_event_loop().run_until_complete(f(*args, **kwargs))

  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-519/elliottlib/cli/find_bugs_sweep_cli.py", line 142, in find_bugs_sweep_cli
    raise ElliottFatalError(f"Error finding or attaching bugs: {errors}. See logs for more information.")

elliottlib.exceptions.ElliottFatalError: Error finding or attaching bugs: [TypeError("object float can't be used in 'await' expression"), TypeError("object float can't be used in 'await' expression")]. See logs for more information.

----------------------------------------------------------------------
Ran 168 tests in 0.775s

FAILED (failures=2)
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f42dd111670>
ERROR: InvocationError for command /mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.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-519/setup.py
py38 recreate: /mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38
py38 installdeps: -rrequirements-dev.txt, -rrequirements.txt
py38 inst: /mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/.tmp/package/1/rh-elliott-2.0.15.dev16+ge441138.zip
py38 installed: aiodns==3.0.0,aiohttp==3.8.4,aiosignal==1.3.1,astroid==2.14.2,async-timeout==4.0.2,asynctest==0.13.0,attrs==22.2.0,Brotli==1.0.9,cachetools==5.3.0,cchardet==2.1.7,certifi==2022.12.7,cffi==1.15.1,chardet==5.1.0,charset-normalizer==3.0.1,click==8.1.3,colorama==0.4.6,coverage==7.2.1,decorator==5.1.1,defusedxml==0.7.1,dill==0.3.6,distlib==0.3.6,errata-tool==1.30.0,exceptiongroup==1.1.0,filelock==3.9.0,flake8==6.0.0,flexmock==0.11.3,frozenlist==1.3.3,future==0.18.3,gssapi==1.8.2,idna==3.4,iniconfig==2.0.0,isort==5.12.0,jira==3.4.1,jsonpath-rw==1.4.0,koji==1.32.0,lazy-object-proxy==1.9.0,mccabe==0.7.0,mock==5.0.1,multidict==6.0.4,mypy==1.0.1,mypy-extensions==1.0.0,oauthlib==3.2.2,packaging==23.0,platformdirs==3.0.0,pluggy==1.0.0,ply==3.11,pycares==4.3.0,pycodestyle==2.10.0,pycparser==2.21,pyflakes==3.0.1,pygit2==1.10.1,pylint==2.16.2,pyproject_api==1.5.0,pytest==7.2.1,python-bugzilla==3.2.0,python-dateutil==2.8.2,PyYAML==6.0,requests==2.28.2,requests-gssapi==1.2.3,requests-oauthlib==1.3.1,requests-toolbelt==0.10.1,rh-elliott @ file:///mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/.tmp/package/1/rh-elliott-2.0.15.dev16%2Bge441138.zip,ruamel.yaml==0.17.21,ruamel.yaml.clib==0.2.7,semver==2.13.0,setuptools-scm==7.1.0,six==1.16.0,tenacity==8.2.2,tomli==2.0.1,tomlkit==0.11.6,tox==4.4.6,typing_extensions==4.5.0,urllib3==1.26.14,virtualenv==20.20.0,wrapt==1.15.0,yarl==1.8.2
py38 run-test-pre: PYTHONHASHSEED='1005425927'
py38 run-test: commands[0] | coverage run --branch --source elliottlib -m unittest discover -t . -s tests/
.............................................Cannot find any corresponding flaw bugs for these trackers: [13]. These trackers do not have a valid whiteboard component value: [12].
..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
.....................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....Bug(s) ['OCPBUGS-5', 'OCPBUGS-6', 'OCPBUGS-4'] have CVE in description but do not have TrackerBug labels. Please investigate.
.............................................
======================================================================
FAIL: test_find_bugs_sweep_brew_event (tests.test_find_bugs_sweep_cli.FindBugsSweepTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.8/unittest/async_case.py", line 65, in _callTestMethod
    self._callMaybeAsync(method)
  File "/usr/lib64/python3.8/unittest/async_case.py", line 84, in _callMaybeAsync
    ret = func(*args, **kwargs)
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/mock/mock.py", line 1417, in patched
    return func(*newargs, **newkeywargs)
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/tests/test_find_bugs_sweep_cli.py", line 144, in test_find_bugs_sweep_brew_event
    self.fail(t)
AssertionError: Traceback (most recent call last):

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/testing.py", line 408, in invoke
    return_value = cli.main(args=args or (), prog_name=prog_name, **extra)

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/decorators.py", line 38, in new_func
    return f(get_current_context().obj, *args, **kwargs)

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/elliottlib/cli/common.py", line 111, in wrapper
    return asyncio.get_event_loop().run_until_complete(f(*args, **kwargs))

  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-519/elliottlib/cli/find_bugs_sweep_cli.py", line 142, in find_bugs_sweep_cli
    raise ElliottFatalError(f"Error finding or attaching bugs: {errors}. See logs for more information.")

elliottlib.exceptions.ElliottFatalError: Error finding or attaching bugs: [TypeError("object float can't be used in 'await' expression"), TypeError("object float can't be used in 'await' expression")]. See logs for more information.

----------------------------------------------------------------------
Ran 168 tests in 0.754s

FAILED (failures=1)
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fe67fce6160>
ERROR: InvocationError for command /mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/bin/coverage run --branch --source elliottlib -m unittest discover -t . -s tests/ (exited with code 1)
___________________________________ summary ____________________________________
ERROR:   py38: commands failed
Ximinhan commented 1 year ago

/lgtm fix UT later

openshift-bot commented 1 year ago

Build #3

GLOB sdist-make: /mnt/workspace/jenkins/working/art-tools_elliott_PR-519/setup.py
py38 recreate: /mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38
py38 installdeps: -rrequirements-dev.txt, -rrequirements.txt
py38 inst: /mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/.tmp/package/1/rh-elliott-2.0.15.dev16+ge441138.zip
py38 installed: aiodns==3.0.0,aiohttp==3.8.4,aiosignal==1.3.1,astroid==2.14.2,async-timeout==4.0.2,asynctest==0.13.0,attrs==22.2.0,Brotli==1.0.9,cachetools==5.3.0,cchardet==2.1.7,certifi==2022.12.7,cffi==1.15.1,chardet==5.1.0,charset-normalizer==3.0.1,click==8.1.3,colorama==0.4.6,coverage==7.2.1,decorator==5.1.1,defusedxml==0.7.1,dill==0.3.6,distlib==0.3.6,errata-tool==1.30.0,exceptiongroup==1.1.0,filelock==3.9.0,flake8==6.0.0,flexmock==0.11.3,frozenlist==1.3.3,future==0.18.3,gssapi==1.8.2,idna==3.4,iniconfig==2.0.0,isort==5.12.0,jira==3.4.1,jsonpath-rw==1.4.0,koji==1.32.0,lazy-object-proxy==1.9.0,mccabe==0.7.0,mock==5.0.1,multidict==6.0.4,mypy==1.0.1,mypy-extensions==1.0.0,oauthlib==3.2.2,packaging==23.0,platformdirs==3.0.0,pluggy==1.0.0,ply==3.11,pycares==4.3.0,pycodestyle==2.10.0,pycparser==2.21,pyflakes==3.0.1,pygit2==1.10.1,pylint==2.16.2,pyproject_api==1.5.0,pytest==7.2.1,python-bugzilla==3.2.0,python-dateutil==2.8.2,PyYAML==6.0,requests==2.28.2,requests-gssapi==1.2.3,requests-oauthlib==1.3.1,requests-toolbelt==0.10.1,rh-elliott @ file:///mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/.tmp/package/1/rh-elliott-2.0.15.dev16%2Bge441138.zip,ruamel.yaml==0.17.21,ruamel.yaml.clib==0.2.7,semver==2.13.0,setuptools-scm==7.1.0,six==1.16.0,tenacity==8.2.2,tomli==2.0.1,tomlkit==0.11.6,tox==4.4.6,typing_extensions==4.5.0,urllib3==1.26.14,virtualenv==20.20.0,wrapt==1.15.0,yarl==1.8.2
py38 run-test-pre: PYTHONHASHSEED='48346318'
py38 run-test: commands[0] | coverage run --branch --source elliottlib -m unittest discover -t . -s tests/
.............................................Cannot find any corresponding flaw bugs for these trackers: [13]. These trackers do not have a valid whiteboard component value: [12].
..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
.....................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....Bug(s) ['OCPBUGS-4', 'OCPBUGS-6', 'OCPBUGS-5'] have CVE in description but do not have TrackerBug labels. Please investigate.
.............................................
======================================================================
FAIL: test_find_bugs_sweep_brew_event (tests.test_find_bugs_sweep_cli.FindBugsSweepTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.8/unittest/async_case.py", line 65, in _callTestMethod
    self._callMaybeAsync(method)
  File "/usr/lib64/python3.8/unittest/async_case.py", line 84, in _callMaybeAsync
    ret = func(*args, **kwargs)
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/mock/mock.py", line 1417, in patched
    return func(*newargs, **newkeywargs)
  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/tests/test_find_bugs_sweep_cli.py", line 144, in test_find_bugs_sweep_brew_event
    self.fail(t)
AssertionError: Traceback (most recent call last):

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/testing.py", line 408, in invoke
    return_value = cli.main(args=args or (), prog_name=prog_name, **extra)

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/lib/python3.8/site-packages/click/decorators.py", line 38, in new_func
    return f(get_current_context().obj, *args, **kwargs)

  File "/mnt/workspace/jenkins/working/art-tools_elliott_PR-519/elliottlib/cli/common.py", line 111, in wrapper
    return asyncio.get_event_loop().run_until_complete(f(*args, **kwargs))

  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-519/elliottlib/cli/find_bugs_sweep_cli.py", line 142, in find_bugs_sweep_cli
    raise ElliottFatalError(f"Error finding or attaching bugs: {errors}. See logs for more information.")

elliottlib.exceptions.ElliottFatalError: Error finding or attaching bugs: [TypeError("object float can't be used in 'await' expression"), TypeError("object float can't be used in 'await' expression")]. See logs for more information.

----------------------------------------------------------------------
Ran 168 tests in 0.792s

FAILED (failures=1)
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f32a8060100>
ERROR: InvocationError for command /mnt/workspace/jenkins/working/art-tools_elliott_PR-519/.tox/py38/bin/coverage run --branch --source elliottlib -m unittest discover -t . -s tests/ (exited with code 1)
___________________________________ summary ____________________________________
ERROR:   py38: commands failed