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

Aberta
#484 2 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
42/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
rust
Domínio
backend, testing

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Rust
Estrelas
6
Forks
2
Merge médio
1d 3h
PRs com merge (30d)
42

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de elastos/elastos-runtime

Todas as issues de elastos/elastos-runtime

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.