You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by lf...@apache.org on 2020/07/23 14:05:59 UTC

[incubator-dlab] branch DLAB-1961 updated (bef18ec -> 126bbdd)

This is an automated email from the ASF dual-hosted git repository.

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


    from bef18ec  [DLAB-1961]: pip now upgrades lib if version is not specified and new version is available
     new bf9cce3  [DLAB-1961]: changed status 'invalid version' to 'invalid_version'
     new 126bbdd  [DLAB-1961]: made dataengine-service to only run pip3 during 'others' packages installation

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/general/lib/os/debian/notebook_lib.py              |  2 +-
 infrastructure-provisioning/src/general/lib/os/fab.py      |  4 ++--
 .../src/general/scripts/os/install_additional_libs.py      | 14 +++++++++-----
 3 files changed, 12 insertions(+), 8 deletions(-)


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


[incubator-dlab] 02/02: [DLAB-1961]: made dataengine-service to only run pip3 during 'others' packages installation

Posted by lf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 126bbdd5d7bab12333514ebf0a58baf8beccea14
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Thu Jul 23 17:04:25 2020 +0300

    [DLAB-1961]: made dataengine-service to only run pip3 during 'others' packages installation
---
 .../src/general/scripts/os/install_additional_libs.py      | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/infrastructure-provisioning/src/general/scripts/os/install_additional_libs.py b/infrastructure-provisioning/src/general/scripts/os/install_additional_libs.py
index d2ce331..ca81a97 100644
--- a/infrastructure-provisioning/src/general/scripts/os/install_additional_libs.py
+++ b/infrastructure-provisioning/src/general/scripts/os/install_additional_libs.py
@@ -97,12 +97,16 @@ if __name__ == "__main__":
     try:
         print('Installing other packages: {}'.format(pkgs['libraries']['others']))
         for pkg in pkgs['libraries']['others']:
-            status_pip2 = install_pip_pkg([pkg], 'pip2', 'others')
-            status_pip3 = install_pip_pkg([pkg], 'pip3', 'others')
-            if status_pip2[0]['status'] == 'installed':
-                general_status = general_status + status_pip2
-            else:
+            if os.environ['conf_resource'] in ('dataengine-service'):#, 'dataengine'):
+                status_pip3 = install_pip_pkg([pkg], 'pip3', 'others')
                 general_status = general_status + status_pip3
+            else:
+                status_pip2 = install_pip_pkg([pkg], 'pip2', 'others')
+                status_pip3 = install_pip_pkg([pkg], 'pip3', 'others')
+                if status_pip2[0]['status'] == 'installed':
+                    general_status = general_status + status_pip2
+                else:
+                    general_status = general_status + status_pip3
     except KeyError:
         pass
 


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


[incubator-dlab] 01/02: [DLAB-1961]: changed status 'invalid version' to 'invalid_version'

Posted by lf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit bf9cce3aae7db4bb116985e0a84958fbd03f9fe4
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Thu Jul 23 16:53:28 2020 +0300

    [DLAB-1961]: changed status 'invalid version' to 'invalid_version'
---
 infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py | 2 +-
 infrastructure-provisioning/src/general/lib/os/fab.py                 | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py b/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
index 8708d08..ee9db26 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
@@ -395,7 +395,7 @@ def install_os_pkg(requisites):
             if 'E: Version' in err and 'was not found' in err:
                 versions = sudo ('apt-cache policy {} | grep 500 | grep -v Packages'.format(os_pkg.split("=")[0])).replace('\r\n', '').replace(' 500', '').replace('     ', ' ').strip().split(' ')
                 if versions != '':
-                    status_msg = 'invalid version'
+                    status_msg = 'invalid_version'
             else:
                 versions = []
                 status_msg = 'failed'
diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index 1592313..576021d 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -96,7 +96,7 @@ def install_pip_pkg(requisites, pip_version, lib_group):
                 versions = err[err.find("(from versions: ") + 16: err.find(")\r\n")]
                 if versions != '':
                     versions = versions.split(', ')
-                    status_msg = 'invalid version'
+                    status_msg = 'invalid_version'
                 else:
                     versions = []
 
@@ -452,7 +452,7 @@ def install_r_pkg(requisites):
                 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(' ')
-                status_msg = 'invalid version'
+                status_msg = 'invalid_version'
             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