Read the investigation of a failed deployment

When a GitHub deployment fails before it lands, Proofline investigates the failure on its own. It reads the failed job's log and names a pull request as the likely cause only when the error names a file that pull request changed. Only that result reaches Slack and the pull request; every other result stays on the environment's Investigations page.

What starts it#

A deployment starts an investigation when GitHub reports a failure or error status for it, to a GitHub Environment that the repository's link lists, before any success status of the same deploy. Each environment whose link lists that GitHub Environment and that has Check each deploy on gets its own investigation. A deployment that already reported success starts none, because its deploy checks read a later failure. A second failure status of the same deployment, or a redelivered one, starts nothing more: the first status's investigation stands.

The investigation starts no deploy check of its own. To report deployment statuses from a script or deploy tool, see Report a successful GitHub deployment for verification. To stop these investigations for an environment, turn off Check each deploy; see Pause deploy verification or alert intake.

What it reads#

Proofline makes these reads in order:

  1. The deployment's GitHub Actions job: the job the deployment names, or else the first failed job of its run. Proofline reads the whole log and masks protected values before anything else reads it. The log names the failing step. When the job ran a Cloud Build build, the build's own failing step replaces it, and when that step ran a Cloud Run job, the log also names the job's execution.
  2. That Cloud Run execution's standard error and system log over the failing step. The read needs an active Google Cloud connection of the environment that reads the execution's project.
  3. The PostgreSQL log of that project's Cloud SQL instances over the minutes the execution wrote in, which records lock waits and the database's errors.
  4. The pull requests the deploy shipped since the previous successful deploy of the same task, as the deploy's page lists them, and each one's changed files, for at most 80 pull requests.

Proofline then looks for a changed file that an error line names, by its path or file name. A migration's version number names the migration file it begins. When one pull request's file is named, or several are and one of them added the file, that pull request is the likely cause. No model chooses it.

When several pull requests' files are named and none of them added the file, the result is Ranked leads and lists them. When no error line names a shipped file, the result is Incomplete and says no cause was established. So is a deployment that names no Actions run, or whose job or log Proofline could not read. A missing Google Cloud connection or read grant appears as a setup gap; see Repair a connection named in an investigation.

Find it in the console#

  1. Open Environments.
  2. Select the environment.
  3. Select Investigations.

The row reads Failed deployment where other rows name an alert or a question, and its symptom names the commit and the GitHub Environment, such as The deployment of 4f1c2a9e7b3d to production failed. Setting Started by to Alerts or Questions leaves it out. That filter's default, Any source, lists every investigation, this one included.

Open the investigation. Under Where to look, the likely cause or each ranked lead is a pull request's merge commit, marked deploy failed. Under Evidence, the execution's log read appears as Failed deployment step and the database's as Database lock waits, each with the window it read; see Inspect the telemetry an investigation actually read. A read that could not run appears as a gap and says nothing about the environment's health.

When Slack and the pull request hear about it#

Nothing is posted when the investigation starts. When it names a likely cause, Proofline posts one message in the environment's investigations channel, or in the Slack delivery channel when the environment has none. The message names the deployment and the environment, then Likely cause:, the pull request, the failing step with its error line, and the file that line names. It ends with a link to the investigation.

Proofline also adds one comment to the pull request that introduced the cause. The comment says which deployment failed, in which step, and that its error names a file this pull request changed, then gives the error line. When the database logged an error or lock waits over the step, it adds them, and it ends with Open investigation. The comment is posted only when the pull request belongs to the deployment's own private repository and does not come from a fork. Shadow mode for the repository also holds it back; see Turn on review shadow mode. A repository that was disconnected or archived, or an environment that was removed, gets no comment either.

A result with ranked leads or no cause posts nothing in Slack or on a pull request, and neither does a rerun. These investigations add no notice to the Inbox and no note to PagerDuty, and send no reply when anything closes. Read their results on the Investigations page.

A likely cause marks the change whose file the error names. It does not establish that the next deployment will succeed. To record whether the cause was right, see Record whether an investigation identified the cause.

Search help

Tab to a result. Enter to open. Escape to close.