From 2cefe20cf2e297ca1a4df42750fe2d77504ecdd3 Mon Sep 17 00:00:00 2001 From: Hung Nguyen Date: Wed, 8 Nov 2023 13:38:50 +0700 Subject: [PATCH] BUGFIX: MSF-25904 Using C9S and java 8 for LCM Bricks --- Dockerfile | 12 ++++++++++-- bin/run_brick.rb | 6 ++++++ gooddata.gemspec | 1 + 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index abb66d13a..639e865f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM 020413372491.dkr.ecr.us-east-1.amazonaws.com/tools/gdc-java-11-jre-centos9:202310031054.5119496 +FROM 020413372491.dkr.ecr.us-east-1.amazonaws.com/tools/gdc-java-8-jdk-centos9:202310201237.2c3bc86 ARG RVM_VERSION=stable ARG JRUBY_VERSION=9.4.1.0 @@ -6,7 +6,7 @@ ARG JRUBY_VERSION=9.4.1.0 LABEL image_name="GDC LCM Bricks" LABEL maintainer="LCM " LABEL git_repository_url="https://github.com/gooddata/gooddata-ruby/" -LABEL parent_image="020413372491.dkr.ecr.us-east-1.amazonaws.com/tools/gdc-java-11-jre-centos9:202310031054.5119496" +LABEL parent_image="020413372491.dkr.ecr.us-east-1.amazonaws.com/tools/gdc-java-8-jdk-centos9:202310201237.2c3bc86" # which is required by RVM RUN yum install -y which patch make git maven procps \ @@ -33,6 +33,14 @@ RUN rvm install jruby-${JRUBY_VERSION} && gem update --system \ && gem install bundler -v 2.4.6 \ && gem install rake -v 13.0.6 +RUN alternatives --install /usr/bin/java java /usr/lib/jvm/java-1.8.0-openjdk/bin/java 1 +RUN update-alternatives --set java /usr/lib/jvm/java-1.8.0-openjdk/bin/java +RUN export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk + +#RUN alternatives --install /usr/bin/java java /usr/lib/jvm/jre-1.8.0/bin/java 1 +#RUN update-alternatives --set java /usr/lib/jvm/jre-1.8.0/bin/java +#RUN export JAVA_HOME=/usr/lib/jvm/jre-1.8.0 + WORKDIR /src RUN groupadd -g 48 apache \ diff --git a/bin/run_brick.rb b/bin/run_brick.rb index a8933bec0..fe997d237 100755 --- a/bin/run_brick.rb +++ b/bin/run_brick.rb @@ -62,6 +62,12 @@ def handle_error(params, log, brick_type, error, error_message) params['GDC_EXECUTION_RESULT_LOG_PATH'] = execution_result_log_path log.info "action=#{brick_type}_execution status=start commit_hash=#{commit_hash} execution_id=#{execution_id}" + + # Start sleep to investigate issue no suitable driver found + log.info "action=#{brick_type}_execution status=start commit_hash=#{commit_hash} execution_id=#{execution_id} sleep=start" + sleep(60) + log.info "action=#{brick_type}_execution status=start commit_hash=#{commit_hash} execution_id=#{execution_id} sleep=end" + brick_pipeline.call(params) rescue GoodData::LcmExecutionError => lcm_error handle_error(execution_result_log_params, log, brick_type, lcm_error, lcm_error.summary_error) diff --git a/gooddata.gemspec b/gooddata.gemspec index 8c8516fa1..06349dbd7 100644 --- a/gooddata.gemspec +++ b/gooddata.gemspec @@ -74,6 +74,7 @@ if RUBY_VERSION >= '2.5' s.add_dependency 'parseconfig', '~> 1.0' s.add_dependency 'pmap', '~> 1.1' s.add_dependency 'sequel', '< 5.72.0' + s.add_dependency 'gooddata-dss-jdbc', '< 0.2.9' s.add_dependency 'remote_syslog_logger', '~> 1.0.3' s.add_dependency 'restforce', '>= 2.4' s.add_dependency 'rest-client', '~> 2.0'