You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2022/11/07 08:35:22 UTC

[atlas] branch master updated (a0a5c596f -> f497d7224)

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

madhan pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git


    from a0a5c596f ATLAS-4692: upgraded Apache Commons Text to 1.10.0
     new b9ff08fee ATLAS-4704: Remove os.path.join causing incorrect windows path
     new a43ed6c11 ATLAS-4676: do not expect response body to be a valid JSON
     new 4774ed61d ATLAS-4706: Remove unnecessary single quote at the end of flink_model.json
     new f497d7224 ATLAS-4706: code clean in the entity store v2 class

The 4 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:
 addons/models/1000-Hadoop/1110-flink_model.json           |  2 +-
 intg/src/main/python/apache_atlas/client/base_client.py   |  6 +++---
 intg/src/main/python/apache_atlas/exceptions.py           | 15 +++++++--------
 .../repository/store/graph/v2/AtlasEntityStoreV2.java     |  2 +-
 4 files changed, 12 insertions(+), 13 deletions(-)


[atlas] 03/04: ATLAS-4706: Remove unnecessary single quote at the end of flink_model.json

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

madhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 4774ed61d5de579d3c9bad9162115e8c6cbb57a6
Author: yanxu3 <ya...@microsoft.com>
AuthorDate: Sun Nov 6 23:11:45 2022 -0800

    ATLAS-4706: Remove unnecessary single quote at the end of flink_model.json
    
    Signed-off-by: Madhan Neethiraj <ma...@apache.org>
---
 addons/models/1000-Hadoop/1110-flink_model.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/addons/models/1000-Hadoop/1110-flink_model.json b/addons/models/1000-Hadoop/1110-flink_model.json
index 029600fa3..35c0af1ba 100644
--- a/addons/models/1000-Hadoop/1110-flink_model.json
+++ b/addons/models/1000-Hadoop/1110-flink_model.json
@@ -103,4 +103,4 @@
       "propagateTags": "NONE"
     }
   ]
-}'
\ No newline at end of file
+}


[atlas] 02/04: ATLAS-4676: do not expect response body to be a valid JSON

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

madhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit a43ed6c11d3ca3c8a63b86981c3241365eb60b79
Author: Maxim Martynov <ma...@mail.ru>
AuthorDate: Fri Sep 16 17:32:39 2022 +0300

    ATLAS-4676: do not expect response body to be a valid JSON
    
    Signed-off-by: Madhan Neethiraj <ma...@apache.org>
---
 intg/src/main/python/apache_atlas/exceptions.py | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/intg/src/main/python/apache_atlas/exceptions.py b/intg/src/main/python/apache_atlas/exceptions.py
index 092a45f3e..812ba1fbd 100644
--- a/intg/src/main/python/apache_atlas/exceptions.py
+++ b/intg/src/main/python/apache_atlas/exceptions.py
@@ -26,15 +26,14 @@ class AtlasServiceException(Exception):
     """
 
     def __init__(self, api, response):
-        msg = ""
+        body = ""
 
-        if api:
-            msg = "Metadata service API {method} : {path} failed".format(**{'method': api.method, 'path': api.path})
+        if response.content:
+            try:
+                body = response.json()
+            except Exception:
+                body = response.content
 
-        if response.content is not None:
-            status = response.status_code if response.status_code is not None else -1
-            msg = "Metadata service API with url {url} and method {method} : failed with status {status} and " \
-                  "Response Body is :{response}". \
-                format(**{'url': response.url, 'method': api.method, 'status': status, 'response': response.json()})
+        msg = "Metadata service API {method} {path} failed with status {status}. Response body is: {body}".format(**{'method': api.method, 'path': api.path, 'status': response.status_code, 'body': body})
 
         Exception.__init__(self, msg)


[atlas] 04/04: ATLAS-4706: code clean in the entity store v2 class

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

madhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit f497d7224f5dd1fcb73c8523a800e2b6ae26c274
Author: zhuangchong <zh...@163.com>
AuthorDate: Mon May 16 14:35:08 2022 +0800

    ATLAS-4706: code clean in the entity store v2 class
    
    Signed-off-by: Madhan Neethiraj <ma...@apache.org>
---
 .../org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
index d0e95e462..656c9d14b 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
@@ -399,7 +399,7 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
                 throw new AtlasBaseException(AtlasErrorCode.UNKNOWN_TYPENAME, objectId.getTypeName());
             }
 
-            guid = AtlasGraphUtilsV2.getGuidByUniqueAttributes(graph, typeRegistry.getEntityTypeByName(objectId.getTypeName()), objectId.getUniqueAttributes());
+            guid = AtlasGraphUtilsV2.getGuidByUniqueAttributes(graph, entityType, objectId.getUniqueAttributes());
         }
 
         AtlasEntity entity = updatedEntityInfo.getEntity();


[atlas] 01/04: ATLAS-4704: Remove os.path.join causing incorrect windows path

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

madhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit b9ff08fee7646f10083da2f8672b932a34aa4a7f
Author: Dov Benyomin Sohacheski <b...@kloud.email>
AuthorDate: Wed Oct 19 08:44:00 2022 +0300

    ATLAS-4704: Remove os.path.join causing incorrect windows path
    
    Signed-off-by: Madhan Neethiraj <ma...@apache.org>
---
 intg/src/main/python/apache_atlas/client/base_client.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/intg/src/main/python/apache_atlas/client/base_client.py b/intg/src/main/python/apache_atlas/client/base_client.py
index 2402611ce..bd52660e3 100644
--- a/intg/src/main/python/apache_atlas/client/base_client.py
+++ b/intg/src/main/python/apache_atlas/client/base_client.py
@@ -18,9 +18,9 @@
 import copy
 import json
 import logging
-import os
 
 from requests import Session
+from urllib.parse import urljoin
 
 from apache_atlas.client.admin import AdminClient
 from apache_atlas.client.discovery import DiscoveryClient
@@ -42,7 +42,7 @@ class AtlasClient:
         session = Session()
         session.auth = auth
 
-        self.host = host
+        self.host = host.rstrip('/')
         self.session = session
         self.request_params = {'headers': {}}
         self.typedef = TypeDefClient(self)
@@ -57,7 +57,7 @@ class AtlasClient:
 
     def call_api(self, api, response_type=None, query_params=None, request_obj=None):
         params = copy.deepcopy(self.request_params)
-        path = os.path.join(self.host, api.path)
+        path = urljoin(self.host, api.path.lstrip('/'))
 
         params['headers']['Accept'] = api.consumes
         params['headers']['Content-type'] = api.produces