From d12299603fbefecc3929051ad07ec532fdc7d14d Mon Sep 17 00:00:00 2001 From: Raj Tekal Date: Fri, 19 Jan 2024 14:35:20 -0500 Subject: [PATCH] Datahub comes up. Needs more UI testing --- .../com/linkedin/datahub/graphql/GmsGraphQLEngine.java | 7 ++++--- .../com/linkedin/datahub/graphql/GmsGraphQLEngineArgs.java | 2 +- .../ermodelrelation/CreateERModelRelationResolver.java | 4 ++-- .../linkedin/ermodelrelation/ERModelRelationProperties.pdl | 2 +- metadata-models/src/main/resources/entity-registry.yml | 2 +- .../ermodelrelation/ERModelRelationServiceFactory.java | 2 +- .../linkedin/gms/factory/graphql/GraphQLEngineFactory.java | 6 +++--- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngine.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngine.java index 2953538078998..6097161b5482b 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngine.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngine.java @@ -397,6 +397,7 @@ public class GmsGraphQLEngine { private final LineageService lineageService; private final QueryService queryService; private final DataProductService dataProductService; + private final ERModelRelationService eRModelRelationService; private final FeatureFlags featureFlags; @@ -445,7 +446,7 @@ public class GmsGraphQLEngine { private final QueryType queryType; private final DataProductType dataProductType; private final OwnershipType ownershipType; - private final ERModelRelationService ermodelrelationService; + /** * A list of GraphQL Plugins that extend the core engine @@ -511,7 +512,7 @@ public GmsGraphQLEngine(final GmsGraphQLEngineArgs args) { this.settingsService = args.settingsService; this.lineageService = args.lineageService; this.queryService = args.queryService; - this.ermodelrelationService = args.ermodelrelationService; + this.eRModelRelationService = args.eRModelRelationService; this.dataProductService = args.dataProductService; this.ingestionConfiguration = Objects.requireNonNull(args.ingestionConfiguration); @@ -937,7 +938,7 @@ private void configureMutationResolvers(final RuntimeWiring.Builder builder) { .dataFetcher("updateCorpUserProperties", new MutableTypeResolver<>(corpUserType)) .dataFetcher("updateCorpGroupProperties", new MutableTypeResolver<>(corpGroupType)) .dataFetcher("updateERModelRelation", new UpdateERModelRelationResolver(this.entityClient)) - .dataFetcher("createERModelRelation", new CreateERModelRelationResolver(this.entityClient, this.ermodelrelationService)) + .dataFetcher("createERModelRelation", new CreateERModelRelationResolver(this.entityClient, this.eRModelRelationService)) .dataFetcher("addTag", new AddTagResolver(entityService)) .dataFetcher("addTags", new AddTagsResolver(entityService)) .dataFetcher("batchAddTags", new BatchAddTagsResolver(entityService)) diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngineArgs.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngineArgs.java index c5e34151ae2d8..b0f5712f30c9a 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngineArgs.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngineArgs.java @@ -74,6 +74,6 @@ public class GmsGraphQLEngineArgs { QueryService queryService; FeatureFlags featureFlags; DataProductService dataProductService; - ERModelRelationService ermodelrelationService; + ERModelRelationService eRModelRelationService; //any fork specific args should go below this line } diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/ermodelrelation/CreateERModelRelationResolver.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/ermodelrelation/CreateERModelRelationResolver.java index 021bdd0603110..c6070957cdbc1 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/ermodelrelation/CreateERModelRelationResolver.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/types/ermodelrelation/CreateERModelRelationResolver.java @@ -32,7 +32,7 @@ public class CreateERModelRelationResolver implements DataFetcher> { private final EntityClient _entityClient; - private final ERModelRelationService _ermodelrelationService; + private final ERModelRelationService _eRModelRelationService; @Override public CompletableFuture get(DataFetchingEnvironment environment) throws Exception { @@ -79,7 +79,7 @@ public CompletableFuture get(DataFetchingEnvironment environmen } catch (RemoteInvocationException e) { throw new RuntimeException("Failed to create ermodelrelation entity", e); } - return ERModelRelationMapper.map(_ermodelrelationService.getERModelRelationResponse(Urn.createFromString(inputUrn.toString()), authentication)); + return ERModelRelationMapper.map(_eRModelRelationService.getERModelRelationResponse(Urn.createFromString(inputUrn.toString()), authentication)); } catch (Exception e) { log.error("Failed to create ERModelRelation to resource with input {}, {}", input, e.getMessage()); throw new RuntimeException(String.format("Failed to create ermodelrelation to resource with input %s", input), e); diff --git a/metadata-models/src/main/pegasus/com/linkedin/ermodelrelation/ERModelRelationProperties.pdl b/metadata-models/src/main/pegasus/com/linkedin/ermodelrelation/ERModelRelationProperties.pdl index 0f516bd25f1bc..4cda44584d6dd 100644 --- a/metadata-models/src/main/pegasus/com/linkedin/ermodelrelation/ERModelRelationProperties.pdl +++ b/metadata-models/src/main/pegasus/com/linkedin/ermodelrelation/ERModelRelationProperties.pdl @@ -8,7 +8,7 @@ import com.linkedin.common.CustomProperties * Properties associated with a ERModelRelation */ @Aspect = { - "name": "ermodelrelationProperties" + "name": "eRModelRelationProperties" } record ERModelRelationProperties includes CustomProperties { diff --git a/metadata-models/src/main/resources/entity-registry.yml b/metadata-models/src/main/resources/entity-registry.yml index e01e5b2061259..a27bb8005bb3b 100644 --- a/metadata-models/src/main/resources/entity-registry.yml +++ b/metadata-models/src/main/resources/entity-registry.yml @@ -438,7 +438,7 @@ entities: doc: ER Model Relation of Dataset Fields keyAspect: ermodelrelationKey aspects: - - erModelRelationProperties + - eRModelRelationProperties - editableERModelRelationProperties - institutionalMemory - ownership diff --git a/metadata-service/factories/src/main/java/com/linkedin/gms/factory/ermodelrelation/ERModelRelationServiceFactory.java b/metadata-service/factories/src/main/java/com/linkedin/gms/factory/ermodelrelation/ERModelRelationServiceFactory.java index 158cee1122bbd..93acb1fe411f6 100644 --- a/metadata-service/factories/src/main/java/com/linkedin/gms/factory/ermodelrelation/ERModelRelationServiceFactory.java +++ b/metadata-service/factories/src/main/java/com/linkedin/gms/factory/ermodelrelation/ERModelRelationServiceFactory.java @@ -25,7 +25,7 @@ public class ERModelRelationServiceFactory { @Qualifier("systemAuthentication") private Authentication _authentication; - @Bean(name = "ermodelrelationService") + @Bean(name = "eRModelRelationService") @Scope("singleton") @Nonnull protected ERModelRelationService getInstance() throws Exception { diff --git a/metadata-service/factories/src/main/java/com/linkedin/gms/factory/graphql/GraphQLEngineFactory.java b/metadata-service/factories/src/main/java/com/linkedin/gms/factory/graphql/GraphQLEngineFactory.java index c951598da8e82..01d166d49b46b 100644 --- a/metadata-service/factories/src/main/java/com/linkedin/gms/factory/graphql/GraphQLEngineFactory.java +++ b/metadata-service/factories/src/main/java/com/linkedin/gms/factory/graphql/GraphQLEngineFactory.java @@ -164,8 +164,8 @@ public class GraphQLEngineFactory { private QueryService _queryService; @Autowired - @Qualifier("ermodelrelationService") - private ERModelRelationService _ermodelrelationService; + @Qualifier("eRModelRelationService") + private ERModelRelationService _eRModelRelationService; @Autowired @Qualifier("dataProductService") @@ -214,7 +214,7 @@ protected GraphQLEngine getInstance() { args.setSettingsService(_settingsService); args.setLineageService(_lineageService); args.setQueryService(_queryService); - args.setErmodelrelationService(_ermodelrelationService); + args.setERModelRelationService(_eRModelRelationService); args.setFeatureFlags(_configProvider.getFeatureFlags()); args.setDataProductService(_dataProductService); return new GmsGraphQLEngine(