Pēteris Caune
1a5ca45d09
Fix InvalidResponseError() initialization parameters
2024-06-20 15:15:14 +03:00
Pēteris Caune
9dbd961beb
Add test case for InvalidResponseError handling
2024-06-20 15:11:42 +03:00
Pēteris Caune
475bdff87d
Add handling for minio.InvalidResponseError exceptions
2024-06-18 23:50:11 +03:00
Pēteris Caune
b2c5e91c70
Implement legacy -> canonical timezone conversion
...
There are three related changes:
* Removed legacy timezones from hc.lib.tz.all_timezones
* Added data migration to update existing Check.tz values
* For backwards compatibility, added code to automatically
replace a legacy timezone with a canonical timezone when a
legacy timezone is passed to an API call
I used the timezone mapping on
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
2024-06-14 12:55:57 +03:00
Pēteris Caune
52f2b534a6
Fix API to accept Europe/Kiev but save it as Europe/Kyiv
2024-06-13 15:23:27 +03:00
Pēteris Caune
c5bd666faf
Add data migration to update timezone "Europe/Kiev" to "Europe/Kyiv"
2024-06-13 15:03:51 +03:00
Pēteris Caune
7ef18cd706
Fix type warning and upgrade django-stubs-ext
2024-05-27 15:59:18 +03:00
Pēteris Caune
d56105e670
Update Slack integration to use channel name as the integration name
...
Fixes : #1003
2024-05-27 15:54:30 +03:00
Pēteris Caune
410b56baef
Fix type hints for django-stubs 5.0.1
2024-05-27 14:35:32 +03:00
Pēteris Caune
12bd59b2c1
Add system hostname logging in hc.logs.Handler
2024-05-24 13:58:18 +03:00
Pēteris Caune
26a57343b1
Add a data migration to fill null api_notification.code values
...
Using model's default didn't quite work, as Django tried to use
the same UUID for all rows.
2024-05-17 10:43:46 +03:00
Pēteris Caune
d486d2db14
Add uniqueness constraint to api_notification.code
...
This is primarily to make notification lookups by code efficient.
We look up notifications by code in hc.api.views.boundces.
This field has a default value (uuid.uuid4), so any null values
will be filled with random UUIDs during migration.
2024-05-17 10:30:01 +03:00
Pēteris Caune
5202938b9c
Update log entry template to show body before UA
2024-05-10 16:09:13 +03:00
Pēteris Caune
1bdfbac775
Fix Sign In page to hide "Email Link" option if SMTP is not configured
...
Fixes : #922
2024-05-10 11:04:21 +03:00
Pēteris Caune
66d482c4af
Disable a type warning related to statsd having no type hints yet
...
python-statsd does have a PR for adding type hints, so
hopefully this is temporary.
2024-05-01 11:39:20 +03:00
Pēteris Caune
c940239757
Improve type hints in the pygmentize management command
2024-05-01 11:34:39 +03:00
Pēteris Caune
99d74d2c2c
Add type hint for view_on_site in channel admin
2024-05-01 11:18:31 +03:00
Pēteris Caune
5b905c1cbc
Bump django-stubs-ext to 5.0.0
2024-05-01 11:11:54 +03:00
Pēteris Caune
4ec7a48082
Update the Discord integration to disable channel on HTTP 404 responses
2024-04-26 09:25:42 +03:00
Pēteris Caune
872e4d743e
Increase the timeout for sending Signal messages to 20 seconds
...
We're sometimes overshooting the 15 seconds, so let's try increasing
the limit a little.
2024-04-25 14:52:15 +03:00
Pēteris Caune
6fb46aee32
Fix integrations to include oncalendar schedules in notifications
2024-04-24 16:08:55 +03:00
Pēteris Caune
4181399659
Fix Spike integration to not disclose check's code in incident data
2024-04-22 13:01:38 +03:00
Pēteris Caune
ddae6a04bf
Fix VictorOps integration to not disclose check's code in incident data
2024-04-22 12:57:10 +03:00
Pēteris Caune
c08ba1d872
Fix PagerTree integration to not disclose check's code in incident data
2024-04-22 12:46:18 +03:00
Pēteris Caune
53f554df1e
Fix type warning
2024-04-22 12:45:51 +03:00
Pēteris Caune
994bc10857
Update PagerDuty integration to use ping.formatted_kind_created
2024-04-22 12:31:03 +03:00
Pēteris Caune
18bd44a68b
Fix PagerDuty integration to not disclose check's code in incident data
2024-04-22 12:12:22 +03:00
Pēteris Caune
4e108073ac
Add handling for Discord "max num of webhooks reached" OAuth response
2024-04-22 10:50:51 +03:00
Pēteris Caune
602ff2b667
Fix senddeletionscheduled to set the "created" field on flip objects
...
The "senddeletionscheduled" management command creates dummy
Flip objects, but does not save them to the database.
Some transport classes expect the flip object to have a non-null
"created" field. Normally it gets set when saving the flip object
to the database, here we need to do that manually.
2024-04-22 09:21:46 +03:00
Pēteris Caune
e683496bed
Move reusable ping formatting code to Ping model
2024-04-19 12:38:20 +03:00
Pēteris Caune
5c73556050
Include ping's kind in Opsgenie notification's "Last ping" field
2024-04-19 12:19:26 +03:00
Pēteris Caune
b9e82e44c9
Fix type warning
2024-04-19 12:02:20 +03:00
Pēteris Caune
7f03a9e738
Improve Opsgenie notifications (include description, schedule, link...)
2024-04-19 11:58:35 +03:00
Pēteris Caune
577602ae21
Fix Opsgenie integration to not disclose check's code in incident data
2024-04-19 11:24:12 +03:00
Pēteris Caune
bd64fab619
Fix hc.front.views.docs_search to handle AND/OR/NOT as query strings
2024-04-18 15:36:48 +03:00
Pēteris Caune
82ed392361
Update transport classes to use regular spaces instead of non-breaking
2024-04-17 16:35:43 +03:00
Pēteris Caune
a4d2094cef
Update the remove_project view to delete checks using lock_and_delete()
...
If we delete project by naively calling project.delete() then checks
can receive pings during the deletion, causing the deletion operation
to fail with an IntegrityError.
So instead do it like so:
* iterate over project's checks, call Check.lock_and_delete() on each
* in the end, call project.delete()
2024-04-16 16:36:49 +03:00
Pēteris Caune
7c7a103632
Improve type hints
2024-04-15 15:41:10 +03:00
Pēteris Caune
83f161d657
Update transport classes to use Transport.last_ping() consistently
...
* Instead of check.n_pings (int) use last_ping().n
* Instead of check.last_ping (datetime) use last_ping().created
There is a time gap from creating a flip object to processing
it (sending out an alert). We want the notification to reflect
the check's state at the moment the flip was created. To do this,
we use the Transport.last_ping() helper method which retrieves
the last ping *that is not newer than the flip*.
This commit updates transport classes and templates to use
Transport.last_ping() consistently everywhere.
2024-04-15 15:09:17 +03:00
Pēteris Caune
d8a46349a8
Update Transport.last_ping() to ignore pings newer than the flip
2024-04-15 12:47:11 +03:00
moraj-turing
3718ff57c7
Add support for system theme ( #987 )
...
Add support for system theme
---------
Co-authored-by: Juan Mora <juan@nimble.gt>
Co-authored-by: Pēteris Caune <cuu508@gmail.com>
2024-04-15 10:42:16 +03:00
Pēteris Caune
26f7facda2
Clean up
2024-04-12 20:13:35 +03:00
Pēteris Caune
81f202e2ac
Rename notify_flip -> notify
2024-04-12 15:49:47 +03:00
Pēteris Caune
4df58aaaef
Fix type warnings
2024-04-12 15:46:46 +03:00
Pēteris Caune
5bdb01baf9
Fix the Zulip integration to use Flip.new_status
2024-04-12 15:43:06 +03:00
Pēteris Caune
6631a5f76a
Fix the WhatsApp integration to use Flip.new_status
2024-04-12 15:40:19 +03:00
Pēteris Caune
3301cce251
Fix the Splunk On-Call integration to use Flip.new_status
2024-04-12 15:37:43 +03:00
Pēteris Caune
6e27d88ec9
Fix the Trello integration to use Flip.new_status
2024-04-12 15:34:54 +03:00
Pēteris Caune
bcecf058c2
Fix the Telegram integration to use Flip.new_status
2024-04-12 15:33:03 +03:00
Pēteris Caune
17e9f33bb9
Fix the Spike integration to use Flip.new_status
2024-04-12 15:30:26 +03:00