Commit Graph

1630 Commits

Author SHA1 Message Date
Klaas van Schelven
30ae7881aa Teams & Projects API
See #146
2025-09-11 09:55:32 +02:00
Klaas van Schelven
c222581951 Add tests for create_release_if_needed 2025-09-11 09:55:23 +02:00
Klaas van Schelven
ee5b49e951 API: Sketch TODO for grouping_key[s] fields
See #146
2025-09-11 09:55:21 +02:00
Klaas van Schelven
b0b2573d17 Releases API
Fix #191
See #146
2025-09-11 09:55:15 +02:00
Klaas van Schelven
829cea1a80 detection of a new release through an event ⇏ triggering of a TurningPoint
This more exactly expresses semantics by itself, and is also in preparation of
creating releases through the API (which have no triggering event)

See #146
2025-09-11 09:55:09 +02:00
Klaas van Schelven
3bab02fda2 API: Remove global Grouping routes
grouping will return later as Issue.grouping_keys & Event.grouping_key
i.e. with the relevant info directly resolved

See #146
2025-09-11 09:55:01 +02:00
Klaas van Schelven
c4c749d1e4 Issues API
See #146
2025-09-11 09:54:51 +02:00
Klaas van Schelven
4844c72415 Events API
See #146
2025-09-11 09:54:43 +02:00
Klaas van Schelven
a87d846a99 API: auth (using the global token)
See #146
2025-09-09 10:41:03 +02:00
Klaas van Schelven
4c2c26743e Canonical API 'skeleton': urls & views
this gives me something to look at and work with, despite
being wildly incomplete

See #146
2025-09-09 10:07:10 +02:00
Klaas van Schelven
9a36426689 Fix urls.py
editing mistake in be7ac2043b
2025-09-08 15:39:40 +02:00
Klaas van Schelven
be7ac2043b Implement /api/0/ endpoint
Fix #97
2025-09-08 14:50:23 +02:00
Klaas van Schelven
d949c984c8 Tailwind 4 border-color fix (preserve tailwind 3 behavior) 2025-09-08 10:13:12 +02:00
Klaas van Schelven
f143645b9a Fix development settings
Broken in a4ecd386b6 while experimenting with `script_name`
(the experiment was checked in)
2025-09-08 09:54:45 +02:00
Klaas van Schelven
81e27efe24 Move conf utils to separate module
In settings-code I want to import as little as possible,
as doing it may trip up things, especially in the context
of transitive/circular imports. Better to put the 3 utils
that are used in settings into a separate module.
2025-09-08 09:49:39 +02:00
Klaas van Schelven
a58ceba31f transaction: use connection.vendor instead of settings.DATABASES engine check
connection.vendor reflects the actual backend of the connection in use,
not just the ENGINE string in global settings. This makes the check more
robust when multiple databases are configured (e.g. main DB on MySQL,
snappea DB on SQLite). The sqlite-specific handling now only applies to
the relevant connection.

See #117
2025-09-05 23:15:33 +02:00
Klaas van Schelven
4ac572f31c Comment that we don't use whitenoise.CompressedManifestStaticFilesStorage
had me surprised for a little bit while debugging another issue (of which I
thought it might have been caused by whitenoise). Better to have something
to grep for
2025-09-05 23:11:29 +02:00
Klaas van Schelven
25c4e34f94 Merge pull request #201 from bugsink/force-script-name
Support hosting at subpath
2025-09-05 23:01:24 +02:00
Klaas van Schelven
a4ecd386b6 Support hosting at subpath
"In principle" setting `SCRIPT_NAME` is enough. The way we do this is [1] using
`FORCE_SCRIPT_NAME` (which does not depend on messing with reverse proxy
settings and [2] by deducing the correct value from `BASE_URL` (which must be
set anyway) automatically.

By works I mean: `reverse` and `{% url` pick it up from there.

However, there are subtleties / extra work:

* `STATIC_URL` is needed too b/c https://code.djangoproject.com/ticket/34028

* in many pre-existing code I just created a path manually in the html. Such
  hrefs are obviously not magically fixed for script_name. Rather than doing
  the "full rewrite" (into `{% url`) this commit just prepends the
  `script_name` in those cases. That's the way forward that will least likely
  break and it gives us something to grep for if we ever want to 'do it
  right'.

* `LOGIN_REDIRECT_URL` and `LOGIN_URL` needed to use a view-name for this to
  work (using a view-name gets revolved using the thing that introduces
  `script_name`)

Checked, no work needed:

* views (`redirect` and `HttpResponseRedirect`)
* html uses of action="..."

Fix #93
2025-09-05 22:47:22 +02:00
Klaas van Schelven
5307860b4d Merge pull request #89 from bugsink/django-5-2
Upgrade to Django 5.2
2.0.0a1
2025-09-05 10:01:02 +02:00
Klaas van Schelven
31559c5b6c Django 5.2: update changelog 2025-09-05 09:54:32 +02:00
Klaas van Schelven
1bbb383cfb Merge branch 'main' into django-5-2 2025-09-05 09:49:15 +02:00
Klaas van Schelven
b88fc4f442 CHANGELOG; update in advance 2025-09-05 09:48:25 +02:00
Klaas van Schelven
144e570db6 MySQL: do not save 2 queries in store_tags
it doesn't support the relevant machinery
2025-09-04 15:20:23 +02:00
Klaas van Schelven
e0cb4b6369 Save another query in store_tags
(analogous to the parent commit)

made possible by Django 5.2
2025-09-04 14:10:52 +02:00
Klaas van Schelven
9a13bdb83d Save a query in store_tags
made possible by Django 5.2
2025-09-04 13:52:08 +02:00
Klaas van Schelven
170d76647e Tailwind 3=>4: final changes 2025-09-04 13:30:09 +02:00
Klaas van Schelven
ad8a2a5e4f Tailwind 3 => 4: bg-opacity "folded into bg"
https://tailwindcss.com/docs/upgrade-guide#renamed-utilities
2025-09-04 13:20:22 +02:00
Klaas van Schelven
610e7b1c17 Tailwind 3 => 4: rounded => rounded-sm
https://tailwindcss.com/docs/upgrade-guide#renamed-utilities
2025-09-04 13:20:22 +02:00
Klaas van Schelven
ac8e2e8cd6 Tailwind 3 => 4: ring => ring-3
https://tailwindcss.com/docs/upgrade-guide#renamed-utilities
2025-09-04 13:20:22 +02:00
Klaas van Schelven
f51bdb487e Tailwind 3 => 4 (and django-tailwind => 4.2)
Applied a version of the instructions here:
https://github.com/timonweb/django-tailwind/issues/229

and ran most of the "original build" instructions
2025-09-04 13:17:35 +02:00
Klaas van Schelven
12af5302ef Drop Python 3.9 support
In principle, Python 3.9 has ~1 month of life in it (its own EOL).
I'm OK with that in practice for main (we haven't released Bugsink yet),
as well as considering the following overview of popular Linux distros
and their Python versions (which will have a much stronger influence
on practical Python deployment in the wild than whatever the PSF says):

