Skip to content

Commit 71462e5

Browse files
Merge branch 'master' into smoke-tests-ingest-golden-files
2 parents 937f047 + c18b125 commit 71462e5

File tree

530 files changed

+83410
-24910
lines changed

Some content is hidden

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

530 files changed

+83410
-24910
lines changed

.github/workflows/pr-labeler.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ jobs:
5858
"bryanprosser-acryl",
5959
"Alex23Hub",
6060
"alexsku",
61-
"benjiaming"
61+
"benjiaming",
62+
"deepgarg760"
6263
]'),
6364
github.actor
6465
)

build.gradle

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ buildscript {
3838
ext.pegasusVersion = '29.74.2'
3939
ext.mavenVersion = '3.6.3'
4040
ext.versionGradle = '8.14.3'
41-
ext.springVersion = '6.2.10'
41+
ext.springVersion = '6.2.11'
4242
ext.springBootVersion = '3.4.5'
4343
ext.springKafkaVersion = '3.3.8'
4444
ext.openTelemetryVersion = '1.49.0'
@@ -251,7 +251,7 @@ project.ext.externalDependency = [
251251
'playFilters': "com.typesafe.play:filters-helpers_$playScalaVersion:$playVersion",
252252
'pac4j': 'org.pac4j:pac4j-oidc:6.1.2',
253253
'playPac4j': "org.pac4j:play-pac4j_$playScalaVersion:12.0.0-PLAY2.8",
254-
'postgresql': 'org.postgresql:postgresql:42.7.7',
254+
'postgresql': 'org.postgresql:postgresql:42.7.8',
255255
'protobuf': 'com.google.protobuf:protobuf-java:4.32.0',
256256
'grpcProtobuf': 'io.grpc:grpc-protobuf:1.53.0',
257257
'rangerCommons': 'org.apache.ranger:ranger-plugins-common:2.3.0',
@@ -338,6 +338,12 @@ allprojects {
338338
if (project.configurations.getByName("testImplementation").getDependencies()
339339
.any { it.getName().contains("testng") }) {
340340
useTestNG()
341+
// Configure TestNG to work better with test-logger
342+
testLogging {
343+
events "failed", "skipped"
344+
exceptionFormat "full"
345+
showStandardStreams = false
346+
}
341347
}
342348
}
343349
}
@@ -396,7 +402,6 @@ allprojects {
396402
}
397403
}
398404
}
399-
400405
}
401406

