Open mlyons-c opened 10 months ago
Thanks for the report. get_client().post_message(...)
should work. this seems a docs issue.
It needs to be updated in the docs, but the actual implementation of teams_on_success/failure from dagster_msteams/hooks.py uses the wrong implementation and causes the hooks to fail when implementing them.
ah you are right - will fix that soon
Dagster version
dagster, version 1.5.2
What's the issue?
The teams_on_success and teams_on_failure run hooks in the dagster-msteams package fail with
AttributeError: 'MSTeamsResource' object has no attribute 'post_message'
when attempting to run them using the documentation outlined in https://docs.dagster.io/_apidocs/libraries/dagster-msteams.When digging into the codebase and comparing to the docs, the context.resources.msteams.post_message(payload=card.payload) seems to be the cause of the issue and should instead be context.resources.msteams.get_client().post_message(payload=card.payload)
What did you expect to happen?
The run hooks to run successfully when implementing them according to the docs
How to reproduce?
https://docs.dagster.io/_apidocs/libraries/dagster-msteams#dagster_msteams.teams_on_failure
Deployment type
Local
Deployment details
Basic Linux service deployment on local infrastructure
Additional information
No response
Message from the maintainers
Impacted by this issue? Give it a 👍! We factor engagement into prioritization.