-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DG-1697: Adding endpoint for linking/unlink policy #3307
Conversation
for (String guid : linkGuids) { | ||
AtlasVertex ev = AtlasGraphUtilsV2.findByGuid(graph, guid); | ||
if (ev != null) { | ||
Set<String> existingValues = ev.getMultiValuedSetProperty("assetPolicyGUIDs", String.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we already have created these attributes on Asset typeDef assetPolicyGUIDs
& assetPoliciesCount
?
If not then these will never be written to Cassandra & eventually not sync to ES as well
Either add new attributes on Asset OR in case you will run tests on custom tenant you can update typeDefs directly using API & pause typeDef seeder cron
for (String guid : linkGuids) { | ||
AtlasVertex ev = AtlasGraphUtilsV2.findByGuid(graph, guid); | ||
if (ev != null) { | ||
Set<String> existingValues = ev.getMultiValuedSetProperty("assetPolicyGUIDs", String.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this only required for writing assetPoliciesCount.
Instead, just fetch current assetPoliciesCount & add 1 & save it
Don't have the full context here so feel free to ignore this -- the policy-id in url feels like resource id for entity. Would it be more clear to restructure the url to -- |
0497f0d
to
83e7c34
Compare
91cc113
to
72b591b
Compare
Change description
Created two new endpoints in the metastore:
2 Link Policies
These endpoints link or unlink policies from a set of asset IDs with minimal operations:
Type of change
Related issues
Checklists
Development
Security
Code review