dlab-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lfro...@apache.org
Subject [incubator-dlab] branch DLAB-1974 updated: [DLAB-1974]: added additional check in case in R package version are invalid characters
Date Fri, 07 Aug 2020 12:01:49 GMT
This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DLAB-1974
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/DLAB-1974 by this push:
     new fd836e4  [DLAB-1974]: added additional check in case in R package version are invalid
characters
fd836e4 is described below

commit fd836e4c44e1c56789b67448e9f7ee7d5cbb4aa6
Author: leonidfrolov <frolovleon@gmail.com>
AuthorDate: Fri Aug 7 15:01:29 2020 +0300

    [DLAB-1974]: added additional check in case in R package version are invalid characters
---
 infrastructure-provisioning/src/general/lib/os/fab.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index 8fe8ace..65eda88 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -457,12 +457,14 @@ def install_r_pkg(requisites):
                 ansi_escape = re.compile(r'\x1b[^m]*m')
                 version = ansi_escape.sub('', res).split("\r\n")[0].split('"')[1]
                 status_msg = 'installed'
-            if 'Error in download_version_url(package, version, repos, type) :' in err:
+            if 'Error in download_version_url(package, version, repos, type) :' in err or
'Error in parse_deps(paste(spec,' in err:
                 sudo('R -e \'install.packages("versions", repos="https://cloud.r-project.org",
dep=TRUE)\'')
                 versions = sudo('R -e \'library(versions); available.versions("' + name +
'")\' 2>&1 | grep -A 50 '
                                     '\'date available\' | awk \'{print $2}\'').replace('\r\n',
' ')[5:].split(' ')
                 if versions != ['']:
                     status_msg = 'invalid_version'
+                else:
+                    versions = []
             else:
                 versions = []
             status.append({"group": "r_pkg", "name": name, "version": version, "status":
status_msg, "error_message": err, "available_versions": versions, "add_pkgs": dep})


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org


Mime
View raw message