open-metadata / OpenMetadata

OpenMetadata is a unified metadata platform for data discovery, data observability, and data governance powered by a central metadata repository, in-depth column level lineage, and seamless team collaboration.
https://open-metadata.org
Apache License 2.0
5.51k stars 1.04k forks source link

Add Glossary Term API Call Fails #17557

Closed andkay closed 2 months ago

andkay commented 2 months ago

Affected module REST API (glossaryTerms endpoint)

Describe the bug Calling the Bulk Add Glossary Term to Assets end point results in a Java null pointer error. We've tested various API calls using cURL (not the SDK) and this is so far the only one that has failed.

{"dryRun":false,"status":"failure","numberOfRowsProcessed":1,"numberOfRowsPassed":0,"numberOfRowsFailed":1,
"successRequest":[],"failedRequest":[{"request":{"id":"035e8a10-db1b-404d-bf6e-99649d552acb",
"type":"table","name":"<REDACTED>","fullyQualifiedName":"<REDACTED>","displayName":"<REDACTED>","deleted":false},
"message":"Cannot invoke \"java.util.Collection.toArray()\" because \"c\" is null"}]}

To Reproduce

curl -X PUT "http://localhost:8585/api/v1/glossaryTerms/274b6b41-a865-4549-bc1e-1e3306043a4f/assets/add" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $mytoken" \
-d '{
  "assets": [
    {
      "id": "035e8a10-db1b-404d-bf6e-99649d552acb",
      "type": "table",
      "fullyQualifiedName": "<REDACTED>"
    }
  ],
  "dryRun": false,
  "operation": "AddGlossaryTags"
}'

Expected behavior Successful request, resulting in an a tag being added to a table.

Version:

harshach commented 2 months ago

@andkay can you please discuss this in https://slack.open-metadata.org to confirm if its indeed a bug, before opening a ticket