Document silverback:api-components:imagine:generate (pre-generating imagine variants)
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- kubernetes, php
調査の方向性
content/4.api/ の uploads / imagine セクションから始め、issue の詳細に基づいてコマンド、そのオプション、出力、およびデプロイ後のワークフローを文書化してください。いつ実行するか、安全性と終了時の動作、HTTP キャッシュをパージする手順を説明してください。説明されているコマンドとワークフローをページが正確に網羅すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Vue
- スター
- 0
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
components-web-app/docs のほかの issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
components-web-app/docs#234 ·
-
Document opening the add page data form with defaults (?parentPage, ?parentPageData, ?template)オープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
components-web-app/docs#230 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
components-web-app/docs#228 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
components-web-app/docs#227 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
components-web-app/docs#235 ·
components-web-app/docs の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
aws-samples/sample-per-model-bedrock#243 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
stellar/stellar-dev-skill#151 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
ajeetraina/awesome-docker-sbx#398 ·
-
content 📄
難易度 1/5 1〜3時間 初心者へのやさしさ 68/100
Qiskit/documentation#5808 ·
メンテナーはふだん 1 日以内に返信
-
fix formatting of the sample database page of the docs対応中かも @Aaqibhafeezkhan が今日担当しました。 オープンdocumentation good first issue help wanted
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
chaoss/CollectOSS#544 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信