You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2022/10/20 13:32:24 UTC

[incubator-datalab] branch epm-v2.5.2.1 updated (9981d22fc -> ebd0d02c1)

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

lfrolov pushed a change to branch epm-v2.5.2.1
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


    from 9981d22fc applied nbformat 5.3.0 version during jupyter installation
     new d73f4baab fixed conflict
     new ebd0d02c1 fixed conflict

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:
 .../general/scripts/os/get_list_available_pkgs.py  | 69 ++++++++++++++++------
 1 file changed, 50 insertions(+), 19 deletions(-)


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


[incubator-datalab] 02/02: fixed conflict

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

lfrolov pushed a commit to branch epm-v2.5.2.1
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit ebd0d02c1f4afc51cad9c503c49c7359fcddf223
Author: Oleksandr Polishchuk2 <ol...@epam.com>
AuthorDate: Fri May 6 14:28:46 2022 +0300

    fixed conflict
---
 .../general/scripts/os/get_list_available_pkgs.py  | 42 ++++++++++++++++------
 1 file changed, 32 insertions(+), 10 deletions(-)

diff --git a/infrastructure-provisioning/src/general/scripts/os/get_list_available_pkgs.py b/infrastructure-provisioning/src/general/scripts/os/get_list_available_pkgs.py
index 86c84128c..c8f655347 100644
--- a/infrastructure-provisioning/src/general/scripts/os/get_list_available_pkgs.py
+++ b/infrastructure-provisioning/src/general/scripts/os/get_list_available_pkgs.py
@@ -42,16 +42,25 @@ def get_available_pip_pkgs(version):
     try:
         for _ in range(100):
             pip_pkgs = dict()
-            client = xmlrpc.client.ServerProxy('https://pypi.python.org/pypi')
-            raw_pkgs = client.browse(["Programming Language :: Python :: " + version + ""])
-            all_pkgs = [i[0] for i in raw_pkgs]
-            if len(all_pkgs) != 0:
-                for pkg in all_pkgs:
-                    pip_pkgs[pkg] = "N/A"
-                return pip_pkgs
-            else:
-                time.sleep(5)
-                continue
+            attempt = 0
+            while attempt < 3:
+                try:
+                    client = xmlrpc.client.ServerProxy('https://pypi.python.org/pypi')
+                    raw_pkgs = client.browse(["Programming Language :: Python :: " + version + ""])
+                    all_pkgs = [i[0] for i in raw_pkgs]
+                    if len(all_pkgs) != 0:
+                        for pkg in all_pkgs:
+                            pip_pkgs[pkg] = "N/A"
+                        return pip_pkgs
+                    else:
+                        time.sleep(5)
+                        continue
+                except:
+                    attempt += 1
+                    time.sleep(10)
+            if attempt == 3:
+                logging.info("Unable to get available pip packages")
+                raise Exception
     except Exception as err:
         print('Error: {0}'.format(err))
         sys.exit(1)
@@ -60,8 +69,13 @@ def get_available_pip_pkgs(version):
 def get_uncategorised_pip_pkgs(all_pkgs_pip2, all_pkgs_pip3):
     try:
         pip_pkgs = dict()
+<<<<<<< HEAD
         attempts = 0
         while attempts < 3:
+=======
+        attempt = 0
+        while attempt < 3:
+>>>>>>> 80e8ea9dc... [DATALAB-2768]: changed retrying cycle concept
             try:
                 client = xmlrpc.client.ServerProxy('https://pypi.python.org/pypi')
                 raw_pkgs = client.list_packages()
@@ -69,11 +83,19 @@ def get_uncategorised_pip_pkgs(all_pkgs_pip2, all_pkgs_pip3):
                 for pkg in raw_pkgs:
                     if pkg not in all_pkgs_pip2 and pkg not in all_pkgs_pip3:
                         all_pkgs_other.append(pkg)
+<<<<<<< HEAD
                 for pkg in all_pkgs_other:
                     pip_pkgs[pkg] = "N/A"
                 return pip_pkgs
             except:
                 attempts += 1
+=======
+                        for pkg in all_pkgs_other:
+                            pip_pkgs[pkg] = "N/A"
+                        return pip_pkgs
+            except:
+                attempt += 1
+>>>>>>> 80e8ea9dc... [DATALAB-2768]: changed retrying cycle concept
                 time.sleep(10)
         if attempt == 3:
             logging.info("Unable to get uncategorised pip packages")


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


[incubator-datalab] 01/02: fixed conflict

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

lfrolov pushed a commit to branch epm-v2.5.2.1
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit d73f4baabaf1ae89b8d07e7e97b000f993b9126f
Author: Oleksandr Polishchuk2 <ol...@epam.com>
AuthorDate: Tue May 10 17:29:55 2022 +0300

    fixed conflict
---
 .../general/scripts/os/get_list_available_pkgs.py  | 27 ++++++++++++++--------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/infrastructure-provisioning/src/general/scripts/os/get_list_available_pkgs.py b/infrastructure-provisioning/src/general/scripts/os/get_list_available_pkgs.py
index 8e33b20bf..86c84128c 100644
--- a/infrastructure-provisioning/src/general/scripts/os/get_list_available_pkgs.py
+++ b/infrastructure-provisioning/src/general/scripts/os/get_list_available_pkgs.py
@@ -60,15 +60,24 @@ def get_available_pip_pkgs(version):
 def get_uncategorised_pip_pkgs(all_pkgs_pip2, all_pkgs_pip3):
     try:
         pip_pkgs = dict()
-        client = xmlrpc.client.ServerProxy('https://pypi.python.org/pypi')
-        raw_pkgs = client.list_packages()
-        all_pkgs_other = []
-        for pkg in raw_pkgs:
-            if pkg not in all_pkgs_pip2 and pkg not in all_pkgs_pip3:
-                all_pkgs_other.append(pkg)
-        for pkg in all_pkgs_other:
-            pip_pkgs[pkg] = "N/A"
-        return pip_pkgs
+        attempts = 0
+        while attempts < 3:
+            try:
+                client = xmlrpc.client.ServerProxy('https://pypi.python.org/pypi')
+                raw_pkgs = client.list_packages()
+                all_pkgs_other = []
+                for pkg in raw_pkgs:
+                    if pkg not in all_pkgs_pip2 and pkg not in all_pkgs_pip3:
+                        all_pkgs_other.append(pkg)
+                for pkg in all_pkgs_other:
+                    pip_pkgs[pkg] = "N/A"
+                return pip_pkgs
+            except:
+                attempts += 1
+                time.sleep(10)
+        if attempt == 3:
+            logging.info("Unable to get uncategorised pip packages")
+            raise Exception
     except Exception as err:
         print('Error: {0}'.format(err))
         sys.exit(1)


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