Skip to content

Make repo names case-insensitive#6750

Open
Jackenmen wants to merge 4 commits into
Cog-Creators:V3/developfrom
Jackenmen:make_repo_names_case_insensitive
Open

Make repo names case-insensitive#6750
Jackenmen wants to merge 4 commits into
Cog-Creators:V3/developfrom
Jackenmen:make_repo_names_case_insensitive

Conversation

@Jackenmen
Copy link
Copy Markdown
Member

@Jackenmen Jackenmen commented May 15, 2026

Description of the changes

This PR makes repo names in Downloader case-insensitive. This involves:

  • making sure that the name of the repo is lowercase everywhere relevant (at API boundaries)
  • adding a migration that updates all repos to use lowercase names, resolving any conflicts that may occur
    • RepoManager's Config is completely replaced by a config with a new identifier and its repos folder is completely replaced by a new (repos.v2) folder - this allows us to create a mapping of old names to new names and then perform a rename in any order without overriding any existing data

Testing of this PR's changes should involve:

  • testing the migration, in particular:
    • name conflict handling (i.e. add 2 repos with names name and NAME and try performing a migration)
      • note for testers: while I'd generally only expect this to be possible on Linux/macOS file systems, it might be possible to test this on Windows too by creating an empty directory as case-sensitive and then creating an instance with that dir as data path, see: https://learn.microsoft.com/en-us/windows/wsl/case-sensitivity#modify-case-sensitivity; might require WSL feature to be enabled though
      • It would be good to test that Downloader prefers not changing existing names, i.e. with 3 repos named name, NAME, and name-2, I'd only expect NAME to be renamed to name-3, leaving name-2 as is
    • handling of repo names that were taken from installed cogs are have since been removed
    • exiting the migration mid-run (probably by just adding a line raising an exception in some strategic place in the repo manager migration)
    • checking that the config JSONs don't have extraneous data left after the migration and that data that is there is in the correct format post-migration
  • checking that all commands correctly work when passing an uppercase name for a repo, i.e. JackCogs should always manage to find a repo named jackcogs

Fixes #6371, fixes #6631, blocked by #6741

Have the changes in this PR been tested?

No

@Jackenmen Jackenmen added this to the 3.6.0 milestone May 15, 2026
@Jackenmen Jackenmen added Type: Enhancement Something meant to enhance existing Red features. Blocked By: Other PR Blocked by another PR. labels May 15, 2026
@github-actions github-actions Bot added Category: Cogs - Downloader This is related to the Downloader cog. Category: Core - Other Internals This is related to core internals that don't have a dedicated label. Category: Core - Downloader This is related to the internal Downloader APIs. labels May 15, 2026
@palmtree5 palmtree5 self-assigned this May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocked By: Other PR Blocked by another PR. Category: Cogs - Downloader This is related to the Downloader cog. Category: Core - Downloader This is related to the internal Downloader APIs. Category: Core - Other Internals This is related to core internals that don't have a dedicated label. Type: Enhancement Something meant to enhance existing Red features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent behavior between [p]repo add and other commands

2 participants