Skip to content

Commit a0a3a46

Browse files
Merge branch 'master' into feature/cus-3571-fix-model-DashboardInfo-DashboardContainsDashboard
2 parents 08bb142 + ffc98da commit a0a3a46

File tree

2,089 files changed

+154397
-3988
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,089 files changed

+154397
-3988
lines changed

.github/ISSUE_TEMPLATE/--bug-report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ If applicable, add screenshots to help explain your problem.
2929
- Version [e.g. 22]
3030

3131
**Additional context**
32-
Add any other context about the problem here.
32+
Add any other context about the problem here.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: DataHub v1.0-rc Bug Report
3+
about: Report issues found in DataHub v1.0 Release Candidates
4+
title: "[v1.0-rc/bug] Description of Bug"
5+
labels: bug, datahub-v1.0-rc
6+
assignees: chriscollins3456, david-leifker, maggiehays
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots and/or Screen Recordings**
24+
If applicable, add screenshots and/or screen recordings to help explain the issue.
25+
26+
**System details (please complete the following information):**
27+
- DataHub Version Tag [e.g. v1.0-rc1]
28+
- OS: [e.g. iOS]
29+
- Browser [e.g. chrome, safari]
30+
31+
**Additional context**
32+
Add any other context about the problem here.

.github/workflows/docker-unified.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1039,12 +1039,12 @@ jobs:
10391039
cypress_matrix=$(printf "{\"test_strategy\":\"cypress\",\"batch\":\"0\",\"batch_count\":\"$cypress_batch_count\"}"; for ((i=1;i<cypress_batch_count;i++)); do printf ",{\"test_strategy\":\"cypress\", \"batch_count\":\"$cypress_batch_count\",\"batch\":\"%d\"}" $i; done)
10401040
10411041
includes=''
1042-
if [[ "${{ needs.setup.outputs.frontend_only }}" == 'true' ]]; then
1043-
includes=$cypress_matrix
1044-
elif [ "${{ needs.setup.outputs.ingestion_only }}" == 'true' ]; then
1045-
includes=$python_matrix
1046-
elif [[ "${{ needs.setup.outputs.backend_change }}" == 'true' || "${{ needs.setup.outputs.smoke_test_change }}" == 'true' ]]; then
1042+
if [[ "${{ needs.setup.outputs.backend_change }}" == 'true' || "${{ needs.setup.outputs.smoke_test_change }}" == 'true' || "${{ needs.setup.outputs.publish }}" == 'true' ]]; then
10471043
includes="$python_matrix,$cypress_matrix"
1044+
elif [[ "${{ needs.setup.outputs.frontend_only }}" == 'true' ]]; then
1045+
includes="$cypress_matrix"
1046+
elif [[ "${{ needs.setup.outputs.ingestion_only }}" == 'true' ]]; then
1047+
includes="$python_matrix"
10481048
fi
10491049
echo "matrix={\"include\":[$includes] }" >> "$GITHUB_OUTPUT"
10501050

.github/workflows/metadata-model.yml

+1
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,5 @@ jobs:
6060
env:
6161
DATAHUB_SERVER: ${{ secrets.DataHubServer }}
6262
DATAHUB_TOKEN: ${{ secrets.DataHubToken }}
63+
DATAHUB_TELEMETRY_ENABLED: false
6364
run: ./gradlew :metadata-ingestion:modelDocUpload

build.gradle

