Skip to content

fix(entrypoint): compare enabled app names to report disabled apps after upgrade#2554

Open
joshtrichards wants to merge 1 commit intomasterfrom
jtr/fix-before-after-app-list
Open

fix(entrypoint): compare enabled app names to report disabled apps after upgrade#2554
joshtrichards wants to merge 1 commit intomasterfrom
jtr/fix-before-after-app-list

Conversation

@joshtrichards
Copy link
Member

Summary

Refactor disabled-app reporting in docker-entrypoint.sh into a helper and compare normalized enabled app names before and after occ upgrade.

Instead of diffing full occ app:list output and parsing human-readable diff output, this change extracts only enabled app names and compares those sets directly.

Why

The previous implementation had two problems:

  1. False positives during upgrades

  2. Alpine / BusyBox incompatibility

    • The code depended on parsing diff output using grep '<', which does not work reliably with BusyBox diff output on Alpine.

By comparing only enabled app names, the script now reports actual before-vs-after enablement changes instead of line-level text differences.

What changed

  • Extract disabled-app reporting into a dedicated helper
  • Normalize occ app:list output down to enabled app names only
  • Compare the before/after app-name lists with comm
  • Keep the upgrade flow behavior the same otherwise

Behavior before

  • calendar 4.2.2 -> 4.2.3 could be reported as "disabled"
  • Alpine images could produce an empty disabled-app list due to diff output format differences

Behavior after

  • Upgraded-but-still-enabled apps are no longer reported as disabled
  • Disabled-app reporting works without depending on diff output format

Notes

This is both a cleanup and a bug fix:

  • the comparison logic is now easier to reason about
  • the result matches the actual intent: report apps enabled before upgrade but
    not enabled after upgrade

Fixes #1911

Alternative to PR #2267

Extract the disabled-app reporting logic into a helper and compare normalized enabled app names instead of parsing diff output from full `occ app:list` snapshots.

This fixes false positives where apps upgraded during `occ upgrade` were reported as disabled because their version line changed, and avoids reliance on diff output format differences on Alpine/BusyBox.

Fixes #1911

Signed-off-by: Josh <[email protected]>
@joshtrichards joshtrichards added bug 3. to review Waiting for reviews feature: upgrading Upgrading an existing deployment to a new image/NC version labels Mar 24, 2026
@joshtrichards joshtrichards requested a review from J0WI March 24, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug feature: upgrading Upgrading an existing deployment to a new image/NC version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disabled app list stays empty due to missing diffutils on Alpine

1 participant