diff --git a/DockerfileOldImage b/DockerfileOldImage index a60b2d723..9d1e7921a 100644 --- a/DockerfileOldImage +++ b/DockerfileOldImage @@ -1,6 +1,8 @@ FROM 020413372491.dkr.ecr.us-east-1.amazonaws.com/tools/gdc-java-11-jre-centos9:202607101511.b527cf7b ARG RVM_VERSION=stable + +# We must use JRuby9.2.20.0 to fix Read Would Block issue on GRIF-177 ARG JRUBY_VERSION=9.2.20.0 LABEL image_name="GDC LCM Bricks" @@ -29,8 +31,12 @@ RUN curl -sSL https://rvm.io/mpapis.asc | gpg --import - \ # Switch to a bash login shell to allow simple 'rvm' in RUN commands SHELL ["/bin/bash", "-l", "-c"] +# Do NOT 'gem update --system' here. JRuby 9.2.20.0 ships RubyGems 3.1.6, which already +# satisfies bundler 2.3.27 (needs >= 2.5.2). Replacing it breaks the default-gem activation +# that jruby-openssl relies on to load its BouncyCastle jars, leaving OpenSSL with only its +# Java half (SSLContext without #set_params) - which kills every later HTTPS gem fetch. RUN rvm install jruby-${JRUBY_VERSION} \ - && gem update --system 3.3.26 \ + && ruby -ropenssl -e 'raise "jruby-openssl Ruby layer not loaded" unless OpenSSL::SSL::SSLContext.method_defined?(:set_params)' \ && gem install bundler -v 2.3.27 \ && gem install rake -v 11.3.0 diff --git a/VERSION b/VERSION index f46ce326f..55fc6a4db 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.7.106 +3.7.107 diff --git a/lib/gooddata/rest/connection.rb b/lib/gooddata/rest/connection.rb index 81a2533b2..5cf82ef29 100644 --- a/lib/gooddata/rest/connection.rb +++ b/lib/gooddata/rest/connection.rb @@ -619,7 +619,7 @@ def process_response(options = {}, &block) merge_headers! response.headers content_type = response.headers[:content_type] return response if process == false - if content_type == 'application/json' || content_type == 'application/json;charset=UTF-8' + if content_type == 'application/json' || content_type == 'application/json;charset=UTF-8' || content_type_with_version(content_type) result = response.to_str == '""' ? {} : MultiJson.load(response.to_str) GoodData.rest_logger.debug "Request ID: #{response.headers[:x_gdc_request]} - Response: #{result.inspect}" elsif ['text/plain;charset=UTF-8', 'text/plain; charset=UTF-8', 'text/plain'].include?(content_type) @@ -647,6 +647,10 @@ def process_response(options = {}, &block) result end + def content_type_with_version(content_type) + !content_type.nil? && content_type.include?('application/json') && content_type.include?('version=') + end + def profile(method, path, request_id, stats_on, &block) t1 = Time.now res = block.call