Update: stage support files before activation in the Terminal update path

Abierto
#484 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust
Área
backend, testing

Línea de trabajo

Read update.rs around lines 1580–1658 and compare the Terminal and operator paths with the System Update staging at lines 1727–1790; then inspect setup.rs and update_controller.rs at the referenced locations. Add coverage for failures on the second changed support file and after the first replacement, verifying the previous release set remains usable offline and user data is unchanged. The issue also requires cross-family review and installed update checks on Mac and Linux.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Intended behavior

elastos update in the Terminal and the remote operator apply path stage every changed provider and capsule file before they activate the new release, as the System Update path already does. If any step fails, the Home keeps one verified release set: the previous binary, components.json, providers and capsules. The Home then opens without network access, and user data stays unchanged.

Current gap

On the local 0.8.0 candidate 460b1888d, the Terminal path activates the binary and components.json (update.rs:1580), then writes each changed support file to its live path (update.rs:1591, setup.rs:3778-3839). If a later step fails, recovery (update.rs:1652-1658) restores the release files and keeps the support files that were already written. The code comment at update.rs:1587-1588 records the same gap. On the next Home start, support repair (update_controller.rs:695-696) downloads the previous files again, so a Home with network access repairs itself. A Home without network access cannot start until the release source is reachable again.

The gap was first recorded in #108 and confirmed again by the 22 October audit (#108 comment). Develop 3beb81643 has the same code, so the train did not introduce it. The System Update button uses complete staging (update.rs:1727-1790).

The updater that runs is the one already installed, so this fix protects updates that start from a release that contains it.

Done means

  • The Terminal and operator paths stage support with the shared staging (setup::stage_update_support, prepare_support) before activation.
  • Tests: the second changed support file fails after the first one succeeds; the update stops after the first support replacement. In both cases the previous binary, manifests, providers and capsules form one verified set, Home opens without network access, and user data is unchanged.
  • Cross-family review of the diff.
  • Installed update check on Mac and Linux from a release that contains the fix.

Triage (22 Oct): known gap for 0.8.0, fixed after the release. Related: #108, #89, #297.

Lenguaje dominante
Rust
Estrellas
6
Forks
2
Merge medio
1 d 3 h
PR fusionados (30 d)
42

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de elastos/elastos-runtime

Todos los issues de elastos/elastos-runtime

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.