Skip to content

Conversation

@jpdillingham
Copy link
Member

This is a rather sneaky regression introduced in #1384, which included a change that was, ironically, supposed to guard against regressions like this by moving the serialization logic inside the script and webhook services, instead of a shared extension. In doing so the compiler optimized out the runtime type checking that allowed serialization to work properly, and inlined EventData which contains only a few properties.

This PR adjusts the JsonSerializer.Serialize() call to explicitly tell it to check the runtime type.

Closes #1388

@jpdillingham jpdillingham merged commit 64be239 into master Jul 6, 2025
4 checks passed
@jpdillingham jpdillingham deleted the fix-json branch July 6, 2025 22:22
alexlebens pushed a commit to alexlebens/infrastructure that referenced this pull request Jul 8, 2025
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [slskd/slskd](https://slskd.org) ([source](https://github.com/slskd/slskd)) | minor | `0.22.5` -> `0.23.1` |

---

### Release Notes

<details>
<summary>slskd/slskd (slskd/slskd)</summary>

### [`v0.23.1`](https://github.com/slskd/slskd/releases/tag/0.23.1)

[Compare Source](slskd/slskd@0.23.0...0.23.1)

#### What's Changed

- Fix regression in scripts and webhooks causing json to be missing detail by [@&#8203;jpdillingham](https://github.com/jpdillingham) in slskd/slskd#1389

**Full Changelog**: slskd/slskd@0.23.0...0.23.1

### [`v0.23.0`](https://github.com/slskd/slskd/releases/tag/0.23.0)

[Compare Source](slskd/slskd@0.22.5...0.23.0)

### 🎉 Database Migrations (that preserve data!)

This release introduces a new system that performs database migrations on existing data ([#&#8203;1343](slskd/slskd#1343)), which was necessary to migrate the Transfers database to correct an out of memory issue at startup for users with a large number of transfer records (see [#&#8203;1291](slskd/slskd#1291)).

Upon first start after upgrading to 0.23.0 the application will apply the initial migration to the Transfers database (`transfers.db`), if there is one.  Depending on the system and the amount of data present, this may take a while, and the UI will be inaccessible during the process.

Backups of existing databases are taken prior to the start of the process (you can find them in `/data/backups`) and they aren't deleted automatically, so **your historical data is safe**.  A feature to add auto deletion after a period of time will come later.

In the unlikely event that the process fails to complete successfully, follow the directions in the new [migration docs](https://github.com/slskd/slskd/blob/master/docs/migrations.md), which explain what to do if something goes wrong, and how to get the application back to a working state if the migration can't be completed.

If you find that your database can't be migrated successfully, please file an issue and I can work on providing a standalone migration tool.

#### What's Changed

- Add a system to perform database migrations by [@&#8203;jpdillingham](https://github.com/jpdillingham) in slskd/slskd#1343
- Fix remaining transfter State queries using HasFlag() by [@&#8203;jpdillingham](https://github.com/jpdillingham) in slskd/slskd#1356
- Extend health check startup to 60 minutes, set $SHELL for docker container, and bump the GC memory limit from 500MiB to 2GiB by [@&#8203;jpdillingham](https://github.com/jpdillingham) in slskd/slskd#1359
- Bump Soulseek.NET to 7.1.0 by [@&#8203;jpdillingham](https://github.com/jpdillingham) in slskd/slskd#1363
- Update documentation for scripts by [@&#8203;jpdillingham](https://github.com/jpdillingham) in slskd/slskd#1384
- Bump http-proxy-middleware from 2.0.6 to 2.0.9 in /src/web by [@&#8203;dependabot](https://github.com/dependabot) in slskd/slskd#1329

**Full Changelog**: slskd/slskd@0.22.5...0.23.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xLjMiLCJ1cGRhdGVkSW5WZXIiOiI0MS4xLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImltYWdlIl19-->

Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/860
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Webhook payload has changed in v0.23.0

2 participants