Skip to content

fix(seeder): skip catalog sync for installed apps on diverged host ports#1005

Open
johno10661 wants to merge 1 commit into
Crosstalk-Solutions:devfrom
johno10661:fix/seeder-preserve-diverged-ports
Open

fix(seeder): skip catalog sync for installed apps on diverged host ports#1005
johno10661 wants to merge 1 commit into
Crosstalk-Solutions:devfrom
johno10661:fix/seeder-preserve-diverged-ports

Conversation

@johno10661

Copy link
Copy Markdown

Problem

The catalog sync in ServiceSeeder.run() (added with the supply depot work) overwrites container_config and ui_location for every curated service not flagged is_user_modified. That flag is new in 1.33.0, so it is false for 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:

  • the app's open link points at the wrong port (broken, or worse, at whatever unrelated service occupies the catalog port), and
  • a later update/reinstall recreates the container on the catalog port, which fails or collides with the service that occupies it.

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_location to 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:

  • internal container-port fixes (e.g. Meshtastic Web 80 → 8080) still sync — host port unchanged
  • ui_location scheme changes (e.g. Vaultwarden → https:8480) still sync — host port unchanged
  • unparseable/absent configs on either side fall through to the existing sync behavior

Fresh installs, custom apps, and user-modified rows are unaffected.

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.
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.

1 participant