apache / gravitino

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
https://gravitino.apache.org
Apache License 2.0
1.09k stars 343 forks source link

[Bug report] Tagging an entity with an unknown tag does nothing #5148

Open justinmclean opened 1 month ago

justinmclean commented 1 month ago

Version

main branch

Describe what's wrong

When calling associateTags with an unknown tag, the tag will not be added to the entity and no error occurs. I would expect a NoSuchTag exception to be raised.

Error message and/or stacktrace

N/A

How to reproduce

Call associateTags with a tag name that has not been created in that metalake.

Additional context

Same happens when removing tags.

jerryshao commented 2 weeks ago

This is because this interface is a batch interface, the throwing of the exception will interrupt the association of other valid tags, so I'm inclined to do nothing instead of throwing an exception. Besides, the return value of this interface will also show whether tags are successfully associated.