+5-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ buildscript {
3838
ext.springVersion = '6.1.14'
3939
ext.springBootVersion = '3.2.9'
4040
ext.springKafkaVersion = '3.1.6'
41-
ext.openTelemetryVersion = '1.18.0'
41+
ext.openTelemetryVersion = '1.45.0'
4242
ext.neo4jVersion = '5.20.0'
4343
ext.neo4jTestVersion = '5.20.0'
4444
ext.neo4jApocVersion = '5.20.0'
@@ -220,7 +220,10 @@ project.ext.externalDependency = [
220220
'neo4jApocCore': 'org.neo4j.procedure:apoc-core:' + neo4jApocVersion,
221221
'neo4jApocCommon': 'org.neo4j.procedure:apoc-common:' + neo4jApocVersion,
222222
'opentelemetryApi': 'io.opentelemetry:opentelemetry-api:' + openTelemetryVersion,
223-
'opentelemetryAnnotations': 'io.opentelemetry:opentelemetry-extension-annotations:' + openTelemetryVersion,
223+
'opentelemetrySdk': 'io.opentelemetry:opentelemetry-sdk:' + openTelemetryVersion,
224+
'opentelemetrySdkTrace': 'io.opentelemetry:opentelemetry-sdk-trace:' + openTelemetryVersion,
225+
'opentelemetryAutoConfig': 'io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:' + openTelemetryVersion,
226+
'opentelemetryAnnotations': 'io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:2.11.0',
224227
'opentracingJdbc':'io.opentracing.contrib:opentracing-jdbc:0.2.15',
225228
'parquet': 'org.apache.parquet:parquet-avro:1.12.3',
226229
'parquetHadoop': 'org.apache.parquet:parquet-hadoop:1.13.1',

datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/Constants.java

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ private Constants() {}
2929
public static final String CONTRACTS_SCHEMA_FILE = "contract.graphql";
3030
public static final String CONNECTIONS_SCHEMA_FILE = "connection.graphql";
3131
public static final String VERSION_SCHEMA_FILE = "versioning.graphql";
32+
public static final String QUERY_SCHEMA_FILE = "query.graphql";
3233
public static final String BROWSE_PATH_DELIMITER = "/";
3334
public static final String BROWSE_PATH_V2_DELIMITER = "␟";
3435
public static final String VERSION_STAMP_FIELD_NAME = "versionStamp";

datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngine.java

+78-17
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@
257257
import com.linkedin.datahub.graphql.resolvers.mutate.RemoveTagResolver;
258258
import com.linkedin.datahub.graphql.resolvers.mutate.RemoveTermResolver;
259259
import com.linkedin.datahub.graphql.resolvers.mutate.UpdateDescriptionResolver;
260+
import com.linkedin.datahub.graphql.resolvers.mutate.UpdateDisplayPropertiesResolver;
260261
import com.linkedin.datahub.graphql.resolvers.mutate.UpdateNameResolver;
261262
import com.linkedin.datahub.graphql.resolvers.mutate.UpdateParentNodeResolver;
262263
import com.linkedin.datahub.graphql.resolvers.mutate.UpdateUserSettingResolver;
@@ -297,6 +298,7 @@
297298
import com.linkedin.datahub.graphql.resolvers.settings.user.UpdateCorpUserViewsSettingsResolver;
298299
import com.linkedin.datahub.graphql.resolvers.settings.view.GlobalViewsSettingsResolver;
299300
import com.linkedin.datahub.graphql.resolvers.settings.view.UpdateGlobalViewsSettingsResolver;
301+
import com.linkedin.datahub.graphql.resolvers.siblings.SiblingsSearchResolver;
300302
import com.linkedin.datahub.graphql.resolvers.step.BatchGetStepStatesResolver;
301303
import com.linkedin.datahub.graphql.resolvers.step.BatchUpdateStepStatesResolver;
302304
import com.linkedin.datahub.graphql.resolvers.structuredproperties.CreateStructuredPropertyResolver;
@@ -314,6 +316,7 @@
314316
import com.linkedin.datahub.graphql.resolvers.test.UpdateTestResolver;
315317
import com.linkedin.datahub.graphql.resolvers.timeline.GetSchemaBlameResolver;
316318
import com.linkedin.datahub.graphql.resolvers.timeline.GetSchemaVersionListResolver;
319+
import com.linkedin.datahub.graphql.resolvers.timeline.GetTimelineResolver;
317320
import com.linkedin.datahub.graphql.resolvers.type.AspectInterfaceTypeResolver;
318321
import com.linkedin.datahub.graphql.resolvers.type.EntityInterfaceTypeResolver;
319322
import com.linkedin.datahub.graphql.resolvers.type.HyperParameterValueTypeResolver;
@@ -376,6 +379,7 @@
376379
import com.linkedin.datahub.graphql.types.notebook.NotebookType;
377380
import com.linkedin.datahub.graphql.types.ownership.OwnershipType;
378381
import com.linkedin.datahub.graphql.types.policy.DataHubPolicyType;
382+
import com.linkedin.datahub.graphql.types.post.PostType;
379383
import com.linkedin.datahub.graphql.types.query.QueryType;
380384
import com.linkedin.datahub.graphql.types.restricted.RestrictedType;
381385
import com.linkedin.datahub.graphql.types.role.DataHubRoleType;
@@ -389,6 +393,7 @@
389393
import com.linkedin.entity.client.EntityClient;
390394
import com.linkedin.entity.client.SystemEntityClient;
391395
import com.linkedin.metadata.client.UsageStatsJavaClient;
396+
import com.linkedin.metadata.config.ChromeExtensionConfiguration;
392397
import com.linkedin.metadata.config.DataHubConfiguration;
393398
import com.linkedin.metadata.config.IngestionConfiguration;
394399
import com.linkedin.metadata.config.TestsConfiguration;
@@ -496,6 +501,7 @@ public class GmsGraphQLEngine {
496501
private final TestsConfiguration testsConfiguration;
497502
private final DataHubConfiguration datahubConfiguration;
498503
private final ViewsConfiguration viewsConfiguration;
504+
private final ChromeExtensionConfiguration chromeExtensionConfiguration;
499505

500506
private final DatasetType datasetType;
501507

@@ -540,6 +546,7 @@ public class GmsGraphQLEngine {
540546
private final FormType formType;
541547
private final IncidentType incidentType;
542548
private final RestrictedType restrictedType;
549+
private final PostType postType;
543550
private final DataProcessInstanceType dataProcessInstanceType;
544551
private final VersionSetType versionSetType;
545552

@@ -620,6 +627,7 @@ public GmsGraphQLEngine(final GmsGraphQLEngineArgs args) {
620627
this.datahubConfiguration = args.datahubConfiguration;
621628
this.viewsConfiguration = args.viewsConfiguration;
622629
this.featureFlags = args.featureFlags;
630+
this.chromeExtensionConfiguration = args.chromeExtensionConfiguration;
623631

624632
this.datasetType = new DatasetType(entityClient);
625633
this.roleType = new RoleType(entityClient);
@@ -662,6 +670,7 @@ public GmsGraphQLEngine(final GmsGraphQLEngineArgs args) {
662670
this.formType = new FormType(entityClient);
663671
this.incidentType = new IncidentType(entityClient);
664672
this.restrictedType = new RestrictedType(entityClient, restrictedService);
673+
this.postType = new PostType(entityClient);
665674
this.dataProcessInstanceType = new DataProcessInstanceType(entityClient, featureFlags);
666675
this.versionSetType = new VersionSetType(entityClient);
667676

@@ -713,6 +722,7 @@ public GmsGraphQLEngine(final GmsGraphQLEngineArgs args) {
713722
entityTypeType,
714723
formType,
715724
incidentType,
725+
postType,
716726
versionSetType,
717727
restrictedType,
718728
businessAttributeType,
@@ -873,7 +883,8 @@ public GraphQLEngine.Builder builder() {
873883
.addSchema(fileBasedSchema(INCIDENTS_SCHEMA_FILE))
874884
.addSchema(fileBasedSchema(CONTRACTS_SCHEMA_FILE))
875885
.addSchema(fileBasedSchema(COMMON_SCHEMA_FILE))
876-
.addSchema(fileBasedSchema(VERSION_SCHEMA_FILE));
886+
.addSchema(fileBasedSchema(VERSION_SCHEMA_FILE))
887+
.addSchema(fileBasedSchema(QUERY_SCHEMA_FILE));
877888

878889
for (GmsGraphQLPlugin plugin : this.graphQLPlugins) {
879890
List<String> pluginSchemaFiles = plugin.getSchemaFiles();
@@ -1002,7 +1013,8 @@ private void configureQueryResolvers(final RuntimeWiring.Builder builder) {
10021013
this.testsConfiguration,
10031014
this.datahubConfiguration,
10041015
this.viewsConfiguration,
1005-
this.featureFlags))
1016+
this.featureFlags,
1017+
this.chromeExtensionConfiguration))
10061018
.dataFetcher("me", new MeResolver(this.entityClient, featureFlags))
10071019
.dataFetcher("search", new SearchResolver(this.entityClient))
10081020
.dataFetcher(
@@ -1088,6 +1100,7 @@ private void configureQueryResolvers(final RuntimeWiring.Builder builder) {
10881100
.dataFetcher(
10891101
"executionRequest", new GetIngestionExecutionRequestResolver(this.entityClient))
10901102
.dataFetcher("getSchemaBlame", new GetSchemaBlameResolver(this.timelineService))
1103+
.dataFetcher("getTimeline", new GetTimelineResolver(this.timelineService))
10911104
.dataFetcher(
10921105
"getSchemaVersionList", new GetSchemaVersionListResolver(this.timelineService))
10931106
.dataFetcher("test", getResolver(testType))
@@ -1352,6 +1365,9 @@ private void configureMutationResolvers(final RuntimeWiring.Builder builder) {
13521365
"createOwnershipType", new CreateOwnershipTypeResolver(this.ownershipTypeService))
13531366
.dataFetcher(
13541367
"updateOwnershipType", new UpdateOwnershipTypeResolver(this.ownershipTypeService))
1368+
.dataFetcher(
1369+
"updateDisplayProperties",
1370+
new UpdateDisplayPropertiesResolver(this.entityService))
13551371
.dataFetcher(
13561372
"deleteOwnershipType", new DeleteOwnershipTypeResolver(this.ownershipTypeService))
13571373
.dataFetcher("submitFormPrompt", new SubmitFormPromptResolver(this.formService))
@@ -1735,7 +1751,10 @@ private void configureDatasetResolvers(final RuntimeWiring.Builder builder) {
17351751
.dataFetcher("exists", new EntityExistsResolver(entityService))
17361752
.dataFetcher("runs", new EntityRunsResolver(entityClient))
17371753
.dataFetcher("privileges", new EntityPrivilegesResolver(entityClient))
1738-
.dataFetcher("parentContainers", new ParentContainersResolver(entityClient)))
1754+
.dataFetcher("parentContainers", new ParentContainersResolver(entityClient))
1755+
.dataFetcher(
1756+
"siblingsSearch",
1757+
new SiblingsSearchResolver(this.entityClient, this.viewService)))
17391758
.type(
17401759
"Owner",
17411760
typeWiring ->
@@ -1768,6 +1787,13 @@ private void configureDatasetResolvers(final RuntimeWiring.Builder builder) {
17681787
datasetType,
17691788
(env) ->
17701789
((ForeignKeyConstraint) env.getSource()).getForeignDataset().getUrn())))
1790+
.type(
1791+
"Deprecation",
1792+
typeWiring ->
1793+
typeWiring.dataFetcher(
1794+
"replacement",
1795+
new EntityTypeResolver(
1796+
entityTypes, (env) -> ((Deprecation) env.getSource()).getReplacement())))
17711797
.type(
17721798
"SiblingProperties",
17731799
typeWiring ->
@@ -1878,10 +1904,16 @@ private void configureSchemaFieldResolvers(final RuntimeWiring.Builder builder)
18781904
builder.type(
18791905
"SchemaFieldEntity",
18801906
typeWiring ->
1881-
typeWiring.dataFetcher(
1882-
"parent",
1883-
new EntityTypeResolver(
1884-
entityTypes, (env) -> ((SchemaFieldEntity) env.getSource()).getParent())));
1907+
typeWiring
1908+
.dataFetcher(
1909+
"parent",
1910+
new EntityTypeResolver(
1911+
entityTypes, (env) -> ((SchemaFieldEntity) env.getSource()).getParent()))
1912+
.dataFetcher("relationships", new EntityRelationshipsResultResolver(graphClient))
1913+
.dataFetcher(
1914+
"lineage",
1915+
new EntityLineageResultResolver(
1916+
siblingGraphService, restrictedService, this.authorizationConfiguration)));
18851917
}
18861918

18871919
private void configureEntityPathResolvers(final RuntimeWiring.Builder builder) {
@@ -1935,10 +1967,12 @@ private void configureCorpUserResolvers(final RuntimeWiring.Builder builder) {
19351967
new LoadableTypeBatchResolver<>(
19361968
dataPlatformType,
19371969
(env) ->
1938-
((CorpUserEditableProperties) env.getSource())
1939-
.getPlatforms().stream()
1940-
.map(DataPlatform::getUrn)
1941-
.collect(Collectors.toList()))));
1970+
((CorpUserEditableProperties) env.getSource()).getPlatforms() != null
1971+
? ((CorpUserEditableProperties) env.getSource())
1972+
.getPlatforms().stream()
1973+
.map(DataPlatform::getUrn)
1974+
.collect(Collectors.toList())
1975+
: ImmutableList.of())));
19421976
}
19431977

19441978
/**
@@ -3065,11 +3099,20 @@ private void configureQueryEntityResolvers(final RuntimeWiring.Builder builder)
30653099
.type(
30663100
"QuerySubject",
30673101
typeWiring ->
3068-
typeWiring.dataFetcher(
3069-
"dataset",
3070-
new LoadableTypeResolver<>(
3071-
datasetType,
3072-
(env) -> ((QuerySubject) env.getSource()).getDataset().getUrn())));
3102+
typeWiring
3103+
.dataFetcher(
3104+
"dataset",
3105+
new LoadableTypeResolver<>(
3106+
datasetType,
3107+
(env) -> ((QuerySubject) env.getSource()).getDataset().getUrn()))
3108+
.dataFetcher(
3109+
"schemaField",
3110+
new LoadableTypeResolver<>(
3111+
schemaFieldType,
3112+
(env) ->
3113+
((QuerySubject) env.getSource()).getSchemaField() != null
3114+
? ((QuerySubject) env.getSource()).getSchemaField().getUrn()
3115+
: null)));
30733116
}
30743117

30753118
private void configureOwnershipTypeResolver(final RuntimeWiring.Builder builder) {
@@ -3098,13 +3141,26 @@ private void configureDataProcessInstanceResolvers(final RuntimeWiring.Builder b
30983141
"DataProcessInstance",
30993142
typeWiring ->
31003143
typeWiring
3144+
.dataFetcher("exists", new EntityExistsResolver(entityService))
3145+
.dataFetcher(
3146+
"platform",
3147+
new LoadableTypeResolver<>(
3148+
dataPlatformType,
3149+
(env) -> {
3150+
final DataProcessInstance dataProcessInstance = env.getSource();
3151+
return dataProcessInstance != null
3152+
&& dataProcessInstance.getPlatform() != null
3153+
? dataProcessInstance.getPlatform().getUrn()
3154+
: null;
3155+
}))
31013156
.dataFetcher(
31023157
"dataPlatformInstance",
31033158
new LoadableTypeResolver<>(
31043159
dataPlatformInstanceType,
31053160
(env) -> {
31063161
final DataProcessInstance dataProcessInstance = env.getSource();
3107-
return dataProcessInstance.getDataPlatformInstance() != null
3162+
return dataProcessInstance != null
3163+
&& dataProcessInstance.getDataPlatformInstance() != null
31083164
? dataProcessInstance.getDataPlatformInstance().getUrn()
31093165
: null;
31103166
}))
@@ -3117,6 +3173,11 @@ private void configureDataProcessInstanceResolvers(final RuntimeWiring.Builder b
31173173
final DataProcessInstance dpi = env.getSource();
31183174
return dpi.getContainer() != null ? dpi.getContainer().getUrn() : null;
31193175
}))
3176+
.dataFetcher(
3177+
"parentTemplate",
3178+
new EntityTypeResolver(
3179+
entityTypes,
3180+
(env) -> ((DataProcessInstance) env.getSource()).getParentTemplate()))
31203181
.dataFetcher("relationships", new EntityRelationshipsResultResolver(graphClient))
31213182
.dataFetcher(
31223183
"lineage",

datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngineArgs.java

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import com.linkedin.entity.client.EntityClient;
1414
import com.linkedin.entity.client.SystemEntityClient;
1515
import com.linkedin.metadata.client.UsageStatsJavaClient;
16+
import com.linkedin.metadata.config.ChromeExtensionConfiguration;
1617
import com.linkedin.metadata.config.DataHubConfiguration;
1718
import com.linkedin.metadata.config.IngestionConfiguration;
1819
import com.linkedin.metadata.config.TestsConfiguration;
@@ -87,6 +88,7 @@ public class GmsGraphQLEngineArgs {
8788
int graphQLQueryDepthLimit;
8889
boolean graphQLQueryIntrospectionEnabled;
8990
BusinessAttributeService businessAttributeService;
91+
ChromeExtensionConfiguration chromeExtensionConfiguration;
9092
ConnectionService connectionService;
9193
AssertionService assertionService;
9294
EntityVersioningService entityVersioningService;

datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/authorization/AuthorizationUtils.java

+16
Original file line numberDiff line numberDiff line change
@@ -375,5 +375,21 @@ public static boolean isViewDatasetUsageAuthorized(
375375
new EntitySpec(resourceUrn.getEntityType(), resourceUrn.toString()));
376376
}
377377

378+
public static boolean isViewDatasetProfileAuthorized(
379+
final QueryContext context, final Urn resourceUrn) {
380+
return AuthUtil.isAuthorized(
381+
context.getOperationContext(),
382+
PoliciesConfig.VIEW_DATASET_PROFILE_PRIVILEGE,
383+
new EntitySpec(resourceUrn.getEntityType(), resourceUrn.toString()));
384+
}
385+
386+
public static boolean isViewDatasetOperationsAuthorized(
387+
final QueryContext context, final Urn resourceUrn) {
388+
return AuthUtil.isAuthorized(
389+
context.getOperationContext(),
390+
PoliciesConfig.VIEW_DATASET_OPERATIONS_PRIVILEGE,
391+
new EntitySpec(resourceUrn.getEntityType(), resourceUrn.toString()));
392+
}
393+
378394
private AuthorizationUtils() {}
379395
}

0 commit comments

Comments
 (0)