Skip to content
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

Instatus: Create incident when important github action fails #30563

Merged
merged 5 commits into from
Sep 21, 2023

Conversation

bnchrch
Copy link
Contributor

@bnchrch bnchrch commented Sep 19, 2023

Overview

Creates or resolves an incident on the internal instatus page if an action is passing or failing
image

Notes for reviewers

  1. Could not find documentation for passing any type of arguments to a instatus template. So we cannot specify what failed in the incident
  2. I had the thought of making it a named action but it did not provide much DRYness to be worth it
  3. This was tested out in our test repo here: https://github.com/airbytehq/github-workflow-test-repo-base/actions/workflows/trigger_ci_failure_for_fun.yml

@bnchrch bnchrch requested review from evantahler, supertopher and a team September 19, 2023 02:11
uses: joelwmale/webhook-action@master
with:
url: ${{ secrets.INSTATUS_CONNECTOR_CI_WEBHOOK_URL }}
body: '{ "trigger": "down" }'
Copy link
Contributor

Choose a reason for hiding this comment

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

That's a rather reasonable payload :D

Copy link
Contributor

Choose a reason for hiding this comment

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

Is instastatus smart enough to know which named service the incident belongs to based on the action name or something like that? Or, since we are using the same INSTATUS_CONNECTOR_CI_WEBHOOK_URL, are these incidents all in the same service?

Copy link
Contributor

Choose a reason for hiding this comment

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

Could not find documentation for passing any type of arguments to a instatus template. So we cannot specify what failed in the incident

Maybe... multiple URLS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately small payload means much less context.

So the webhook url (and as a result the instatus template) is the area that "knows" what service this relates too.

This means that we have two instatus services

  • Platform Critical Github Actions
  • Connector Critical Github Actions

which each have a unique template

and each of those templates have a unique webhook url

One of them is defined in our secrets as INSTATUS_CONNECTOR_CI_WEBHOOK_URL and the other INSTATUS_PLATFORM_CI_WEBHOOK_URL

@vercel
Copy link

vercel bot commented Sep 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 21, 2023 11:17pm

@bnchrch bnchrch merged commit b9bd39f into master Sep 21, 2023
@bnchrch bnchrch deleted the bnchrch/instatus/important-action branch September 21, 2023 23:34
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.

2 participants