402407
configure(subprojects.findAll {! it.name.startsWith('spark-lineage')}) {

datahub-frontend/conf/application.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ play.server.akka.max-header-size = ${?DATAHUB_AKKA_MAX_HEADER_VALUE_LENGTH}
4545
play.server.akka.max-header-value-length = 32k
4646
play.server.akka.max-header-value-length = ${?DATAHUB_AKKA_MAX_HEADER_VALUE_LENGTH}
4747

48+
# CVE-2023-31442
49+
# https://doc.akka.io/libraries/akka-core/current/io-dns.html
50+
akka.io.dns.resolver = "inet-address"
51+
4852
# Update AUTH_COOKIE_SAME_SITE and AUTH_COOKIE_SECURE in order to change how authentication cookies
4953
# are configured. If you wish cookies to be sent in first and third party contexts, set
5054
# AUTH_COOKIE_SAME_SITE = "NONE" and AUTH_COOKIE_SECURE = true. If AUTH_COOKIE_SAME_SITE is "NONE",

datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/exception/DataHubDataFetcherExceptionHandler.java

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.linkedin.datahub.graphql.exception;
22

3-
import com.linkedin.metadata.entity.validation.ValidationException;
43
import graphql.PublicApi;
54
import graphql.execution.DataFetcherExceptionHandler;
65
import graphql.execution.DataFetcherExceptionHandlerParameters;
@@ -50,7 +49,27 @@ public CompletableFuture<DataFetcherExceptionHandlerResult> handleException(
5049
message = validationException.getMessage();
5150
}
5251

53-
if (illException == null && graphQLException == null && validationException == null) {
52+
IllegalStateException illegalStateException =
53+
findFirstThrowableCauseOfClass(exception, IllegalStateException.class);
54+
if (validationException == null && illegalStateException != null) {
55+
log.error("Failed to execute", illegalStateException);
56+
errorCode = DataHubGraphQLErrorCode.SERVER_ERROR;
57+
message = illegalStateException.getMessage();
58+
}
59+
60+
RuntimeException runtimeException =
61+
findFirstThrowableCauseOfClass(exception, RuntimeException.class);
62+
if (message.equals(DEFAULT_ERROR_MESSAGE) && runtimeException != null) {
63+
log.error("Failed to execute", runtimeException);
64+
errorCode = DataHubGraphQLErrorCode.SERVER_ERROR;
65+
message = runtimeException.getMessage();
66+
}
67+
68+
if (illException == null
69+
&& graphQLException == null
70+
&& validationException == null
71+
&& illegalStateException == null
72+
&& runtimeException == null) {
5473
log.error("Failed to execute", exception);
5574
}
5675
DataHubGraphQLError error = new DataHubGraphQLError(message, path, sourceLocation, errorCode);

datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/config/AppConfigResolver.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ public CompletableFuture<AppConfig> get(final DataFetchingEnvironment environmen
259259
.setShowIngestionPageRedesign(_featureFlags.isShowIngestionPageRedesign())
260260
.setShowLineageExpandMore(_featureFlags.isShowLineageExpandMore())
261261
.setShowStatsTabRedesign(_featureFlags.isShowStatsTabRedesign())
262+
.setShowDefaultExternalLinks(_featureFlags.isShowDefaultExternalLinks())
262263
.setShowHomePageRedesign(_featureFlags.isShowHomePageRedesign())
263264
.setShowProductUpdates(_featureFlags.isShowProductUpdates())
264265
.setLineageGraphV3(_featureFlags.isLineageGraphV3())

datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/ingest/source/UpsertIngestionSourceResolver.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import com.linkedin.ingestion.DataHubIngestionSourceConfig;
2323
import com.linkedin.ingestion.DataHubIngestionSourceInfo;
2424
import com.linkedin.ingestion.DataHubIngestionSourceSchedule;
25+
import com.linkedin.ingestion.DataHubIngestionSourceSource;
26+
import com.linkedin.ingestion.DataHubIngestionSourceSourceType;
2527
import com.linkedin.metadata.entity.EntityService;
2628
import com.linkedin.metadata.key.DataHubIngestionSourceKey;
2729
import com.linkedin.mxe.MetadataChangeProposal;
@@ -123,6 +125,12 @@ private DataHubIngestionSourceInfo mapIngestionSourceInfo(
123125
if (input.getSchedule() != null) {
124126
result.setSchedule(mapSchedule(input.getSchedule()));
125127
}
128+
if (input.getSource() != null) {
129+
result.setSource(
130+
new DataHubIngestionSourceSource()
131+
.setType(
132+
DataHubIngestionSourceSourceType.valueOf(input.getSource().getType().name())));
133+
}
126134
return result;
127135
}
128136

datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/mutate/AddLinkResolver.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.linkedin.datahub.graphql.concurrency.GraphQLConcurrencyUtils;
99
import com.linkedin.datahub.graphql.exception.AuthorizationException;
1010
import com.linkedin.datahub.graphql.generated.AddLinkInput;
11+
import com.linkedin.datahub.graphql.generated.LinkSettingsInput;
1112
import com.linkedin.datahub.graphql.resolvers.mutate.util.GlossaryUtils;
1213
import com.linkedin.datahub.graphql.resolvers.mutate.util.LinkUtils;
1314
import com.linkedin.entity.client.EntityClient;
@@ -33,6 +34,7 @@ public CompletableFuture<Boolean> get(DataFetchingEnvironment environment) throw
3334
String linkUrl = input.getLinkUrl();
3435
String linkLabel = input.getLabel();
3536
Urn targetUrn = Urn.createFromString(input.getResourceUrn());
37+
LinkSettingsInput settingsInput = input.getSettings();
3638

3739
if (!LinkUtils.isAuthorizedToUpdateLinks(context, targetUrn)
3840
&& !GlossaryUtils.canUpdateGlossaryEntity(targetUrn, context, _entityClient)) {
@@ -55,6 +57,7 @@ public CompletableFuture<Boolean> get(DataFetchingEnvironment environment) throw
5557
linkLabel,
5658
targetUrn,
5759
actor,
60+
settingsInput,
5861
_entityService);
5962
return true;
6063
} catch (Exception e) {

datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/mutate/DescriptionUtils.java

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -340,19 +340,6 @@ public static boolean isAuthorizedToUpdateFieldDescription(
340340
context, targetUrn.getEntityType(), targetUrn.toString(), orPrivilegeGroups);
341341
}
342342

343-
public static boolean isAuthorizedToUpdateDomainDescription(
344-
@Nonnull QueryContext context, Urn targetUrn) {
345-
final DisjunctivePrivilegeGroup orPrivilegeGroups =
346-
new DisjunctivePrivilegeGroup(
347-
ImmutableList.of(
348-
ALL_PRIVILEGES_GROUP,
349-
new ConjunctivePrivilegeGroup(
350-
ImmutableList.of(PoliciesConfig.EDIT_ENTITY_DOCS_PRIVILEGE.getType()))));
351-
352-
return AuthorizationUtils.isAuthorized(
353-
context, targetUrn.getEntityType(), targetUrn.toString(), orPrivilegeGroups);
354-
}
355-
356343
public static boolean isAuthorizedToUpdateContainerDescription(
357344
@Nonnull QueryContext context, Urn targetUrn) {
358345
final DisjunctivePrivilegeGroup orPrivilegeGroups =
@@ -373,7 +360,9 @@ public static boolean isAuthorizedToUpdateDescription(
373360
ImmutableList.of(
374361
ALL_PRIVILEGES_GROUP,
375362
new ConjunctivePrivilegeGroup(
376-
ImmutableList.of(PoliciesConfig.EDIT_ENTITY_DOCS_PRIVILEGE.getType()))));
363+
ImmutableList.of(PoliciesConfig.EDIT_ENTITY_DOCS_PRIVILEGE.getType())),
364+
new ConjunctivePrivilegeGroup(
365+
ImmutableList.of(PoliciesConfig.MANAGE_ASSET_SUMMARY_PRIVILEGE.getType()))));
377366

