Commit Graph

278 Commits

Author SHA1 Message Date
Klaas van Schelven
2dc07a0aae 'issue key info' header box
alignment still feels slightly off (too high) but OK for now
2024-09-13 15:57:37 +02:00
Klaas van Schelven
b912182bcb Show (event, not issue-histogram) tags in box in RHS 2024-09-13 15:47:27 +02:00
Klaas van Schelven
55aa917436 Integration test using the extracted event-samples 2024-09-13 11:46:25 +02:00
Klaas van Schelven
eec8d51491 Remove various non-TODOs
either already done, or more of a 'this is a way this code could potentially
evolve in the future' (but not a 'we must do this')
2024-09-13 10:05:22 +02:00
Klaas van Schelven
3d66a60b41 Hide away links to admin interface 2024-09-13 09:12:28 +02:00
Klaas van Schelven
a118066129 Django admin forms: do not mess up my specially crafted fields please
* no stripping
* no introduction of '\r'
2024-09-12 14:08:46 +02:00
Klaas van Schelven
eb08bd562c When there's no (meaningful) release info, don't display it 2024-09-12 13:58:36 +02:00
Klaas van Schelven
e340fab784 SVG dropdown icons: properly grey-out when disabled
this went wrong in 0df5f891c4, when we turned these into SVGs
2024-09-12 13:34:56 +02:00
Klaas van Schelven
cdf08b6d46 Hide the thead-checkbox in the issue_list if there's no issues 2024-09-12 12:54:23 +02:00
Klaas van Schelven
9e4b326ab6 whitespace 2024-09-12 12:41:22 +02:00
Klaas van Schelven
10c91ccbdc fix tests
recently introduced (e59fd3a225) caching made it so that repeated calls to
create_release_if_needed no longer work if releases have been created in the
meantime.

In actual usage create_release_if_needed is always called on a single project
so I _think_ just calling `fresh` in the tests is good way to get to green
tests again.
2024-09-12 12:17:47 +02:00
Klaas van Schelven
e59fd3a225 Implement 'occurs_in_last_release' 2024-09-12 09:49:22 +02:00
Klaas van Schelven
1bfac5d8c6 assertEquals -> assertEual (Python 3.12)
<<insert remarks about fashion police>>
2024-08-21 08:49:49 +02:00
Klaas van Schelven
6560767764 Tailwind: Explicitly point to python file containing class 2024-08-19 22:12:20 +02:00
Klaas van Schelven
d6c61c25bb When resolving, show history as 'resolved' (bugfix) 2024-08-19 11:43:14 +02:00
Klaas van Schelven
b76e474ef1 Navigation: fix for missing events
Now that we have eviction, events may disappear. Deal with it:

* event-specific 404 that still allows for navigation
* first/last buttons
* navigation to prev/next when prev/next is not just 1 step away
* don't use HttpRedirect for "lookup based" views
    in principle, the thing you were looking for might go missing in-between
    drawback: these URLs are not "stable"
2024-07-19 11:03:08 +02:00
Klaas van Schelven
aec78f6318 Clarify a docstring 2024-07-18 15:13:08 +02:00
Klaas van Schelven
3128392d9a Distinguish ingested_at and digested_at 2024-07-18 14:45:59 +02:00
Klaas van Schelven
717a632b7d check_for_thresholds refactoring: 'metadata' is superfluous
because it was basically the input-tuple (in a different format)
2024-07-18 09:43:37 +02:00
Klaas van Schelven
e40e652722 Remove duplicate test-factory function 2024-07-18 09:33:50 +02:00
Klaas van Schelven
65ea181f37 vbc-unmute: reduce calls to the expensive check
as done in the previous commit for project quota
2024-07-17 15:33:15 +02:00
Klaas van Schelven
c01d332e18 Rename ingest_order to digest_order and clarify event_count
* issue.event_count to digested_event_count
* event.ingest_order to event.digest_order
* issue.ingest_order to digest_order

This is generally more correct/explicit, and is also in preparation
of doing work on-digest (which may or may not happen)
2024-07-16 15:23:40 +02:00
Klaas van Schelven
d56a8663a7 Remove the periodCounter and the PC registry
direct consequence of switching to SQL-based counting
2024-07-16 15:08:05 +02:00
Klaas van Schelven
5ce840f62f Move period_utils to separate file 2024-07-15 14:38:35 +02:00
Klaas van Schelven
93365f4c8d Period-counting using SQL instead of custom-made (PoC)
The direct cause for this was the following observation: there was no mechanism
in place to safeguard counted events across evictions, i.e. the following order
of events was not accounted for:

* ingest/digest a bunch of events (PCs correctly updated)
* eviction (PC still correct)
* server/snappea restart (PC reloaded, but based on new events. not correct).

I though about various approaches to fix this (e.g. snapshotting) but in the end
such approaches added even more complexity to the PC mechanism. I decided to first
check how non-performant the SQL route would be, and this PoC seems to say: just
go SQL.

There's also a small semantic change (probably in the direction of what you'd
expect), namely: the periods are no longer 'calendar' periods.
2024-07-15 14:28:13 +02:00
Klaas van Schelven
d68aff05ca Quota 2024-07-15 09:37:36 +02:00
Klaas van Schelven
edff0e219c PeriodCounter: remove event-based approach
Replacing it with passing the thresholds on each call to `inc`.

The event-based approach was broken in a multi-process setup (such as having a separate
gunicorn and snappea), because the unmute events would be registered GUI-side
(gunicorn), and the single process where the counting happened had a different PC
instance.

The solution is to get rid of the event-listener approach, and just make an inventory of
the threshold-checks that need to be done right before each call to `inc`. Because the
calls to `inc` happen in a single process (we [will] enforce this elsewhere) this fixes
the problem.

During refactoring it became clear that this is probably a good idea anyway: many
comments about corner-cases could be removed.

Other things I found:

* The now-removed `_digest_event_python_postprocessing` did more than Python alone (it
  also touched the DB for unmutes) so that was probably a separate bug (now fixed).

* In the event-listener-based code, I foresaw the need for `on_become_false` (but did
  not use it yet). The idea was probably that this could be useful in the quota setting
  (a quota can become unmet after a while) but in fact it isn't useful, because when a
  quota becomes unmet you'd still need to check all quota and OR them.

Tests have not been truly refactored (the new architecture probably points to a new
desired set of tests) but rather have been made to run in the simplest way possible.
2024-07-09 09:31:36 +02:00
Klaas van Schelven
fe6c955465 never_evict events that are a Historic Turning Point
Both for technical (foreign keys) and business reasons (these are events you
care about)
2024-06-24 22:50:00 +02:00
Klaas van Schelven
5e2cc0575f Retention, small fixes (from Friday) 2024-06-23 22:20:18 +02:00
Klaas van Schelven
0df5f891c4 Replace inline unicode 'icons' with SVG
user reported not being able to see the icon
2024-06-19 16:21:45 +02:00
Klaas van Schelven
2d7a261515 Project-settings buttons at bottom of issue-list 2024-06-17 12:37:24 +02:00
Klaas van Schelven
8ad6059722 Complete migration reset 2024-06-14 10:29:10 +02:00
Klaas van Schelven
c4358aaece Fix tests for users.User idiom 2024-06-12 17:45:06 +02:00
Klaas van Schelven
93b8c892b1 'No issues found' bigger (I overlooked it myself) 2024-06-10 15:45:30 +02:00
Klaas van Schelven
b04feae788 SDK setup (WIP) 2024-06-07 17:24:25 +02:00
Klaas van Schelven
222a6906dd Remove dead (template) code 2024-06-03 09:14:03 +02:00
Klaas van Schelven
cef1127e48 Make user-model swappable
I may just need this later, and doing it this late was already painful enough.
2024-05-29 10:22:57 +02:00
Klaas van Schelven
d2ba9b9ddb Add missing migration 2024-05-17 10:14:09 +02:00
Klaas van Schelven
8d23239526 Be more strict about usage of TransactionTestCase in tests 2024-04-27 20:35:35 +02:00
Klaas van Schelven
41a4913299 Implement SNAPPEA_TASK_ALWAYS_EAGER 2024-04-19 21:41:42 +02:00
Klaas van Schelven
8e70d04c2c Split issue_list into 2 parts for a shorter write-lock 2024-04-19 09:16:18 +02:00
Klaas van Schelven
c50780ab4e Use atomic transactions in views 2024-04-18 13:15:46 +02:00
Klaas van Schelven
d75bede5dd Show current status for issues 2024-04-16 21:54:36 +02:00
Klaas van Schelven
3a571afce7 Show timezones in templates
and: put it on Europe/Amsterdam 'for now'. Better local development experience
2024-04-16 13:59:15 +02:00
Klaas van Schelven
a7c02a24e2 Show 'seen in releases' in the UI 2024-04-16 13:31:08 +02:00
Klaas van Schelven
d89e3d4dd5 Add 'next-materialized historic annotation 2024-04-16 09:31:12 +02:00
Klaas van Schelven
d17292b2b7 Fix typo (textual) 2024-04-15 20:28:42 +02:00
Klaas van Schelven
f236dea0bf Don't allow newly created empty comments 2024-04-15 19:47:30 +02:00
Klaas van Schelven
a5f6326d26 Implement ctrl-enter form-submitting for the history comments 2024-04-15 19:43:18 +02:00
Klaas van Schelven
c3f8996e6b History view: Make button stand out less 2024-04-15 19:33:08 +02:00