[arvados] created: 2.7.0-4961-g375779392b

git repository hosting git at public.arvados.org
Fri Oct 6 17:31:32 UTC 2023


        at  375779392bdbb3c6cfba4432bbf40448c5e56c16 (commit)


commit 375779392bdbb3c6cfba4432bbf40448c5e56c16
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Fri Oct 6 14:23:20 2023 -0300

    20949: Adds query string based redirections from wb1's actions controller.
    
    Matches '/actions?uuid=X' URLs and redirects to an appropriate WB2 URL.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_workbench_configuration.sls b/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_workbench_configuration.sls
index 87ed7c4507..e610ec158f 100644
--- a/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_workbench_configuration.sls
+++ b/tools/salt-install/config_examples/multi_host/aws/pillars/nginx_workbench_configuration.sls
@@ -33,6 +33,16 @@ nginx:
         requires:
           __CERT_REQUIRES__
         config:
+          # Maps WB1 '/actions?uuid=X' URLs to their equivalent on WB2
+          - 'map $request_uri $actions_redirect':
+            - '~^/actions\?uuid=(.*-4zz18-.*)': '/collections/$1'
+            - '~^/actions\?uuid=(.*-j7d0g-.*)': '/projects/$1'
+            - '~^/actions\?uuid=(.*-tpzed-.*)': '/projects/$1'
+            - '~^/actions\?uuid=(.*-7fd4e-.*)': '/workflows/$1'
+            - '~^/actions\?uuid=(.*-xvhdp-.*)': '/processes/$1'
+            - '~^/actions\?uuid=(.*)': '/'
+            - default: 0
+
           - server:
             - server_name: workbench.__DOMAIN__
             - listen:
@@ -49,6 +59,10 @@ nginx:
     # rewrite ^/projects.* /projects redirect;
     # rewrite ^/trash /trash redirect;
 
+            # WB1 '/actions?uuid=X' URL Redirects
+            - 'if ($actions_redirect)':
+              - return: '301 $actions_redirect'
+
     # Redirects that include a uuid
             - rewrite: '^/work_units/(.*) /processes/$1 redirect'
             - rewrite: '^/container_requests/(.*) /processes/$1 redirect'
diff --git a/tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/nginx_workbench_configuration.sls b/tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/nginx_workbench_configuration.sls
index 87ed7c4507..e610ec158f 100644
--- a/tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/nginx_workbench_configuration.sls
+++ b/tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/nginx_workbench_configuration.sls
@@ -33,6 +33,16 @@ nginx:
         requires:
           __CERT_REQUIRES__
         config:
+          # Maps WB1 '/actions?uuid=X' URLs to their equivalent on WB2
+          - 'map $request_uri $actions_redirect':
+            - '~^/actions\?uuid=(.*-4zz18-.*)': '/collections/$1'
+            - '~^/actions\?uuid=(.*-j7d0g-.*)': '/projects/$1'
+            - '~^/actions\?uuid=(.*-tpzed-.*)': '/projects/$1'
+            - '~^/actions\?uuid=(.*-7fd4e-.*)': '/workflows/$1'
+            - '~^/actions\?uuid=(.*-xvhdp-.*)': '/processes/$1'
+            - '~^/actions\?uuid=(.*)': '/'
+            - default: 0
+
           - server:
             - server_name: workbench.__DOMAIN__
             - listen:
@@ -49,6 +59,10 @@ nginx:
     # rewrite ^/projects.* /projects redirect;
     # rewrite ^/trash /trash redirect;
 
+            # WB1 '/actions?uuid=X' URL Redirects
+            - 'if ($actions_redirect)':
+              - return: '301 $actions_redirect'
+
     # Redirects that include a uuid
             - rewrite: '^/work_units/(.*) /processes/$1 redirect'
             - rewrite: '^/container_requests/(.*) /processes/$1 redirect'

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list