378367
return AuthorizationUtils.isAuthorized(
379368
context, targetUrn.getEntityType(), targetUrn.toString(), orPrivilegeGroups);

datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/mutate/UpdateDescriptionResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private CompletableFuture<Boolean> updateDomainDescription(
111111
Urn targetUrn, DescriptionUpdateInput input, QueryContext context) {
112112
return GraphQLConcurrencyUtils.supplyAsync(
113113
() -> {
114-
if (!DescriptionUtils.isAuthorizedToUpdateDomainDescription(context, targetUrn)) {
114+
if (!DescriptionUtils.isAuthorizedToUpdateDescription(context, targetUrn)) {
115115
throw new AuthorizationException(
116116
"Unauthorized to perform this action. Please contact your DataHub administrator.");
117117
}

datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/mutate/UpdateLinkResolver.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.linkedin.datahub.graphql.QueryContext;
88
import com.linkedin.datahub.graphql.concurrency.GraphQLConcurrencyUtils;
99
import com.linkedin.datahub.graphql.exception.AuthorizationException;
10+
import com.linkedin.datahub.graphql.generated.LinkSettingsInput;
1011
import com.linkedin.datahub.graphql.generated.UpdateLinkInput;
1112
import com.linkedin.datahub.graphql.resolvers.mutate.util.GlossaryUtils;
1213
import com.linkedin.datahub.graphql.resolvers.mutate.util.LinkUtils;
@@ -35,6 +36,7 @@ public CompletableFuture<Boolean> get(DataFetchingEnvironment environment) throw
3536
String currentLinkLabel = input.getCurrentLabel();
3637
String linkUrl = input.getLinkUrl();
3738
String linkLabel = input.getLabel();
39+
LinkSettingsInput settingsInput = input.getSettings();
3840
Urn targetUrn = Urn.createFromString(input.getResourceUrn());
3941

4042
if (!LinkUtils.isAuthorizedToUpdateLinks(context, targetUrn)
@@ -60,6 +62,7 @@ public CompletableFuture<Boolean> get(DataFetchingEnvironment environment) throw
6062
linkLabel,
6163
targetUrn,
6264
actor,
65+
settingsInput,
6366
_entityService);
6467
return true;
6568
} catch (Exception e) {

0 commit comments

Comments
 (0)