Skip to content

[codex] Förbättra updaterloggning - #81

Merged
perNyfelt merged 1 commit into
mainfrom
codex/updater-logging
Jun 21, 2026
Merged

[codex] Förbättra updaterloggning#81
perNyfelt merged 1 commit into
mainfrom
codex/updater-logging

Conversation

@perNyfelt

Copy link
Copy Markdown
Member

What changed

  • Adds explicit Java-side logging for update download, checksum verification, extraction, staging, and updater handoff.
  • Adds a persistent updater script log at the app log location (updater.log) and records backup, copy, config update, cleanup, launch, and failure paths.
  • Moves update apply/restart work off the Swing completion callback and shows clearer update phases in the dialog, including the updater log path.
  • Sets Linux launches to use -Djdk.lang.Process.launchMechanism=VFORK in the packaged launcher and as a guarded startup default.

Why

A 1.2.0 to 1.4.0 in-app update could reach 100% and then appear stuck with no updater log in the installation directory. The app log showed Linux subprocess startup failures (posix_spawn failed, error: 13), which is relevant because the updater relies on launching a detached script after the app shuts down.

Impact and risk

  • Users get actionable progress messages and a concrete updater log path when update handoff starts.
  • Failed updater scripts should now leave persistent diagnostics under the app log directory instead of disappearing with the detached process.
  • The Linux process-launch workaround is limited to Linux and preserves any explicitly provided jdk.lang.Process.launchMechanism value.
  • No schema changes.

Validation

  • ./gradlew spotlessApply
  • ./gradlew :app:compileGroovy codenarcMain test --tests 'unit.se.alipsa.accounting.service.UpdateServiceTest' --tests 'unit.se.alipsa.accounting.support.ResourceBundleCompletenessTest'
  • ./gradlew build
  • git diff --check

@perNyfelt
perNyfelt merged commit d8ca88d into main Jun 21, 2026
@perNyfelt
perNyfelt deleted the codex/updater-logging branch June 21, 2026 17:31
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