Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some tests require network connection #1783

Closed
FrNecas opened this issue Nov 28, 2022 · 2 comments
Closed

Some tests require network connection #1783

FrNecas opened this issue Nov 28, 2022 · 2 comments
Labels
area/testing Tests are impacted.

Comments

@FrNecas
Copy link

FrNecas commented Nov 28, 2022

This occurred during the copr outage, apparently test_submit_copr_build queries the copr backend for some data under the hood (the tests failed due to timeout during the outage). I haven't been able to quickly find the root cause yet (and I do not want to get too sidetracked) but we are probably missing some mocks, or we could use requre. Should be reproducible by disconnecting from the network and running the test suite.

tests/unit/test_copr_build.py:2697:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
packit_service/worker/helpers/build/copr_build.py:585: in submit_copr_build
    raise ex
        buildopts  = {}
        owner      = ''
        script     = None
        self       = <packit_service.worker.helpers.build.copr_build.CoprBuildJobHelper object at 0x7f899be98d90>
packit_service/worker/helpers/build/copr_build.py:528: in submit_copr_build
    "chroots": list(self.build_targets),
        buildopts  = {}
        owner      = ''
        script     = None
        self       = <packit_service.worker.helpers.build.copr_build.CoprBuildJobHelper object at 0x7f899be98d90>
packit_service/worker/helpers/build/build_helper.py:174: in build_targets
    return self.build_targets_all
        self       = <packit_service.worker.helpers.build.copr_build.CoprBuildJobHelper object at 0x7f899be98d90>
packit_service/worker/helpers/build/copr_build.py:208: in build_targets_all
    return get_valid_build_targets(*self.configured_build_targets, default=None)
        self       = <packit_service.worker.helpers.build.copr_build.CoprBuildJobHelper object at 0x7f899be98d90>
/usr/lib/python3.10/site-packages/packit/config/aliases.py:136: in get_valid_build_targets
    copr_chroots = CoprHelper.get_available_chroots()
        build_targets = {'fedora-31-x86_64', 'fedora-32-x86_64'}
        default    = None
        name       = ('fedora-stable',)
/usr/local/lib/python3.10/site-packages/cachetools/func.py:62: in wrapper
    v = func(*args, **kwargs)
        args       = ()
        cache      = TTLCache({}, maxsize=1, currsize=0)
        func       = <function CoprHelper.get_available_chroots at 0x7f89a1a36c20>
        hits       = 0
        k          = ()
        key        = <function hashkey at 0x7f89a2115510>
        kwargs     = {}
        lock       = <unlocked _thread.RLock object owner=0 count=0 at 0x7f89a1fb6580>
        misses     = 1
/usr/lib/python3.10/site-packages/packit/copr_helper.py:373: in get_available_chroots
    client.mock_chroot_proxy.get_list().keys(),
        client     = <copr.v3.client.Client object at 0x7f899be9b880>
/usr/lib/python3.10/site-packages/copr/v3/helpers.py:73: in wrapper
    result = func(*args, **kwargs)
@TomasTomecek
Copy link
Member

Very good point, we should mock these remote calls

@TomasTomecek TomasTomecek moved this from new to backlog in Packit Kanban Board Nov 29, 2022
@TomasTomecek
Copy link
Member

Duplicate of #1491

@TomasTomecek TomasTomecek marked this as a duplicate of #1491 Dec 6, 2022
@TomasTomecek TomasTomecek closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2022
Repository owner moved this from backlog to done in Packit Kanban Board Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Tests are impacted.
Projects
Archived in project
Development

No branches or pull requests

2 participants