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

[6.15.z] Fix validation: validate IPv6 proxy URL only when IS_IPV6 is set to True #15423

Merged

Conversation

Satellite-QE
Copy link
Collaborator

Cherrypick of PR: #15413

Problem Statement

Using latest robottelo, including the IPv6-related changes, I am running into

dynaconf.validator.ValidationError: server.http_proxy_ipv6_url must is_type_of <class 'str'> but it is None in env main

This error is caused by a validator that enforces string type, but it is setting the value to None itself. :meow_shrugs:

Validator('server.http_proxy_ipv6_url', is_type_of=str, default=None),

Solution

Utilize conditional validation - validate the IPv6 proxy URL setting only when IS_IPV6 is set to True
https://www.dynaconf.com/validation/#conditional-validation

Related Issues

This should be fixed before #15289 goes in

@Satellite-QE Satellite-QE requested a review from a team as a code owner June 17, 2024 09:14
@Satellite-QE Satellite-QE added 6.15.z Introduced in or relating directly to Satellite 6.15 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels Jun 17, 2024
@lpramuk lpramuk merged commit 8ef8841 into 6.15.z Jun 17, 2024
13 checks passed
@lpramuk lpramuk deleted the cherry-pick-6.15.z-90ffb9b671af4a9ae74fedb4f2468df05f4d024f branch June 17, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.15.z Introduced in or relating directly to Satellite 6.15 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants