Skip to content

[SE-3470] Add failure context to periodic build notifications

This PR is adding more context for to the periodic provisioning failure notifications. Also, it adds an extra functionality to send "ack" email when a provisioning succeeds after a failure. The following extra information will be provided:

  • branch
  • last commit date
  • configuration branch
  • extra config parameters (filtered/masked)
  • last successful deployment (to see if it is continuously broken or a one-time issue -> during a weekend, the periodic build is ran 4 times at least)
  • last relevant ansible failure log (filtered/masked)

Screenshots: N/A

Sandbox URL: N/A

Testing instructions:

  1. Create an instance
  2. Enable periodic builds on the instance
  3. Add your email address to the Periodic build notification emails text field
  4. Set 00:05:00 as build interval (5 minutes)
  5. Misconfigure it to no be able to provision (for example change the configuration repo branch to notexistsatall)
  6. Wait for the email (check your spam folder as well) - It should arrive in 5-10 minutes based on the delay in the queue
  7. Check the email has no sensitive data and has the desired (listed above) content.
  8. Fix the configuration
  9. Wait for the ack email - It should arrive in 5-10 minutes based on the delay in the queue

Author notes and concerns:

  1. The sensitive filtering is based on best effort, hence it won't replace the matching text parts but the whole text. This was safer then experimenting with something else.

Reviewers

  • @Kelketek

Merge request reports