Skip to content

fix(tui): restart process after auto-upgrade to apply new binary#29345

Open
LifeJiggy wants to merge 1 commit into
anomalyco:devfrom
LifeJiggy:fix/session-auth-lost-after-upgrade
Open

fix(tui): restart process after auto-upgrade to apply new binary#29345
LifeJiggy wants to merge 1 commit into
anomalyco:devfrom
LifeJiggy:fix/session-auth-lost-after-upgrade

Conversation

@LifeJiggy
Copy link
Copy Markdown

Issue for this PR

Closes #27859

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

After auto-upgrade downloads and installs a new binary, the running process continues with the old binary. Session/auth state that was in memory is lost because the new binary is only picked up on next manual restart.

  • Made upgrade() return a boolean indicating whether an upgrade happened
  • On successful upgrade, the worker disposes all instances and stops the server, then the thread spawns a new process with the same args and exits cleanly
  • Added tests for Installation event types and upgrade return path

How did you verify your code works?

2 new tests confirming Installation event type strings. Typecheck clean. Existing tests unaffected.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

After auto-upgrade downloads and installs a new binary, the running
process continues with the old binary's in-memory state. Fix by:
- Returning a boolean from upgrade() indicating if upgrade occurred
- Disposing instances and stopping server before restart
- Spawning a new process with the same args and exiting cleanly
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.

Sessions and auth state lost after auto-upgrade from 1.15.0 to 1.15.1

1 participant