Skip to content
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

Add ownership to Ingestion Source resolvers #11902

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Deepalijain13
Copy link

Add "ownership" aspect with the entity "DatahubExecutionRequest" so that we could filter jobs by the owner's corp id
and will be able to send notification to the owners of the DatahubExecutionRequest

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added product PR or Issue related to the DataHub UI/UX community-contribution PR or Issue raised by member(s) of DataHub Community labels Nov 20, 2024
@hsheth2 hsheth2 added the needs-review Label for PRs that need review from a maintainer. label Nov 20, 2024
"""
The urn of the ingestion source
"""
ingestionSource: String
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is an URN and not the actual resolved ingestionSource entity object, I'd recommend naming this ingestionSourceUrn for clarity and consistency

@@ -47,15 +47,16 @@ public CompletableFuture<IngestionSource> get(final DataFetchingEnvironment envi
context.getOperationContext(),
Constants.INGESTION_SOURCE_ENTITY_NAME,
new HashSet<>(ImmutableSet.of(urn)),
ImmutableSet.of(Constants.INGESTION_INFO_ASPECT_NAME));
ImmutableSet.of(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also fetch the ownership aspect?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be a mistake, fetching ORIGIN instead of OWNERSHIP

@@ -101,7 +101,8 @@ public CompletableFuture<ListIngestionSourcesResult> get(
new HashSet<>(entitiesUrnList),
ImmutableSet.of(
Constants.INGESTION_INFO_ASPECT_NAME,
Constants.INGESTION_SOURCE_KEY_ASPECT_NAME));
Constants.INGESTION_SOURCE_KEY_ASPECT_NAME,
Constants.OWNERSHIP_ASPECT_NAME));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct

@@ -101,7 +101,8 @@ public CompletableFuture<ListIngestionSourcesResult> get(
new HashSet<>(entitiesUrnList),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any unit test we need to update for this class?

@@ -47,15 +47,16 @@ public CompletableFuture<IngestionSource> get(final DataFetchingEnvironment envi
context.getOperationContext(),
Constants.INGESTION_SOURCE_ENTITY_NAME,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any unit test we need to update for this class?

@@ -8,6 +9,7 @@
import com.linkedin.datahub.graphql.generated.IngestionSource;
import com.linkedin.datahub.graphql.generated.StringMapEntry;
import com.linkedin.datahub.graphql.generated.StructuredReport;
import com.linkedin.datahub.graphql.types.common.mappers.OwnershipMapper;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any unit test we need to update for this class?

"""
Ownership metadata of the IngestionSource
"""
ownership: Ownership
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does ExectionRequest have Ownership? I'm not seeing this field populated by your GraphQL java changes (only ingestion source)

@@ -414,6 +434,11 @@ type IngestionSource {
"""
platform: DataPlatform

"""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense - the only changes in here do not

Copy link
Collaborator

@jjoyce0510 jjoyce0510 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither dataHubExecutionRequest NOR dataHubIngestionSource entity types have the ownership aspect: https://github.com/datahub-project/datahub/blob/master/metadata-models/src/main/resources/entity-registry.yml#L289

So these changes won't exactly work without it.

Also, there is currently no way to set the ownership of an ingestion source through the UI or otherwise, so this PR is generally NOT applicable for Open Source DataHub.

This one requires further discussion.

Cheers
John

@hsheth2 hsheth2 added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution PR or Issue raised by member(s) of DataHub Community pending-submitter-response Issue/request has been reviewed but requires a response from the submitter product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants