-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b883aa5
commit 8b72e5f
Showing
10 changed files
with
279 additions
and
68 deletions.
There are no files selected for viewing
7 changes: 3 additions & 4 deletions
7
python_modules/libraries/dagster-msteams/dagster_msteams/adaptive_card.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 2 additions & 6 deletions
8
python_modules/libraries/dagster-msteams/dagster_msteams/client.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
python_modules/libraries/dagster-msteams/dagster_msteams/utils.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from typing import NamedTuple | ||
|
||
|
||
class Link(NamedTuple): | ||
text: str | ||
url: str |
Empty file.
203 changes: 203 additions & 0 deletions
203
python_modules/libraries/dagster-msteams/dagster_msteams_tests/__snapshots__/test_hooks.ambr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,203 @@ | ||
# serializer version: 1 | ||
# name: test_failure_hook_with_pythonic_resource[https://foo.webhook.office.com/bar/baz] | ||
_CallList([ | ||
_Call( | ||
tuple( | ||
'https://foo.webhook.office.com/bar/baz', | ||
), | ||
dict({ | ||
'headers': dict({ | ||
'Content-Type': 'application/json', | ||
}), | ||
'json': dict({ | ||
'attachments': list([ | ||
dict({ | ||
'content': dict({ | ||
'text': "Some custom text <a href='localhost:3000/runs/a791605c-fa84-4c59-9027-13d009c1c3a2'>View in Dagster UI</a>", | ||
'title': 'Dagster Pipeline Alert', | ||
}), | ||
'contentType': 'application/vnd.microsoft.card.hero', | ||
}), | ||
]), | ||
'type': 'message', | ||
}), | ||
'proxies': None, | ||
'timeout': 60, | ||
'verify': True, | ||
}), | ||
), | ||
]) | ||
# --- | ||
# name: test_failure_hook_with_pythonic_resource[https://foo.westus.logic.azure.com:443/workflows/8be36cde7f394925af220480f6701bd0] | ||
_CallList([ | ||
_Call( | ||
tuple( | ||
'https://foo.westus.logic.azure.com:443/workflows/8be36cde7f394925af220480f6701bd0', | ||
), | ||
dict({ | ||
'headers': dict({ | ||
'Content-Type': 'application/json', | ||
}), | ||
'json': dict({ | ||
'attachments': list([ | ||
dict({ | ||
'content': dict({ | ||
'body': list([ | ||
dict({ | ||
'text': 'Some custom text [View in Dagster UI](localhost:3000/runs/d5358b53-37eb-42e2-9c46-97315843c304)', | ||
'type': 'TextBlock', | ||
'wrap': True, | ||
}), | ||
]), | ||
'type': 'AdaptiveCard', | ||
'version': '1.0', | ||
}), | ||
'contentType': 'application/vnd.microsoft.card.adaptive', | ||
'contentUrl': None, | ||
}), | ||
]), | ||
'type': 'message', | ||
}), | ||
'proxies': None, | ||
'timeout': 60, | ||
'verify': True, | ||
}), | ||
), | ||
]) | ||
# --- | ||
# name: test_success_hook_with_pythonic_resource[https://foo.webhook.office.com/bar/baz] | ||
_CallList([ | ||
_Call( | ||
tuple( | ||
'https://foo.webhook.office.com/bar/baz', | ||
), | ||
dict({ | ||
'headers': dict({ | ||
'Content-Type': 'application/json', | ||
}), | ||
'json': dict({ | ||
'attachments': list([ | ||
dict({ | ||
'content': dict({ | ||
'text': ''' | ||
Op pass_op on job job_def succeeded! | ||
Run ID: 135f8cfd-81ca-4448-8e7f-66b58201391f | ||
''', | ||
'title': 'Dagster Pipeline Alert', | ||
}), | ||
'contentType': 'application/vnd.microsoft.card.hero', | ||
}), | ||
]), | ||
'type': 'message', | ||
}), | ||
'proxies': None, | ||
'timeout': 60, | ||
'verify': True, | ||
}), | ||
), | ||
_Call( | ||
tuple( | ||
'https://foo.webhook.office.com/bar/baz', | ||
), | ||
dict({ | ||
'headers': dict({ | ||
'Content-Type': 'application/json', | ||
}), | ||
'json': dict({ | ||
'attachments': list([ | ||
dict({ | ||
'content': dict({ | ||
'text': ''' | ||
Op success_solid_with_hook on job job_def succeeded! | ||
Run ID: 135f8cfd-81ca-4448-8e7f-66b58201391f | ||
''', | ||
'title': 'Dagster Pipeline Alert', | ||
}), | ||
'contentType': 'application/vnd.microsoft.card.hero', | ||
}), | ||
]), | ||
'type': 'message', | ||
}), | ||
'proxies': None, | ||
'timeout': 60, | ||
'verify': True, | ||
}), | ||
), | ||
]) | ||
# --- | ||
# name: test_success_hook_with_pythonic_resource[https://foo.westus.logic.azure.com:443/workflows/8be36cde7f394925af220480f6701bd0] | ||
_CallList([ | ||
_Call( | ||
tuple( | ||
'https://foo.westus.logic.azure.com:443/workflows/8be36cde7f394925af220480f6701bd0', | ||
), | ||
dict({ | ||
'headers': dict({ | ||
'Content-Type': 'application/json', | ||
}), | ||
'json': dict({ | ||
'attachments': list([ | ||
dict({ | ||
'content': dict({ | ||
'body': list([ | ||
dict({ | ||
'text': ''' | ||
Op pass_op on job job_def succeeded! | ||
Run ID: f235ae37-e068-4f90-888d-d59a7cf017db | ||
''', | ||
'type': 'TextBlock', | ||
'wrap': True, | ||
}), | ||
]), | ||
'type': 'AdaptiveCard', | ||
'version': '1.0', | ||
}), | ||
'contentType': 'application/vnd.microsoft.card.adaptive', | ||
'contentUrl': None, | ||
}), | ||
]), | ||
'type': 'message', | ||
}), | ||
'proxies': None, | ||
'timeout': 60, | ||
'verify': True, | ||
}), | ||
), | ||
_Call( | ||
tuple( | ||
'https://foo.westus.logic.azure.com:443/workflows/8be36cde7f394925af220480f6701bd0', | ||
), | ||
dict({ | ||
'headers': dict({ | ||
'Content-Type': 'application/json', | ||
}), | ||
'json': dict({ | ||
'attachments': list([ | ||
dict({ | ||
'content': dict({ | ||
'body': list([ | ||
dict({ | ||
'text': ''' | ||
Op success_solid_with_hook on job job_def succeeded! | ||
Run ID: f235ae37-e068-4f90-888d-d59a7cf017db | ||
''', | ||
'type': 'TextBlock', | ||
'wrap': True, | ||
}), | ||
]), | ||
'type': 'AdaptiveCard', | ||
'version': '1.0', | ||
}), | ||
'contentType': 'application/vnd.microsoft.card.adaptive', | ||
'contentUrl': None, | ||
}), | ||
]), | ||
'type': 'message', | ||
}), | ||
'proxies': None, | ||
'timeout': 60, | ||
'verify': True, | ||
}), | ||
), | ||
]) | ||
# --- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 1 addition & 27 deletions
28
python_modules/libraries/dagster-msteams/dagster_msteams_tests/test_client.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.