Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Code monitors: canceled context causes monitor to retry ad nauseum #56238

@jasonhawkharris

Description

@jasonhawkharris

There is an issue with code monitors caused by searches timing out, which cancels the context. As a result, when that context is passed to cm.UpsertLastSearched, the database upsert fails since the context is canceled. That results in the cm_last_searched record not being updated with the most recent commit hash, which in turn leads the monitor job to run ad nauseam.

As a result, this has led to a cm_trigger_jobs table that is bloated by 32GB for one of our customers. This led to an outage that required them to increase the size of the frontend database volume and suspend all their code monitors so that the cm_trigger_jobs table could breathe.

  • Fix the canceled context that is passed into cm.UpsertLastSearched
  • Add WARNING to EventStatus
  • In the UI, display the warning message (ex. 'search timed out' or something like it) in the logs section of the Code monitors page.
  • Write unit tests

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions