From 61c4d5a8947f3784887dbc79ac61b0b67f749136 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Thu, 17 Nov 2022 19:51:36 +0100 Subject: [PATCH] Provide default for retrieve_files method Fixes CODEOCEAN-F4 --- lib/runner/strategy.rb | 2 +- lib/runner/strategy/docker_container_pool.rb | 2 +- lib/runner/strategy/null.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/runner/strategy.rb b/lib/runner/strategy.rb index bbb8ec72..50a55def 100644 --- a/lib/runner/strategy.rb +++ b/lib/runner/strategy.rb @@ -33,7 +33,7 @@ class Runner::Strategy raise NotImplementedError end - def retrieve_files(path:, recursive:, privileged_execution:) + def retrieve_files(path: './', recursive: true, privileged_execution: false) raise NotImplementedError end diff --git a/lib/runner/strategy/docker_container_pool.rb b/lib/runner/strategy/docker_container_pool.rb index e4558ef9..c13be88d 100644 --- a/lib/runner/strategy/docker_container_pool.rb +++ b/lib/runner/strategy/docker_container_pool.rb @@ -104,7 +104,7 @@ class Runner::Strategy::DockerContainerPool < Runner::Strategy Rails.logger.debug { "#{Time.zone.now.getutc.inspect}: Finished copying files" } end - def retrieve_files(path:, recursive:, privileged_execution:) + def retrieve_files(path: './', recursive: true, privileged_execution: false) # The DockerContainerPool does not support retrieving files from the runner. end diff --git a/lib/runner/strategy/null.rb b/lib/runner/strategy/null.rb index e5b53cc9..c1c05879 100644 --- a/lib/runner/strategy/null.rb +++ b/lib/runner/strategy/null.rb @@ -25,7 +25,7 @@ class Runner::Strategy::Null < Runner::Strategy def copy_files(_files); end - def retrieve_files(path:, recursive:, privileged_execution: false); end + def retrieve_files(path: './', recursive: true, privileged_execution: false); end def download_file(_file, privileged_execution: false, &_block) # rubocop:disable Lint/UnusedMethodArgument for the keyword argument raise Runner::Error.new