EntityTypeMapper is missing EntityType.VERSION_SET, so searchAcrossEntities can't enumerate VersionSet entities
Describe the bug
EntityTypeMapper.ENTITY_TYPE_TO_NAME (datahub-graphql-core) has no entry for EntityType.VERSION_SET, even though VERSION_SET is a real value in the GraphQL EntityType enum and Constants.VERSION_SET_ENTITY_NAME already exists and is used elsewhere in the codebase (e.g. VersionSetType, EntityVersioningServiceImpl, VersionPropertiesSideEffect). As a result, EntityTypeMapper.getName(EntityType.VERSION_SET) throws, and any resolver that goes through it — most visibly searchAcrossEntities — fails for VersionSet entities specifically, even though the entities are indexed correctly and every URN-addressed read path works.
Of the 54 values in the EntityType enum, 49 have an entry in ENTITY_TYPE_TO_NAME. Of the 5 that don't, 4 are internal plumbing with no user-facing search/browse surface (DATAHUB_CONNECTION, DATAHUB_FILE, DATAHUB_PAGE_MODULE, DATAHUB_PAGE_TEMPLATE) — VERSION_SET is the only unmapped value that's actually meant to be searched and browsed like any other catalog entity.
To Reproduce
- Create at least one
VersionSet(e.g. writeversionPropertiesascending on a couple of dataset versions so DataHub builds the set). - Confirm the entities are indexed via the REST search path:
POST /entities?action=searchwith{"entity":"versionSet", ...}returns 200 and the expected count. - Query the same population through GraphQL:
searchAcrossEntities(input: {types: [VERSION_SET], query: "*"}). - Observe:
Unknown entity type: VERSION_SET.
Every URN-addressed GraphQL path resolves correctly for the same entities — entity(urn: ...) with a ... on VersionSet fragment, entities(urns: ...), entityExists, and versionSet(urn: ...) with latestVersion/versionsSearch all work. Only enumeration through this mapper fails. autoCompleteForMultiple returns 200 with empty suggestions rather than throwing, because it filters on searchableTypes rather than going through EntityTypeMapper.
Expected behavior
searchAcrossEntities(types: [VERSION_SET]) (and any other resolver that maps EntityType.VERSION_SET through EntityTypeMapper) should return the indexed VersionSet entities, the same way it does for every other enum value with a corresponding entry.
Additional context
- The fix looks like a one-line addition to the builder in
EntityTypeMapper.java:.put(EntityType.VERSION_SET, Constants.VERSION_SET_ENTITY_NAME). entityVersioningEnableddoes not gate this — it only gates thelinkAssetVersion/unlinkAssetVersionmutations and the OpenAPI controller, not this static map, the aspect write path, the index, or any other read resolver. Its upstream default isfalse, so this reproduces on a stock deployment.- Verified against a local v1.7.0 deployment and against the current state of
datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/entitytype/EntityTypeMapper.javaonmasteras of this report — the mapping is still absent.
Source: datahub-project/datahub