Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE:MSF-24365 - Change update status for test #1890

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions bin/run_brick.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def handle_error(params, log, brick_type, error, error_message)
execution_log = GoodData.logger
execution_log.error "Execution failed. Error: #{error}" unless execution_log.nil?
GoodData::Bricks::ExecutionResultMiddleware.update_execution_result(GoodData::Bricks::ExecutionStatus::ERROR, error_message)
GoodData.logger.warn("Handling the WARNING status when error")
log.error "action=#{brick_type}_execution status=failed commit_hash=#{params['GOODDATA_RUBY_COMMIT']} execution_id=#{params['GDC_EXECUTION_ID']} exception=#{error}"
raise
end
Expand All @@ -29,6 +30,7 @@ def handle_error(params, log, brick_type, error, error_message)
log = RemoteSyslogLogger.new(syslog_node, 514, :program => "ruby_#{brick_type}", :facility => 'local2')

log.info "action=#{brick_type}_execution status=init"
GoodData.logger.info("Start for testing WARNING status")

begin
commit_hash = ENV['GOODDATA_RUBY_COMMIT'] || ''
Expand Down Expand Up @@ -58,6 +60,12 @@ def handle_error(params, log, brick_type, error, error_message)

log.info "action=#{brick_type}_execution status=start commit_hash=#{commit_hash} execution_id=#{execution_id}"
brick_pipeline.call(params)
if params['is_brick_ok'].nil? || params['is_brick_ok'] == false
log.info "#Debug brick ends: WARNING"
GoodData::Bricks::ExecutionResultMiddleware.update_execution_result(GoodData::Bricks::ExecutionStatus::WARNING, "The testing warning message")
else
log.info "#Debug brick ends: OK"
end
rescue GoodData::LcmExecutionError => lcm_error
handle_error(execution_result_log_params, log, brick_type, lcm_error, lcm_error.summary_error)
rescue Exception => e # rubocop:disable RescueException
Expand Down
202 changes: 0 additions & 202 deletions spec/lcm/load/users_brick_load_spec.rb

This file was deleted.