multiwoven-integrations 0.34.16 → 0.34.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7bebe9724dca9256d94672989876f204411cafa4be8ca561e60e147e7277bbb9
|
|
4
|
+
data.tar.gz: 88448e28fd80ea1fa28c148a96bf5e859e90e6cf9e6a4e40b4332b2b37431ed8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c88f953a5859c6e86f1f0107b7237a71a9fdbc43f18e6d9779d61d9b1ac3c8838a28eb9643a58c5cb6d9d4cb2e8121fbf2a05c0a01ee936c2202206a50add49e
|
|
7
|
+
data.tar.gz: 87f3368ec5fcb97bbf45a5242290a0920d63eb829f42bb4b48cba663f07a2d67fe1d9b6257376d2613b747472af9df5a2e172672aec86c6f1c4368da23f0e7b7
|
|
@@ -45,6 +45,11 @@ module Multiwoven::Integrations::Destination
|
|
|
45
45
|
|
|
46
46
|
private
|
|
47
47
|
|
|
48
|
+
def path_style_enabled?(connection_config)
|
|
49
|
+
val = connection_config[:path_style]
|
|
50
|
+
val == true || val.to_s.casecmp("true").zero?
|
|
51
|
+
end
|
|
52
|
+
|
|
48
53
|
def create_connection(connection_config)
|
|
49
54
|
connection_config = connection_config.with_indifferent_access
|
|
50
55
|
s3_options = {
|
|
@@ -55,7 +60,9 @@ module Multiwoven::Integrations::Destination
|
|
|
55
60
|
endpoint = connection_config[:endpoint].to_s.strip
|
|
56
61
|
if endpoint.present?
|
|
57
62
|
s3_options[:endpoint] = endpoint
|
|
58
|
-
|
|
63
|
+
# Path style is required for MinIO/S3-compatible endpoints. Accept both boolean and string
|
|
64
|
+
# (e.g. from JSON/API) so it works in all environments.
|
|
65
|
+
s3_options[:force_path_style] = path_style_enabled?(connection_config)
|
|
59
66
|
end
|
|
60
67
|
Aws::S3::Client.new(**s3_options)
|
|
61
68
|
end
|
|
@@ -83,6 +83,11 @@ module Multiwoven::Integrations::Source
|
|
|
83
83
|
end
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
+
def path_style_enabled?(connection_config)
|
|
87
|
+
val = connection_config[:path_style]
|
|
88
|
+
val == true || val.to_s.casecmp("true").zero?
|
|
89
|
+
end
|
|
90
|
+
|
|
86
91
|
def create_s3_connection(connection_config)
|
|
87
92
|
connection_config = connection_config.with_indifferent_access
|
|
88
93
|
|
|
@@ -97,7 +102,7 @@ module Multiwoven::Integrations::Source
|
|
|
97
102
|
endpoint = connection_config[:endpoint].to_s.strip
|
|
98
103
|
if endpoint.present?
|
|
99
104
|
s3_options[:endpoint] = endpoint
|
|
100
|
-
s3_options[:force_path_style] = connection_config
|
|
105
|
+
s3_options[:force_path_style] = path_style_enabled?(connection_config)
|
|
101
106
|
end
|
|
102
107
|
|
|
103
108
|
@s3_resource = Aws::S3::Resource.new(**s3_options)
|
|
@@ -130,10 +135,15 @@ module Multiwoven::Integrations::Source
|
|
|
130
135
|
|
|
131
136
|
# Disable SSL if http
|
|
132
137
|
secret_parts << "USE_SSL false" if uri.scheme == "http"
|
|
138
|
+
|
|
139
|
+
# Path-style URLs (endpoint/bucket/key) required for MinIO and S3-compatible stores.
|
|
140
|
+
# Must be set in the secret; session SET s3_url_style is not applied when using secrets.
|
|
141
|
+
secret_parts << "URL_STYLE 'path'" if path_style_enabled?(connection_config)
|
|
133
142
|
end
|
|
134
143
|
secret_query = "CREATE SECRET amazons3_source (#{secret_parts.join(", ")});"
|
|
135
144
|
get_results(conn, secret_query)
|
|
136
|
-
|
|
145
|
+
# Session-level fallback for environments where secret URL_STYLE is not honored
|
|
146
|
+
conn.execute("SET s3_url_style = 'path';") if path_style_enabled?(connection_config)
|
|
137
147
|
conn
|
|
138
148
|
end
|
|
139
149
|
|