-
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
ci(propagate-content): use boolean inputs #671
Conversation
as it is easier to handle through check boxes
default: 'false' | ||
type: boolean | ||
description: 'If checked, send slack notifications when errors occur' | ||
default: true |
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 think it is better to change this default value to 'true'.
BTW, how did it work in the cron, as we can see that notifications are correctly sent by default?
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 condition for the Slack notification in the workflow.
if: failure() && (github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.slack-notifications == 'true') )
So when the cron starts, the inputs.slack-notifications are ignored.
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.
About the default value, it is set to false on purpose. The input has been created mainly to troubleshoot slack issues, but not to send a message when the workflow is triggered manually.
When someone is triggering the workflow manually, it is supposed to monitor the run by themself. There is no need to pollute other Engineers with a slack notification.
default: 'false' | ||
type: boolean | ||
description: 'If checked, send slack notifications when errors occur' | ||
default: true |
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.
default: true | |
default: false |
@@ -55,7 +55,7 @@ jobs: | |||
./.././bonita-documentation-site/scripts/propagate_doc_upwards.bash | |||
|
|||
- name: Send message to Slack channel | |||
if: failure() && (github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.slack-notifications == 'true') ) |
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.
question: did you test the change by running the action? AFAIK, whatever the type is defined in the input, the actual type at runtime in github.event.inputs
is always a string, so this change may change the behavior (the input is always set, so the condition would always be true)
The workflow will also receive the inputs in the github.event.inputs context. The information in the inputs context and github.event.inputs context is identical except that the inputs context preserves Boolean values as Booleans instead of converting them to strings. The choice type resolves to a string and is a single selectable option.
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.
My bad, reverting it...
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.
✔️ Tested with https://github.com/bonitasoft/bonita-documentation-site/actions/runs/8112514456 using the branch of this PR. Dry-run and no slack notifications.
# Conflicts: # .github/workflows/propagate-doc-upwards.yml
Quality Gate passedIssues Measures |
as it is easier to handle boolean inputs through check boxes