fix(seeder): skip catalog sync for installed apps on diverged host ports#1005
Open
johno10661 wants to merge 1 commit into
Open
fix(seeder): skip catalog sync for installed apps on diverged host ports#1005johno10661 wants to merge 1 commit into
johno10661 wants to merge 1 commit into
Conversation
The catalog sync added in the supply depot work overwrites container_config and ui_location for any curated service not flagged is_user_modified. Apps installed on an alternate host port before that flag existed (e.g. because the catalog default port was already taken on the host) have their record reset to the catalog port on the next boot, desyncing it from the running container and breaking the app's open link. Compare the published host ports of the existing record against the catalog and leave the row alone when an installed app diverges. Only host ports are compared, so catalog corrections to internal container ports (Meshtastic 80->8080) and ui_location scheme changes (Vaultwarden https:8480) still reach existing installs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The catalog sync in
ServiceSeeder.run()(added with the supply depot work) overwritescontainer_configandui_locationfor every curated service not flaggedis_user_modified. That flag is new in 1.33.0, so it isfalsefor all rows that predate it — including apps that were deliberately installed on an alternate host port because the catalog default was already taken on that host.On the first boot after upgrading to 1.33.0, the seeder resets such a record back to the catalog port while the actual container keeps running on the alternate port. The record is now desynced from reality:
Real-world case: a host running Consul (server RPC on 8300) had Kolibri installed on 8310. After upgrading to 1.33.0-rc.1, the auto-seed reset Kolibri's
ui_locationto 8300, so the Supply Depot card linked to Consul's RPC port and the app appeared dead.Fix
Before syncing a row, compare the published host ports of the existing record against the catalog entry. If the app is installed and its host ports diverge, skip the sync for that row — the deployed container is the source of truth.
Only host ports are compared, deliberately, so the corrections this sync exists for still propagate:
ui_locationscheme changes (e.g. Vaultwarden →https:8480) still sync — host port unchangedFresh installs, custom apps, and user-modified rows are unaffected.