Commit Graph

302 Commits

Author SHA1 Message Date
Klaas van Schelven b6b4083ac1 Move vendored code into explicitly licenced dir 2024-09-27 18:03:51 +02:00
Klaas van Schelven 390048e2cd Comments/docstrings 2024-09-27 17:56:42 +02:00
Klaas van Schelven 6f0493f685 Resolved issues: italic & checkbox
in the lists; this is easier to read than a strikethrough.
I experimented with text-decoration-style and text-decoration-style but that
didn't make it better.
Our big brother doesn't bother to reveal the resolvedness of issues in lists
_at all_, btw. Surprising!
2024-09-27 12:16:25 +02:00
Klaas van Schelven a899be8cd5 Order events on event_list page
Paginator's Warning inspired me to do so
2024-09-26 16:18:29 +02:00
Klaas van Schelven 9db0b121ec Further HTML correctness checks; by not going through Firefox a few more issues were unhidden 2024-09-26 16:14:51 +02:00
Klaas van Schelven 35292d0ceb Replace "<a name" elements w/ id=...
Multiple problems w/ <a name

* in itself deprecated
* my approach of self-closing <a is illegal too

replaced w/ spans where necessary.

Further notes:

'topp' was never used; '#top' is taken too, so I went with first-frame (stil unused, 'maybe later')

The fixes in this and preceding commits were inspired by running "Nu Html Checker"

docker run -it --rm -p 8888:8888 ghcr.io/validator/validator:latest

files were simply saved in Firefox and then uploaded; make sure to ignore the warning which is caused by Firefox:

> A document must not include both a meta element with an http-equiv attribute whose value is content-type, and a meta element with a charset attribute.

I limited checking to the issue-list and various event-detail pages.
2024-09-26 15:58:42 +02:00
Klaas van Schelven b43d1cfa05 action must be non-empty 2024-09-26 15:27:46 +02:00
Klaas van Schelven f450bf6c29 Add 'alt' to img 2024-09-26 15:25:18 +02:00
Klaas van Schelven 336e126e3e Event-list: pagination 2024-09-26 10:39:36 +02:00
Klaas van Schelven e83d1b8290 Fix bottom menu separators (for the non-event, yes-admin case) 2024-09-26 09:57:31 +02:00
Klaas van Schelven fd79706c54 Search (TSTTCPW approach) 2024-09-25 14:49:05 +02:00
Klaas van Schelven bbe244c95d No {{ state_filter }} issues found logic 2024-09-25 14:30:28 +02:00
Klaas van Schelven 6f86a16f12 Don't hide project-related icons on bottom RHS for issue-list when issue-list empty
in fact, that situation may very well be one where you care about those icons
2024-09-25 14:22:39 +02:00
Klaas van Schelven 01570121d9 Typo in tailwind class 'ext' -> 'text' 2024-09-25 14:15:59 +02:00
Klaas van Schelven 096d1f7d9a Add 'samples' tests as such explicitly 2024-09-19 13:10:13 +02:00
Klaas van Schelven f2a78fed9d Use the envelope's event_id when using the envelope endpoint
* As per the spec 'takes precendence'
* Also fixes the reported bug on Laravel, which apparently doesn't send event_id
  as part of the event payload.
* Fixes the envelope tests (they were doing nothing when I moved the
  data samples around recently)
* Adds a 'no event_id in data, but yes in envelope' test to that test.
* Adds handling to send_json such that we can send envelopes when the event_id
  is missing from the event data.
2024-09-18 11:36:47 +02:00
Klaas van Schelven db486adb35 Rewrite comments on 'reopen' and 'issue_is_regression' 2024-09-17 23:01:41 +02:00
Klaas van Schelven 890b627553 Use 'platform' as a guessing fallback when filename fails 2024-09-17 21:23:27 +02:00
Klaas van Schelven d9e611ee9e Remove a TODO
duplicate one-liner is fine
2024-09-17 10:05:15 +02:00
Klaas van Schelven c5465f2f8a Don't assume samples miss the 'timestamp' property
(we have fixed the samples accordingly)
2024-09-17 09:38:08 +02:00
Klaas van Schelven 278630b529 Show Browser and OS info, and Contexts more generally 2024-09-16 16:55:34 +02:00
Klaas van Schelven 519c09b662 Syntax error fix 2024-09-16 14:19:34 +02:00
Klaas van Schelven f1b75aab81 api.json.schema: put back in code, make test fail on invalidness and related fixes
This reverts course on 4201fbd778, and restores event.schema.json from that
commit.  In that commit we said: 'this is not used'. Not true: it's used in a
test, though this test used the validity check to silently skip.

In this commit:

1. Do _not_ just silently skip invalid samples. Since we have a way of properly
   validating, let's use that so that we know how useful the samples that we have
   actually are.

2. Deal with "_meta", a field that we sometimes see in the "private samples" (data
   that ultimately comes from running a somewhat recent python-sdk against my
   actual codebase). The need for this was exposed by [1]

3. Add a test for the up-to-date-ness of event.json.schema

4. remove special-cased attribute-checks in `is_valid`; `send_json` was, at the
   time, an opportunistic way to just get my hands on some sample data. the
   approach at validation reflected that: I just did some tests on the existence
   of certain attributes to determine which json files were even events. But in
   the end I did a full validation using an API schema, which kinda made the
   whole business useless. This commit cleans up the individual checks.
2024-09-16 11:28:05 +02:00
Klaas van Schelven 138382cf13 Note about parsed_data.user 2024-09-13 17:17:48 +02:00
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