Merge branch 'master' into 14946-ruby-2.5
authorLucas Di Pentima <ldipentima@veritasgenetics.com>
Thu, 23 May 2019 14:42:10 +0000 (11:42 -0300)
committerLucas Di Pentima <ldipentima@veritasgenetics.com>
Thu, 23 May 2019 14:42:10 +0000 (11:42 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

13 files changed:
apps/workbench/app/controllers/actions_controller.rb
apps/workbench/app/controllers/status_controller.rb
apps/workbench/config/application.rb
apps/workbench/config/initializers/validate_wb2_url_config.rb
apps/workbench/test/integration/application_layout_test.rb
doc/sdk/python/arvados-fuse.html.textile.liquid
sdk/cwl/arvados_cwl/arvcontainer.py
sdk/cwl/tests/15241-writable-dir-job.json [new file with mode: 0644]
sdk/cwl/tests/15241-writable-dir.cwl [new file with mode: 0644]
sdk/cwl/tests/arvados-tests.yml
sdk/cwl/tests/test_container.py
sdk/cwl/tests/test_submit.py
tools/arvbox/lib/arvbox/docker/service/nginx/run

index 4f77a1be477e4f17046e8a243e65831c17122789..b1bbb122670dcb6b11aac21d915f26174851aed9 100644 (file)
@@ -3,6 +3,7 @@
 # SPDX-License-Identifier: AGPL-3.0
 
 require "arvados/collection"
+require "app_version"
 
 class ActionsController < ApplicationController
 
index 0a8fb5a282c5872b2b20b66cb4ee3dfb7f71a152..0e45daa1df095d1ec7829f79886a206ea28dd9e6 100644 (file)
@@ -2,6 +2,8 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
+require "app_version"
+
 class StatusController < ApplicationController
   skip_around_action :require_thread_api_token
   skip_before_action :find_object_by_uuid
index 09fa403057aa996c66ea0ce530315c4c3a6347f2..1c7a9d0dac8866511f795e1fea048d7f4989a300 100644 (file)
@@ -26,8 +26,9 @@ module ArvadosWorkbench
     # -- all .rb files in that directory are automatically loaded.
 
     # Custom directories with classes and modules you want to be autoloadable.
+    # Autoload paths shouldn't be used anymore since Rails 5.0
+    # See #15258 and https://github.com/rails/rails/issues/13142#issuecomment-74586224
     # config.autoload_paths += %W(#{config.root}/extras)
-    config.autoload_paths += %W(#{config.root}/lib)
 
     # Only load the plugins named here, in the order given (default is alphabetical).
     # :all can be used as a placeholder for all plugins not explicitly named.
index f9096486c1b273c0350ade315555942b5ef36949..0a8f07c4bed0c1bedf3e565ff63b49f4318f847f 100644 (file)
@@ -2,6 +2,8 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
+require 'config_validators'
+
 include ConfigValidators
 
 ConfigValidators::validate_wb2_url_config()
\ No newline at end of file
index b3f704cdd98feb3be31326b2cbaf6451c5aa7925..51c3720985a85e0fbfd3ebd60ff1473134af78ab 100644 (file)
@@ -3,6 +3,7 @@
 # SPDX-License-Identifier: AGPL-3.0
 
 require 'integration_helper'
+require 'config_validators'
 
 class ApplicationLayoutTest < ActionDispatch::IntegrationTest
   # These tests don't do state-changing API calls. Save some time by
index 6169734768e47c538ffd7b7cc4e4b3ad36b0dffa..b900dc932ffcb105a217686dbeac67aecee9e23b 100644 (file)
@@ -19,7 +19,7 @@ If you are logged in to an Arvados VM, the @arv-mount@ utility should already be
 To use the FUSE driver elsewhere, you can install from a distribution package, PyPI, or source.
 
 {% include 'notebox_begin' %}
-The Python SDK requires Python 2.7.
+The Arvados FUSE driver requires Python 2.7
 {% include 'notebox_end' %}
 
 h4. Option 1: Install from distribution packages
@@ -46,7 +46,7 @@ On Debian-based systems:
 
 h4. Option 2: Install with pip
 
-Run @pip-2.7 install arvados_fuse@ in an appropriate installation environment, such as a virtualenv.
+Run @pip install arvados_fuse@ in an appropriate installation environment, such as a virtualenv.
 
 h4. Option 3: Install from source
 
@@ -55,7 +55,7 @@ Install the @python-setuptools@ package from your distribution.  Then run the fo
 <notextile>
 <pre><code>~$ <span class="userinput">git clone https://github.com/curoverse/arvados.git</span>
 ~$ <span class="userinput">cd arvados/services/fuse</span>
-~/arvados/services/fuse$ <span class="userinput">python2.7 setup.py install</span>
+~/arvados/services/fuse$ <span class="userinput">python setup.py install</span>
 </code></pre>
 </notextile>
 
index b194f3dfcaa0be1cf676ea771e008cbcc9b0b2c0..ec144abf3ee36adfe5e8594e4cd1219632f79528 100644 (file)
@@ -155,7 +155,7 @@ class ArvadosContainer(JobBase):
                                 vwd.mkdirs(p.target)
                             else:
                                 source, path = self.arvrunner.fs_access.get_collection(p.resolved)
-                                vwd.copy(path, p.target, source_collection=source)
+                                vwd.copy(path or ".", p.target, source_collection=source)
                         elif p.type == "CreateFile":
                             if self.arvrunner.secret_store.has_secret(p.resolved):
                                 secret_mounts["%s/%s" % (self.outdir, p.target)] = {
diff --git a/sdk/cwl/tests/15241-writable-dir-job.json b/sdk/cwl/tests/15241-writable-dir-job.json
new file mode 100644 (file)
index 0000000..f30578e
--- /dev/null
@@ -0,0 +1,6 @@
+{
+    "filesDir": {
+        "location": "keep:d7514270f356df848477718d58308cc4+94",
+        "class": "Directory"
+    }
+}
diff --git a/sdk/cwl/tests/15241-writable-dir.cwl b/sdk/cwl/tests/15241-writable-dir.cwl
new file mode 100644 (file)
index 0000000..bfd17f7
--- /dev/null
@@ -0,0 +1,20 @@
+cwlVersion: v1.0
+class: CommandLineTool
+
+requirements:
+  - class: InitialWorkDirRequirement
+    listing:
+      - entry: $(inputs.filesDir)
+        writable: true
+
+inputs:
+  filesDir:
+    type: Directory
+
+outputs:
+  results:
+    type: Directory
+    outputBinding:
+      glob: .
+
+arguments: [touch, $(inputs.filesDir.path)/blurg.txt]
index 8b8ff28c789d771ba0c2e54855beb82381ee6a83..d649c3bf67706669ee93076a2640958f3194d734 100644 (file)
     }
   tool: 13931-size.cwl
   doc: Test that size is set for files in Keep
+
+- job: 15241-writable-dir-job.json
+  output: {
+    "results": {
+        "basename": "keep:6dd5fa20622d5a7a23c9147d0927da2a+180",
+        "class": "Directory",
+        "listing": [
+            {
+                "basename": "d7514270f356df848477718d58308cc4+94",
+                "class": "Directory",
+                "listing": [
+                    {
+                        "basename": "a",
+                        "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
+                        "class": "File",
+                        "location": "a",
+                        "size": 0
+                    },
+                    {
+                        "basename": "blurg.txt",
+                        "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
+                        "class": "File",
+                        "location": "blurg.txt",
+                        "size": 0
+                    },
+                    {
+                        "basename": "c",
+                        "class": "Directory",
+                        "listing": [
+                            {
+                                "basename": "d",
+                                "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
+                                "class": "File",
+                                "location": "d",
+                                "size": 0
+                            }
+                        ],
+                        "location": "c"
+                    },
+                    {
+                        "basename": "b",
+                        "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
+                        "class": "File",
+                        "location": "b",
+                        "size": 0
+                    }
+                ],
+                "location": "d7514270f356df848477718d58308cc4+94"
+            }
+        ],
+        "location": "keep:6dd5fa20622d5a7a23c9147d0927da2a+180"
+    }
+  }
+  tool: 15241-writable-dir.cwl
+  doc: Test for writable collections
index 07d962bf9b55e2d33efab5b470b3146cab8c49f9..3ddfd358a891431ed8c74d974458f201e862641b 100644 (file)
@@ -324,7 +324,7 @@ class TestContainer(unittest.TestCase):
         call_args, call_kwargs = runner.api.container_requests().create.call_args
 
         vwdmock.copy.assert_has_calls([mock.call('bar', 'foo', source_collection=sourcemock)])
-        vwdmock.copy.assert_has_calls([mock.call('', 'foo2', source_collection=sourcemock)])
+        vwdmock.copy.assert_has_calls([mock.call('.', 'foo2', source_collection=sourcemock)])
         vwdmock.copy.assert_has_calls([mock.call('baz/filename', 'filename', source_collection=sourcemock)])
         vwdmock.copy.assert_has_calls([mock.call('subdir', 'subdir', source_collection=sourcemock)])
 
index 9535f6ba206bfadf267dda54bbad19fcecf0f961..f1118695023d017d5507103d4143245e9a0d2a63 100644 (file)
@@ -1394,6 +1394,7 @@ class TestSubmit(unittest.TestCase):
 
     @stubs
     def test_submit_request_uuid(self, stubs):
+        stubs.api._rootDesc["remoteHosts"]["zzzzz"] = "123"
         stubs.expect_container_request_uuid = "zzzzz-xvhdp-yyyyyyyyyyyyyyy"
 
         stubs.api.container_requests().update().execute.return_value = {
index 4014c5c8b040316c4850df4d788476854d06527c..2353e949f7090093a02501afa57779f0dce6f649 100755 (executable)
@@ -24,6 +24,8 @@ http {
      access_log off;
      include /etc/nginx/mime.types;
      default_type application/octet-stream;
+     client_max_body_size 128M;
+
      server {
             listen ${services[doc]} default_server;
             listen [::]:${services[doc]} default_server;