Skip to content

fix(flashlight): PRESTAFLOW_PS_VERSION tirée du tag d'image, pas le tag lui-même - #12

Merged
PrestaEdit merged 2 commits into
mainfrom
fix/ps-version-from-image-tag
Nov 23, 2026
Merged

PrestaEdit merged 2 commits into
mainfrom
fix/ps-version-from-image-tag

Conversation

@PrestaEdit

Copy link
Copy Markdown
Contributor

ps-version est un tag d'image Flashlight (8.2.8-nginx, latest…). L'action le passait tel quel à la librairie en PRESTAFLOW_PS_VERSION. Or la librairie ne lit qu'une version nue : avec 8.2.8-nginx, le run s'arrêtait sur Error with version 8.2.8-nginx, sans exécuter aucun test. Une version 8.2.8 n'est publiée qu'avec un suffixe (8.2.8-nginx, 8.2.8-8.1-nginx…), donc le problème touchait toute la 8.2.x récente.

Changements

  • psVersionFromImageTag() extrait la version en tête du tag : 8.2.8-nginx donne 8.2.8, 1.7.8.11-7.4-fpm-alpine-nginx donne 1.7.8.11.
  • Pour un tag sans version (latest, nightly…), l'action lit la version dans la boutique : d'abord la variable PS_VERSION de l'image (latest = 9.2.1), sinon app/AppKernel.php.
  • Si rien ne donne la version, PRESTAFLOW_PS_VERSION n'est pas écrite (le .env du projet ou le env: de l'étape s'appliquent), et un avertissement explique quoi faire.
  • Le log affiche l'image et la version : Flashlight ready at … (image 8.2.8-nginx, PS 8.2.8).
  • action.yml et README mis à jour, dist/ reconstruit.

Vérifié

  • npm run lint OK ; npm test : 128 tests OK (tags, lecture de PS_VERSION, repli sur AppKernel, version inconnue).
  • Smoke réel sur PrestaFlow/github-action-smoke, librairie v1.9.0, client de démo :
Image Action Version passée Connexion client
8.2.8-nginx v2.4.0 8.2.8-nginx → Error with version, 0 test —
8.2.8-nginx cette branche 8.2.8 ✅
1.7.8.11 cette branche 1.7.8.11 ✅
latest cette branche 9.2.1 (lue dans l'image) ✅ avec PRESTAFLOW_THEME=hummingbird

Sur latest avec le thème par défaut (classic), la connexion réussit (« John DOE » est affiché), mais isLoggedIn() cherche le lien de déconnexion de Classic. PS 9.2 installe Hummingbird par défaut : c'est un réglage du projet, pas un sujet de l'action.

🤖 Generated with Claude Code

PrestaEdit and others added 2 commits November 23, 2026 20:11
…g itself

ps-version is a Flashlight image tag (8.2.8-nginx, latest…). It was passed as
is to the library, which only parses a bare version and failed the run with
"Error with version 8.2.8-nginx". The version is now taken from the tag, read
from the shop's AppKernel for a tag without one, and left unset (with a warning)
when neither tells.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…'s PS_VERSION

latest (9.2.1) gave no version from AppKernel. Flashlight images declare
PS_VERSION in their environment: read it first, AppKernel as a fallback.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@PrestaEdit
PrestaEdit merged commit 714ae2e into main Nov 23, 2026
1 check passed
@PrestaEdit
PrestaEdit deleted the fix/ps-version-from-image-tag branch November 23, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant