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

Fix ipv6 proxy url validation #15594

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

dosas
Copy link
Collaborator

@dosas dosas commented Jul 9, 2024

Problem Statement

http_proxy_ipv6_url is accessed despite ipv6 is set to false on default.

pytest_fixtures/core/broker.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.11/contextlib.py:137: in __enter__
    return next(self.gen)
pytest_fixtures/core/broker.py:37: in _target_sat_imp
    _default_sat.enable_ipv6_http_proxy()
robottelo/hosts.py:1829: in enable_ipv6_http_proxy
    if not all([settings.server.is_ipv6, settings.server.http_proxy_ipv6_url]):
../../../.virtualenvs/robottelo/lib/python3.11/site-packages/dynaconf/utils/boxing.py:18: in evaluate
    value = f(dynabox, item, *args, **kwargs)
../../../.virtualenvs/robottelo/lib/python3.11/site-packages/dynaconf/utils/boxing.py:41: in __getattr__
    return super().__getattr__(n_item, *args, **kwargs)


E     dynaconf.vendor.box.exceptions.BoxKeyError: "'DynaBox' object has no attribute 'http_proxy_ipv6_url'"

Solution

using lazy evaluation the missing setting
will not be queried when ipv6 is disabled (default)

Related Issues

@dosas dosas requested a review from a team as a code owner July 9, 2024 07:49
@dosas dosas added CherryPick PR needs CherryPick to previous branches 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 labels Jul 9, 2024
@omkarkhatavkar
Copy link
Contributor

Can one of the admins verify this patch?

robottelo/hosts.py Outdated Show resolved Hide resolved
http_proxy_url is validated in Validators already
@Gauravtalreja1 Gauravtalreja1 merged commit a6b4131 into SatelliteQE:master Jul 9, 2024
8 checks passed
github-actions bot pushed a commit that referenced this pull request Jul 9, 2024
Fix ipv6 proxy url validation:

http_proxy_url is validated in Validators already

(cherry picked from commit a6b4131)
Gauravtalreja1 pushed a commit that referenced this pull request Jul 9, 2024
Fix ipv6 proxy url validation (#15594)

Fix ipv6 proxy url validation:

http_proxy_url is validated in Validators already

(cherry picked from commit a6b4131)

Co-authored-by: dosas <dosas@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 CherryPick PR needs CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants