Add one-shot migration

This commit is contained in:
Theodor S. Midtlien
2026-09-16 16:00:25 +02:00
committed by GitHub
parent fe97bd5b4e
commit db459b38ec
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)