Not affected:

* Ubuntu 22.04 LTS (EOL Apr 2027) has Python 3.10
* Ubuntu 24.04 LTS (EOL Apr 2029) has Python 3.12
* Debian 12 Bookworm (EOL Jun 2028) has Python 3.11
* RHEL 9 (EOL May 2032) default 3.9 but also offers 3.11 and 3.12
* The Docker image we use has Python version configurable (we use 3.12)

Affected:

* Debian 11 Bullseye (EOL Aug 2026) has Python 3.9

Given Bugsink's own age my guess is "no one's on Bullseye".
2025-09-04 11:48:12 +02:00
Klaas van Schelven
0764024389 Replace python-sourcemap with ecma426
an up-to-date, w/ section support. Moreover: the other is 'NIH'.
2025-09-04 10:10:23 +02:00
Klaas van Schelven
8b8b61ea3c Use safe_join in vacuum utility
given the listdir right before it: not strictly necessary
but easier to reason about than yet another 'nosec'
2025-09-02 13:30:09 +02:00
Klaas van Schelven
10658d70a5 vacuum_ingest_dir Minor stylistic post-copilot cleanup
Fix #163
2025-09-02 13:24:21 +02:00
copilot-swe-agent[bot]
257b5f1777 Implement vacuum_ingest_dir management command
(Klaas removed copilot's testcases)

See #163

Co-authored-by: vanschelven <223833+vanschelven@users.noreply.github.com>
2025-09-02 13:17:48 +02:00
Klaas van Schelven
25b7f7c0bc Merge pull request #178 from bugsink/non-root-docker
non-root Docker
2025-09-02 13:01:21 +02:00
Klaas van Schelven
b911acebdc single-server template, warn about containing-dir
for snappea PID_FILE

See #195
2025-09-01 20:39:42 +02:00
Klaas van Schelven
3a050e7533 Typo in comment 2025-09-01 20:33:55 +02:00
Klaas van Schelven
41944a8cf0 Update snappea PID_FILE default location to be in bugsink-specific directory
See #195
2025-09-01 20:30:03 +02:00
Klaas van Schelven
4ad3c5efcf Hardening of Temporary-Directory Usage
Defends against certain forms of local privilege escalation, i.e.
understood to be defense in depth rather than a security issue given
the recommended ways of deploying (docker container or in a single-use
single-server)

Fix #174

See https://github.com/python/cpython/pull/23901
2025-08-30 15:10:50 +02:00
Klaas van Schelven
16578cbe6c Remove dead code
See #194
2025-08-29 14:50:39 +02:00
Klaas van Schelven
d62d016be3 When selecting text in the stacktrace frameHeader, don't toggle the frame
The frameheader is a typical target for copy/paste actions (filenames/paths)
and having stuff jump around right after selecting is annoying
2025-08-29 14:47:46 +02:00
Klaas van Schelven
d155fa2bb2 Push User.language choices callable to the model
as per the comment: possible from Django 5.0 up
2025-08-28 21:44:57 +02:00
Klaas van Schelven
5cf4591166 Merge branch 'main' into django-5-2 2025-08-28 21:38:24 +02:00
Klaas van Schelven
6a523a6a67 Merge pull request #192
i18n support and Chinese translation
2025-08-28 20:23:54 +02:00
Klaas van Schelven
a0dc91c8c5 Push verbose_name to the model-level
at least for those fields where it is currently used.
this necessitates a patch to the migration machinery, which this commit adds

See #161
2025-08-28 16:03:27 +02:00
Klaas van Schelven
f38112f3df Pull markup out of translation files
it's bad enough that we do markup in views.py

See #161
2025-08-28 15:31:43 +02:00
Klaas van Schelven
a3cdeb9c8a Flake8 (including one breakage)
See #161
2025-08-28 15:01:05 +02:00
Klaas van Schelven
31fdf46a10 yesnomaybe translation fix
see https://code.djangoproject.com/ticket/36579

* remove workarounds; instead just provide a correctly formatted one in the .po file
* regen of .po file more generally

See #161
2025-08-28 14:17:31 +02:00