Skip to content

Built-in repositories rename from addons -> apps #7079

Description

@mdegat01

Description

Our current built-in repositories are these:

# Git-based built-in repositories
CORE = REPOSITORY_CORE
COMMUNITY_APPS = "https://github.com/hassio-addons/repository"
ESPHOME = "https://github.com/esphome/home-assistant-addon"
MUSIC_ASSISTANT = "https://github.com/music-assistant/home-assistant-addon"

core for reference is really https://github.com/home-assistant/addons

Good news is changing the name and url of a github repo is surprisingly easy. You can do it in settings and put in a permanent redirect from the old url to the new one. We're not sure what expiration there is on that but according to Frenck its long enough that it might as well be forever. So that is very easy to change in a backwards compatible way.

The bad news is actually changing the source code is more complicated. For all repositories except core a hash of the URL is used to create the unique identifier or slug of apps. We can't let this change for built-in repositories. It will divorce existing installed apps from their store repository preventing updates and creating repairs, will likely break backup and restore since we'll be unable to find the store config, will break all existing my links in documentation around the community, etc.

So to change the source code to use the new URL we'll need to do the following:

  1. Change all built-in repositories to work like core with a hard-coded slug. For Community, ESPHome and Music Assistant we'll just use the existing hash.
  2. Update the origin URL existing clones on disk to the new one

That should be enough to maintain compatibility while changing the URL for the built-in repos. For all other repos including the ones we own like addons-development we'll have to decide what to do. We can rely on the permanent redirect option and publish a guide on that for others to use and that mostly covers it. For non-builtins users had to specifically add the repository URL so that'll persist unchanged in Supervisor settings and in backups preventing most of the issues builtins have (since builtins are not included in Supervisor settings and backups).

The one issue we will have though is my links. My links to particular apps include the slug which includes the hash of the repository. If we do a permanent redirect then my links to apps will either work for users with the old URL or the new URL but not both. We may need to look into addressing this in order to present a proper migration/rename plan to other app developers.

Additional context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

None yet

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions