-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73176/
-----------------------------------------------------------
(Updated Feb. 8, 2021, 5:09 p.m.)
Review request for atlas, Jayendra Parab, Nikhil Bonte, and Nixon Rodrigues.
Summary (updated)
-----------------
ATLAS-4147 : [Atlas: Glossary Term Bulk Import] When un_supported file type is
passed error message displays file type {0}/ATLAS-4148 : [Atlas: Glossary Term
Bulk Import] Incorrect error code displayed when no data found in the uploaded
file/ATLAS-4134 : [Atlas:Glossary] Update conflict error me
Bugs: ATLAS-4147
https://issues.apache.org/jira/browse/ATLAS-4147
Repository: atlas
Description (updated)
-------
Pass unsupported file type to the glossary term bulk import
curl --request POST -u user:password
'https://<cluster>/api/atlas/v2/glossary/import' \
-H 'Accept: application/json' \
-H 'Cache-Control: no-cache' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'X-XSRF-HEADER: ""' \
-H 'Content-Type: multipart/form-data' \
-F [email protected] \
--compressed \
--insecure
Expectation:
Instead of "file type {0}" actual file type should be displayed
Suggestion:
Along with the above message, display the supported file format too
ATLAS-4148:
Steps to repro:
GlossaryName, TermName, ShortDescription, LongDescription, Examples,
Abbreviation, Usage, AdditionalAttributes, TranslationTerms, ValidValuesFor,
Synonyms, ReplacedBy, ValidValues, ReplacementTerms, SeeAlso, TranslatedTerms,
IsA, Antonyms, Classifies, PreferredToTerms, PreferredTerms
This file is written for testing supported format with incorrect data format.
So this file contains some random text.
When this file is used as an input, the error code displayed is incorrect:
{
"errorCode":"ATLAS-404-00-014",
"errorMessage":"No data found in the uploaded file"
}
Expectation:
Since this is client side error 400 should be displayed
ATLAS-4134:
Currently we display the following error message for conflicts:
{
"errorCode":"ATLAS-409-00-007",
"errorMessage":"Glossary with qualifiedName abc already exists"
}
It will be user friendly if the message is "Glossary with name abc already
exists"
Diffs (updated)
-----
intg/src/main/java/org/apache/atlas/AtlasErrorCode.java ad67fa917
repository/src/main/java/org/apache/atlas/glossary/GlossaryService.java
82243e20f
repository/src/main/java/org/apache/atlas/util/FileUtils.java 71ac9e309
repository/src/test/java/org/apache/atlas/glossary/GlossaryServiceTest.java
54e00a4bd
Diff: https://reviews.apache.org/r/73176/diff/3/
Changes: https://reviews.apache.org/r/73176/diff/2-3/
Testing
-------
When passed above request:
{"errorCode":"ATLAS-400-00-098","errorMessage":"The provided file type:
template_2122.py is not supported expected file formats .csv, .xls."
Thanks,
chaitali