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: b6b99b3873653f5b2e7e7854a933ad303133548fe02d3c226e6cdb5416b3a2fa
4
- data.tar.gz: b4e0f73a8cf353a66884917ba79d3f9e1535bb9807acaeddb810ceb50b00fbd3
3
+ metadata.gz: 7bebe9724dca9256d94672989876f204411cafa4be8ca561e60e147e7277bbb9
4
+ data.tar.gz: 88448e28fd80ea1fa28c148a96bf5e859e90e6cf9e6a4e40b4332b2b37431ed8
5
5
  SHA512:
6
- metadata.gz: 66cb050fc40ed6385371b2f4577f77f2902c79f29e36a3fa4a5388314653cacff8b66427eb39deeec3af9773227f5568b5fb45b3cbe2a5c103567c0bee43bcb4
7
- data.tar.gz: 37a520ae02b487111059022dc1d27b7f177a5b52436df77dba9d3d0adce32355d909d75d0057eb60a2dc9b7428d73befdd3b75bf38c56df32352cc26d3861dad
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
- s3_options[:force_path_style] = connection_config[:path_style] == true
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Multiwoven
4
4
  module Integrations
5
- VERSION = "0.34.16"
5
+ VERSION = "0.34.17"
6
6
 
7
7
  ENABLED_SOURCES = %w[
8
8
  Snowflake
@@ -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[:path_style] == true
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
- conn.execute("SET s3_url_style = 'path';") if connection_config[:path_style].present?
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multiwoven-integrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.16
4
+ version: 0.34.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Subin T P