-
Notifications
You must be signed in to change notification settings - Fork 48
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
feat(): Introducing support for DataHub Events Source #142
Conversation
datahub-actions/src/datahub_actions/plugin/source/acryl/datahub_cloud_event_source.py
Outdated
Show resolved
Hide resolved
|
||
# Converts a DataHub Events Message to an EntityChangeEvent. | ||
def build_entity_change_event(payload: GenericPayloadClass) -> EntityChangeEvent: | ||
return EntityChangeEvent.from_json(payload.get("value")) |
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.
does this need any try/catch?
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.
no - this should raise an exception if it fails to parse. all i would do here is wrap and raise the exception. i can do that to add context but this indicates a fundamental issue
datahub-actions/src/datahub_actions/plugin/source/acryl/datahub_cloud_event_source.py
Outdated
Show resolved
Hide resolved
if pipeline_name.startswith("urn:li:dataHubAction:"): | ||
return pipeline_name | ||
else: | ||
return f"urn:li:dataHubAction:{pipeline_name}" |
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.
prefer urn_builder here
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 is a pretty rarely constructured urn from python, so we don't have a utility for it: https://github.com/datahub-project/datahub/blob/8ac35fa9ee6229ab7b8c0f4b2a0e669113574cd1/metadata-ingestion/src/datahub/emitter/mce_builder.py#L125 (unless you're referring to another set of utils)
datahub-actions/src/datahub_actions/plugin/source/acryl/datahub_cloud_event_source.py
Outdated
Show resolved
Hide resolved
datahub-actions/src/datahub_actions/plugin/source/acryl/datahub_cloud_event_source.py
Outdated
Show resolved
Hide resolved
datahub-actions/src/datahub_actions/plugin/source/acryl/datahub_cloud_event_source.py
Outdated
Show resolved
Hide resolved
### Privileges | ||
|
||
By default, users do not have access to the Events API of DataHub Cloud. In order to access the API, the user or service account | ||
associated with the access token used to configure this events source _must_ have the `Get Platform Events` platform privilege, which |
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.
why not grant this to all Admins? Admins already have the ability to read all metadata. This seems like it will be a constant source of frustration.
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.
Currently, the root user does have it but they are the only ones. We can grant to admins once we validate that everything is working. I agree it could be frustrating
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.
e.g. the Admin user
datahub-actions/src/datahub_actions/plugin/source/acryl/datahub_cloud_event_source.py
Outdated
Show resolved
Hide resolved
…b_cloud_event_source.py Co-authored-by: Gabe Lyons <[email protected]>
@@ -127,6 +127,7 @@ def get_long_description(): | |||
"jsonpickle", | |||
"build", | |||
"twine", | |||
"tenacity", |
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.
looks like this was added to dev deps, not framework_common
Fixing a regression from #142
As of v0.3.7 of DataHub Cloud, connecting DataHub actions is supported.
Summary
QA & Validation
Verified that the integration is working correctly with longtailcompanions.acryl.io: