Document silverback:api-components:imagine:generate (pre-generating imagine variants)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- kubernetes, php
- Ambito
- documentation
Direzione di ricerca
Inizia nella sezione uploads / imagine sotto content/4.api/ e documenta, in base ai dettagli dell’issue, il comando, le sue opzioni, l’output e il flusso di lavoro successivo al deploy. Spiega quando eseguirlo, la sua sicurezza e il comportamento all’uscita, oltre al passaggio per svuotare la cache HTTP. Il lavoro è terminato quando la pagina descrive accuratamente il comando e il flusso di lavoro indicati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The API bundle adds a console command to generate missing imagine variants ahead of requests: components-web-app/api-components-bundle#416 (issue components-web-app/api-components-bundle#413).
Please document it in the bundle's uploads / imagine section (content/4.api/).
What to document
Why it exists. When an app adds an imagine filter to an existing field, every existing image needs a new variant. Without this command, each variant is generated the first time the API serialises a resource holding the image, inside a visitor's request. A page with many images then generates many variants in one request, within the web pod's memory limit. A variant skipped over the memory budget is retried on every request.
The command.
bin/console silverback:api-components:imagine:generate [--filter=<filter> ...] [--class=<FQCN> ...] [--dry-run] [-v]
- Walks every uploadable entity and field, drafts included. A field's filters are its
UploadableFieldimagineFiltersplus, for an entity implementingImagineFiltersInterface,getImagineFilters($property, null). Only raster images are processed (SVG and non-images are left out). - Generates, one at a time, each variant that is not stored yet, and saves its file info. Originals and stored variants are not touched, so it is safe to re-run after an interruption: a second run generates nothing.
--filter(repeatable) only generates those filters; a name that is not a configured LiipImagine filter set exits 2 before anything runs.--class(repeatable) only walks that uploadable class or its subclasses; a class that is not uploadable exits 2.- Variants are written with the field's
imagineCacheControl(from#[UploadableField]), falling back tosilverback_api_components.uploadable.cache_control.imagine, exactly as variants generated during a request. --dry-runcounts what is missing and generates nothing.- Output: counts of generated, already stored, skipped over the memory budget, failed, and original missing (a dry run prints "To generate" instead of "Generated").
-vlists each variant. - Exit code 1 if any variant failed, so a Kubernetes Job shows as failed. Variants skipped over the memory budget, and originals whose file is missing, are reported but exit 0.
- It uses the same memory budget as request-time generation (
silverback_api_components.imagine.memory_limit), and a CLI withmemory_limit=-1is never checked. A variant over the budget is logged and skipped. - Only registered when LiipImagineBundle is enabled.
How to run it after a deploy that adds a filter.
- Run the command as a one-off Kubernetes Job from the API (php) image, so the image processing stays out of the web pods. Optionally run
--dry-runfirst to see how many variants are missing. - Then purge the HTTP cache (
bin/console silverback:api-components:purge-http-cache, orPOST /_/http_cache/purge), so cached API responses and pages list the new variants.
- Lingua principale
- Vue
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di components-web-app/docs
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
components-web-app/docs#217 ·
-
documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
components-web-app/docs#216 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
components-web-app/docs#215 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
components-web-app/docs#214 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
components-web-app/docs#212 ·
Tutte le issue di components-web-app/docs
Issue simili
-
docs good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
soma-intelligence/open-health-sync#59 ·
I maintainer di solito rispondono entro 1 giorno
-
agent-task risk:low
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
guyellis/http-status-check#512 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
gradio-app/gradio#13964 ·
I maintainer di solito rispondono entro 1 giorno
-
area: recipes bug good first issue priority: low size: XS
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 94/100
cubrid-lab/cubrid-cookbook-python#315 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
docs(ko): replace the mistranslated term for redaction in the Korean docsForse già presa @KeuqS l’ha presa oggi. Apertadocumentation good first issue priority: low size: XS
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
cubrid-lab/cubrid-mcp-server#290 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno