[ARVADOS] updated: 2.1.0-656-g27004c7c4

Git user git at public.arvados.org
Thu Apr 15 20:03:53 UTC 2021


Summary of changes:
 apps/workbench/bin/yarn                 | 15 ---------------
 apps/workbench/config/arvados_config.rb |  4 ++--
 build/rails-package-scripts/postinst.sh |  6 ------
 build/run-build-packages.sh             |  4 ++--
 services/api/bin/yarn                   | 16 ----------------
 services/api/config/arvados_config.rb   |  4 ++--
 6 files changed, 6 insertions(+), 43 deletions(-)
 delete mode 100755 apps/workbench/bin/yarn
 delete mode 100755 services/api/bin/yarn

       via  27004c7c4cffac0b61c3fb346e0bd9b155c3763c (commit)
       via  15ea250e76a816f54c3e29d5a3b0c72bb0435f4c (commit)
      from  03aade6dd988f91b1037f39754438846c4844cfb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 27004c7c4cffac0b61c3fb346e0bd9b155c3763c
Author: Tom Clegg <tom at curii.com>
Date:   Thu Apr 15 16:02:11 2021 -0400

    17528: Fix assets:precompile @ build time, skip at install time.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/apps/workbench/config/arvados_config.rb b/apps/workbench/config/arvados_config.rb
index fb99b3117..c5cc544b9 100644
--- a/apps/workbench/config/arvados_config.rb
+++ b/apps/workbench/config/arvados_config.rb
@@ -32,8 +32,8 @@ $arvados_config_defaults = clusterConfig
 $arvados_config_defaults["ClusterID"] = clusterID
 
 if ENV["ARVADOS_CONFIG"] == "none"
-  # Don't load config. This magic value is set by postinst so it can
-  # run "rake assets:precompile" without a real config.
+  # Don't load config. This magic value is set by packaging scripts so
+  # they can run "rake assets:precompile" without a real config.
   $arvados_config_global = $arvados_config_defaults.deep_dup
 else
   # Load the global config file
diff --git a/build/rails-package-scripts/postinst.sh b/build/rails-package-scripts/postinst.sh
index 6b069957a..766481116 100644
--- a/build/rails-package-scripts/postinst.sh
+++ b/build/rails-package-scripts/postinst.sh
@@ -226,12 +226,6 @@ configure_version() {
       prepare_database
   fi
 
-  # Here, "ARVADOS_CONFIG=none" tells arvados_config.rb not to try
-  # loading config from /etc: it might not exist on a new install, and
-  # assets:precompile doesn't depend on config anyway.
-  run_and_report "Precompiling assets" \
-                 ARVADOS_CONFIG=none $COMMAND_PREFIX bundle exec rake assets:precompile -q -s 2>/dev/null || true
-
   if [ -e /etc/arvados/config.yml ]; then
       # warn about config errors (deprecated/removed keys from
       # previous version, etc)
diff --git a/build/run-build-packages.sh b/build/run-build-packages.sh
index f9db56a5f..e231a83df 100755
--- a/build/run-build-packages.sh
+++ b/build/run-build-packages.sh
@@ -401,8 +401,8 @@ if [[ "$?" == "0" ]] ; then
       mv /tmp/x /etc/arvados/config.yml
       perl -p -i -e 'BEGIN{undef $/;} s/WebDAV(.*?):\n( *)ExternalURL: ""/WebDAV$1:\n$2ExternalURL: "example.com"/g' /etc/arvados/config.yml
 
-      RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake npm:install >"$STDOUT_IF_DEBUG"
-      RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile >"$STDOUT_IF_DEBUG"
+      ARVADOS_CONFIG=none RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake npm:install >"$STDOUT_IF_DEBUG"
+      ARVADOS_CONFIG=none RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile >"$STDOUT_IF_DEBUG"
 
       # Remove generated configuration files so they don't go in the package.
       rm -rf /etc/arvados/
diff --git a/services/api/config/arvados_config.rb b/services/api/config/arvados_config.rb
index eb48e271b..2c259919a 100644
--- a/services/api/config/arvados_config.rb
+++ b/services/api/config/arvados_config.rb
@@ -57,8 +57,8 @@ $arvados_config_defaults = clusterConfig
 $arvados_config_defaults["ClusterID"] = clusterID
 
 if ENV["ARVADOS_CONFIG"] == "none"
-  # Don't load config. This magic value is set by postinst so it can
-  # run "rake assets:precompile" without a real config.
+  # Don't load config. This magic value is set by packaging scripts so
+  # they can run "rake assets:precompile" without a real config.
   $arvados_config_global = $arvados_config_defaults.deep_dup
 else
   # Load the global config file

commit 15ea250e76a816f54c3e29d5a3b0c72bb0435f4c
Author: Tom Clegg <tom at curii.com>
Date:   Thu Apr 15 15:45:40 2021 -0400

    17528: Remove bin/yarn from Rails projects.
    
    "rake assets:precompile" uses the existence of the bin/yarn stub to
    decide whether yarn is needed.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/apps/workbench/bin/yarn b/apps/workbench/bin/yarn
deleted file mode 100755
index 5fc761195..000000000
--- a/apps/workbench/bin/yarn
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env ruby
-# Copyright (C) The Arvados Authors. All rights reserved.
-#
-# SPDX-License-Identifier: AGPL-3.0
-
-APP_ROOT = File.expand_path('..', __dir__)
-Dir.chdir(APP_ROOT) do
-  begin
-    exec "yarnpkg #{ARGV.join(" ")}"
-  rescue Errno::ENOENT
-    $stderr.puts "Yarn executable was not detected in the system."
-    $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
-    exit 1
-  end
-end
diff --git a/services/api/bin/yarn b/services/api/bin/yarn
deleted file mode 100755
index cc54a3ba5..000000000
--- a/services/api/bin/yarn
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env ruby
-
-# Copyright (C) The Arvados Authors. All rights reserved.
-#
-# SPDX-License-Identifier: AGPL-3.0
-
-APP_ROOT = File.expand_path('..', __dir__)
-Dir.chdir(APP_ROOT) do
-  begin
-    exec "yarnpkg", *ARGV
-  rescue Errno::ENOENT
-    $stderr.puts "Yarn executable was not detected in the system."
-    $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
-    exit 1
-  end
-end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list