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

fix(notifications): fix wrong urls in ms teams notifications #102

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

Conversation

Lizard-tlt
Copy link

Links for datasets like a file are not correct in Teams notifications.
Part of delimiters "/" in a URL should be replaced on "%2F" symbols.

For example, before changes:
http://xx.xx.xx.xx:9002/dataset/urn:li:dataset:(urn:li:dataPlatform:dbfs,/dream_team/cross_banner,PROD)/Schema?schemaFilter=ban_1_Banner

And after changes:
http://xx.xx.xx.xx:9002/dataset/urn:li:dataset:(urn:li:dataPlatform:dbfs,%2Fdream_team%2Fcross_banner,PROD)/Schema?schemaFilter=ban_1_Banner

@@ -65,3 +65,7 @@ def make_datahub_url(urn: str, base_url: str) -> str:
entity_type = entity_type_from_urn(urn)
urn = urn.replace("/", "%2F")
return f"{base_url}/{ENTITY_TYPE_TO_URL_PATH_MAP[entity_type]}/{urn}/"

def make_entity_url(urn: str, entity_type: str, base_url: str) -> str:
Copy link
Contributor

Choose a reason for hiding this comment

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

We may want to do even more general-purpose URL encoding here! There should be an easy to use python method for this :)

Copy link

Unit Test Results (build & test)

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 175affe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants