Skip to content

Commit 513fbbf

Browse files
Merge pull request #181 from GoogleCloudPlatform/fix/url-check
removing external validation of URLs
2 parents e01a4e4 + 63b0964 commit 513fbbf

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

dagify/converter/yaml_validator/custom_validator.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,19 @@ def _is_valid(self, value):
1414
def fail(self, value):
1515
return f'{value} is not a valid email address.'
1616

17-
17+
#K.S. edit: Removing URL validator for now to avoid broken URL links to crash the tool.
18+
# Additionally, requiring internet access for the tool might not be a good idea.
1819
class URLValidator(Validator):
1920
tag = 'validURL' # This is the tag you use in your schema
2021

2122
def _is_valid(self, value):
2223

23-
try:
24-
response = requests.get(value)
25-
return response.status_code == 200
26-
except requests.exceptions.RequestException as e:
27-
print(f"Error checking URL: {e}")
28-
24+
#try:
25+
# response = requests.get(value)
26+
# return response.status_code == 200
27+
#except requests.exceptions.RequestException as e:
28+
# print(f"Error checking URL: {e}")
29+
return True
2930

3031
# Extend default validators with your custom validators
3132
validators = DefaultValidators.copy()

0 commit comments

Comments
 (0)