fix(api): add a migration script to rename *arr tags with spaces#1946
fix(api): add a migration script to rename *arr tags with spaces#1946gauthier-th merged 2 commits intodevelopfrom
Conversation
This PR adds a migration script that will run at the startup of the app to remove the spaces from the *arr tags of Jellyseerr. fix #1897 re #1913 re Radarr/Radarr#11251
|
I'm gonna try something. For testing and research purposes. Excuse me for the spam |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a migration script to automatically rename *arr (Radarr/Sonarr) tags that contain spaces in their user ID format, changing from {user.id} - to {user.id}- format to resolve compatibility issues with *arr applications.
- Adds a new migration script that runs at startup to update existing tag formats
- Implements a
renameTagmethod in the ServarrBase API class - Updates the settings interface to track completed migrations
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| server/lib/settings/migrations/0007_migrate_arr_tags.ts | New migration script that renames user tags by removing spaces from the format |
| server/lib/settings/index.ts | Adds migrations tracking to settings interface and default configuration |
| server/api/servarr/base.ts | Implements renameTag API method for updating tag labels |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Did a small test on a test instance, went well. Will test later on my prod instance. |
|
Preview tag: |
|
Tested in prod and works well |
|
I found a possible issue with this PR: Radarr (v6) is logging these lines: Sonarr (v4) is logging these lines: The tags in Sonarr (which is still on v4 and thus unaffected from these recent enforced naming rules) are renamed, while in Radarr the tags rely unchanged. now they are renamed to: Since tags with spaces are not prohibited in Sonarr v4, renaming works. However, since only the first two spaces and not all subsequent spaces are removed during migration, Radarr v6 blocks these renames. |
Good catch thanks. I'll make a PR to fix that. |
Description
This PR adds a migration script that will run at the startup of the app to remove the spaces from the *arr tags of Jellyseerr.
To-Dos
pnpm buildpnpm i18n:extractIssues Fixed or Closed
Tag Requestsshould not contain spaces per Sonarr and Radarr specifications #1897