Skip to content

Commit cb5c254

Browse files
committed
resolve merge conflict
2 parents 0c576e2 + 01a2c0c commit cb5c254

File tree

90 files changed

+3585
-1356
lines changed

Some content is hidden

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

90 files changed

+3585
-1356
lines changed

.github/workflows/check-datahub-jars.yml

+12-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ on:
55
branches:
66
- master
77
paths:
8-
- "metadata-integration"
8+
- "metadata-integration/**"
99
pull_request:
1010
branches:
1111
- "**"
1212
paths:
13-
- "metadata-integration"
13+
- "metadata-integration/**"
1414
release:
1515
types: [published]
1616

@@ -28,15 +28,22 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- uses: acryldata/sane-checkout-action@v3
31+
- uses: actions/setup-python@v5
32+
with:
33+
python-version: "3.10"
34+
- uses: actions/cache@v4
35+
with:
36+
path: |
37+
~/.cache/uv
38+
key: ${{ runner.os }}-uv-${{ hashFiles('**/requirements.txt') }}
39+
- name: Install dependencies
40+
run: ./metadata-ingestion/scripts/install_deps.sh
3141
- name: Set up JDK 17
3242
uses: actions/setup-java@v4
3343
with:
3444
distribution: "zulu"
3545
java-version: 17
3646
- uses: gradle/actions/setup-gradle@v3
37-
- uses: actions/setup-python@v5
38-
with:
39-
python-version: "3.10"
4047
- name: check ${{ matrix.command }} jar
4148
run: |
4249
./gradlew :metadata-integration:java:${{ matrix.command }}:build --info

build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ configure(subprojects.findAll {! it.name.startsWith('spark-lineage')}) {
373373
exclude group: "org.slf4j", module: "slf4j-log4j12"
374374
exclude group: "org.slf4j", module: "slf4j-nop"
375375
exclude group: "org.slf4j", module: "slf4j-ext"
376+
exclude group: "org.codehaus.jackson", module: "jackson-mapper-asl"
376377

377378
resolutionStrategy.force externalDependency.antlr4Runtime
378379
resolutionStrategy.force externalDependency.antlr4

datahub-frontend/conf/logback.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<logger name="com.linkedin" level="DEBUG">
6262
<appender-ref ref="DEBUG_FILE"/>
6363
</logger>
64-
<logger name="controller" level="DEBUG">
64+
<logger name="controllers" level="DEBUG">
6565
<appender-ref ref="DEBUG_FILE"/>
6666
</logger>
6767
<logger name="auth" level="DEBUG">

datahub-upgrade/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ dependencies {
6060
// mock internal schema registry
6161
implementation externalDependency.kafkaAvroSerde
6262
implementation externalDependency.kafkaAvroSerializer
63-
implementation "org.apache.kafka:kafka_2.12:3.7.1"
63+
implementation "org.apache.kafka:kafka_2.13:3.7.2"
6464

6565
implementation externalDependency.slf4jApi
6666
compileOnly externalDependency.lombok

datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/dataprocessinstances/BackfillDataProcessInstancesHasRunEventsStep.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import static com.linkedin.metadata.Constants.*;
44

5+
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
6+
import com.fasterxml.jackson.databind.node.ObjectNode;
57
import com.google.common.base.Throwables;
68
import com.linkedin.common.urn.Urn;
79
import com.linkedin.datahub.upgrade.UpgradeContext;
@@ -23,8 +25,6 @@
2325
import java.util.Set;
2426
import java.util.function.Function;
2527
import lombok.extern.slf4j.Slf4j;
26-
import org.codehaus.jackson.node.JsonNodeFactory;
27-
import org.codehaus.jackson.node.ObjectNode;
2828
import org.opensearch.action.search.SearchRequest;
2929
import org.opensearch.action.search.SearchResponse;
3030
import org.opensearch.client.RequestOptions;

datahub-web-react/src/app/entity/schemaField/SchemaFieldPropertiesEntity.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,9 @@ export class SchemaFieldPropertiesEntity implements Entity<SchemaFieldEntity> {
3535
// Currently unused.
3636
getPathName = () => 'schemaField';
3737

38-
// Currently unused.
39-
getEntityName = () => 'schemaField';
38+
getEntityName = () => 'Column';
4039

41-
// Currently unused.
42-
getCollectionName = () => 'schemaFields';
40+
getCollectionName = () => 'Columns';
4341

4442
// Currently unused.
4543
renderProfile = (_: string) => <></>;

datahub-web-react/src/app/entity/shared/components/styled/DeprecationPill.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ const DeprecatedContainer = styled.div`
1919
justify-content: center;
2020
align-items: center;
2121
color: #cd0d24;
22-
margin-left: 0px;
23-
margin-right: 8px;
2422
padding-top: 8px;
2523
padding-bottom: 8px;
2624
padding-right: 4px;

datahub-web-react/src/app/entity/shared/components/styled/StructuredProperty/MultipleStringInput.tsx datahub-web-react/src/app/entity/shared/components/styled/StructuredProperty/MultipleOpenEndedInput.tsx

+8-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import React from 'react';
44
import styled from 'styled-components';
55
import { ANTD_GRAY_V2 } from '../../../constants';
66

7+
const MultiStringWrapper = styled.div``;
8+
79
const StyledInput = styled(Input)`
810
width: 75%;
911
min-width: 350px;
@@ -29,10 +31,11 @@ const DeleteButton = styled(Button)`
2931

3032
interface Props {
3133
selectedValues: any[];
34+
inputType?: string;
3235
updateSelectedValues: (values: any[]) => void;
3336
}
3437

35-
export default function MultipleStringInput({ selectedValues, updateSelectedValues }: Props) {
38+
export default function MultipleOpenEndedInput({ selectedValues, updateSelectedValues, inputType = 'text' }: Props) {
3639
function updateInput(text: string, index: number) {
3740
const updatedValues =
3841
selectedValues.length > 0 ? selectedValues.map((value, i) => (i === index ? text : value)) : [text];
@@ -53,14 +56,14 @@ export default function MultipleStringInput({ selectedValues, updateSelectedValu
5356
}
5457

5558
return (
56-
<div>
59+
<MultiStringWrapper>
5760
{selectedValues.length > 1 &&
5861
selectedValues.map((selectedValue, index) => {
5962
const key = `${index}`;
6063
return (
6164
<InputWrapper key={key}>
6265
<StyledInput
63-
type="text"
66+
type={inputType}
6467
value={selectedValue}
6568
onChange={(e) => updateInput(e.target.value, index)}
6669
/>
@@ -70,14 +73,14 @@ export default function MultipleStringInput({ selectedValues, updateSelectedValu
7073
})}
7174
{selectedValues.length <= 1 && (
7275
<StyledInput
73-
type="text"
76+
type={inputType}
7477
value={selectedValues[0] || ''}
7578
onChange={(e) => updateInput(e.target.value, 0)}
7679
/>
7780
)}
7881
<StyledButton type="link" onClick={addNewValue}>
7982
+ Add More
8083
</StyledButton>
81-
</div>
84+
</MultiStringWrapper>
8285
);
8386
}

datahub-web-react/src/app/entity/shared/components/styled/StructuredProperty/NumberInput.tsx

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { Input } from 'antd';
22
import React, { ChangeEvent } from 'react';
33
import styled from 'styled-components';
4+
import { PropertyCardinality } from '@src/types.generated';
45
import { ANTD_GRAY_V2 } from '../../../constants';
6+
import MultipleOpenEndedInput from './MultipleOpenEndedInput';
57

68
const StyledInput = styled(Input)`
79
border: 1px solid ${ANTD_GRAY_V2[6]};
@@ -10,15 +12,31 @@ const StyledInput = styled(Input)`
1012

1113
interface Props {
1214
selectedValues: any[];
15+
cardinality?: PropertyCardinality | null;
1316
updateSelectedValues: (values: string[] | number[]) => void;
1417
}
1518

16-
export default function NumberInput({ selectedValues, updateSelectedValues }: Props) {
19+
export default function NumberInput({ selectedValues, cardinality, updateSelectedValues }: Props) {
1720
function updateInput(event: ChangeEvent<HTMLInputElement>) {
1821
const number = Number(event.target.value);
1922
updateSelectedValues([number]);
2023
}
2124

25+
function updateMultipleValues(values: string[] | number[]) {
26+
const numbers = values.map((v) => Number(v));
27+
updateSelectedValues(numbers);
28+
}
29+
30+
if (cardinality === PropertyCardinality.Multiple) {
31+
return (
32+
<MultipleOpenEndedInput
33+
selectedValues={selectedValues}
34+
updateSelectedValues={updateMultipleValues}
35+
inputType="number"
36+
/>
37+
);
38+
}
39+
2240
return (
2341
<StyledInput
2442
type="number"

datahub-web-react/src/app/entity/shared/components/styled/StructuredProperty/StringInput.tsx

+10-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, { ChangeEvent } from 'react';
33
import styled from 'styled-components';
44
import { ANTD_GRAY_V2 } from '../../../constants';
55
import { PropertyCardinality } from '../../../../../../types.generated';
6-
import MultipleStringInput from './MultipleStringInput';
6+
import MultipleOpenEndedInput from './MultipleOpenEndedInput';
77

88
const StyledInput = styled(Input)`
99
width: 75%;
@@ -24,8 +24,15 @@ export default function StringInput({ selectedValues, cardinality, updateSelecte
2424
}
2525

2626
if (cardinality === PropertyCardinality.Multiple) {
27-
return <MultipleStringInput selectedValues={selectedValues} updateSelectedValues={updateSelectedValues} />;
27+
return <MultipleOpenEndedInput selectedValues={selectedValues} updateSelectedValues={updateSelectedValues} />;
2828
}
2929

30-
return <StyledInput type="text" value={selectedValues[0] || ''} onChange={updateInput} />;
30+
return (
31+
<StyledInput
32+
type="text"
33+
value={selectedValues[0] || ''}
34+
onChange={updateInput}
35+
data-testid="structured-property-string-value-input"
36+
/>
37+
);
3138
}

datahub-web-react/src/app/entity/shared/components/styled/StructuredProperty/StructuredPropertyInput.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ export default function StructuredPropertyInput({
6060
<DateInput selectedValues={selectedValues} updateSelectedValues={updateSelectedValues} />
6161
)}
6262
{!allowedValues && valueType.info.type === StdDataType.Number && (
63-
<NumberInput selectedValues={selectedValues} updateSelectedValues={updateSelectedValues} />
63+
<NumberInput
64+
selectedValues={selectedValues}
65+
cardinality={cardinality}
66+
updateSelectedValues={updateSelectedValues}
67+
/>
6468
)}
6569
{!allowedValues && valueType.info.type === StdDataType.Urn && (
6670
<UrnInput

datahub-web-react/src/app/entity/shared/containers/profile/header/EntityHeader.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const TitleWrapper = styled.div`
2424
display: flex;
2525
justify-content: left;
2626
align-items: center;
27+
gap: 8px;
2728
2829
.ant-typography-edit-content {
2930
padding-top: 7px;

datahub-web-react/src/app/entity/shared/containers/profile/header/EntityName.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import { useEntityData, useRefetch } from '../../../EntityContext';
88
import { useGlossaryEntityData } from '../../../GlossaryEntityContext';
99

1010
export const EntityTitle = styled(Typography.Title)`
11-
margin-right: 10px;
12-
1311
&&& {
1412
margin-bottom: 0;
1513
word-break: break-all;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
import { identifyAndAddParentRows } from '../useStructuredProperties';
2+
3+
describe('identifyAndAddParentRows', () => {
4+
it('should not return parent rows when there are none', () => {
5+
const propertyRows = [
6+
{ displayName: 'test1', qualifiedName: 'test1' },
7+
{ displayName: 'test2', qualifiedName: 'test2' },
8+
];
9+
expect(identifyAndAddParentRows(propertyRows)).toMatchObject([]);
10+
});
11+
12+
it('should not return parent rows when another row starts with the same letters but is a different token', () => {
13+
const propertyRows = [
14+
{ displayName: 'test1', qualifiedName: 'testing.one' },
15+
{ displayName: 'test2', qualifiedName: 'testingAgain.two' },
16+
];
17+
expect(identifyAndAddParentRows(propertyRows)).toMatchObject([]);
18+
});
19+
20+
it('should return parent rows properly', () => {
21+
const propertyRows = [
22+
{ displayName: 'test1', qualifiedName: 'testing.one' },
23+
{ displayName: 'test2', qualifiedName: 'testing.two' },
24+
{ displayName: 'test3', qualifiedName: 'testing.three' },
25+
];
26+
expect(identifyAndAddParentRows(propertyRows)).toMatchObject([
27+
{ displayName: 'testing', qualifiedName: 'testing', childrenCount: 3 },
28+
]);
29+
});
30+
31+
it('should return parent rows properly with multiple layers of nesting', () => {
32+
const propertyRows = [
33+
{ displayName: 'test1', qualifiedName: 'testing.one.two.a.1' },
34+
{ displayName: 'test1', qualifiedName: 'testing.one.two.a.2' },
35+
{ displayName: 'test1', qualifiedName: 'testing.one.two.b' },
36+
{ displayName: 'test1', qualifiedName: 'testing.one.three' },
37+
{ displayName: 'test2', qualifiedName: 'testing.two.c.d' },
38+
{ displayName: 'test3', qualifiedName: 'testing.three' },
39+
{ displayName: 'test3', qualifiedName: 'testParent' },
40+
];
41+
expect(identifyAndAddParentRows(propertyRows)).toMatchObject([
42+
{ displayName: 'testing', qualifiedName: 'testing', isParentRow: true, childrenCount: 6 },
43+
{ displayName: 'testing.one', qualifiedName: 'testing.one', isParentRow: true, childrenCount: 4 },
44+
{ displayName: 'testing.one.two', qualifiedName: 'testing.one.two', isParentRow: true, childrenCount: 3 },
45+
{
46+
displayName: 'testing.one.two.a',
47+
qualifiedName: 'testing.one.two.a',
48+
isParentRow: true,
49+
childrenCount: 2,
50+
},
51+
]);
52+
});
53+
54+
it('should return parent rows properly with multiple layers of nesting regardless of order', () => {
55+
const propertyRows = [
56+
{ displayName: 'test1', qualifiedName: 'testing.one.two.a.1' },
57+
{ displayName: 'test3', qualifiedName: 'testParent' },
58+
{ displayName: 'test1', qualifiedName: 'testing.one.three' },
59+
{ displayName: 'test2', qualifiedName: 'testing.two.c.d' },
60+
{ displayName: 'test1', qualifiedName: 'testing.one.two.b' },
61+
{ displayName: 'test3', qualifiedName: 'testing.three' },
62+
{ displayName: 'test1', qualifiedName: 'testing.one.two.a.2' },
63+
];
64+
expect(identifyAndAddParentRows(propertyRows)).toMatchObject([
65+
{ displayName: 'testing', qualifiedName: 'testing', isParentRow: true, childrenCount: 6 },
66+
{ displayName: 'testing.one', qualifiedName: 'testing.one', isParentRow: true, childrenCount: 4 },
67+
{ displayName: 'testing.one.two', qualifiedName: 'testing.one.two', isParentRow: true, childrenCount: 3 },
68+
{
69+
displayName: 'testing.one.two.a',
70+
qualifiedName: 'testing.one.two.a',
71+
isParentRow: true,
72+
childrenCount: 2,
73+
},
74+
]);
75+
});
76+
77+
it('should return parent rows properly with simpler layers of nesting', () => {
78+
const propertyRows = [
79+
{ displayName: 'test2', qualifiedName: 'testing.two.c.d' },
80+
{ displayName: 'test3', qualifiedName: 'testing.three' },
81+
{ displayName: 'test3', qualifiedName: 'testParent' },
82+
];
83+
expect(identifyAndAddParentRows(propertyRows)).toMatchObject([
84+
{ displayName: 'testing', qualifiedName: 'testing', isParentRow: true, childrenCount: 2 },
85+
]);
86+
});
87+
});

datahub-web-react/src/app/entity/shared/tabs/Properties/useStructuredProperties.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ export function identifyAndAddParentRows(rows?: Array<PropertyRow>): Array<Prope
122122
// that would tell us to nest. If the count is not equal, we should nest the child properties.
123123
for (let index = 0; index < substrings.length; index++) {
124124
const token = substrings[index];
125-
const currentCount = qualifiedNames.filter((name) => name.startsWith(token)).length;
125+
const currentCount = qualifiedNames.filter((name) => name.startsWith(`${token}.`)).length;
126126

127-
// If we're at the beginning of the path and there is no nesting, break
128-
if (index === 0 && currentCount === 1) {
127+
// If there's only one child, don't nest it
128+
if (currentCount === 1) {
129129
break;
130130
}
131131

datahub-web-react/src/app/govern/structuredProperties/AllowedValuesDrawer.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ const AllowedValuesDrawer = ({
127127
setTimeout(() => scrollToBottom(), 0);
128128
}}
129129
color="violet"
130+
type="button"
130131
>
131132
Add
132133
</Button>

datahub-web-react/src/app/govern/structuredProperties/DisplayPreferences.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ const DisplayPreferences = ({
153153
clickable={false}
154154
/>
155155
&nbsp;is already being shown on asset previews, but only one property is allowed at a time.
156-
Do you want to replace the current property? This will hide PropVal on all asset previews.
156+
Do you want to replace the current property? This will hide {getDisplayName(badgeProperty)}{' '}
157+
on all asset previews.
157158
</p>
158159
}
159160
/>

datahub-web-react/src/app/govern/structuredProperties/StructuredPropsDrawer.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ const StructuredPropsDrawer = ({
192192
form.validateFields().then(() => {
193193
const createInput = {
194194
...form.getFieldsValue(),
195+
qualifiedName: form.getFieldValue('qualifiedName') || undefined,
195196
valueType: valueTypes.find((type) => type.value === form.getFieldValue('valueType'))?.urn,
196197
allowedValues,
197198
cardinality,

datahub-web-react/src/app/govern/structuredProperties/cacheUtils.ts

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const addToCache = (existingProperties, newProperty) => {
1717
allowedValues: newProperty.definition.allowedValues,
1818
created: newProperty.definition.created,
1919
lastModified: newProperty.definition.lastModified,
20-
filterStatus: newProperty.definition.filterStatus,
2120
},
2221
settings: {
2322
isHidden: newProperty.settings.isHidden,

0 commit comments

Comments
 (0)