Skip to content

[No QA] Only post to slack when job was successful#6256

Merged
roryabraham merged 2 commits into
mainfrom
tgolen-fix-deploy-message
Nov 5, 2021
Merged

[No QA] Only post to slack when job was successful#6256
roryabraham merged 2 commits into
mainfrom
tgolen-fix-deploy-message

Conversation

@tgolen

@tgolen tgolen commented Nov 5, 2021

Copy link
Copy Markdown
Contributor

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/183630

Tests

The next time there is a deploy failure, we can verify there was no success message posted

QA Steps

None

cc @roryabraham

@tgolen tgolen self-assigned this Nov 5, 2021
@tgolen tgolen requested a review from a team November 5, 2021 19:58
@tgolen tgolen changed the title Only post to slack when job was successful [No QA] Only post to slack when job was successful Nov 5, 2021
@tgolen tgolen marked this pull request as ready for review November 5, 2021 19:58
@MelvinBot MelvinBot requested review from aldo-expensify and removed request for a team November 5, 2021 19:58

@roryabraham roryabraham left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aldo-expensify aldo-expensify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

NAB: just a doubt, there is no message on slack on failure, right?

@tgolen

tgolen commented Nov 5, 2021

Copy link
Copy Markdown
Contributor Author

@aldo-expensify There is a message for the failure, yeah. It's higher up in the file:

postSlackMessage:
name: Post a Slack message when any platform fails to build or deploy
runs-on: ubuntu-latest
if: ${{ failure() }}
needs: [android, desktop, iOS, web]
steps:
- uses: 8398a7/action-slack@v3
name: Job failed Slack notification
with:
status: custom
fields: workflow, repo
custom_payload: |
{
channel: '#announce',
attachments: [{
color: "#DB4545",
pretext: `<!subteam^S4TJJ3PSL>`,
text: `💥 ${process.env.AS_REPO} failed on ${process.env.AS_WORKFLOW} workflow 💥`,
}]
}
env:
GITHUB_TOKEN: ${{ github.token }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

@aldo-expensify

Copy link
Copy Markdown
Contributor

@aldo-expensify There is a message for the failure, yeah. It's higher up in the file:

Cool, I missed it!, thanks

@yuwenmemon

Copy link
Copy Markdown
Contributor

NAB: just a doubt, there is no message on slack on failure, right?

I didn't see this show up when the successful message was displayed:
https://expensify.slack.com/archives/C07J32337/p1635813884219300

Are we sure the fail message posts in #deployer?

@tgolen

tgolen commented Nov 5, 2021

Copy link
Copy Markdown
Contributor Author

Are we sure the fail message posts in #deployer?

Well, according to that action, the fail message posts to #announce.

@roryabraham roryabraham merged commit b770151 into main Nov 5, 2021
@roryabraham roryabraham deleted the tgolen-fix-deploy-message branch November 5, 2021 22:35
@OSBotify

OSBotify commented Nov 5, 2021

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by @roryabraham in version: 1.1.14-5 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by @AndrewGable in version: 1.1.15-15 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants