You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are seeing notifications for passing builds with "warnings" in Slack when we have notify_when: 'failure' set.
This only happens on a job that runs a Bash script in which there's a fallback for the initial action failing.
Our workflow looks like this:
name: Mergedownon:
push:
branches:
- mainpaths-ignore:
- '*/CHANGELOG.md'
- CHANGELOG.md
- package.jsonjobs:
mergedown:
name: Mergedownruns-on: ubuntu-lateststeps:
- name: Checkout Source Codeuses: actions/[email protected]with:
fetch-depth: 0token: ${{ secrets.MERGEDOWN_TOKEN }}
- name: Merge Updates from Main into Release Branchesenv:
GH_TOKEN: ${{ github.token }}run: | git config user.name "${{ github.actor }}" git config user.email "${{ github.actor}}@users.noreply.github.com" for BRANCH in $(git branch --all --list | grep remotes/origin/release | sed 's/remotes\/origin\///g') do echo "Merging 'main' into '$BRANCH'..." git checkout $BRANCH git merge --no-verify origin/main && git push origin $BRANCH || ( echo "Automatic mergedown failed for $BRANCH. Finding PR..." PR=$( gh api graphql \ --jq '.data.repository.pullRequests.nodes[0].id' \ -F branch="$BRANCH" \ -f query=' query FindPullRequest($branch: String!) { repository(owner: "[REDACTED]", name: "[REDACTED]") { pullRequests(headRefName: $branch, first: 1) { nodes { id } } } } ' ) if [[ ! -z $PR ]]; then echo "Commenting on pull request with global ID $PR" gh api graphql \ -F pr=$PR \ -f query=' mutation AddComment($pr: ID!) { addComment(input: { body: "Mergedown of ${{ github.sha }} has failed.", subjectId: $pr }) { clientMutationId } }' fi git merge --abort ) done
- name: Report Workflow Failure to Slackif: always()uses: ravsamhq/notify-slack-action@v1with:
status: ${{ steps.decider.outputs.result }}notify_when: 'failure'message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>'notification_title: Mergedown failed. This is probably an issue with the workflow, not an individual branch.env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_SOFTWARE_WEBHOOK_URL }}
This job passes in GitHub, and it's unclear from the output why it is throwing any warnings:
I suspect it has something to do with run's output and me misunderstanding how the (do this) || (or this if that doesn't work) technique in bash for falling back to another command if the first one fails, but either way I do see that notify_when allows me to specify if I want "passed with warnings" to be one of the statuses, so I'm thinking this action shouldn't be sending me the notification regardless.
edit:
This line of code might be the culprit: status: ${{ steps.decider.outputs.result }}
I copy/pasted this particular action from another workflow which has a "decider" step, but this one doesn't. I guess GitHub still lets this through but might just set this to status: null? Anyway, this could be the issue right here, as when I changed this to just use ${{ job.status }}, my warning notifications went away.
Is it possible that this action threw the warning, and it was just buried because it was the one actually doing the work of notifying me?
The text was updated successfully, but these errors were encountered:
Hello and welcome to RavSam 💜. Thanks for opening your first issue. I will assign one of our team members to take a look at the problem you have raised. Make sure to include as much information as possible to help our team diagnose the issue and solve it quickly.
If the problem is related to a security concern, then please delete this issue and send us an email at [email protected].
@tubbo@ketiko To get rid of the slow build speeds of Docker, we have released v2 which is written in Typescript. See this comment for more information.
We are seeing notifications for passing builds with "warnings" in Slack when we have
notify_when: 'failure'
set.This only happens on a job that runs a Bash script in which there's a fallback for the initial action failing.
Our workflow looks like this:
This job passes in GitHub, and it's unclear from the output why it is throwing any warnings:
I suspect it has something to do with
run
's output and me misunderstanding how the(do this) || (or this if that doesn't work)
technique in bash for falling back to another command if the first one fails, but either way I do see thatnotify_when
allows me to specify if I want "passed with warnings" to be one of the statuses, so I'm thinking this action shouldn't be sending me the notification regardless.edit:
This line of code might be the culprit:
status: ${{ steps.decider.outputs.result }}
I copy/pasted this particular action from another workflow which has a "decider" step, but this one doesn't. I guess GitHub still lets this through but might just set this to
status: null
? Anyway, this could be the issue right here, as when I changed this to just use${{ job.status }}
, my warning notifications went away.Is it possible that this action threw the warning, and it was just buried because it was the one actually doing the work of notifying me?
The text was updated successfully, but these errors were encountered: