-
Notifications
You must be signed in to change notification settings - Fork 5
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 a flag to send dry-run results to slack #492
Conversation
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.
What is the purpose of this feature?
Do we want to see results of test runs? Then just looking at the workflow logs would work fine.
Do we want to make sure that posting to slack works? Then I would prefer a test which posts to slack.
In both cases, I would avoid posting messages to a channel used for actual payouts.
parser.add_argument( | ||
"--send-to-slack", | ||
action="store_true", | ||
help="Flag indicating whether or not the script should send the results to a slack channel", |
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.
If I read the code correctly, a slack message is also posted without this flag if the --post-tx
flag is set.
Those flags could profit from some clean-up. Also, the manual_propose
and auto_propose
have become somewhat similar. Merging them and splitting off some functionality for removing transfers would make it easier to understand what those functions do and how those flags enter into the logic.
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.
I tried running the dry run with the --post-tx
flag and ran into this error:
assert signing_key is not None
I think that still wouldn't send the slack message though because of this part:
if not dry_run:
slack_channel = config.io_config.slack_channel
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.
The current main is not easy to understand and this PR makes it even a bit more complicated. We can still proceed with merging, I add an issue about cleaning up flags.
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.
Can be merged as is to move forward with test runs. I created the issue #494 for cleaning up command line arguments.
This PR adds a flag to send the results from the dry-run to a slack channel.