Add one-shot migration

This commit is contained in:
Theodor S. Midtlien
2026-09-15 16:16:10 +02:00
committed by GitHub
parent c9cd499b15
commit ba71150350
6 changed files with 399 additions and 32 deletions
+7
View File
@@ -288,6 +288,13 @@ func (s *Server) Start() error {
return err
}
// A half-migrated machine still runs, it just keeps resolving profiles the
// old way, so a failure here is logged and retried on the next start rather
// than kept from starting at all.
if err := s.profileManager.MigrateLegacyProfiles(); err != nil {
log.Errorf("profile migration did not finish, retrying on next start: %v", err)
}
activeProf, err := s.profileManager.GetActiveProfileState()
if err != nil {
return fmt.Errorf("failed to get active profile state: %w", err)