A failed `app_api:app:update` command can leave the ExApp stopped with no way to retry

Ouverte
#1,234 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
42/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
kubernetes, php
Domaine
backend, devops

Piste de recherche

Start with lib/Command/ExApp/Update.php, especially the update sequence around lines 166–203 linked in the report. Trace how image pulling, container replacement, heartbeat checks, and metadata writes are handled, then check the Kubernetes path because the issue says its update flow may differ. Done means a failed update leaves the old ExApp usable and retryable, while a successful update commits the new metadata and removes the old container.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug deploy docker
Describe the bug

The command disables and stops the app, replaces its routes and translations, and writes the new version to the database. It only pulls and deploys the new image after all of that:
https://github.com/nextcloud/app_api/blob/634729d75dbca75a76dada69962e5bf99154a149/lib/Command/ExApp/Update.php#L166-L203

This results in the ex-app being down for the time the image is downloaded, and if the pull fails, the metadata is already lost, and the previous ex-app is left disabled.
The ex-app cannot be updated now since the metadata says it's already updated. The only way to update it is to unregister+register it.

A possible order:

  • Pull the new image first, before touching the running app.
  • Stop the old container and rename it instead of removing it, then start the new one.
  • Only after the heartbeat passes, write the version, routes and translations and remove the old container.
  • If any step fails, restore the old container.

For kubernetes things could look different, I'm not sure.

Steps/Code to Reproduce

/

Expected Results

/

Actual Results

/

Setup configuration

app_api = 36.0.0-dev.0
nextcloud = 36.0.0

Langage dominant
PHP
Étoiles
202
Forks
30
Merge moyen
3 j 20 h
PR mergées (30 j)
24

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de nextcloud/app_api

Toutes les issues de nextcloud/app_api

Issues similaires

Plus d'issues PHP

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.