From 985301330d795a76a2a8d84af4d706c3aed23860 Mon Sep 17 00:00:00 2001 From: Julius Unverfehrt Date: Tue, 1 Mar 2022 10:39:53 +0100 Subject: [PATCH] Quickfix endpoint parsing bug --- pyinfra/storage/clients/s3.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyinfra/storage/clients/s3.py b/pyinfra/storage/clients/s3.py index 6b73fee..c0e6bc3 100644 --- a/pyinfra/storage/clients/s3.py +++ b/pyinfra/storage/clients/s3.py @@ -1,3 +1,4 @@ +import logging import re from minio import Minio @@ -7,7 +8,8 @@ from pyinfra.exceptions import InvalidEndpoint def parse_endpoint(endpoint): - endpoint_pattern = r"(?Phttps?)://(?P
(?:(?:(?:\d{1,3}\.){3}\d{1,3})|(?:\w|\.)+)(?:\:\d+)?)" + # FIXME Greedy matching (.+) since we get random storage names on kubernetes (eg http://red-research-headless:9000) + endpoint_pattern = r"(?Phttps?)://(?P
(?:(?:(?:\d{1,3}\.){3}\d{1,3})|.+)(?:\:\d+)?)" match = re.match(endpoint_pattern, endpoint)