You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Mandar Ambawane <ma...@freestoneinfotech.com> on 2021/06/11 13:09:15 UTC

Review Request 73416: ATLAS-4336 Restrict attributes of type to be created starting with double underscore

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73416/
-----------------------------------------------------------

Review request for atlas, Ashutosh Mestry, Jayendra Parab, Nixon Rodrigues, and Sarath Subramanian.


Bugs: ATLAS-4336
    https://issues.apache.org/jira/browse/ATLAS-4336


Repository: atlas


Description
-------

Currently type can be updated with an attribute whose name starts with "__" like __guid.

This gets mixed up with system attributes.

Hence attribute names should not be allowed to be started with double underscore or following attribute names (system attribute names) should be restricted when a type is created or updated :

__classificationNames
__modifiedBy
__createdBy
__state
__typeName
__modificationTimestamp
__propagatedClassificationNames
__customAttributes
__isIncomplete
__guid
__timestamp
__labels


Diffs
-----

  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasAbstractDefStoreV2.java 3dab120 


Diff: https://reviews.apache.org/r/73416/diff/1/


Testing
-------


Thanks,

Mandar Ambawane


Re: Review Request 73416: ATLAS-4336 Restrict attributes of type to be created starting with double underscore

Posted by Ashutosh Mestry via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73416/#review223143
-----------------------------------------------------------




repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasAbstractDefStoreV2.java
Line 117 (original), 117 (patched)
<https://reviews.apache.org/r/73416/#comment312254>

    I don't think this condition will work. It should be:
    if (!allowReservedKeywords && AtlasDSL.Parser.isKeyword(attrDef.getName()) || isInternalAttributeName(attrDef.getName())


- Ashutosh Mestry


On June 14, 2021, 1:57 p.m., Mandar Ambawane wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73416/
> -----------------------------------------------------------
> 
> (Updated June 14, 2021, 1:57 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Jayendra Parab, Nixon Rodrigues, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4336
>     https://issues.apache.org/jira/browse/ATLAS-4336
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Currently type can be updated with an attribute whose name starts with "__" like __guid.
> 
> This gets mixed up with system attributes.
> 
> Hence attribute names should not be allowed to be started with double underscore or following attribute names (system attribute names) should be restricted when a type is created or updated :
> 
> __classificationNames
> __modifiedBy
> __createdBy
> __state
> __typeName
> __modificationTimestamp
> __propagatedClassificationNames
> __customAttributes
> __isIncomplete
> __guid
> __timestamp
> __labels
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasAbstractDefStoreV2.java 3dab120 
> 
> 
> Diff: https://reviews.apache.org/r/73416/diff/2/
> 
> 
> Testing
> -------
> 
> PreCommit: https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/651/consoleFull
> 
> 
> Thanks,
> 
> Mandar Ambawane
> 
>


Re: Review Request 73416: ATLAS-4336 Restrict attributes of type to be created starting with double underscore

Posted by Ashutosh Mestry via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73416/#review223156
-----------------------------------------------------------


Ship it!




Ship It!

- Ashutosh Mestry


On June 15, 2021, 8:57 a.m., Mandar Ambawane wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73416/
> -----------------------------------------------------------
> 
> (Updated June 15, 2021, 8:57 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Jayendra Parab, Nixon Rodrigues, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4336
>     https://issues.apache.org/jira/browse/ATLAS-4336
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Currently type can be updated with an attribute whose name starts with "__" like __guid.
> 
> This gets mixed up with system attributes.
> 
> Hence attribute names should not be allowed to be started with double underscore or following attribute names (system attribute names) should be restricted when a type is created or updated :
> 
> __classificationNames
> __modifiedBy
> __createdBy
> __state
> __typeName
> __modificationTimestamp
> __propagatedClassificationNames
> __customAttributes
> __isIncomplete
> __guid
> __timestamp
> __labels
> 
> 
> Diffs
> -----
> 
>   intg/src/test/java/org/apache/atlas/TestUtilsV2.java f0ec675 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasAbstractDefStoreV2.java 3dab120 
>   webapp/src/test/java/org/apache/atlas/web/adapters/TypeDefsRESTTest.java 962345b 
> 
> 
> Diff: https://reviews.apache.org/r/73416/diff/4/
> 
> 
> Testing
> -------
> 
> PreCommit: https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/651/consoleFull
> 
> 
> Thanks,
> 
> Mandar Ambawane
> 
>


Re: Review Request 73416: ATLAS-4336 Restrict attributes of type to be created starting with double underscore

Posted by Mandar Ambawane <ma...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73416/
-----------------------------------------------------------

(Updated June 16, 2021, 8:35 a.m.)


Review request for atlas, Ashutosh Mestry, Jayendra Parab, Nixon Rodrigues, and Sarath Subramanian.


Changes
-------

Code cleanup: removed logging statement


Bugs: ATLAS-4336
    https://issues.apache.org/jira/browse/ATLAS-4336


Repository: atlas


Description
-------

Currently type can be updated with an attribute whose name starts with "__" like __guid.

This gets mixed up with system attributes.

Hence attribute names should not be allowed to be started with double underscore or following attribute names (system attribute names) should be restricted when a type is created or updated :

__classificationNames
__modifiedBy
__createdBy
__state
__typeName
__modificationTimestamp
__propagatedClassificationNames
__customAttributes
__isIncomplete
__guid
__timestamp
__labels


Diffs (updated)
-----

  intg/src/test/java/org/apache/atlas/TestUtilsV2.java f0ec675 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasAbstractDefStoreV2.java 3dab120 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java b51cbfc 
  webapp/src/test/java/org/apache/atlas/web/adapters/TypeDefsRESTTest.java 962345b 


Diff: https://reviews.apache.org/r/73416/diff/5/

Changes: https://reviews.apache.org/r/73416/diff/4-5/


Testing
-------

PreCommit: https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/664/consoleFull


Thanks,

Mandar Ambawane


Re: Review Request 73416: ATLAS-4336 Restrict attributes of type to be created starting with double underscore

Posted by Mandar Ambawane <ma...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73416/
-----------------------------------------------------------

(Updated June 16, 2021, 4:55 a.m.)


Review request for atlas, Ashutosh Mestry, Jayendra Parab, Nixon Rodrigues, and Sarath Subramanian.


Bugs: ATLAS-4336
    https://issues.apache.org/jira/browse/ATLAS-4336


Repository: atlas


Description
-------

Currently type can be updated with an attribute whose name starts with "__" like __guid.

This gets mixed up with system attributes.

Hence attribute names should not be allowed to be started with double underscore or following attribute names (system attribute names) should be restricted when a type is created or updated :

__classificationNames
__modifiedBy
__createdBy
__state
__typeName
__modificationTimestamp
__propagatedClassificationNames
__customAttributes
__isIncomplete
__guid
__timestamp
__labels


Diffs
-----

  intg/src/test/java/org/apache/atlas/TestUtilsV2.java f0ec675 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasAbstractDefStoreV2.java 3dab120 
  webapp/src/test/java/org/apache/atlas/web/adapters/TypeDefsRESTTest.java 962345b 


Diff: https://reviews.apache.org/r/73416/diff/4/


Testing (updated)
-------

PreCommit: https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/664/consoleFull


Thanks,

Mandar Ambawane


Re: Review Request 73416: ATLAS-4336 Restrict attributes of type to be created starting with double underscore

Posted by Mandar Ambawane <ma...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73416/
-----------------------------------------------------------

(Updated June 15, 2021, 8:57 a.m.)


Review request for atlas, Ashutosh Mestry, Jayendra Parab, Nixon Rodrigues, and Sarath Subramanian.


Changes
-------

Added Test cases for Attributes of EntityType, ClassificationType and BusinessMetadataType


Bugs: ATLAS-4336
    https://issues.apache.org/jira/browse/ATLAS-4336


Repository: atlas


Description
-------

Currently type can be updated with an attribute whose name starts with "__" like __guid.

This gets mixed up with system attributes.

Hence attribute names should not be allowed to be started with double underscore or following attribute names (system attribute names) should be restricted when a type is created or updated :

__classificationNames
__modifiedBy
__createdBy
__state
__typeName
__modificationTimestamp
__propagatedClassificationNames
__customAttributes
__isIncomplete
__guid
__timestamp
__labels


Diffs (updated)
-----

  intg/src/test/java/org/apache/atlas/TestUtilsV2.java f0ec675 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasAbstractDefStoreV2.java 3dab120 
  webapp/src/test/java/org/apache/atlas/web/adapters/TypeDefsRESTTest.java 962345b 


Diff: https://reviews.apache.org/r/73416/diff/4/

Changes: https://reviews.apache.org/r/73416/diff/3-4/


Testing
-------

PreCommit: https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/651/consoleFull


Thanks,

Mandar Ambawane


Re: Review Request 73416: ATLAS-4336 Restrict attributes of type to be created starting with double underscore

Posted by Mandar Ambawane <ma...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73416/
-----------------------------------------------------------

(Updated June 14, 2021, 3:33 p.m.)


Review request for atlas, Ashutosh Mestry, Jayendra Parab, Nixon Rodrigues, and Sarath Subramanian.


Changes
-------

Addressed review comments


Bugs: ATLAS-4336
    https://issues.apache.org/jira/browse/ATLAS-4336


Repository: atlas


Description
-------

Currently type can be updated with an attribute whose name starts with "__" like __guid.

This gets mixed up with system attributes.

Hence attribute names should not be allowed to be started with double underscore or following attribute names (system attribute names) should be restricted when a type is created or updated :

__classificationNames
__modifiedBy
__createdBy
__state
__typeName
__modificationTimestamp
__propagatedClassificationNames
__customAttributes
__isIncomplete
__guid
__timestamp
__labels


Diffs (updated)
-----

  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasAbstractDefStoreV2.java 3dab120 


Diff: https://reviews.apache.org/r/73416/diff/3/

Changes: https://reviews.apache.org/r/73416/diff/2-3/


Testing
-------

PreCommit: https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/651/consoleFull


Thanks,

Mandar Ambawane


Re: Review Request 73416: ATLAS-4336 Restrict attributes of type to be created starting with double underscore

Posted by Mandar Ambawane <ma...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73416/
-----------------------------------------------------------

(Updated June 14, 2021, 1:57 p.m.)


Review request for atlas, Ashutosh Mestry, Jayendra Parab, Nixon Rodrigues, and Sarath Subramanian.


Changes
-------

Addressed review comments


Bugs: ATLAS-4336
    https://issues.apache.org/jira/browse/ATLAS-4336


Repository: atlas


Description
-------

Currently type can be updated with an attribute whose name starts with "__" like __guid.

This gets mixed up with system attributes.

Hence attribute names should not be allowed to be started with double underscore or following attribute names (system attribute names) should be restricted when a type is created or updated :

__classificationNames
__modifiedBy
__createdBy
__state
__typeName
__modificationTimestamp
__propagatedClassificationNames
__customAttributes
__isIncomplete
__guid
__timestamp
__labels


Diffs (updated)
-----

  repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasAbstractDefStoreV2.java 3dab120 


Diff: https://reviews.apache.org/r/73416/diff/2/

Changes: https://reviews.apache.org/r/73416/diff/1-2/


Testing
-------

PreCommit: https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/651/consoleFull


Thanks,

Mandar Ambawane


Re: Review Request 73416: ATLAS-4336 Restrict attributes of type to be created starting with double underscore

Posted by Ashutosh Mestry via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73416/#review223138
-----------------------------------------------------------




repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasAbstractDefStoreV2.java
Line 117 (original), 117 (patched)
<https://reviews.apache.org/r/73416/#comment312252>

    I think it would be possible to combine 117 and 120 in one clause.


- Ashutosh Mestry


On June 11, 2021, 1:09 p.m., Mandar Ambawane wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73416/
> -----------------------------------------------------------
> 
> (Updated June 11, 2021, 1:09 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Jayendra Parab, Nixon Rodrigues, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4336
>     https://issues.apache.org/jira/browse/ATLAS-4336
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Currently type can be updated with an attribute whose name starts with "__" like __guid.
> 
> This gets mixed up with system attributes.
> 
> Hence attribute names should not be allowed to be started with double underscore or following attribute names (system attribute names) should be restricted when a type is created or updated :
> 
> __classificationNames
> __modifiedBy
> __createdBy
> __state
> __typeName
> __modificationTimestamp
> __propagatedClassificationNames
> __customAttributes
> __isIncomplete
> __guid
> __timestamp
> __labels
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasAbstractDefStoreV2.java 3dab120 
> 
> 
> Diff: https://reviews.apache.org/r/73416/diff/1/
> 
> 
> Testing
> -------
> 
> PreCommit: https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/651/consoleFull
> 
> 
> Thanks,
> 
> Mandar Ambawane
> 
>