Description
Currently, a Cron Monitor does not support multiple environments such as "production", "development", etc.
Current estimated delivery: 03/22/23
Spec from @evanpurkhiser
We'll need to make some data model updates and adjust some assumptions about how monitors currently store status.
Adding environments means that each checkin entry will now be associated to an environment (or the default empty string).
-
Monitor status can no longer be denormalized onto the
monitor
object. The status needs to come from the most recent checkin for the selected environment(s). The status of the monitor will become dependent on the most recent checkin. -
Each monitor should have a list of activated environments associated to it. We should introduce a
monitorenvironment
model that has a FK to the monitor and a FK to the project environment. -
next checkin time needs to move to the environment.
-
Checkin details should be specific to a single environment. It does not make sense to try and show checkins for a monitor across multiple environments.
-
When listing monitors we should only allow selection of a single environment.
-
Checkins must now accept the environment for which the checkin is associated to. (If none is passed it should default to production (see
environment
in the link)) -
The
check_monitors
task now needs to take into account each environment as well, so we'll need to update the query to join on themonitor_environments
table.
### Tasks
- [ ] https://github.com/getsentry/sentry/issues/45009
- [ ] https://github.com/getsentry/sentry/issues/45011
- [ ] https://github.com/getsentry/sentry/issues/45013
- [ ] https://github.com/getsentry/sentry/issues/45017
- [ ] https://github.com/getsentry/sentry/issues/45022
- [ ] https://github.com/getsentry/sentry/issues/45019
- [ ] https://github.com/getsentry/sentry/issues/45020
- [ ] https://github.com/getsentry/sentry/issues/45023
- [ ] https://github.com/getsentry/sentry/issues/45024
- [ ] https://github.com/getsentry/sentry/issues/45025
- [ ] https://github.com/getsentry/sentry/issues/45994
- [ ] https://github.com/getsentry/sentry/issues/46137
- [ ] https://github.com/getsentry/sentry/issues/47854
- [ ] https://github.com/getsentry/sentry/issues/47855
Metadata
Metadata
Assignees
Labels
Type
Projects
Status