-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ingestion): enforce lastObserved timestamps in SystemMetadata #11104
fix(ingestion): enforce lastObserved timestamps in SystemMetadata #11104
Conversation
Warning Walkthrough skippedFile diffs could not be summarized. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (2)
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/UnsetDomainResolverTest.java (2)
159-159
: The function usage ofgetMockEntityService
needs to be updated to match the new signature.The current implementation of
getMockEntityService
inTestUtils.java
returnsEntityService<ChangeItemImpl>
. To ensure consistency and flexibility, this should be updated to returnEntityService<?>
.
- Update the return type of
getMockEntityService
inTestUtils.java
toEntityService<?>
.Analysis chain
LGTM! But verify the function usage in the codebase.
The change to use
EntityService<?>
enhances flexibility. Ensure that all function calls togetMockEntityService
are updated accordingly.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `getMockEntityService` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type java -A 5 $'getMockEntityService'Length of output: 126656
115-115
: Update function signature to match the new usageThe function
getMockEntityService
inTestUtils.java
currently returnsEntityService<ChangeItemImpl>
. To ensure consistency with the updated usage ofEntityService<?>
across the codebase, please update the function signature inTestUtils.java
to returnEntityService<?>
.
- File:
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/TestUtils.java
- Line: 1 (function definition)
Analysis chain
LGTM! But verify the function usage in the codebase.
The change to use
EntityService<?>
enhances flexibility. Ensure that all function calls togetMockEntityService
are updated accordingly.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `getMockEntityService` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type java -A 5 $'getMockEntityService'Length of output: 126656
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (48)
- datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/mutate/MutationUtils.java (2 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/TestUtils.java (2 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/assertion/DeleteAssertionResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/AddBusinessAttributeResolverTest.java (1 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/CreateBusinessAttributeResolverTest.java (1 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/RemoveBusinessAttributeResolverTest.java (1 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/datacontract/UpsertDataContractResolverTest.java (7 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/delete/BatchUpdateSoftDeletedResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/deprecation/BatchUpdateDeprecationResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/deprecation/UpdateDeprecationResolverTest.java (7 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/BatchSetDomainResolverTest.java (7 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/CreateDomainResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/MoveDomainResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/SetDomainResolverTest.java (7 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/UnsetDomainResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/embed/UpdateEmbedResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/AddRelatedTermsResolverTest.java (9 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/CreateGlossaryNodeResolverTest.java (2 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/CreateGlossaryTermResolverTest.java (3 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/DeleteGlossaryEntityResolverTest.java (2 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/RemoveRelatedTermsResolverTest.java (4 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/UpdateNameResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/UpdateParentNodeResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/ingest/source/UpsertIngestionSourceResolverTest.java (2 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/mutate/SiblingsUtilsTest.java (3 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/mutate/UpdateUserSettingResolverTest.java (1 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/operation/ReportOperationResolverTest.java (1 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/AddOwnersResolverTest.java (8 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/BatchAddOwnersResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/BatchRemoveOwnersResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/AddTagsResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/BatchAddTagsResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/BatchRemoveTagsResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/CreateTagResolverTest.java (3 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/SetTagColorResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/AddTermsResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/BatchAddTermsResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/BatchRemoveTermsResolverTest.java (5 hunks)
- datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/browsepaths/BackfillBrowsePathsV2Step.java (3 hunks)
- datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/policyfields/BackfillPolicyFieldsStep.java (3 hunks)
- metadata-io/metadata-io-api/src/main/java/com/linkedin/metadata/entity/EntityApiUtils.java (2 hunks)
- metadata-io/src/main/java/com/linkedin/metadata/entity/EntityServiceImpl.java (2 hunks)
- metadata-io/src/test/java/com/linkedin/metadata/AspectGenerationUtils.java (2 hunks)
- metadata-io/src/test/java/com/linkedin/metadata/entity/EntityServiceTest.java (2 hunks)
- metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/BackfillBrowsePathsV2Step.java (3 hunks)
- metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/UpgradeDefaultBrowsePathsStep.java (3 hunks)
- metadata-service/restli-servlet-impl/src/main/java/com/linkedin/metadata/resources/entity/EntityResource.java (4 hunks)
- metadata-utils/src/main/java/com/linkedin/metadata/utils/SystemMetadataUtils.java (2 hunks)
Files skipped from review due to trivial changes (7)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/assertion/DeleteAssertionResolverTest.java
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/delete/BatchUpdateSoftDeletedResolverTest.java
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/CreateDomainResolverTest.java
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/RemoveRelatedTermsResolverTest.java
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/BatchAddOwnersResolverTest.java
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/AddTagsResolverTest.java
- metadata-io/src/test/java/com/linkedin/metadata/entity/EntityServiceTest.java
Additional comments not posted (160)
metadata-utils/src/main/java/com/linkedin/metadata/utils/SystemMetadataUtils.java (3)
15-17
: LGTM! The changes improve maintainability.The method now delegates to
generateSystemMetadataIfEmpty
, centralizing the logic for generating system metadata.
19-23
: LGTM! The new method adds flexibility.The method allows for an optional
runId
and ensures thatlastObserved
is set correctly.
28-35
: LGTM! The method ensures default values are applied correctly.The method checks if
systemMetadata
is null and sets default values forrunId
andlastObserved
, enhancing robustness.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/mutate/UpdateUserSettingResolverTest.java (1)
26-26
: LGTM! The change improves type safety and flexibility.The type declaration of
mockService
has been updated toEntityService<?>
, enhancing type safety and adaptability.metadata-io/metadata-io-api/src/main/java/com/linkedin/metadata/entity/EntityApiUtils.java (2)
3-3
: LGTM! The import change reflects the new method usage.The import statement for
createDefaultSystemMetadata
replaces the previous import forDEFAULT_RUN_ID
, reflecting the new method usage.
40-40
: LGTM! The change improves maintainability.The method now calls
createDefaultSystemMetadata
, centralizing the logic for creating default system metadata and improving code readability.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/DeleteGlossaryEntityResolverTest.java (2)
28-28
: Enhancement: Improved type safety with generic type.Updating
mockService
toEntityService<?>
enhances type safety and flexibility.
53-53
: Enhancement: Improved type safety with generic type.Updating
mockService
toEntityService<?>
enhances type safety and flexibility.metadata-io/src/test/java/com/linkedin/metadata/AspectGenerationUtils.java (1)
53-56
: Refactor: Centralized metadata creation.Using
createDefaultSystemMetadata
improves maintainability and consistency in metadata creation.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/operation/ReportOperationResolverTest.java (1)
60-60
: Refactor: Encapsulated verification logic.Using
verifyIngestProposal
improves readability and maintainability by encapsulating the verification logic.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/mutate/SiblingsUtilsTest.java (3)
34-34
: Enhanced type safety with generic type.The change from
EntityService
toEntityService<?>
enhances type safety and flexibility.
48-48
: Enhanced type safety with generic type.The change from
EntityService
toEntityService<?>
enhances type safety and flexibility.
62-62
: Enhanced type safety with generic type.The change from
EntityService
toEntityService<?>
enhances type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/CreateTagResolverTest.java (3)
30-30
: Enhanced type safety and readability.The change from
EntityService
toEntityService<?>
enhances type safety and flexibility. The use ofverifyIngestProposal
improves readability and reduces boilerplate code.Also applies to: 56-56
62-62
: Enhanced type safety with generic type.The change from
EntityService
toEntityService<?>
enhances type safety and flexibility.
79-79
: Enhanced type safety with generic type.The change from
EntityService
toEntityService<?>
enhances type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/CreateGlossaryNodeResolverTest.java (3)
5-5
: Enhanced type safety and readability.The change from
EntityService
toEntityService<?>
enhances type safety and flexibility. The use ofverifyIngestProposal
improves readability and reduces boilerplate code.Also applies to: 66-66, 74-74
80-80
: Enhanced type safety and readability.The change from
EntityService
toEntityService<?>
enhances type safety and flexibility. The use ofverifyIngestProposal
improves readability and reduces boilerplate code.Also applies to: 88-88
94-94
: Enhanced type safety and readability.The change from
EntityService
toEntityService<?>
enhances type safety and flexibility. The use ofverifyIngestProposal
improves readability and reduces boilerplate code.Also applies to: 102-102
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/RemoveBusinessAttributeResolverTest.java (1)
34-34
: LGTM! The wildcard type parameter enhances flexibility.The change to
EntityService<?>
improves type flexibility, allowing the mock service to accommodate any specific type ofEntityService
.datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/mutate/MutationUtils.java (1)
4-4
: LGTM! The use ofcreateDefaultSystemMetadata()
enhances code clarity and consistency.Encapsulating the instantiation logic within
createDefaultSystemMetadata()
ensures that the system metadata is initialized with default values, improving overall code maintainability.Also applies to: 88-88
metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/UpgradeDefaultBrowsePathsStep.java (1)
4-4
: LGTM! The use ofcreateDefaultSystemMetadata()
enhances code readability and consistency.Encapsulating the instantiation logic within
createDefaultSystemMetadata()
ensures that the system metadata is initialized with default values, improving overall code maintainability.Also applies to: 141-141
metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/BackfillBrowsePathsV2Step.java (2)
4-4
: Good use of utility function for creating default system metadata.The change enhances code readability and maintainability by encapsulating the metadata creation logic in a dedicated utility function.
155-155
: Good use of utility function for creating default system metadata.The change enhances code readability and maintainability by encapsulating the metadata creation logic in a dedicated utility function.
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/AddBusinessAttributeResolverTest.java (1)
32-32
: Improved type safety with parameterized type.Updating the
mockService
variable toEntityService<?>
enhances type safety and flexibility by allowing it to accept any specific type ofEntityService
.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/MoveDomainResolverTest.java (5)
43-43
: Improved type safety with parameterized type.Updating the
mockService
variable toEntityService<?>
enhances type safety and flexibility by allowing it to accept any specific type ofEntityService
.
80-80
: Improved type safety with parameterized type.Updating the
mockService
variable toEntityService<?>
enhances type safety and flexibility by allowing it to accept any specific type ofEntityService
.
103-103
: Improved type safety with parameterized type.Updating the
mockService
variable toEntityService<?>
enhances type safety and flexibility by allowing it to accept any specific type ofEntityService
.
130-130
: Improved type safety with parameterized type.Updating the
mockService
variable toEntityService<?>
enhances type safety and flexibility by allowing it to accept any specific type ofEntityService
.
146-146
: Improved type safety with parameterized type.Updating the
mockService
variable toEntityService<?>
enhances type safety and flexibility by allowing it to accept any specific type ofEntityService
.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/ingest/source/UpsertIngestionSourceResolverTest.java (1)
70-74
: LGTM! Encapsulating verification logic improves maintainability.The use of
verifyIngestProposal
enhances readability and maintainability by encapsulating the verification logic.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/embed/UpdateEmbedResolverTest.java (5)
42-42
: LGTM! Enhancing type safety with generic type.Changing
EntityService
toEntityService<?>
improves type safety and flexibility.
81-81
: LGTM! Enhancing type safety with generic type.Changing
EntityService
toEntityService<?>
improves type safety and flexibility.
134-134
: LGTM! Enhancing type safety with generic type.Changing
EntityService
toEntityService<?>
improves type safety and flexibility.
156-156
: LGTM! Enhancing type safety with generic type.Changing
EntityService
toEntityService<?>
improves type safety and flexibility.
173-173
: LGTM! Enhancing type safety with generic type.Changing
EntityService
toEntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/CreateGlossaryTermResolverTest.java (5)
85-93
: LGTM! Enhancing type safety and encapsulating verification logic.Changing
EntityService
toEntityService<?>
improves type safety and flexibility. UsingverifyIngestProposal
encapsulates the verification logic, enhancing readability and maintainability.
99-107
: LGTM! Enhancing type safety and encapsulating verification logic.Changing
EntityService
toEntityService<?>
improves type safety and flexibility. UsingverifyIngestProposal
encapsulates the verification logic, enhancing readability and maintainability.
113-121
: LGTM! Enhancing type safety and encapsulating verification logic.Changing
EntityService
toEntityService<?>
improves type safety and flexibility. UsingverifyIngestProposal
encapsulates the verification logic, enhancing readability and maintainability.
158-158
: LGTM! Enhancing type safety with generic type.Changing
EntityService
toEntityService<?>
improves type safety and flexibility.
Line range hint
173-173
: LGTM! Enhancing type safety with generic type.Changing
EntityService
toEntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/UpdateNameResolverTest.java (5)
45-45
: Enhancement: Improved type safety with wildcard type parameter.The change to
EntityService<?>
enhances type safety by allowing the mock service to accept any subtype ofEntityService
.
68-68
: Enhancement: Improved type safety with wildcard type parameter.The change to
EntityService<?>
enhances type safety by allowing the mock service to accept any subtype ofEntityService
.
86-86
: Enhancement: Improved type safety with wildcard type parameter.The change to
EntityService<?>
enhances type safety by allowing the mock service to accept any subtype ofEntityService
.
120-120
: Enhancement: Improved type safety with wildcard type parameter.The change to
EntityService<?>
enhances type safety by allowing the mock service to accept any subtype ofEntityService
.
166-166
: Enhancement: Improved type safety with wildcard type parameter.The change to
EntityService<?>
enhances type safety by allowing the mock service to accept any subtype ofEntityService
.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/SetTagColorResolverTest.java (5)
41-41
: Enhancement: Improved type safety with wildcard type parameter.The change to
EntityService<?>
enhances type safety by allowing the mock service to accept any subtype ofEntityService
.
72-72
: Refactor: Simplified verification method.The change to use
verifyIngestProposal
instead ofMockito.verify
simplifies the test code and improves readability.
82-82
: Enhancement: Improved type safety with wildcard type parameter.The change to
EntityService<?>
enhances type safety by allowing the mock service to accept any subtype ofEntityService
.
137-137
: Enhancement: Improved type safety with wildcard type parameter.The change to
EntityService<?>
enhances type safety by allowing the mock service to accept any subtype ofEntityService
.
157-157
: Enhancement: Improved type safety with wildcard type parameter.The change to
EntityService<?>
enhances type safety by allowing the mock service to accept any subtype ofEntityService
.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/UpdateParentNodeResolverTest.java (6)
46-46
: Enhancement: Improved type safety with wildcard type parameter.The change to
EntityService<?>
enhances type safety by allowing the mock service to accept any subtype ofEntityService
.
70-70
: Enhancement: Improved type safety with wildcard type parameter.The change to
EntityService<?>
enhances type safety by allowing the mock service to accept any subtype ofEntityService
.
92-92
: Enhancement: Improved type safety with wildcard type parameter.The change to
EntityService<?>
enhances type safety by allowing the mock service to accept any subtype ofEntityService
.
132-132
: Enhancement: Improved type safety with wildcard type parameter.The change to
EntityService<?>
enhances type safety by allowing the mock service to accept any subtype ofEntityService
.
152-152
: Enhancement: Improved type safety with wildcard type parameter.The change to
EntityService<?>
enhances type safety by allowing the mock service to accept any subtype ofEntityService
.
172-172
: Enhancement: Improved type safety with wildcard type parameter.The change to
EntityService<?>
enhances type safety by allowing the mock service to accept any subtype ofEntityService
.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/UnsetDomainResolverTest.java (4)
79-79
: LGTM!The introduction of
verifyIngestProposal
improves readability and maintainability.
133-133
: LGTM!The introduction of
verifyIngestProposal
improves readability and maintainability.
179-179
: LGTM! But verify the function usage in the codebase.The change to use
EntityService<?>
enhances flexibility. Ensure that all function calls togetMockEntityService
are updated accordingly.Verification successful
All instances of
getMockEntityService
have been updated to use the generic typeEntityService<?>
.
- The change to use
EntityService<?>
enhances flexibility and has been consistently applied across the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `getMockEntityService` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type java -A 5 $'getMockEntityService'Length of output: 126656
61-61
: LGTM! But verify the function usage in the codebase.The change to use
EntityService<?>
enhances flexibility. Ensure that all function calls togetMockEntityService
are updated accordingly.Verification successful
LGTM! But verify the function usage in the codebase.
The change to use
EntityService<?>
enhances flexibility. Ensure that all function calls togetMockEntityService
are updated accordingly.The shell script output shows that the
getMockEntityService
function is used across multiple test files, and all of them are utilizing the new generic typeEntityService<?>
. This confirms that the function usage has been updated consistently across the codebase.
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/TestUtils.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/BatchAddTermsResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/SetTagColorResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/CreateTagResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/BatchRemoveTermsResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/BatchRemoveTagsResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/AddTagsResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/BatchAddTagsResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/AddTermsResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/mutate/UpdateUserSettingResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/BatchRemoveOwnersResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/AddOwnersResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/BatchAddOwnersResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/AddRelatedTermsResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/UpdateNameResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/CreateGlossaryNodeResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/embed/UpdateEmbedResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/SetDomainResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/UnsetDomainResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/CreateDomainResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/BatchSetDomainResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/DeleteGlossaryEntityResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/assertion/DeleteAssertionResolverTest.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/RemoveRelatedTermsResolverTest.java
Based on this comprehensive list, it is clear that the function usage has been updated correctly across the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `getMockEntityService` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type java -A 5 $'getMockEntityService'Length of output: 126656
datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/policyfields/BackfillPolicyFieldsStep.java (1)
237-237
: LGTM!The use of
createDefaultSystemMetadata
improves code readability and maintainability.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/TestUtils.java (9)
128-128
: LGTM!The change to use
EntityService<?>
enhances flexibility.
133-133
: LGTM!The change to use
EntityService<?>
enhances flexibility.
137-154
: LGTM!The use of
ArgumentCaptor
and the assertions improve the robustness of the verification logic.
158-173
: LGTM!The change to use
EntityService<?>
enhances flexibility and ensures robust validation of proposals.
176-176
: LGTM!The change to use
EntityService<?>
enhances flexibility.
182-182
: LGTM!The change to use
EntityService<?>
enhances flexibility.
188-188
: LGTM!The change to use
EntityService<?>
enhances flexibility.
193-210
: LGTM!The introduction of the overloaded method to accept
EntityClient
expands the utility of the method and ensures robust validation of proposals.
211-211
: LGTM!The change to use
EntityService<?>
enhances flexibility.datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/browsepaths/BackfillBrowsePathsV2Step.java (2)
4-4
: LGTM!The import statement for
createDefaultSystemMetadata
is correct and aligns with the changes in the code.
211-211
: LGTM!Replacing the direct instantiation of
SystemMetadata
with a call tocreateDefaultSystemMetadata
enhances code readability and maintainability.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/AddTermsResolverTest.java (6)
35-35
: LGTM!Updating the type declaration for
mockService
toEntityService<?>
enhances type safety.
85-85
: LGTM!Updating the type declaration for
mockService
toEntityService<?>
enhances type safety.
127-127
: LGTM!Updating the type declaration for
mockService
toEntityService<?>
enhances type safety.
159-159
: LGTM!Updating the type declaration for
mockService
toEntityService<?>
enhances type safety.
191-191
: LGTM!Updating the type declaration for
mockService
toEntityService<?>
enhances type safety.
210-210
: LGTM!Updating the type declaration for
mockService
toEntityService<?>
enhances type safety.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/deprecation/UpdateDeprecationResolverTest.java (7)
62-62
: LGTM!Updating the type declaration for
mockService
toEntityService<?>
enhances type safety.
86-86
: LGTM!Replacing the verification method call with
verifyIngestProposal
improves readability.
123-123
: LGTM!Updating the type declaration for
mockService
toEntityService<?>
enhances type safety.
147-147
: LGTM!Replacing the verification method call with
verifyIngestProposal
improves readability.
172-172
: LGTM!Updating the type declaration for
mockService
toEntityService<?>
enhances type safety.
193-193
: LGTM!Updating the type declaration for
mockService
toEntityService<?>
enhances type safety.
209-209
: LGTM!Updating the type declaration for
mockService
toEntityService<?>
enhances type safety.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/BatchRemoveOwnersResolverTest.java (5)
38-38
: Approved: Enhanced type safety and flexibility.The change from
EntityService
toEntityService<?>
improves type safety and flexibility without altering the test logic.
86-86
: Approved: Enhanced type safety and flexibility.The change from
EntityService
toEntityService<?>
improves type safety and flexibility without altering the test logic.
153-153
: Approved: Enhanced type safety and flexibility.The change from
EntityService
toEntityService<?>
improves type safety and flexibility without altering the test logic.
198-198
: Approved: Enhanced type safety and flexibility.The change from
EntityService
toEntityService<?>
improves type safety and flexibility without altering the test logic.
221-221
: Approved: Enhanced type safety and flexibility.The change from
EntityService
toEntityService<?>
improves type safety and flexibility without altering the test logic.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/BatchRemoveTermsResolverTest.java (5)
38-38
: Approved: Enhanced type safety and flexibility.The change from
EntityService
toEntityService<?>
improves type safety and flexibility without altering the test logic.
85-85
: Approved: Enhanced type safety and flexibility.The change from
EntityService
toEntityService<?>
improves type safety and flexibility without altering the test logic.
151-151
: Approved: Enhanced type safety and flexibility.The change from
EntityService
toEntityService<?>
improves type safety and flexibility without altering the test logic.
195-195
: Approved: Enhanced type safety and flexibility.The change from
EntityService
toEntityService<?>
improves type safety and flexibility without altering the test logic.
217-217
: Approved: Enhanced type safety and flexibility.The change from
EntityService
toEntityService<?>
improves type safety and flexibility without altering the test logic.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/deprecation/BatchUpdateDeprecationResolverTest.java (5)
37-37
: Approved: Enhanced type safety and flexibility.The change from
EntityService
toEntityService<?>
improves type safety and flexibility without altering the test logic.
102-102
: Approved: Enhanced type safety and flexibility.The change from
EntityService
toEntityService<?>
improves type safety and flexibility without altering the test logic.
161-161
: Approved: Enhanced type safety and flexibility.The change from
EntityService
toEntityService<?>
improves type safety and flexibility without altering the test logic.
205-205
: Approved: Enhanced type safety and flexibility.The change from
EntityService
toEntityService<?>
improves type safety and flexibility without altering the test logic.
229-229
: Approved: Enhanced type safety and flexibility.The change from
EntityService
toEntityService<?>
improves type safety and flexibility without altering the test logic.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/CreateBusinessAttributeResolverTest.java (1)
59-59
: Update type declaration to a generic version.The type declaration for
mockService
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/AddRelatedTermsResolverTest.java (9)
31-31
: Update type declaration to a generic version.The type declaration for
mockService
insetUpService
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.
44-44
: Update type declaration to a generic version.The type declaration for
mockService
intestGetSuccessIsRelatedNonExistent
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.
78-78
: Update type declaration to a generic version.The type declaration for
mockService
intestGetSuccessHasRelatedNonExistent
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.
112-112
: Update type declaration to a generic version.The type declaration for
mockService
intestGetFailAddSelfAsRelatedTerm
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.
134-134
: Update type declaration to a generic version.The type declaration for
mockService
intestGetFailAddNonTermAsRelatedTerm
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.
156-156
: Update type declaration to a generic version.The type declaration for
mockService
intestGetFailAddNonExistentTermAsRelatedTerm
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.
180-180
: Update type declaration to a generic version.The type declaration for
mockService
intestGetFailAddToNonExistentUrn
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.
204-204
: Update type declaration to a generic version.The type declaration for
mockService
intestGetFailAddToNonTerm
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.
228-228
: Update type declaration to a generic version.The type declaration for
mockService
intestFailNoPermissions
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/BatchAddTermsResolverTest.java (6)
38-38
: Update type declaration to a generic version.The type declaration for
mockService
intestGetSuccessNoExistingTerms
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.
102-102
: Update type declaration to a generic version.The type declaration for
mockService
intestGetSuccessExistingTerms
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.
158-158
: Update type declaration to a generic version.The type declaration for
mockService
intestGetFailureTagDoesNotExist
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.
192-192
: Update type declaration to a generic version.The type declaration for
mockService
intestGetFailureResourceDoesNotExist
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.
237-237
: Update type declaration to a generic version.The type declaration for
mockService
intestGetUnauthorized
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.
259-259
: Update type declaration to a generic version.The type declaration for
mockService
intestGetEntityClientException
has been updated toEntityService<?>
, which improves flexibility by allowing it to handle any type of entity.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/BatchRemoveTagsResolverTest.java (5)
45-45
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.
107-107
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.
180-180
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.
225-225
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.
248-248
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/SetDomainResolverTest.java (6)
62-62
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.
124-124
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.
176-176
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.
215-215
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.
238-238
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.
Line range hint
289-289
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/BatchAddTagsResolverTest.java (6)
42-42
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.
118-118
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.
187-187
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.
221-221
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.
266-266
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.
289-289
: Enhance type safety with wildcard type parameter.The change to
EntityService<?>
improves type flexibility and safety by allowing the mock service to handle any subtype ofEntityService
.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/BatchSetDomainResolverTest.java (7)
42-42
: Good use of generic type.Updating the type declaration to
EntityService<?>
improves type safety and flexibility.
108-108
: Good use of generic type.Updating the type declaration to
EntityService<?>
improves type safety and flexibility.
179-179
: Good use of generic type.Updating the type declaration to
EntityService<?>
improves type safety and flexibility.
236-236
: Good use of generic type.Updating the type declaration to
EntityService<?>
improves type safety and flexibility.
271-271
: Good use of generic type.Updating the type declaration to
EntityService<?>
improves type safety and flexibility.
315-315
: Good use of generic type.Updating the type declaration to
EntityService<?>
improves type safety and flexibility.
337-337
: Good use of generic type.Updating the type declaration to
EntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/AddOwnersResolverTest.java (8)
41-41
: Good use of generic type.Updating the type declaration to
EntityService<?>
improves type safety and flexibility.
104-104
: Good use of generic type.Updating the type declaration to
EntityService<?>
improves type safety and flexibility.
170-170
: Good use of generic type.Updating the type declaration to
EntityService<?>
improves type safety and flexibility.
233-233
: Good use of generic type.Updating the type declaration to
EntityService<?>
improves type safety and flexibility.
331-331
: Good use of generic type.Updating the type declaration to
EntityService<?>
improves type safety and flexibility.
369-369
: Good use of generic type.Updating the type declaration to
EntityService<?>
improves type safety and flexibility.
407-407
: Good use of generic type.Updating the type declaration to
EntityService<?>
improves type safety and flexibility.
432-432
: Good use of generic type.Updating the type declaration to
EntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/datacontract/UpsertDataContractResolverTest.java (7)
5-5
: Good import addition.The import statement for
createDefaultSystemMetadata
is necessary for its usage in the code.
92-93
: Good use of@Captor
annotation.The
@Captor
annotation forproposalCaptor
helps in capturing arguments for verification in tests.
94-98
: Good addition of@BeforeTest
method.The
@BeforeTest
methodinit
ensures that the Mockito framework is properly set up before each test runs.
142-143
: Improved metadata creation.Using
createDefaultSystemMetadata
enhances code readability and maintainability by centralizing the creation of default system metadata.Also applies to: 152-153
160-174
: Enhanced proposal verification.Using
proposalCaptor
and including checks forlastObserved
timestamp improves the robustness of the tests.
217-218
: Improved metadata creation.Using
createDefaultSystemMetadata
enhances code readability and maintainability by centralizing the creation of default system metadata.Also applies to: 227-228
235-249
: Enhanced proposal verification.Using
proposalCaptor
and including checks forlastObserved
timestamp improves the robustness of the tests.metadata-service/restli-servlet-impl/src/main/java/com/linkedin/metadata/resources/entity/EntityResource.java (2)
289-289
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
generateSystemMetadataIfEmpty
are correct and consistent across the codebase.Verification successful
Verification successful!
The function
generateSystemMetadataIfEmpty
is used consistently and correctly across the codebase.
metadata-service/restli-servlet-impl/src/main/java/com/linkedin/metadata/resources/entity/EntityResource.java
metadata-utils/src/main/java/com/linkedin/metadata/utils/SystemMetadataUtils.java
metadata-io/metadata-io-api/src/main/java/com/linkedin/metadata/entity/ebean/batch/ChangeItemImpl.java
metadata-io/metadata-io-api/src/main/java/com/linkedin/metadata/entity/ebean/batch/PatchItemImpl.java
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `generateSystemMetadataIfEmpty` are correct and consistent. # Test: Search for the function usage. Expect: Only occurrences of the new method. rg --type java -A 5 $'generateSystemMetadataIfEmpty'Length of output: 9890
350-350
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
generateSystemMetadataIfEmpty
are correct and consistent across the codebase.Verification successful
LGTM! The function
generateSystemMetadataIfEmpty
is used correctly and consistently across the codebase.The function calls ensure that
SystemMetadata
is properly initialized where necessary.
EntityResource.java
: Lines 350 and other instances.ChangeItemImpl.java
: Multiple instances.PatchItemImpl.java
: Multiple instances.SystemMetadataUtils.java
: Definition and usage.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `generateSystemMetadataIfEmpty` are correct and consistent. # Test: Search for the function usage. Expect: Only occurrences of the new method. rg --type java -A 5 $'generateSystemMetadataIfEmpty'Length of output: 9890
Script:
#!/bin/bash # Description: Gather detailed context around the usage of `generateSystemMetadataIfEmpty` in the identified files. # Search for the function usage and include more surrounding lines for better context. rg --type java -A 10 -B 10 $'generateSystemMetadataIfEmpty'Length of output: 30705
metadata-io/src/main/java/com/linkedin/metadata/entity/EntityServiceImpl.java (2)
12-12
: Import statement forcreateDefaultSystemMetadata
is necessary.The import statement for
createDefaultSystemMetadata
is necessary for the new utility function being used in theingestEntity
method.
1838-1838
: LGTM! But verify the function usage in the codebase.The manual creation and initialization of a
SystemMetadata
object has been replaced with a call tocreateDefaultSystemMetadata()
. This change makes the code more concise and maintainable.However, ensure that all function calls to
createDefaultSystemMetadata
are correct and consistent.Verification successful
Verify the function usage in the codebase.
The function
createDefaultSystemMetadata
is used across multiple files. Ensure that all function calls tocreateDefaultSystemMetadata
are correct and consistent.
Function usage verified and consistent.
The function
createDefaultSystemMetadata
is used correctly and consistently across the codebase. The function is utilized to initializeSystemMetadata
objects as intended.
metadata-utils/src/main/java/com/linkedin/metadata/utils/SystemMetadataUtils.java
metadata-service/schema-registry-servlet/src/test/java/io/datahubproject/openapi/test/SchemaRegistryControllerTest.java
metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/BackfillBrowsePathsV2Step.java
metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/UpgradeDefaultBrowsePathsStep.java
metadata-io/metadata-io-api/src/main/java/com/linkedin/metadata/entity/EntityApiUtils.java
metadata-io/src/main/java/com/linkedin/metadata/entity/EntityServiceImpl.java
metadata-io/src/test/java/com/linkedin/metadata/AspectGenerationUtils.java
metadata-io/src/test/java/com/linkedin/metadata/entity/DeleteEntityServiceTest.java
datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/policyfields/BackfillPolicyFieldsStep.java
datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/browsepaths/BackfillBrowsePathsV2Step.java
datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/mutate/MutationUtils.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/datacontract/UpsertDataContractResolverTest.java
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `createDefaultSystemMetadata` are correct and consistent. # Test: Search for the function usage. Expect: Only occurrences of the correct usage. rg --type java -A 5 $'createDefaultSystemMetadata'Length of output: 22490
Script:
#!/bin/bash # Description: Verify the context of each function call to `createDefaultSystemMetadata` to ensure correctness and consistency. # Search for the function usage and include more context lines rg --type java -A 10 -B 2 $'createDefaultSystemMetadata'Length of output: 45269
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (2)
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/AddRelatedTermsResolverTest.java (1)
156-156
: Update the return type ofsetUpService()
toEntityService<?>
for type consistency.The
setUpService()
method correctly initializes and returns an instance ofEntityService<?>
. However, the return type of the method should be updated toEntityService<?>
to align with the changes in the test methods and ensure type consistency.
- Update the return type of
setUpService()
inAddRelatedTermsResolverTest.java
toEntityService<?>
.Analysis chain
LGTM! But verify the change does not introduce any type-related issues.
The change to
EntityService<?>
improves type safety and flexibility.However, ensure that the change does not introduce any type-related issues elsewhere in the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the change to `EntityService<?>` in `testGetFailAddNonExistentTermAsRelatedTerm` does not introduce any type-related issues. # Test: Search for the usage of `testGetFailAddNonExistentTermAsRelatedTerm` and ensure there are no type-related issues. rg --type java -A 5 $'testGetFailAddNonExistentTermAsRelatedTerm'Length of output: 1078
Script:
#!/bin/bash # Description: Verify the definition and usage of `setUpService()` to ensure it aligns with the change to `EntityService<?>`. # Search for the definition of `setUpService()` rg --type java 'setUpService()' # Search for the usage of `setUpService()` rg --type java 'setUpService()'Length of output: 3053
Script:
#!/bin/bash # Description: Extract the implementation of `setUpService()` to verify it returns an instance of `EntityService<?>`. # Extract the implementation of `setUpService()` rg --type java -A 10 'private EntityService setUpService()'Length of output: 1712
metadata-io/src/main/java/com/linkedin/metadata/entity/EntityServiceImpl.java (1)
1838-1838
: Instances ofnew SystemMetadata()
found in main code files:
metadata-service/restli-servlet-impl/src/main/java/com/linkedin/metadata/resources/entity/EntityResource.java
metadata-utils/src/main/java/com/linkedin/metadata/utils/SystemMetadataUtils.java
metadata-io/metadata-io-api/src/main/java/com/linkedin/metadata/entity/ebean/batch/ChangeItemImpl.java
metadata-io/src/main/java/com/linkedin/metadata/aspect/utils/DefaultAspectsUtil.java
Please review these instances and replace them with
createDefaultSystemMetadata()
if applicable.Analysis chain
LGTM! But verify the utility function usage in the codebase.
The code changes are approved.
However, ensure that all instances of
SystemMetadata
instantiation are replaced withcreateDefaultSystemMetadata()
where applicable.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all instances of `SystemMetadata` instantiation are replaced with `createDefaultSystemMetadata()`. # Test: Search for `new SystemMetadata()` usage. Expect: No occurrences. rg --type java 'new SystemMetadata()'Length of output: 8502
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (48)
- datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/mutate/MutationUtils.java (2 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/TestUtils.java (2 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/assertion/DeleteAssertionResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/AddBusinessAttributeResolverTest.java (1 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/CreateBusinessAttributeResolverTest.java (1 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/RemoveBusinessAttributeResolverTest.java (1 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/datacontract/UpsertDataContractResolverTest.java (7 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/delete/BatchUpdateSoftDeletedResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/deprecation/BatchUpdateDeprecationResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/deprecation/UpdateDeprecationResolverTest.java (7 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/BatchSetDomainResolverTest.java (7 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/CreateDomainResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/MoveDomainResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/SetDomainResolverTest.java (7 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/UnsetDomainResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/embed/UpdateEmbedResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/AddRelatedTermsResolverTest.java (9 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/CreateGlossaryNodeResolverTest.java (2 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/CreateGlossaryTermResolverTest.java (3 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/DeleteGlossaryEntityResolverTest.java (2 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/RemoveRelatedTermsResolverTest.java (4 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/UpdateNameResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/UpdateParentNodeResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/ingest/source/UpsertIngestionSourceResolverTest.java (2 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/mutate/SiblingsUtilsTest.java (3 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/mutate/UpdateUserSettingResolverTest.java (1 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/operation/ReportOperationResolverTest.java (1 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/AddOwnersResolverTest.java (8 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/BatchAddOwnersResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/BatchRemoveOwnersResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/AddTagsResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/BatchAddTagsResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/BatchRemoveTagsResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/CreateTagResolverTest.java (3 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/SetTagColorResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/AddTermsResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/BatchAddTermsResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/BatchRemoveTermsResolverTest.java (5 hunks)
- datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/browsepaths/BackfillBrowsePathsV2Step.java (3 hunks)
- datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/policyfields/BackfillPolicyFieldsStep.java (3 hunks)
- metadata-io/metadata-io-api/src/main/java/com/linkedin/metadata/entity/EntityApiUtils.java (2 hunks)
- metadata-io/src/main/java/com/linkedin/metadata/entity/EntityServiceImpl.java (2 hunks)
- metadata-io/src/test/java/com/linkedin/metadata/AspectGenerationUtils.java (2 hunks)
- metadata-io/src/test/java/com/linkedin/metadata/entity/EntityServiceTest.java (2 hunks)
- metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/BackfillBrowsePathsV2Step.java (3 hunks)
- metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/UpgradeDefaultBrowsePathsStep.java (3 hunks)
- metadata-service/restli-servlet-impl/src/main/java/com/linkedin/metadata/resources/entity/EntityResource.java (4 hunks)
- metadata-utils/src/main/java/com/linkedin/metadata/utils/SystemMetadataUtils.java (2 hunks)
Files skipped from review due to trivial changes (9)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/assertion/DeleteAssertionResolverTest.java
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/delete/BatchUpdateSoftDeletedResolverTest.java
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/ingest/source/UpsertIngestionSourceResolverTest.java
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/mutate/SiblingsUtilsTest.java
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/operation/ReportOperationResolverTest.java
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/BatchRemoveTagsResolverTest.java
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/BatchRemoveTermsResolverTest.java
- metadata-io/src/test/java/com/linkedin/metadata/entity/EntityServiceTest.java
- metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/UpgradeDefaultBrowsePathsStep.java
Additional comments not posted (163)
metadata-utils/src/main/java/com/linkedin/metadata/utils/SystemMetadataUtils.java (3)
14-17
: LGTM! Refactor improves maintainability.The refactor centralizes the logic for generating default metadata, improving code readability and maintainability.
19-23
: LGTM! Addition improves flexibility.The addition of the method with an optional
runId
parameter improves flexibility in creatingSystemMetadata
.
28-35
: LGTM! Addition improves robustness.The addition of the method centralizes the logic for generating default metadata, ensuring that default values are consistently applied, thus improving robustness.
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/mutate/UpdateUserSettingResolverTest.java (1)
26-26
: LGTM! Change improves type safety.Updating the type of
mockService
toEntityService<?>
improves type safety by allowing the mock service to accept any type parameter.metadata-io/metadata-io-api/src/main/java/com/linkedin/metadata/entity/EntityApiUtils.java (1)
40-40
: LGTM! Change improves code clarity.Updating the method to use
createDefaultSystemMetadata
improves code clarity and reduces redundancy by leveraging the existing utility function.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/DeleteGlossaryEntityResolverTest.java (2)
28-28
: LGTM! But verify the usage ofmockService
in the codebase.The code changes are approved.
However, ensure that all usages of
mockService
are compatible with the new type declaration.
53-53
: LGTM! But verify the usage ofmockService
in the codebase.The code changes are approved.
However, ensure that all usages of
mockService
are compatible with the new type declaration.metadata-io/src/test/java/com/linkedin/metadata/AspectGenerationUtils.java (1)
53-56
: Refactor approved!The refactor improves code clarity and maintainability by using
createDefaultSystemMetadata
for initializingSystemMetadata
.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/CreateTagResolverTest.java (4)
30-30
: LGTM! But verify the usage ofmockService
in the codebase.The code changes are approved.
However, ensure that all usages of
mockService
are compatible with the new type declaration.
62-62
: LGTM! But verify the usage ofmockService
in the codebase.The code changes are approved.
However, ensure that all usages of
mockService
are compatible with the new type declaration.
79-79
: LGTM! But verify the usage ofmockService
in the codebase.The code changes are approved.
However, ensure that all usages of
mockService
are compatible with the new type declaration.
56-56
: LGTM! But verify the usage ofverifyIngestProposal
in the codebase.The code changes are approved.
However, ensure that all usages of
verifyIngestProposal
are compatible with the new method.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/CreateGlossaryNodeResolverTest.java (3)
5-5
: Import statement approved.The import statement for
verifyIngestProposal
is necessary for the new verification method.
66-66
: Type declaration change approved.Changing the type declaration for
mockService
toEntityService<?>
improves type safety and flexibility.
74-74
: Verification method change approved.Replacing direct calls to
Mockito.verify
withverifyIngestProposal
enhances code readability and encapsulates the verification logic.Also applies to: 88-88, 102-102
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/RemoveBusinessAttributeResolverTest.java (1)
34-34
: Type declaration change approved.Changing the type declaration for
mockService
toEntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/mutate/MutationUtils.java (1)
88-88
: Instantiation method change approved.Replacing the direct instantiation of
SystemMetadata
with a call tocreateDefaultSystemMetadata
enhances readability and maintainability.metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/BackfillBrowsePathsV2Step.java (2)
4-4
: Import statement forcreateDefaultSystemMetadata
is correctly added.The import statement for the utility function is correctly added, ensuring that the function can be used within this file.
155-155
: LGTM! The usage ofcreateDefaultSystemMetadata
improves maintainability.The change to use
createDefaultSystemMetadata()
instead of direct instantiation improves code maintainability and readability.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/AddBusinessAttributeResolverTest.java (1)
32-32
: LGTM! The type update enhances type safety.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating that it can hold an instance ofEntityService
with an unspecified type parameter.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/MoveDomainResolverTest.java (5)
43-43
: LGTM! The type update enhances type safety.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating that it can hold an instance ofEntityService
with an unspecified type parameter.
80-80
: LGTM! The type update enhances type safety.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating that it can hold an instance ofEntityService
with an unspecified type parameter.
103-103
: LGTM! The type update enhances type safety.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating that it can hold an instance ofEntityService
with an unspecified type parameter.
130-130
: LGTM! The type update enhances type safety.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating that it can hold an instance ofEntityService
with an unspecified type parameter.
146-146
: LGTM! The type update enhances type safety.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating that it can hold an instance ofEntityService
with an unspecified type parameter.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/RemoveRelatedTermsResolverTest.java (4)
39-39
: Approved: Improved type safety with generic type.The change to
EntityService<?>
enhances type safety and flexibility without affecting the test logic.
74-74
: Approved: Improved type safety with generic type.The change to
EntityService<?>
enhances type safety and flexibility without affecting the test logic.
105-105
: Approved: Improved type safety with generic type.The change to
EntityService<?>
enhances type safety and flexibility without affecting the test logic.
138-138
: Approved: Improved type safety with generic type.The change to
EntityService<?>
enhances type safety and flexibility without affecting the test logic.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/embed/UpdateEmbedResolverTest.java (5)
42-42
: Approved: Improved type safety with generic type.The change to
EntityService<?>
enhances type safety and flexibility without affecting the test logic.
81-81
: Approved: Improved type safety with generic type.The change to
EntityService<?>
enhances type safety and flexibility without affecting the test logic.
134-134
: Approved: Improved type safety with generic type.The change to
EntityService<?>
enhances type safety and flexibility without affecting the test logic.
156-156
: Approved: Improved type safety with generic type.The change to
EntityService<?>
enhances type safety and flexibility without affecting the test logic.
173-173
: Approved: Improved type safety with generic type.The change to
EntityService<?>
enhances type safety and flexibility without affecting the test logic.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/CreateGlossaryTermResolverTest.java (4)
85-85
: Approved: Improved type safety and code readability.The change to
EntityService<?>
enhances type safety and flexibility without affecting the test logic. The introduction ofverifyIngestProposal
improves code readability and maintainability.Also applies to: 93-93
99-99
: Approved: Improved type safety and code readability.The change to
EntityService<?>
enhances type safety and flexibility without affecting the test logic. The introduction ofverifyIngestProposal
improves code readability and maintainability.Also applies to: 107-107
113-113
: Approved: Improved type safety and code readability.The change to
EntityService<?>
enhances type safety and flexibility without affecting the test logic. The introduction ofverifyIngestProposal
improves code readability and maintainability.Also applies to: 121-121
158-158
: Approved: Improved type safety with generic type.The change to
EntityService<?>
enhances type safety and flexibility without affecting the test logic.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/UpdateNameResolverTest.java (5)
45-45
: LGTM! Enhanced type safety.The change to use
EntityService<?>
improves type safety and flexibility.
68-68
: LGTM! Enhanced type safety.The change to use
EntityService<?>
improves type safety and flexibility.
86-86
: LGTM! Enhanced type safety.The change to use
EntityService<?>
improves type safety and flexibility.
120-120
: LGTM! Enhanced type safety.The change to use
EntityService<?>
improves type safety and flexibility.
166-166
: LGTM! Enhanced type safety.The change to use
EntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/SetTagColorResolverTest.java (4)
41-41
: LGTM! Enhanced type safety.The change to use
EntityService<?>
improves type safety and flexibility.
82-82
: LGTM! Enhanced type safety.The change to use
EntityService<?>
improves type safety and flexibility.
137-137
: LGTM! Enhanced type safety.The change to use
EntityService<?>
improves type safety and flexibility.
157-157
: LGTM! Enhanced type safety.The change to use
EntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/UpdateParentNodeResolverTest.java (6)
46-46
: LGTM! Enhanced type safety.The change to use
EntityService<?>
improves type safety and flexibility.
70-70
: LGTM! Enhanced type safety.The change to use
EntityService<?>
improves type safety and flexibility.
92-92
: LGTM! Enhanced type safety.The change to use
EntityService<?>
improves type safety and flexibility.
132-132
: LGTM! Enhanced type safety.The change to use
EntityService<?>
improves type safety and flexibility.
152-152
: LGTM! Enhanced type safety.The change to use
EntityService<?>
improves type safety and flexibility.
172-172
: LGTM! Enhanced type safety.The change to use
EntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/UnsetDomainResolverTest.java (6)
61-61
: Enhance type safety with generic type.Changing
mockService
toEntityService<?>
improves type safety.
115-115
: Enhance type safety with generic type.Changing
mockService
toEntityService<?>
improves type safety.
159-159
: Enhance type safety with generic type.Changing
mockService
toEntityService<?>
improves type safety.
179-179
: Enhance type safety with generic type.Changing
mockService
toEntityService<?>
improves type safety.
79-79
: Streamline verification with custom method.Using
verifyIngestProposal
improves readability and reduces redundancy.Ensure that
verifyIngestProposal
is correctly used and covers all necessary checks.Verification successful
Ensure
verifyIngestProposal
method covers all necessary checks.The
verifyIngestProposal
method is used correctly across multiple test files, includingUnsetDomainResolverTest.java
. The method is defined inTestUtils.java
and appears to be invoked correctly.
- Implementation of
verifyIngestProposal
inTestUtils.java
:
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/TestUtils.java
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `verifyIngestProposal` method. # Test: Search for the method usage. Expect: Only occurrences of the new method. rg --type java -A 5 $'verifyIngestProposal'Length of output: 41991
133-133
: Streamline verification with custom method.Using
verifyIngestProposal
improves readability and reduces redundancy.Ensure that
verifyIngestProposal
is correctly used and covers all necessary checks.Verification successful
Ensure
verifyIngestProposal
is correctly used and covers all necessary checks.The
verifyIngestProposal
method is used across multiple test files, includingUnsetDomainResolverTest.java
. The implementation inTestUtils.java
appears to cover various scenarios with different overloads.
- TestUtils.java:
verifyIngestProposal
withEntityService<?> mockService
,int numberOfInvocations
,MetadataChangeProposal proposal
verifyIngestProposal
withEntityService<?> mockService
,int numberOfInvocations
,List<MetadataChangeProposal> proposals
verifyIngestProposal
withEntityService<?> mockService
,int numberOfInvocations
verifyIngestProposal
withEntityClient mockClient
,int numberOfInvocations
,MetadataChangeProposal expectedProposal
The method captures arguments and verifies the number of invocations, ensuring that the proposals are correctly ingested.
- UnsetDomainResolverTest.java:
- The usage of
verifyIngestProposal
inUnsetDomainResolverTest.java
appears consistent with its intended purpose.Locations to review:
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/TestUtils.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/UnsetDomainResolverTest.java
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `verifyIngestProposal` method. # Test: Search for the method usage. Expect: Only occurrences of the new method. rg --type java -A 5 $'verifyIngestProposal'Length of output: 41991
datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/policyfields/BackfillPolicyFieldsStep.java (2)
4-4
: Improve maintainability with utility function.Adding the import statement for
createDefaultSystemMetadata
enhances code maintainability.
237-237
: Enhance readability with utility function.Replacing direct instantiation with
createDefaultSystemMetadata
improves readability and maintainability.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/TestUtils.java (6)
128-128
: Enhance type safety with generic type.Updating the method signature to use
EntityService<?>
improves type safety.
133-133
: Enhance type safety with generic type.Updating the method signature to use
EntityService<?>
improves type safety.
158-158
: Enhance type safety with generic type.Updating the method signature to use
EntityService<?>
improves type safety.
176-176
: Enhance type safety with generic type.Updating the method signature to use
EntityService<?>
improves type safety.
188-188
: Enhance type safety with generic type.Updating the method signature to use
EntityService<?>
improves type safety.
193-210
: Improve testing capabilities with new method.Adding the method
verifyIngestProposal
forEntityClient
enhances testing capabilities.datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/browsepaths/BackfillBrowsePathsV2Step.java (2)
4-4
: Import changes approved.The import changes align with the modifications to use the utility function
createDefaultSystemMetadata()
.
211-211
: Refactor approved.Using
createDefaultSystemMetadata()
improves maintainability by encapsulating the logic of creating default system metadata.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/AddTermsResolverTest.java (6)
35-35
: Type safety improvement approved.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating thatmockService
can accept any type of entity.
85-85
: Type safety improvement approved.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating thatmockService
can accept any type of entity.
127-127
: Type safety improvement approved.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating thatmockService
can accept any type of entity.
159-159
: Type safety improvement approved.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating thatmockService
can accept any type of entity.
191-191
: Type safety improvement approved.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating thatmockService
can accept any type of entity.
210-210
: Type safety improvement approved.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating thatmockService
can accept any type of entity.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/deprecation/UpdateDeprecationResolverTest.java (5)
62-62
: Type safety improvement approved.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating thatmockService
can accept any type of entity.
123-123
: Type safety improvement approved.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating thatmockService
can accept any type of entity.
172-172
: Type safety improvement approved.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating thatmockService
can accept any type of entity.
193-193
: Type safety improvement approved.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating thatmockService
can accept any type of entity.
209-209
: Type safety improvement approved.Changing the type of
mockService
toEntityService<?>
enhances type safety by explicitly indicating thatmockService
can accept any type of entity.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/BatchRemoveOwnersResolverTest.java (5)
38-38
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.
86-86
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.
153-153
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.
198-198
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.
221-221
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/deprecation/BatchUpdateDeprecationResolverTest.java (5)
37-37
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.
102-102
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.
161-161
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.
205-205
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.
229-229
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/AddTagsResolverTest.java (6)
38-38
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.
97-97
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.
149-149
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.
180-180
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.
211-211
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.
Line range hint
229-229
: LGTM!The change to
EntityService<?>
enhances type safety without altering the function's logic.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/CreateBusinessAttributeResolverTest.java (1)
59-59
: LGTM! But verify the change does not introduce any type-related issues.The change to
EntityService<?>
improves type safety and flexibility.However, ensure that the change does not introduce any type-related issues elsewhere in the codebase.
Verification successful
The change to
EntityService<?>
is verified and does not introduce any type-related issues.The
getMockEntityService
method returnsEntityService<ChangeItemImpl>
, which is compatible with the more generalEntityService<?>
.
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/TestUtils.java
: Implementation ofgetMockEntityService
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the change to `EntityService<?>` does not introduce any type-related issues. # Test: Search for the usage of `CreateBusinessAttributeResolverTest` and ensure there are no type-related issues. rg --type java -A 5 $'CreateBusinessAttributeResolverTest'Length of output: 1193
Script:
#!/bin/bash # Description: Search for all instances of `mockService` within the `CreateBusinessAttributeResolverTest` class and review the context around its usage. # Test: Search for the usage of `mockService` within the `CreateBusinessAttributeResolverTest` class. rg --type java -A 5 'mockService' datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/CreateBusinessAttributeResolverTest.javaLength of output: 1704
Script:
#!/bin/bash # Description: Search for the implementation of `getMockEntityService` within the codebase to confirm it returns an `EntityService<?>`. # Test: Search for the implementation of `getMockEntityService`. rg --type java 'EntityService<?> getMockEntityService' datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/CreateBusinessAttributeResolverTest.javaLength of output: 189
Script:
#!/bin/bash # Description: Search for the implementation of `getMockEntityService` within the codebase. # Test: Search for the implementation of `getMockEntityService` without specifying the return type. rg --type java 'getMockEntityService'Length of output: 23524
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/AddRelatedTermsResolverTest.java (8)
31-31
: LGTM! But verify the change does not introduce any type-related issues.The change to
EntityService<?>
improves type safety and flexibility.However, ensure that the change does not introduce any type-related issues elsewhere in the codebase.
228-228
: LGTM! But verify the change does not introduce any type-related issues.The change to
EntityService<?>
improves type safety and flexibility.However, ensure that the change does not introduce any type-related issues elsewhere in the codebase.
204-204
: LGTM! But verify the change does not introduce any type-related issues.The change to
EntityService<?>
improves type safety and flexibility.However, ensure that the change does not introduce any type-related issues elsewhere in the codebase.
78-78
: LGTM! But verify the change does not introduce any type-related issues.The change to
EntityService<?>
improves type safety and flexibility.However, ensure that the change does not introduce any type-related issues elsewhere in the codebase.
Verification successful
No type-related issues found with the change to
EntityService<?>
.The change to
EntityService<?>
in thetestGetSuccessHasRelatedNonExistent
method is consistent with the existing codebase, and no type-related issues were identified.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the change to `EntityService<?>` in `testGetSuccessHasRelatedNonExistent` does not introduce any type-related issues. # Test: Search for the usage of `testGetSuccessHasRelatedNonExistent` and ensure there are no type-related issues. rg --type java -A 5 $'testGetSuccessHasRelatedNonExistent'Length of output: 1064
Script:
#!/bin/bash # Description: Verify that the change to `EntityService<?>` does not introduce any type-related issues elsewhere in the codebase. # Test: Search for all usages of `EntityService` in the codebase. rg --type java 'EntityService<'Length of output: 71685
134-134
: LGTM! But verify the change does not introduce any type-related issues.The change to
EntityService<?>
improves type safety and flexibility.However, ensure that the change does not introduce any type-related issues elsewhere in the codebase.
Verification successful
LGTM! But verify the change does not introduce any type-related issues.
The change to
EntityService<?>
improves type safety and flexibility.The extensive usage of
EntityService<?>
across the codebase confirms that the change does not introduce any type-related issues.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the change to `EntityService<?>` in `testGetFailAddNonTermAsRelatedTerm` does not introduce any type-related issues. # Test: Search for the usage of `testGetFailAddNonTermAsRelatedTerm` and ensure there are no type-related issues. rg --type java -A 5 $'testGetFailAddNonTermAsRelatedTerm'Length of output: 1062
Script:
#!/bin/bash # Description: Verify that the change to `EntityService<?>` in `testGetFailAddNonTermAsRelatedTerm` does not introduce any type-related issues elsewhere in the codebase. # Test: Search for the usage of `EntityService` within the codebase. rg --type java 'EntityService'Length of output: 153732
112-112
: LGTM! But verify the change does not introduce any type-related issues.The change to
EntityService<?>
improves type safety and flexibility.However, ensure that the change does not introduce any type-related issues elsewhere in the codebase.
44-44
: LGTM! But verify the change does not introduce any type-related issues.The change to
EntityService<?>
improves type safety and flexibility.However, ensure that the change does not introduce any type-related issues elsewhere in the codebase.
Verification successful
LGTM! No type-related issues found.
The change to
EntityService<?>
in thetestGetSuccessIsRelatedNonExistent
method is consistent with existing practices across the codebase and does not introduce any type-related issues.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the change to `EntityService<?>` in `testGetSuccessIsRelatedNonExistent` does not introduce any type-related issues. # Test: Search for the usage of `testGetSuccessIsRelatedNonExistent` and ensure there are no type-related issues. rg --type java -A 5 $'testGetSuccessIsRelatedNonExistent'Length of output: 1062
Script:
#!/bin/bash # Description: Verify that the change to `EntityService<?>` does not introduce any type-related issues elsewhere in the codebase. # Test: Search for all usages of `EntityService` in the codebase to ensure there are no type-related issues. rg --type java 'EntityService'Length of output: 153732
180-180
: LGTM! But verify the change does not introduce any type-related issues.The change to
EntityService<?>
improves type safety and flexibility.However, ensure that the change does not introduce any type-related issues elsewhere in the codebase.
Verification successful
LGTM! But verify the change does not introduce any type-related issues.
The change to
EntityService<?>
improves type safety and flexibility.However, ensure that the change does not introduce any type-related issues elsewhere in the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the change to `EntityService<?>` in `testGetFailAddToNonExistentUrn` does not introduce any type-related issues. # Test: Search for the usage of `testGetFailAddToNonExistentUrn` and ensure there are no type-related issues. rg --type java -A 5 $'testGetFailAddToNonExistentUrn'Length of output: 1055
Script:
#!/bin/bash # Description: Verify that the change to `EntityService<?>` does not introduce any type-related issues in the codebase. # Search for the usage of `EntityService` in the codebase to ensure there are no type-related issues. rg --type java 'EntityService<.*>' -A 5Length of output: 383135
Script:
#!/bin/bash # Description: Verify that the change to `EntityService<?>` does not introduce any type-related issues in the codebase. # Search for the definition and usage of `setUpService` method to ensure it handles `EntityService<?>` correctly. rg --type java 'setUpService' -A 5Length of output: 9053
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/CreateDomainResolverTest.java (2)
56-56
: LGTM! But verify the change does not introduce any type-related issues.The change to
EntityService<?>
improves type safety and flexibility.However, ensure that the change does not introduce any type-related issues elsewhere in the codebase.
106-106
: LGTM! But verify the change does not introduce any type-related issues.The change to
EntityService<?>
improves type safety and flexibility.However, ensure that the change does not introduce any type-related issues elsewhere in the codebase.
Verification successful
Verification complete! No type-related issues found.
The change to
EntityService<?>
inCreateDomainResolverTest.java
has been verified and does not introduce any type-related issues.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the change to `EntityService<?>` in `testGetSuccessNoParentDomain` does not introduce any type-related issues. # Test: Search for the usage of `testGetSuccessNoParentDomain` and ensure there are no type-related issues. rg --type java -A 5 $'testGetSuccessNoParentDomain'Length of output: 1957
Script:
#!/bin/bash # Description: Verify that the change to `EntityService<?>` in `CreateDomainResolverTest.java` does not introduce any type-related issues. # Test: Search for the usage of `EntityService` in `CreateDomainResolverTest.java` and ensure there are no type-related issues. rg --type java -A 5 'EntityService' datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/CreateDomainResolverTest.javaLength of output: 2403
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/BatchAddTermsResolverTest.java (6)
38-38
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
102-102
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
158-158
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
192-192
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
237-237
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
259-259
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/SetDomainResolverTest.java (5)
62-62
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
124-124
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
176-176
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
215-215
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
238-238
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/BatchAddTagsResolverTest.java (6)
42-42
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
118-118
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
187-187
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
221-221
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
266-266
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
289-289
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/BatchSetDomainResolverTest.java (7)
42-42
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
108-108
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
179-179
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
236-236
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
271-271
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
315-315
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
337-337
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/BatchAddOwnersResolverTest.java (6)
41-41
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
129-129
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
220-220
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
270-270
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
329-329
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
366-366
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/AddOwnersResolverTest.java (8)
41-41
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
104-104
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
170-170
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
233-233
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
331-331
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
369-369
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
407-407
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.
432-432
: LGTM! Type declaration updated for flexibility.The change to
EntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/datacontract/UpsertDataContractResolverTest.java (15)
5-5
: Ensure the utility methodcreateDefaultSystemMetadata
is correctly utilized.Verify that the utility method
createDefaultSystemMetadata
is used consistently and correctly across the file.
51-59
: New imports for Mockito and TestNG annotations.The new imports for
ArgumentCaptor
,Captor
,MockitoAnnotations
, andBeforeTest
are necessary for the enhancements in the testing framework.
92-93
: Add@Captor
annotation for capturing arguments.The
@Captor
annotation is correctly used to capture a list ofMetadataChangeProposal
objects.
94-97
: Add@BeforeTest
annotation for initializing Mockito annotations.The
@BeforeTest
annotation is correctly used to initialize Mockito annotations before each test runs.
142-143
: Use utility methodcreateDefaultSystemMetadata
for properties proposal.The utility method
createDefaultSystemMetadata
is correctly used for creating system metadata in the properties proposal.
152-153
: Use utility methodcreateDefaultSystemMetadata
for status proposal.The utility method
createDefaultSystemMetadata
is correctly used for creating system metadata in the status proposal.
160-161
: Capture proposals usingproposalCaptor
.The proposals are correctly captured using
proposalCaptor
for verification.
162-165
: VerifylastObserved
timestamp in captured proposals.The verification step correctly checks that all captured proposals have a valid
lastObserved
timestamp.
167-174
: Compare captured proposals with expected values.The captured proposals are correctly compared with expected values after resetting the
lastObserved
timestamp.
217-218
: Use utility methodcreateDefaultSystemMetadata
for properties proposal.The utility method
createDefaultSystemMetadata
is correctly used for creating system metadata in the properties proposal.
227-228
: Use utility methodcreateDefaultSystemMetadata
for status proposal.The utility method
createDefaultSystemMetadata
is correctly used for creating system metadata in the status proposal.
235-236
: Capture proposals usingproposalCaptor
.The proposals are correctly captured using
proposalCaptor
for verification.
237-240
: VerifylastObserved
timestamp in captured proposals.The verification step correctly checks that all captured proposals have a valid
lastObserved
timestamp.
242-249
: Compare captured proposals with expected values.The captured proposals are correctly compared with expected values after resetting the
lastObserved
timestamp.
Line range hint
289-289
: Use utility methodgenerateSystemMetadataIfEmpty
for system metadata.The utility method
generateSystemMetadataIfEmpty
is correctly used for generating system metadata if it is empty.metadata-service/restli-servlet-impl/src/main/java/com/linkedin/metadata/resources/entity/EntityResource.java (3)
16-16
: Ensure the utility methodgenerateSystemMetadataIfEmpty
is correctly utilized.Verify that the utility method
generateSystemMetadataIfEmpty
is used consistently and correctly across the file.
289-289
: Use utility methodgenerateSystemMetadataIfEmpty
for system metadata.The utility method
generateSystemMetadataIfEmpty
is correctly used for generating system metadata if it is empty.
350-350
: Use utility methodgenerateSystemMetadataIfEmpty
for system metadata list.The utility method
generateSystemMetadataIfEmpty
is correctly used for generating system metadata if it is empty for each entity in the batch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (48)
- datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/mutate/MutationUtils.java (2 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/TestUtils.java (2 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/assertion/DeleteAssertionResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/AddBusinessAttributeResolverTest.java (1 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/CreateBusinessAttributeResolverTest.java (1 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/RemoveBusinessAttributeResolverTest.java (1 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/datacontract/UpsertDataContractResolverTest.java (7 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/delete/BatchUpdateSoftDeletedResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/deprecation/BatchUpdateDeprecationResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/deprecation/UpdateDeprecationResolverTest.java (7 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/BatchSetDomainResolverTest.java (7 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/CreateDomainResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/MoveDomainResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/SetDomainResolverTest.java (7 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/UnsetDomainResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/embed/UpdateEmbedResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/AddRelatedTermsResolverTest.java (9 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/CreateGlossaryNodeResolverTest.java (2 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/CreateGlossaryTermResolverTest.java (3 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/DeleteGlossaryEntityResolverTest.java (2 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/RemoveRelatedTermsResolverTest.java (4 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/UpdateNameResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/UpdateParentNodeResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/ingest/source/UpsertIngestionSourceResolverTest.java (2 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/mutate/SiblingsUtilsTest.java (3 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/mutate/UpdateUserSettingResolverTest.java (1 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/operation/ReportOperationResolverTest.java (1 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/AddOwnersResolverTest.java (8 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/BatchAddOwnersResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/BatchRemoveOwnersResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/AddTagsResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/BatchAddTagsResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/BatchRemoveTagsResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/CreateTagResolverTest.java (3 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/SetTagColorResolverTest.java (5 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/AddTermsResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/BatchAddTermsResolverTest.java (6 hunks)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/BatchRemoveTermsResolverTest.java (5 hunks)
- datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/browsepaths/BackfillBrowsePathsV2Step.java (3 hunks)
- datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/policyfields/BackfillPolicyFieldsStep.java (3 hunks)
- metadata-io/metadata-io-api/src/main/java/com/linkedin/metadata/entity/EntityApiUtils.java (2 hunks)
- metadata-io/src/main/java/com/linkedin/metadata/entity/EntityServiceImpl.java (2 hunks)
- metadata-io/src/test/java/com/linkedin/metadata/AspectGenerationUtils.java (2 hunks)
- metadata-io/src/test/java/com/linkedin/metadata/entity/EntityServiceTest.java (2 hunks)
- metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/BackfillBrowsePathsV2Step.java (3 hunks)
- metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/UpgradeDefaultBrowsePathsStep.java (3 hunks)
- metadata-service/restli-servlet-impl/src/main/java/com/linkedin/metadata/resources/entity/EntityResource.java (4 hunks)
- metadata-utils/src/main/java/com/linkedin/metadata/utils/SystemMetadataUtils.java (2 hunks)
Files skipped from review due to trivial changes (5)
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/AddRelatedTermsResolverTest.java
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/operation/ReportOperationResolverTest.java
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/BatchAddTagsResolverTest.java
- datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/BatchRemoveTagsResolverTest.java
- metadata-io/src/test/java/com/linkedin/metadata/entity/EntityServiceTest.java
Additional comments not posted (188)
metadata-utils/src/main/java/com/linkedin/metadata/utils/SystemMetadataUtils.java (3)
15-17
: Refactor improves maintainability and consistency.The refactor to call
generateSystemMetadataIfEmpty
centralizes the logic for creatingSystemMetadata
instances, which improves maintainability and consistency.
19-23
: Enhancement improves flexibility.The new function
createDefaultSystemMetadata
with an optionalrunId
parameter enhances flexibility by allowing the caller to specify a run ID or use a default value if none is provided.
28-35
: Enhancement improves default value handling.The enhancements to
generateSystemMetadataIfEmpty
improve the handling of default values and ensure that the metadata is consistently populated.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/mutate/UpdateUserSettingResolverTest.java (1)
26-26
: Enhancement improves type safety.The change to use a parameterized type
EntityService<?>
enhances type safety by ensuring that themockService
can now accept any type of entity.metadata-io/metadata-io-api/src/main/java/com/linkedin/metadata/entity/EntityApiUtils.java (1)
40-40
: Refactor improves maintainability and consistency.The change to call
createDefaultSystemMetadata
simplifies the logic by removing explicit field assignments and centralizing the default creation logic, improving maintainability and consistency.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/DeleteGlossaryEntityResolverTest.java (2)
28-28
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
53-53
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.metadata-io/src/test/java/com/linkedin/metadata/AspectGenerationUtils.java (1)
3-4
: LGTM!The change to use
createDefaultSystemMetadata(runId)
improves code readability and encapsulates the creation logic. The order of setting fields is slightly altered but should not affect functionality.Also applies to: 53-56
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/mutate/SiblingsUtilsTest.java (3)
34-34
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
48-48
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
62-62
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/CreateTagResolverTest.java (4)
30-30
: LGTM! The change toEntityService<?>
improves type safety.The change to use a wildcard type enhances flexibility and type safety.
62-62
: LGTM! The change toEntityService<?>
improves type safety.The change to use a wildcard type enhances flexibility and type safety.
79-79
: LGTM! The change toEntityService<?>
improves type safety.The change to use a wildcard type enhances flexibility and type safety.
56-56
: Verify the implementation ofverifyIngestProposal
.Ensure that the
verifyIngestProposal
method correctly encapsulates the verification logic.Verification successful
The
verifyIngestProposal
method correctly encapsulates the verification logic.The method captures the
MetadataChangeProposal
argument, verifies thelastObserved
timestamp, and ensures the captured proposal matches the expected proposal.
- Location:
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/TestUtils.java
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of `verifyIngestProposal`. # Test: Search for the implementation of `verifyIngestProposal`. Expect: Correct encapsulation of verification logic. rg --type java 'void verifyIngestProposal'Length of output: 588
Script:
#!/bin/bash # Extract the full implementation of the `verifyIngestProposal` method from TestUtils.java # Display the implementation of `verifyIngestProposal` rg --type java --context 10 'public static void verifyIngestProposal' datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/TestUtils.javaLength of output: 2775
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/CreateGlossaryNodeResolverTest.java (4)
66-66
: LGTM! The change toEntityService<?>
improves type safety.The change to use a wildcard type enhances flexibility and type safety.
80-80
: LGTM! The change toEntityService<?>
improves type safety.The change to use a wildcard type enhances flexibility and type safety.
94-94
: LGTM! The change toEntityService<?>
improves type safety.The change to use a wildcard type enhances flexibility and type safety.
74-74
: Verify the implementation ofverifyIngestProposal
.Ensure that the
verifyIngestProposal
method correctly encapsulates the verification logic.Verification successful
The
verifyIngestProposal
methods correctly encapsulate the verification logic.The methods use
Mockito.verify
to ensure that theingestProposal
method is called with the expected parameters, handling different scenarios appropriately.
TestUtils.java
contains multiple overloads of theverifyIngestProposal
method.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of `verifyIngestProposal`. # Test: Search for the implementation of `verifyIngestProposal`. Expect: Correct encapsulation of verification logic. rg --type java 'void verifyIngestProposal'Length of output: 588
Script:
#!/bin/bash # Extract the full implementation of all `verifyIngestProposal` methods in `TestUtils.java`. rg --type java --context 10 'void verifyIngestProposal' datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/TestUtils.javaLength of output: 2761
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/RemoveBusinessAttributeResolverTest.java (1)
34-34
: LGTM! The change toEntityService<?>
improves type safety.The change to use a wildcard type enhances flexibility and type safety.
datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/mutate/MutationUtils.java (2)
4-4
: Import statement: Looks good.The import statement for
createDefaultSystemMetadata
is added correctly.
Line range hint
88-93
:
Refactor: UsingcreateDefaultSystemMetadata
improves maintainability.The change from direct instantiation to using
createDefaultSystemMetadata
enhances maintainability and consistency across the codebase.However, ensure the
createDefaultSystemMetadata
method is correctly implemented and does not introduce any issues.Verification successful
Verification Complete: Implementation of
createDefaultSystemMetadata
is correct.The
createDefaultSystemMetadata
method, which usesgenerateSystemMetadataIfEmpty
, is correctly implemented. It ensures that theSystemMetadata
object has appropriate default values, thereby enhancing maintainability and consistency across the codebase.
metadata-utils/src/main/java/com/linkedin/metadata/utils/SystemMetadataUtils.java
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of `createDefaultSystemMetadata` method. # Test: Search for the method implementation. Expect: Correct implementation without issues. ast-grep --lang java --pattern $'public static SystemMetadata createDefaultSystemMetadata() { $$$ }'Length of output: 473
Script:
#!/bin/bash # Description: Verify the implementation of `generateSystemMetadataIfEmpty` method. # Test: Search for the method implementation. Expect: Correct implementation without issues. ast-grep --lang java --pattern $'public static SystemMetadata generateSystemMetadataIfEmpty(SystemMetadata metadata) { $$$ }'Length of output: 128
Script:
#!/bin/bash # Description: Search for the `generateSystemMetadataIfEmpty` method by its name. # Test: Locate the method definition and gather context around it. rg 'generateSystemMetadataIfEmpty' -A 10Length of output: 16901
metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/UpgradeDefaultBrowsePathsStep.java (2)
4-4
: Import statement: Looks good.The import statement for
createDefaultSystemMetadata
is added correctly.
141-141
: Refactor: UsingcreateDefaultSystemMetadata
improves code clarity.The change from direct instantiation to using
createDefaultSystemMetadata
enhances code clarity and maintainability.However, ensure the
createDefaultSystemMetadata
method is correctly implemented and does not introduce any issues.metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/BackfillBrowsePathsV2Step.java (2)
4-4
: Import statement: Looks good.The import statement for
createDefaultSystemMetadata
is added correctly.
155-155
: Refactor: UsingcreateDefaultSystemMetadata
improves code readability.The change from direct instantiation to using
createDefaultSystemMetadata
enhances code readability and maintainability.However, ensure the
createDefaultSystemMetadata
method is correctly implemented and does not introduce any issues.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/AddBusinessAttributeResolverTest.java (1)
32-32
: Enhance type safety with wildcard type parameter.The change to use
EntityService<?>
enhances type safety by allowingmockService
to accept any type of entity.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/MoveDomainResolverTest.java (5)
43-43
: Enhance type safety with wildcard type parameter.The change to use
EntityService<?>
in thesetupTests
method enhances type safety by allowingmockService
to accept any type of entity.
80-80
: Enhance type safety with wildcard type parameter.The change to use
EntityService<?>
in thetestGetSuccess
method enhances type safety by allowingmockService
to accept any type of entity.
103-103
: Enhance type safety with wildcard type parameter.The change to use
EntityService<?>
in thetestGetFailureEntityDoesNotExist
method enhances type safety by allowingmockService
to accept any type of entity.
130-130
: Enhance type safety with wildcard type parameter.The change to use
EntityService<?>
in thetestGetFailureParentDoesNotExist
method enhances type safety by allowingmockService
to accept any type of entity.
146-146
: Enhance type safety with wildcard type parameter.The change to use
EntityService<?>
in thetestGetFailureParentIsNotDomain
method enhances type safety by allowingmockService
to accept any type of entity.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/ingest/source/UpsertIngestionSourceResolverTest.java (1)
70-74
: Refactor to enhance readability and maintainability.The change to use
verifyIngestProposal
enhances readability and maintainability by reducing boilerplate code while preserving the original functionality.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/RemoveRelatedTermsResolverTest.java (4)
39-39
: Approved: Enhanced type safety formockService
.The change to
EntityService<?>
improves type safety without affecting the test logic.
74-74
: Approved: Enhanced type safety formockService
.The change to
EntityService<?>
improves type safety without affecting the test logic.
105-105
: Approved: Enhanced type safety formockService
.The change to
EntityService<?>
improves type safety without affecting the test logic.
138-138
: Approved: Enhanced type safety formockService
.The change to
EntityService<?>
improves type safety without affecting the test logic.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/embed/UpdateEmbedResolverTest.java (5)
42-42
: Approved: Enhanced type safety formockService
.The change to
EntityService<?>
improves type safety without affecting the test logic.
81-81
: Approved: Enhanced type safety formockService
.The change to
EntityService<?>
improves type safety without affecting the test logic.
134-134
: Approved: Enhanced type safety formockService
.The change to
EntityService<?>
improves type safety without affecting the test logic.
156-156
: Approved: Enhanced type safety formockService
.The change to
EntityService<?>
improves type safety without affecting the test logic.
173-173
: Approved: Enhanced type safety formockService
.The change to
EntityService<?>
improves type safety without affecting the test logic.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/CreateGlossaryTermResolverTest.java (5)
85-85
: Approved: Enhanced type safety formockService
.The change to
EntityService<?>
improves type safety without affecting the test logic.
99-99
: Approved: Enhanced type safety formockService
.The change to
EntityService<?>
improves type safety without affecting the test logic.
113-113
: Approved: Enhanced type safety formockService
.The change to
EntityService<?>
improves type safety without affecting the test logic.
158-158
: Approved: Enhanced type safety formockService
.The change to
EntityService<?>
improves type safety without affecting the test logic.
93-93
: Approved: Use ofverifyIngestProposal
method for verification.The change encapsulates the verification logic, making the tests cleaner and easier to maintain.
Also applies to: 107-107, 121-121
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/UpdateNameResolverTest.java (5)
45-45
: LGTM! The change enhances type safety.The transition from
EntityService
toEntityService<?>
improves type safety and flexibility.
68-68
: LGTM! The change enhances type safety.The transition from
EntityService
toEntityService<?>
improves type safety and flexibility.
86-86
: LGTM! The change enhances type safety.The transition from
EntityService
toEntityService<?>
improves type safety and flexibility.
120-120
: LGTM! The change enhances type safety.The transition from
EntityService
toEntityService<?>
improves type safety and flexibility.
166-166
: LGTM! The change enhances type safety.The transition from
EntityService
toEntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/assertion/DeleteAssertionResolverTest.java (5)
34-34
: LGTM! The change enhances type safety.The transition from
EntityService
toEntityService<?>
improves type safety and flexibility.
80-80
: LGTM! The change enhances type safety.The transition from
EntityService
toEntityService<?>
improves type safety and flexibility.
120-120
: LGTM! The change enhances type safety.The transition from
EntityService
toEntityService<?>
improves type safety and flexibility.
152-152
: LGTM! The change enhances type safety.The transition from
EntityService
toEntityService<?>
improves type safety and flexibility.
189-189
: LGTM! The change enhances type safety.The transition from
EntityService
toEntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/SetTagColorResolverTest.java (5)
41-41
: LGTM! The change enhances type safety and the refactoring improves readability.The transition from
EntityService
toEntityService<?>
improves type safety and flexibility. The refactoring of the verification step for themockClient
enhances readability and maintainability.Also applies to: 72-72
82-82
: LGTM! The change enhances type safety.The transition from
EntityService
toEntityService<?>
improves type safety and flexibility.
137-137
: LGTM! The change enhances type safety.The transition from
EntityService
toEntityService<?>
improves type safety and flexibility.
157-157
: LGTM! The change enhances type safety.The transition from
EntityService
toEntityService<?>
improves type safety and flexibility.
Line range hint
189-189
: LGTM! The change enhances type safety.The transition from
EntityService
toEntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/glossary/UpdateParentNodeResolverTest.java (6)
46-46
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the function's logic.
70-70
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the test's logic.
92-92
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the test's logic.
132-132
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the test's logic.
152-152
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the test's logic.
172-172
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the test's logic.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/delete/BatchUpdateSoftDeletedResolverTest.java (5)
36-36
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the test's logic.
87-87
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the test's logic.
136-136
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the test's logic.
176-176
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the test's logic.
196-196
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the test's logic.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/UnsetDomainResolverTest.java (5)
61-61
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the test's logic.
115-115
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the test's logic.
159-159
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the test's logic.
179-179
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the test's logic.
Line range hint
196-196
: Improved Type SafetyThe change to
EntityService<?>
enhances type safety without affecting the test's logic.datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/policyfields/BackfillPolicyFieldsStep.java (2)
4-4
: LGTM! Static import added forcreateDefaultSystemMetadata
.The static import improves readability by allowing direct usage of the utility function.
237-237
: LGTM! Refactored to usecreateDefaultSystemMetadata
.The change enhances readability and maintainability by centralizing the metadata creation logic.
Ensure that the
createDefaultSystemMetadata
utility function is correctly implemented and used consistently across the codebase.Verification successful
The
createDefaultSystemMetadata
utility function is correctly implemented and used consistently across the codebase.
- Implementation can be found in
metadata-utils/src/main/java/com/linkedin/metadata/utils/SystemMetadataUtils.java
.- Usage is consistent across various files, including
UpgradeDefaultBrowsePathsStep.java
,BackfillBrowsePathsV2Step.java
,SchemaRegistryControllerTest.java
,AspectGenerationUtils.java
,EntityServiceImpl.java
,EntityApiUtils.java
,MutationUtils.java
, andBackfillPolicyFieldsStep.java
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct implementation and usage of `createDefaultSystemMetadata`. # Test: Search for the utility function implementation. Expect: Correct implementation and usage. rg --type java -A 5 $'createDefaultSystemMetadata'Length of output: 22490
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/TestUtils.java (13)
15-15
: LGTM! Import added forEntityClient
.The import is necessary for the new overload of
verifyIngestProposal
.
20-20
: LGTM! Import added forRemoteInvocationException
.The import is necessary for the new overload of
verifyIngestProposal
.
24-25
: LGTM! Imports added forArgumentCaptor
andCollectors
.These imports are necessary for the new assertions in
verifyIngestProposal
.
128-128
: LGTM! Method signature updated to useEntityService<?>
.The change improves flexibility by allowing different types of
EntityService
to be used.
133-133
: LGTM! Method signature updated to useEntityService<?>
.The change improves flexibility by allowing different types of
EntityService
to be used.
137-145
: LGTM! AddedArgumentCaptor
and assertion forlastObserved
timestamp.The new assertion ensures that
lastObserved
is greater than zero, improving test robustness.
147-154
: LGTM! Added assertion to verify proposals after resettinglastObserved
timestamps.The new assertion ensures that the proposals match expected values, improving test robustness.
158-160
: LGTM! Method signature updated to useEntityService<?>
.The change improves flexibility by allowing different types of
EntityService
to be used.
161-173
: LGTM! AddedArgumentCaptor
and assertions forlastObserved
timestamp.The new assertions ensure that
lastObserved
is greater than zero and that the proposals match expected values after resetting the timestamp.
176-176
: LGTM! Method signature updated to useEntityService<?>
.The change improves flexibility by allowing different types of
EntityService
to be used.
182-182
: LGTM! Method signature updated to useEntityService<?>
.The change improves flexibility by allowing different types of
EntityService
to be used.
188-188
: LGTM! Method signature updated to useEntityService<?>
.The change improves flexibility by allowing different types of
EntityService
to be used.
193-210
: LGTM! New overload ofverifyIngestProposal
added.The new method adds functionality for verifying ingest proposals related to
EntityClient
, including assertions forlastObserved
timestamp.datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/browsepaths/BackfillBrowsePathsV2Step.java (2)
4-4
: LGTM! Static import added forcreateDefaultSystemMetadata
.The static import improves readability by allowing direct usage of the utility function.
211-211
: LGTM! Refactored to usecreateDefaultSystemMetadata
.The change enhances readability and maintainability by centralizing the metadata creation logic.
Ensure that the
createDefaultSystemMetadata
utility function is correctly implemented and used consistently across the codebase.Verification successful
Verification successful: The
createDefaultSystemMetadata
utility function is correctly implemented inmetadata-utils/src/main/java/com/linkedin/metadata/utils/SystemMetadataUtils.java
and is used consistently across the codebase.
- Implementation:
metadata-utils/src/main/java/com/linkedin/metadata/utils/SystemMetadataUtils.java
- Usage:
metadata-service/schema-registry-servlet/src/test/java/io/datahubproject/openapi/test/SchemaRegistryControllerTest.java
metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/BackfillBrowsePathsV2Step.java
metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/UpgradeDefaultBrowsePathsStep.java
metadata-io/src/test/java/com/linkedin/metadata/AspectGenerationUtils.java
metadata-io/src/test/java/com/linkedin/metadata/entity/DeleteEntityServiceTest.java
metadata-io/metadata-io-api/src/main/java/com/linkedin/metadata/entity/EntityApiUtils.java
metadata-io/src/main/java/com/linkedin/metadata/entity/EntityServiceImpl.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/datacontract/UpsertDataContractResolverTest.java
datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/mutate/MutationUtils.java
datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/browsepaths/BackfillBrowsePathsV2Step.java
datahub-upgrade/src/main/java/com/linkedin/datahub/upgrade/system/policyfields/BackfillPolicyFieldsStep.java
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct implementation and usage of `createDefaultSystemMetadata`. # Test: Search for the utility function implementation. Expect: Correct implementation and usage. rg --type java -A 5 $'createDefaultSystemMetadata'Length of output: 22490
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/AddTermsResolverTest.java (6)
35-35
: Type safety improvement.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
.
85-85
: Type safety improvement.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
.
127-127
: Type safety improvement.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
.
159-159
: Type safety improvement.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
.
191-191
: Type safety improvement.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
.
210-210
: Type safety improvement.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/deprecation/UpdateDeprecationResolverTest.java (5)
62-62
: Type safety and readability improvements.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
. Refactoring the verification calls to useverifyIngestProposal
improves code readability and maintainability.Also applies to: 86-86
123-123
: Type safety and readability improvements.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
. Refactoring the verification calls to useverifyIngestProposal
improves code readability and maintainability.Also applies to: 147-147
172-172
: Type safety improvement.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
.
193-193
: Type safety improvement.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
.
209-209
: Type safety improvement.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/BatchRemoveOwnersResolverTest.java (5)
38-38
: Type safety improvement.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
.
86-86
: Type safety improvement.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
.
153-153
: Type safety improvement.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
.
198-198
: Type safety improvement.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
.
221-221
: Type safety improvement.Changing the type of
mockService
toEntityService<?>
improves type safety by allowing any subtype ofEntityService
.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/BatchRemoveTermsResolverTest.java (5)
38-38
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
85-85
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
151-151
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
195-195
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
217-217
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/deprecation/BatchUpdateDeprecationResolverTest.java (5)
37-37
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
102-102
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
161-161
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
205-205
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
229-229
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/tag/AddTagsResolverTest.java (6)
38-38
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
97-97
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
149-149
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
180-180
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
211-211
: LGTM!The change to
EntityService<?>
improves type safety and flexibility.
Line range hint
229-229
:
LGTM!The change to
EntityService<?>
improves type safety and flexibility.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/businessattribute/CreateBusinessAttributeResolverTest.java (1)
59-59
: LGTM! The change enhances type flexibility.The update to
EntityService<?>
allows for greater flexibility in the type of entities thatmockService
can handle.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/CreateDomainResolverTest.java (5)
56-56
: LGTM! The change enhances type flexibility.The update to
EntityService<?>
allows for greater flexibility in the type of entities thatmockService
can handle.
106-106
: LGTM! The change enhances type flexibility.The update to
EntityService<?>
allows for greater flexibility in the type of entities thatmockService
can handle.
149-149
: LGTM! The change enhances type flexibility.The update to
EntityService<?>
allows for greater flexibility in the type of entities thatmockService
can handle.
167-167
: LGTM! The change enhances type flexibility.The update to
EntityService<?>
allows for greater flexibility in the type of entities thatmockService
can handle.
221-221
: LGTM! The change enhances type flexibility.The update to
EntityService<?>
allows for greater flexibility in the type of entities thatmockService
can handle.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/term/BatchAddTermsResolverTest.java (6)
38-38
: LGTM! The change enhances type flexibility.The update to
EntityService<?>
allows for greater flexibility in the type of entities thatmockService
can handle.
102-102
: LGTM! The change enhances type flexibility.The update to
EntityService<?>
allows for greater flexibility in the type of entities thatmockService
can handle.
158-158
: LGTM! The change enhances type flexibility.The update to
EntityService<?>
allows for greater flexibility in the type of entities thatmockService
can handle.
192-192
: LGTM! The change enhances type flexibility.The update to
EntityService<?>
allows for greater flexibility in the type of entities thatmockService
can handle.
237-237
: LGTM! The change enhances type flexibility.The update to
EntityService<?>
allows for greater flexibility in the type of entities thatmockService
can handle.
259-259
: LGTM! The change enhances type flexibility.The update to
EntityService<?>
allows for greater flexibility in the type of entities thatmockService
can handle.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/SetDomainResolverTest.java (7)
85-85
: LGTM! Custom verification method is used.The use of
verifyIngestProposal
simplifies the verification logic.
124-124
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
147-147
: LGTM! Custom verification method is used.The use of
verifyIngestProposal
simplifies the verification logic.
176-176
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
215-215
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
238-238
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
62-62
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
Verification successful
LGTM! Verify the usage of
EntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility. The search results confirm that the usage ofEntityService<?>
is consistent across the codebase.
metadata-service/services/src/main/java/com/linkedin/metadata/service/RollbackService.java
metadata-service/services/src/main/java/com/linkedin/metadata/service/BusinessAttributeService.java
metadata-service/restli-servlet-impl/src/main/java/com/linkedin/metadata/resources/entity/EntityResource.java
metadata-service/openapi-entity-servlet/src/test/java/io/datahubproject/openapi/config/OpenAPIEntityTestConfiguration.java
metadata-service/factories/src/main/java/com/linkedin/metadata/boot/steps/IngestDataTypesStep.java
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/SetDomainResolverTest.java
These files and others have been updated accordingly to use
EntityService<?>
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `EntityService<?>` in the codebase. # Test: Search for the usage of `EntityService<?>`. Expect: Only occurrences of the new type. rg --type java 'EntityService<\?>'Length of output: 68923
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/domain/BatchSetDomainResolverTest.java (7)
42-42
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
108-108
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
179-179
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
236-236
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
271-271
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
315-315
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
337-337
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/BatchAddOwnersResolverTest.java (6)
41-41
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
129-129
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
220-220
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
270-270
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
329-329
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
366-366
: LGTM! Verify the usage ofEntityService<?>
in the codebase.The change to
EntityService<?>
improves type safety and flexibility.Ensure that other parts of the codebase are updated accordingly.
datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/owner/AddOwnersResolverTest.java (8)
41-41
: Update type declaration for mockService.The type of
mockService
has been updated toEntityService<?>
to enhance type safety and flexibility. This change is appropriate and does not introduce any issues.
104-104
: Update type declaration for mockService.The type of
mockService
has been updated toEntityService<?>
to enhance type safety and flexibility. This change is appropriate and does not introduce any issues.
170-170
: Update type declaration for mockService.The type of
mockService
has been updated toEntityService<?>
to enhance type safety and flexibility. This change is appropriate and does not introduce any issues.
233-233
: Update type declaration for mockService.The type of
mockService
has been updated toEntityService<?>
to enhance type safety and flexibility. This change is appropriate and does not introduce any issues.
331-331
: Update type declaration for mockService.The type of
mockService
has been updated toEntityService<?>
to enhance type safety and flexibility. This change is appropriate and does not introduce any issues.
369-369
: Update type declaration for mockService.The type of
mockService
has been updated toEntityService<?>
to enhance type safety and flexibility. This change is appropriate and does not introduce any issues.
407-407
: Update type declaration for mockService.The type of
mockService
has been updated toEntityService<?>
to enhance type safety and flexibility. This change is appropriate and does not introduce any issues.
432-432
: Update type declaration for mockService.The type of
mockService
has been updated toEntityService<?>
to enhance type safety and flexibility. This change is appropriate and does not introduce any issues.datahub-graphql-core/src/test/java/com/linkedin/datahub/graphql/resolvers/datacontract/UpsertDataContractResolverTest.java (16)
5-5
: Add import for createDefaultSystemMetadata.The import for
createDefaultSystemMetadata
has been added to standardize the creation of system metadata across tests. This change improves consistency and reduces potential errors.
51-55
: Add import and declaration for ArgumentCaptor.The import and declaration for
ArgumentCaptor
have been added to capture a list ofMetadataChangeProposal
instances during verification of method calls. This change enables more precise testing of the proposals being sent to themockClient
.
57-57
: Add import for MockitoAnnotations.The import for
MockitoAnnotations
has been added to initialize Mockito annotations in the@BeforeTest
method. This change ensures that the captor is properly set up before each test runs.
59-59
: Add import for BeforeTest.The import for
BeforeTest
has been added to define a method that runs before each test to initialize Mockito annotations.
92-93
: Add ArgumentCaptor for MetadataChangeProposal.The
@Captor
annotation forproposalCaptor
has been added to capture a list ofMetadataChangeProposal
instances during verification of method calls. This change enables more precise testing of the proposals being sent to themockClient
.
94-98
: Add init method to initialize Mockito annotations.The
@BeforeTest
methodinit
has been added to initialize Mockito annotations. This change ensures that the captor is properly set up before each test runs.
142-143
: Use createDefaultSystemMetadata for propertiesProposal.The
createDefaultSystemMetadata
utility method is used to standardize the creation of system metadata forpropertiesProposal
. This change improves consistency and reduces potential errors.
152-153
: Use createDefaultSystemMetadata for statusProposal.The
createDefaultSystemMetadata
utility method is used to standardize the creation of system metadata forstatusProposal
. This change improves consistency and reduces potential errors.
160-161
: Verify batchIngestProposals with proposalCaptor.The
batchIngestProposals
method is verified usingproposalCaptor
to capture the list ofMetadataChangeProposal
instances. This change enables more precise testing of the proposals being sent to themockClient
.
162-166
: Check lastObserved timestamp in captured proposals.The
lastObserved
timestamp of the system metadata is checked to ensure it is greater than zero in the captured proposals. This change confirms the accuracy of thelastObserved
timestamp in the proposals.
167-174
: Check equality of proposals without lastObserved timestamp.The equality of the proposals is checked by resetting the
lastObserved
timestamp to zero. This change enhances the robustness of the test cases by ensuring that thelastObserved
timestamp can be reset without affecting the equality of the proposals.
217-218
: Use createDefaultSystemMetadata for propertiesProposal.The
createDefaultSystemMetadata
utility method is used to standardize the creation of system metadata forpropertiesProposal
. This change improves consistency and reduces potential errors.
227-228
: Use createDefaultSystemMetadata for statusProposal.The
createDefaultSystemMetadata
utility method is used to standardize the creation of system metadata forstatusProposal
. This change improves consistency and reduces potential errors.
235-236
: Verify batchIngestProposals with proposalCaptor.The
batchIngestProposals
method is verified usingproposalCaptor
to capture the list ofMetadataChangeProposal
instances. This change enables more precise testing of the proposals being sent to themockClient
.
237-241
: Check lastObserved timestamp in captured proposals.The
lastObserved
timestamp of the system metadata is checked to ensure it is greater than zero in the captured proposals. This change confirms the accuracy of thelastObserved
timestamp in the proposals.
242-249
: Check equality of proposals without lastObserved timestamp.The equality of the proposals is checked by resetting the
lastObserved
timestamp to zero. This change enhances the robustness of the test cases by ensuring that thelastObserved
timestamp can be reset without affecting the equality of the proposals.metadata-service/restli-servlet-impl/src/main/java/com/linkedin/metadata/resources/entity/EntityResource.java (4)
16-16
: Add import for generateSystemMetadataIfEmpty.The import for
generateSystemMetadataIfEmpty
has been added to replace thepopulateDefaultFieldsIfEmpty
method. This change centralizes the logic for generating defaultSystemMetadata
instances.
24-24
: Remove import for populateDefaultFieldsIfEmpty.The import for
populateDefaultFieldsIfEmpty
has been removed as the method has been replaced bygenerateSystemMetadataIfEmpty
fromSystemMetadataUtils
.
289-289
: Use generateSystemMetadataIfEmpty in ingest method.The
generateSystemMetadataIfEmpty
method is used to initializeSystemMetadata
if it is null. This change centralizes the logic for generating defaultSystemMetadata
instances and improves maintainability.
350-350
: Use generateSystemMetadataIfEmpty in batchIngest method.The
generateSystemMetadataIfEmpty
method is used to initializeSystemMetadata
if it is null. This change centralizes the logic for generating defaultSystemMetadata
instances and improves maintainability.metadata-io/src/main/java/com/linkedin/metadata/entity/EntityServiceImpl.java (1)
1838-1838
: LGTM! The change simplifies the initialization ofSystemMetadata
.The use of
createDefaultSystemMetadata
centralizes the logic and reduces the risk of errors. Ensure that the new utility method is correctly implemented and used throughout the codebase.Verification successful
The
createDefaultSystemMetadata
method is correctly implemented and used consistently throughout the codebase.
- The method is defined in
SystemMetadataUtils
and its implementation appears to be correct.- Its usage is found in various classes and test files, ensuring that the logic for creating default system metadata is centralized and consistent.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation and usage of `createDefaultSystemMetadata`. # Test: Search for the function definition and its usage. Expect: Correct implementation and consistent usage. rg --type java --pattern 'createDefaultSystemMetadata'Length of output: 466
Script:
#!/bin/bash # Description: Verify the implementation and usage of `createDefaultSystemMetadata`. # Test: Search for the function definition and its usage. Expect: Correct implementation and consistent usage. rg 'createDefaultSystemMetadata' --type java -A 5Length of output: 22490
SystemMetadata result = systemMetadata == null ? new SystemMetadata() : systemMetadata; | ||
if (result.getRunId() == null) { | ||
result.setRunId(DEFAULT_RUN_ID); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Thank you so much @david-leifker !
* feat(forms) Handle deleting forms references when hard deleting forms (datahub-project#10820) * refactor(ui): Misc improvements to the setup ingestion flow (ingest uplift 1/2) (datahub-project#10764) Co-authored-by: John Joyce <[email protected]> Co-authored-by: John Joyce <[email protected]> * fix(ingestion/airflow-plugin): pipeline tasks discoverable in search (datahub-project#10819) * feat(ingest/transformer): tags to terms transformer (datahub-project#10758) Co-authored-by: Aseem Bansal <[email protected]> * fix(ingestion/unity-catalog): fixed issue with profiling with GE turned on (datahub-project#10752) Co-authored-by: Aseem Bansal <[email protected]> * feat(forms) Add java SDK for form entity PATCH + CRUD examples (datahub-project#10822) * feat(SDK) Add java SDK for structuredProperty entity PATCH + CRUD examples (datahub-project#10823) * feat(SDK) Add StructuredPropertyPatchBuilder in python sdk and provide sample CRUD files (datahub-project#10824) * feat(forms) Add CRUD endpoints to GraphQL for Form entities (datahub-project#10825) * add flag for includeSoftDeleted in scroll entities API (datahub-project#10831) * feat(deprecation) Return actor entity with deprecation aspect (datahub-project#10832) * feat(structuredProperties) Add CRUD graphql APIs for structured property entities (datahub-project#10826) * add scroll parameters to openapi v3 spec (datahub-project#10833) * fix(ingest): correct profile_day_of_week implementation (datahub-project#10818) * feat(ingest/glue): allow ingestion of empty databases from Glue (datahub-project#10666) Co-authored-by: Harshal Sheth <[email protected]> * feat(cli): add more details to get cli (datahub-project#10815) * fix(ingestion/glue): ensure date formatting works on all platforms for aws glue (datahub-project#10836) * fix(ingestion): fix datajob patcher (datahub-project#10827) * fix(smoke-test): add suffix in temp file creation (datahub-project#10841) * feat(ingest/glue): add helper method to permit user or group ownership (datahub-project#10784) * feat(): Show data platform instances in policy modal if they are set on the policy (datahub-project#10645) Co-authored-by: Hendrik Richert <[email protected]> * docs(patch): add patch documentation for how implementation works (datahub-project#10010) Co-authored-by: John Joyce <[email protected]> * fix(jar): add missing custom-plugin-jar task (datahub-project#10847) * fix(): also check exceptions/stack trace when filtering log messages (datahub-project#10391) Co-authored-by: John Joyce <[email protected]> * docs(): Update posts.md (datahub-project#9893) Co-authored-by: Hyejin Yoon <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * chore(ingest): update acryl-datahub-classify version (datahub-project#10844) * refactor(ingest): Refactor structured logging to support infos, warnings, and failures structured reporting to UI (datahub-project#10828) Co-authored-by: John Joyce <[email protected]> Co-authored-by: Harshal Sheth <[email protected]> * fix(restli): log aspect-not-found as a warning rather than as an error (datahub-project#10834) * fix(ingest/nifi): remove duplicate upstream jobs (datahub-project#10849) * fix(smoke-test): test access to create/revoke personal access tokens (datahub-project#10848) * fix(smoke-test): missing test for move domain (datahub-project#10837) * ci: update usernames to not considered for community (datahub-project#10851) * env: change defaults for data contract visibility (datahub-project#10854) * fix(ingest/tableau): quote special characters in external URL (datahub-project#10842) * fix(smoke-test): fix flakiness of auto complete test * ci(ingest): pin dask dependency for feast (datahub-project#10865) * fix(ingestion/lookml): liquid template resolution and view-to-view cll (datahub-project#10542) * feat(ingest/audit): add client id and version in system metadata props (datahub-project#10829) * chore(ingest): Mypy 1.10.1 pin (datahub-project#10867) * docs: use acryl-datahub-actions as expected python package to install (datahub-project#10852) * docs: add new js snippet (datahub-project#10846) * refactor(ingestion): remove company domain for security reason (datahub-project#10839) * fix(ingestion/spark): Platform instance and column level lineage fix (datahub-project#10843) Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat(ingestion/tableau): optionally ingest multiple sites and create site containers (datahub-project#10498) Co-authored-by: Yanik Häni <[email protected]> * fix(ingestion/looker): Add sqlglot dependency and remove unused sqlparser (datahub-project#10874) * fix(manage-tokens): fix manage access token policy (datahub-project#10853) * Batch get entity endpoints (datahub-project#10880) * feat(system): support conditional write semantics (datahub-project#10868) * fix(build): upgrade vercel builds to Node 20.x (datahub-project#10890) * feat(ingest/lookml): shallow clone repos (datahub-project#10888) * fix(ingest/looker): add missing dependency (datahub-project#10876) * fix(ingest): only populate audit stamps where accurate (datahub-project#10604) * fix(ingest/dbt): always encode tag urns (datahub-project#10799) * fix(ingest/redshift): handle multiline alter table commands (datahub-project#10727) * fix(ingestion/looker): column name missing in explore (datahub-project#10892) * fix(lineage) Fix lineage source/dest filtering with explored per hop limit (datahub-project#10879) * feat(conditional-writes): misc updates and fixes (datahub-project#10901) * feat(ci): update outdated action (datahub-project#10899) * feat(rest-emitter): adding async flag to rest emitter (datahub-project#10902) Co-authored-by: Gabe Lyons <[email protected]> * feat(ingest): add snowflake-queries source (datahub-project#10835) * fix(ingest): improve `auto_materialize_referenced_tags_terms` error handling (datahub-project#10906) * docs: add new company to adoption list (datahub-project#10909) * refactor(redshift): Improve redshift error handling with new structured reporting system (datahub-project#10870) Co-authored-by: John Joyce <[email protected]> Co-authored-by: Harshal Sheth <[email protected]> * feat(ui) Finalize support for all entity types on forms (datahub-project#10915) * Index ExecutionRequestResults status field (datahub-project#10811) * feat(ingest): grafana connector (datahub-project#10891) Co-authored-by: Shirshanka Das <[email protected]> Co-authored-by: Harshal Sheth <[email protected]> * fix(gms) Add Form entity type to EntityTypeMapper (datahub-project#10916) * feat(dataset): add support for external url in Dataset (datahub-project#10877) * docs(saas-overview) added missing features to observe section (datahub-project#10913) Co-authored-by: John Joyce <[email protected]> * fix(ingest/spark): Fixing Micrometer warning (datahub-project#10882) * fix(structured properties): allow application of structured properties without schema file (datahub-project#10918) * fix(data-contracts-web) handle other schedule types (datahub-project#10919) * fix(ingestion/tableau): human-readable message for PERMISSIONS_MODE_SWITCHED error (datahub-project#10866) Co-authored-by: Harshal Sheth <[email protected]> * Add feature flag for view defintions (datahub-project#10914) Co-authored-by: Ethan Cartwright <[email protected]> * feat(ingest/BigQuery): refactor+parallelize dataset metadata extraction (datahub-project#10884) * fix(airflow): add error handling around render_template() (datahub-project#10907) * feat(ingestion/sqlglot): add optional `default_dialect` parameter to sqlglot lineage (datahub-project#10830) * feat(mcp-mutator): new mcp mutator plugin (datahub-project#10904) * fix(ingest/bigquery): changes helper function to decode unicode scape sequences (datahub-project#10845) * feat(ingest/postgres): fetch table sizes for profile (datahub-project#10864) * feat(ingest/abs): Adding azure blob storage ingestion source (datahub-project#10813) * fix(ingest/redshift): reduce severity of SQL parsing issues (datahub-project#10924) * fix(build): fix lint fix web react (datahub-project#10896) * fix(ingest/bigquery): handle quota exceeded for project.list requests (datahub-project#10912) * feat(ingest): report extractor failures more loudly (datahub-project#10908) * feat(ingest/snowflake): integrate snowflake-queries into main source (datahub-project#10905) * fix(ingest): fix docs build (datahub-project#10926) * fix(ingest/snowflake): fix test connection (datahub-project#10927) * fix(ingest/lookml): add view load failures to cache (datahub-project#10923) * docs(slack) overhauled setup instructions and screenshots (datahub-project#10922) Co-authored-by: John Joyce <[email protected]> * fix(airflow): Add comma parsing of owners to DataJobs (datahub-project#10903) * fix(entityservice): fix merging sideeffects (datahub-project#10937) * feat(ingest): Support System Ingestion Sources, Show and hide system ingestion sources with Command-S (datahub-project#10938) Co-authored-by: John Joyce <[email protected]> * chore() Set a default lineage filtering end time on backend when a start time is present (datahub-project#10925) Co-authored-by: John Joyce <[email protected]> Co-authored-by: John Joyce <[email protected]> * Added relationships APIs to V3. Added these generic APIs to V3 swagger doc. (datahub-project#10939) * docs: add learning center to docs (datahub-project#10921) * doc: Update hubspot form id (datahub-project#10943) * chore(airflow): add python 3.11 w/ Airflow 2.9 to CI (datahub-project#10941) * fix(ingest/Glue): column upstream lineage between S3 and Glue (datahub-project#10895) * fix(ingest/abs): split abs utils into multiple files (datahub-project#10945) * doc(ingest/looker): fix doc for sql parsing documentation (datahub-project#10883) Co-authored-by: Harshal Sheth <[email protected]> * fix(ingest/bigquery): Adding missing BigQuery types (datahub-project#10950) * fix(ingest/setup): feast and abs source setup (datahub-project#10951) * fix(connections) Harden adding /gms to connections in backend (datahub-project#10942) * feat(siblings) Add flag to prevent combining siblings in the UI (datahub-project#10952) * fix(docs): make graphql doc gen more automated (datahub-project#10953) * feat(ingest/athena): Add option for Athena partitioned profiling (datahub-project#10723) * fix(spark-lineage): default timeout for future responses (datahub-project#10947) * feat(datajob/flow): add environment filter using info aspects (datahub-project#10814) * fix(ui/ingest): correct privilege used to show tab (datahub-project#10483) Co-authored-by: Kunal-kankriya <[email protected]> * feat(ingest/looker): include dashboard urns in browse v2 (datahub-project#10955) * add a structured type to batchGet in OpenAPI V3 spec (datahub-project#10956) * fix(ui): scroll on the domain sidebar to show all domains (datahub-project#10966) * fix(ingest/sagemaker): resolve incorrect variable assignment for SageMaker API call (datahub-project#10965) * fix(airflow/build): Pinning mypy (datahub-project#10972) * Fixed a bug where the OpenAPI V3 spec was incorrect. The bug was introduced in datahub-project#10939. (datahub-project#10974) * fix(ingest/test): Fix for mssql integration tests (datahub-project#10978) * fix(entity-service) exist check correctly extracts status (datahub-project#10973) * fix(structuredProps) casing bug in StructuredPropertiesValidator (datahub-project#10982) * bugfix: use anyOf instead of allOf when creating references in openapi v3 spec (datahub-project#10986) * fix(ui): Remove ant less imports (datahub-project#10988) * feat(ingest/graph): Add get_results_by_filter to DataHubGraph (datahub-project#10987) * feat(ingest/cli): init does not actually support environment variables (datahub-project#10989) * fix(ingest/graph): Update get_results_by_filter graphql query (datahub-project#10991) * feat(ingest/spark): Promote beta plugin (datahub-project#10881) Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat(ingest): support domains in meta -> "datahub" section (datahub-project#10967) * feat(ingest): add `check server-config` command (datahub-project#10990) * feat(cli): Make consistent use of DataHubGraphClientConfig (datahub-project#10466) Deprecates get_url_and_token() in favor of a more complete option: load_graph_config() that returns a full DatahubClientConfig. This change was then propagated across previous usages of get_url_and_token so that connections to DataHub server from the client respect the full breadth of configuration specified by DatahubClientConfig. I.e: You can now specify disable_ssl_verification: true in your ~/.datahubenv file so that all cli functions to the server work when ssl certification is disabled. Fixes datahub-project#9705 * fix(ingest/s3): Fixing container creation when there is no folder in path (datahub-project#10993) * fix(ingest/looker): support platform instance for dashboards & charts (datahub-project#10771) * feat(ingest/bigquery): improve handling of information schema in sql parser (datahub-project#10985) * feat(ingest): improve `ingest deploy` command (datahub-project#10944) * fix(backend): allow excluding soft-deleted entities in relationship-queries; exclude soft-deleted members of groups (datahub-project#10920) - allow excluding soft-deleted entities in relationship-queries - exclude soft-deleted members of groups * fix(ingest/looker): downgrade missing chart type log level (datahub-project#10996) * doc(acryl-cloud): release docs for 0.3.4.x (datahub-project#10984) Co-authored-by: John Joyce <[email protected]> Co-authored-by: RyanHolstien <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Pedro Silva <[email protected]> * fix(protobuf/build): Fix protobuf check jar script (datahub-project#11006) * fix(ui/ingest): Support invalid cron jobs (datahub-project#10998) * fix(ingest): fix graph config loading (datahub-project#11002) Co-authored-by: Pedro Silva <[email protected]> * feat(docs): Document __DATAHUB_TO_FILE_ directive (datahub-project#10968) Co-authored-by: Harshal Sheth <[email protected]> * fix(graphql/upsertIngestionSource): Validate cron schedule; parse error in CLI (datahub-project#11011) * feat(ece): support custom ownership type urns in ECE generation (datahub-project#10999) * feat(assertion-v2): changed Validation tab to Quality and created new Governance tab (datahub-project#10935) * fix(ingestion/glue): Add support for missing config options for profiling in Glue (datahub-project#10858) * feat(propagation): Add models for schema field docs, tags, terms (datahub-project#2959) (datahub-project#11016) Co-authored-by: Chris Collins <[email protected]> * docs: standardize terminology to DataHub Cloud (datahub-project#11003) * fix(ingestion/transformer): replace the externalUrl container (datahub-project#11013) * docs(slack) troubleshoot docs (datahub-project#11014) * feat(propagation): Add graphql API (datahub-project#11030) Co-authored-by: Chris Collins <[email protected]> * feat(propagation): Add models for Action feature settings (datahub-project#11029) * docs(custom properties): Remove duplicate from sidebar (datahub-project#11033) * feat(models): Introducing Dataset Partitions Aspect (datahub-project#10997) Co-authored-by: John Joyce <[email protected]> Co-authored-by: John Joyce <[email protected]> * feat(propagation): Add Documentation Propagation Settings (datahub-project#11038) * fix(models): chart schema fields mapping, add dataHubAction entity, t… (datahub-project#11040) * fix(ci): smoke test lint failures (datahub-project#11044) * docs: fix learning center color scheme & typo (datahub-project#11043) * feat: add cloud main page (datahub-project#11017) Co-authored-by: Jay <[email protected]> * feat(restore-indices): add additional step to also clear system metadata service (datahub-project#10662) Co-authored-by: John Joyce <[email protected]> * docs: fix typo (datahub-project#11046) * fix(lint): apply spotless (datahub-project#11050) * docs(airflow): example query to get datajobs for a dataflow (datahub-project#11034) * feat(cli): Add run-id option to put sub-command (datahub-project#11023) Adds an option to assign run-id to a given put command execution. This is useful when transformers do not exist for a given ingestion payload, we can follow up with custom metadata and assign it to an ingestion pipeline. * fix(ingest): improve sql error reporting calls (datahub-project#11025) * fix(airflow): fix CI setup (datahub-project#11031) * feat(ingest/dbt): add experimental `prefer_sql_parser_lineage` flag (datahub-project#11039) * fix(ingestion/lookml): enable stack-trace in lookml logs (datahub-project#10971) * (chore): Linting fix (datahub-project#11015) * chore(ci): update deprecated github actions (datahub-project#10977) * Fix ALB configuration example (datahub-project#10981) * chore(ingestion-base): bump base image packages (datahub-project#11053) * feat(cli): Trim report of dataHubExecutionRequestResult to max GMS size (datahub-project#11051) * fix(ingestion/lookml): emit dummy sql condition for lookml custom condition tag (datahub-project#11008) Co-authored-by: Harshal Sheth <[email protected]> * fix(ingestion/powerbi): fix issue with broken report lineage (datahub-project#10910) * feat(ingest/tableau): add retry on timeout (datahub-project#10995) * change generate kafka connect properties from env (datahub-project#10545) Co-authored-by: david-leifker <[email protected]> * fix(ingest): fix oracle cronjob ingestion (datahub-project#11001) Co-authored-by: david-leifker <[email protected]> * chore(ci): revert update deprecated github actions (datahub-project#10977) (datahub-project#11062) * feat(ingest/dbt-cloud): update metadata_endpoint inference (datahub-project#11041) * build: Reduce size of datahub-frontend-react image by 50-ish% (datahub-project#10878) Co-authored-by: david-leifker <[email protected]> * fix(ci): Fix lint issue in datahub_ingestion_run_summary_provider.py (datahub-project#11063) * docs(ingest): update developing-a-transformer.md (datahub-project#11019) * feat(search-test): update search tests from datahub-project#10408 (datahub-project#11056) * feat(cli): add aspects parameter to DataHubGraph.get_entity_semityped (datahub-project#11009) Co-authored-by: Harshal Sheth <[email protected]> * docs(airflow): update min version for plugin v2 (datahub-project#11065) * doc(ingestion/tableau): doc update for derived permission (datahub-project#11054) Co-authored-by: Pedro Silva <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Harshal Sheth <[email protected]> * fix(py): remove dep on types-pkg_resources (datahub-project#11076) * feat(ingest/mode): add option to exclude restricted (datahub-project#11081) * fix(ingest): set lastObserved in sdk when unset (datahub-project#11071) * doc(ingest): Update capabilities (datahub-project#11072) * chore(vulnerability): Log Injection (datahub-project#11090) * chore(vulnerability): Information exposure through a stack trace (datahub-project#11091) * chore(vulnerability): Comparison of narrow type with wide type in loop condition (datahub-project#11089) * chore(vulnerability): Insertion of sensitive information into log files (datahub-project#11088) * chore(vulnerability): Risky Cryptographic Algorithm (datahub-project#11059) * chore(vulnerability): Overly permissive regex range (datahub-project#11061) Co-authored-by: Harshal Sheth <[email protected]> * fix: update customer data (datahub-project#11075) * fix(models): fixing the datasetPartition models (datahub-project#11085) Co-authored-by: John Joyce <[email protected]> * fix(ui): Adding view, forms GraphQL query, remove showing a fallback error message on unhandled GraphQL error (datahub-project#11084) Co-authored-by: John Joyce <[email protected]> * feat(docs-site): hiding learn more from cloud page (datahub-project#11097) * fix(docs): Add correct usage of orFilters in search API docs (datahub-project#11082) Co-authored-by: Jay <[email protected]> * fix(ingest/mode): Regexp in mode name matcher didn't allow underscore (datahub-project#11098) * docs: Refactor customer stories section (datahub-project#10869) Co-authored-by: Jeff Merrick <[email protected]> * fix(release): fix full/slim suffix on tag (datahub-project#11087) * feat(config): support alternate hashing algorithm for doc id (datahub-project#10423) Co-authored-by: david-leifker <[email protected]> Co-authored-by: John Joyce <[email protected]> * fix(emitter): fix typo in get method of java kafka emitter (datahub-project#11007) * fix(ingest): use correct native data type in all SQLAlchemy sources by compiling data type using dialect (datahub-project#10898) Co-authored-by: Harshal Sheth <[email protected]> * chore: Update contributors list in PR labeler (datahub-project#11105) * feat(ingest): tweak stale entity removal messaging (datahub-project#11064) * fix(ingestion): enforce lastObserved timestamps in SystemMetadata (datahub-project#11104) * fix(ingest/powerbi): fix broken lineage between chart and dataset (datahub-project#11080) * feat(ingest/lookml): CLL support for sql set in sql_table_name attribute of lookml view (datahub-project#11069) * docs: update graphql docs on forms & structured properties (datahub-project#11100) * test(search): search openAPI v3 test (datahub-project#11049) * fix(ingest/tableau): prevent empty site content urls (datahub-project#11057) Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat(entity-client): implement client batch interface (datahub-project#11106) * fix(snowflake): avoid reporting warnings/info for sys tables (datahub-project#11114) * fix(ingest): downgrade column type mapping warning to info (datahub-project#11115) * feat(api): add AuditStamp to the V3 API entity/aspect response (datahub-project#11118) * fix(ingest/redshift): replace r'\n' with '\n' to avoid token error redshift serverless… (datahub-project#11111) * fix(entiy-client): handle null entityUrn case for restli (datahub-project#11122) * fix(sql-parser): prevent bad urns from alter table lineage (datahub-project#11092) * fix(ingest/bigquery): use small batch size if use_tables_list_query_v2 is set (datahub-project#11121) * fix(graphql): add missing entities to EntityTypeMapper and EntityTypeUrnMapper (datahub-project#10366) * feat(ui): Changes to allow editable dataset name (datahub-project#10608) Co-authored-by: Jay Kadambi <[email protected]> * fix: remove saxo (datahub-project#11127) * feat(mcl-processor): Update mcl processor hooks (datahub-project#11134) * fix(openapi): fix openapi v2 endpoints & v3 documentation update * Revert "fix(openapi): fix openapi v2 endpoints & v3 documentation update" This reverts commit 573c1cb. * docs(policies): updates to policies documentation (datahub-project#11073) * fix(openapi): fix openapi v2 and v3 docs update (datahub-project#11139) * feat(auth): grant type and acr values custom oidc parameters support (datahub-project#11116) * fix(mutator): mutator hook fixes (datahub-project#11140) * feat(search): support sorting on multiple fields (datahub-project#10775) * feat(ingest): various logging improvements (datahub-project#11126) * fix(ingestion/lookml): fix for sql parsing error (datahub-project#11079) Co-authored-by: Harshal Sheth <[email protected]> * feat(docs-site) cloud page spacing and content polishes (datahub-project#11141) * feat(ui) Enable editing structured props on fields (datahub-project#11042) * feat(tests): add md5 and last computed to testResult model (datahub-project#11117) * test(openapi): openapi regression smoke tests (datahub-project#11143) * fix(airflow): fix tox tests + update docs (datahub-project#11125) * docs: add chime to adoption stories (datahub-project#11142) * fix(ingest/databricks): Updating code to work with Databricks sdk 0.30 (datahub-project#11158) * fix(kafka-setup): add missing script to image (datahub-project#11190) * fix(config): fix hash algo config (datahub-project#11191) * test(smoke-test): updates to smoke-tests (datahub-project#11152) * fix(elasticsearch): refactor idHashAlgo setting (datahub-project#11193) * chore(kafka): kafka version bump (datahub-project#11211) * readd UsageStatsWorkUnit * fix merge problems * change logo --------- Co-authored-by: Chris Collins <[email protected]> Co-authored-by: John Joyce <[email protected]> Co-authored-by: John Joyce <[email protected]> Co-authored-by: John Joyce <[email protected]> Co-authored-by: dushayntAW <[email protected]> Co-authored-by: sagar-salvi-apptware <[email protected]> Co-authored-by: Aseem Bansal <[email protected]> Co-authored-by: Kevin Chun <[email protected]> Co-authored-by: jordanjeremy <[email protected]> Co-authored-by: skrydal <[email protected]> Co-authored-by: Harshal Sheth <[email protected]> Co-authored-by: david-leifker <[email protected]> Co-authored-by: sid-acryl <[email protected]> Co-authored-by: Julien Jehannet <[email protected]> Co-authored-by: Hendrik Richert <[email protected]> Co-authored-by: Hendrik Richert <[email protected]> Co-authored-by: RyanHolstien <[email protected]> Co-authored-by: Felix Lüdin <[email protected]> Co-authored-by: Pirry <[email protected]> Co-authored-by: Hyejin Yoon <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: cburroughs <[email protected]> Co-authored-by: ksrinath <[email protected]> Co-authored-by: Mayuri Nehate <[email protected]> Co-authored-by: Kunal-kankriya <[email protected]> Co-authored-by: Shirshanka Das <[email protected]> Co-authored-by: ipolding-cais <[email protected]> Co-authored-by: Tamas Nemeth <[email protected]> Co-authored-by: Shubham Jagtap <[email protected]> Co-authored-by: haeniya <[email protected]> Co-authored-by: Yanik Häni <[email protected]> Co-authored-by: Gabe Lyons <[email protected]> Co-authored-by: Gabe Lyons <[email protected]> Co-authored-by: 808OVADOZE <[email protected]> Co-authored-by: noggi <[email protected]> Co-authored-by: Nicholas Pena <[email protected]> Co-authored-by: Jay <[email protected]> Co-authored-by: ethan-cartwright <[email protected]> Co-authored-by: Ethan Cartwright <[email protected]> Co-authored-by: Nadav Gross <[email protected]> Co-authored-by: Patrick Franco Braz <[email protected]> Co-authored-by: pie1nthesky <[email protected]> Co-authored-by: Joel Pinto Mata (KPN-DSH-DEX team) <[email protected]> Co-authored-by: Ellie O'Neil <[email protected]> Co-authored-by: Ajoy Majumdar <[email protected]> Co-authored-by: deepgarg-visa <[email protected]> Co-authored-by: Tristan Heisler <[email protected]> Co-authored-by: Andrew Sikowitz <[email protected]> Co-authored-by: Davi Arnaut <[email protected]> Co-authored-by: Pedro Silva <[email protected]> Co-authored-by: amit-apptware <[email protected]> Co-authored-by: Sam Black <[email protected]> Co-authored-by: Raj Tekal <[email protected]> Co-authored-by: Steffen Grohsschmiedt <[email protected]> Co-authored-by: jaegwon.seo <[email protected]> Co-authored-by: Renan F. Lima <[email protected]> Co-authored-by: Matt Exchange <[email protected]> Co-authored-by: Jonny Dixon <[email protected]> Co-authored-by: Pedro Silva <[email protected]> Co-authored-by: Pinaki Bhattacharjee <[email protected]> Co-authored-by: Jeff Merrick <[email protected]> Co-authored-by: skrydal <[email protected]> Co-authored-by: AndreasHegerNuritas <[email protected]> Co-authored-by: jayasimhankv <[email protected]> Co-authored-by: Jay Kadambi <[email protected]> Co-authored-by: David Leifker <[email protected]>
Close gaps in the generation of lastObserved timestamps in SystemMetadata.
Checklist