Skip to content
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

repository-services getEntityDetail is ignoring MetadataCollectionId part of GUID #557

Closed
bogdan-sava opened this issue Jun 15, 2021 · 2 comments · Fixed by #561
Closed
Assignees
Labels
bug Something isn't working

Comments

@bogdan-sava
Copy link
Contributor

The guid path parameter is formatted like: [ IGCType ]@[ MetadataCollectionId ]:[IGC-RID]

getEntityDetail is ignoring MetadataCollectionId.

If there are 2 or more IGC proxies in the cohort, having entities with the same RID each, the first one getting the request from enterprise, will respond with the entity, but different GUID than the one from request.
This behaviour makes OMRS to provide a different entity than the one requested, and the entity from the second IGC proxy unreachable from enterprise layer.

I think connector should validate toe MetadataCollectionId part from the GUID.

@lpalashevski
Copy link
Contributor

Good catch.

The connector should only respond with the instances that are known to the specific metadata collection it represents. It makes sense to check metadata collection id because it is part of the instance identity (guid), when this part of the id does not match then from egeria perspective it is different instance. In this case we should respond with 'EntityNotKnownException' allowing federation/enterprise layer to find the matching instance comming from the correct metadata collection origin.

This also makes sense from purely REST API perspective and it should apply for all get instance by guid methods, based on the usage in the code I see the follwing:

  • getEntitySummary
  • getEntityDetail
  • getRelationshipsForEntity

@cmgrote cmgrote self-assigned this Jun 15, 2021
@cmgrote cmgrote added the bug Something isn't working label Jun 15, 2021
@cmgrote
Copy link
Member

cmgrote commented Jun 15, 2021

Yikes, can't believe we haven't spotted this earlier! I'll have a deeper look -- should hopefully be pretty simple & straightforward to fix.

cmgrote added a commit to cmgrote/egeria-connector-ibm-information-server that referenced this issue Jun 16, 2021
Signed-off-by: Christopher Grote <chris@thegrotes.net>
@cmgrote cmgrote linked a pull request Jun 16, 2021 that will close this issue
cmgrote added a commit that referenced this issue Jun 16, 2021
Fixes #557 to only retrieve homed metadata instances
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants