From 93ddd1950411cd1f65bd0f3a2b6b0b4a5f93fa2c Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 5 Nov 2026 09:15:36 +0000 Subject: [PATCH] chore(addons): retire the Memory add-on package Memory is built in. Drop the package matrix, the catalog template and the entry in the generated library index, and stop building it in the package workflow, so the add-on is no longer offered for a new install. The sources stay as the fixture of copies that are still installed: the host keeps the alias that maps the legacy id to the built-in provider, and the add-on page keeps its notice that memory is built in. The inventories and the docs follow. Assisted-by: Claude:claude-sonnet-5-5 --- .github/workflows/addons-package.yml | 4 +- Makefile | 2 +- addons/memory/package/platforms.yaml | 40 ----- core/services/addons/catalog/official_test.go | 2 +- docs/content/features/addons.md | 19 +-- docs/content/features/short-memory.md | 2 +- gallery/addons/README.md | 4 +- gallery/addons/index.yaml | 144 ------------------ gallery/addons/memory.yaml.tmpl | 18 --- pkg/addons/packaging/packaging_test.go | 10 +- pkg/addons/packaging/platforms_test.go | 2 +- pkg/addons/packaging/translations_test.go | 11 +- scripts/addons/package_test.sh | 6 +- scripts/addons/suites.json | 7 - 14 files changed, 36 insertions(+), 235 deletions(-) delete mode 100644 addons/memory/package/platforms.yaml delete mode 100644 gallery/addons/memory.yaml.tmpl diff --git a/.github/workflows/addons-package.yml b/.github/workflows/addons-package.yml index b3a2e6bb1c..ad95ff1d0e 100644 --- a/.github/workflows/addons-package.yml +++ b/.github/workflows/addons-package.yml @@ -117,7 +117,7 @@ jobs: strategy: fail-fast: true matrix: - addon: [tables, voice, face, fine-tuning, quantization, studio, talk, telegram, slack, discord, github, home-assistant, jellyfin, office, pikvm, sandbox, web, memory] + addon: [tables, voice, face, fine-tuning, quantization, studio, talk, telegram, slack, discord, github, home-assistant, jellyfin, office, pikvm, sandbox, web] steps: - uses: actions/checkout@v7 with: @@ -236,7 +236,7 @@ jobs: # event it fails the plan. A missing or malformed platform file, or # any other error, fails the plan on every event. include='[]' - for id in tables voice face fine-tuning quantization studio talk telegram slack discord github home-assistant jellyfin office pikvm sandbox web memory; do + for id in tables voice face fine-tuning quantization studio talk telegram slack discord github home-assistant jellyfin office pikvm sandbox web; do cfg="addons/$id/package/platforms.yaml" err="matrix-$id.err" if rows=$(go run ./scripts/addons/cmd/addonpkg matrix --config "$cfg" 2>"$err"); then diff --git a/Makefile b/Makefile index f998bd7787..03404dee73 100644 --- a/Makefile +++ b/Makefile @@ -1777,7 +1777,7 @@ test-addons-suites: ## `local-ai addons install `). Each zip holds the files of the OCI package ## of one add-on and platform: it is made from the package that package.sh builds. ## make addons-zip every add-on, this host's platform -## make addons-zip ADDON=memory one add-on +## make addons-zip ADDON=web one add-on ## make addons-zip PLATFORMS=linux/amd64,darwin/arm64 ADDON_EXECUTABLES= ## A platform other than this host needs the native executables at ## /-/. ADDON_VERSION overrides the manifest diff --git a/addons/memory/package/platforms.yaml b/addons/memory/package/platforms.yaml deleted file mode 100644 index 37c3705b87..0000000000 --- a/addons/memory/package/platforms.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# Release platform matrix of the Memory add-on package. -# -# A platform ships only while "enabled" is true. Enable a platform in the same -# change that shows its native check passing on a runner of that platform; -# until then it stays listed and disabled. The release workflow fails closed -# when no platform is enabled, and it never builds a platform that is not -# enabled here. -# -# runner: the GitHub runner label that builds and checks the platform -# natively. Required for an enabled platform. -# native_check: "executable-start": the packaged executable is extracted on -# the native runner and started. Required for an enabled platform. -# runtime: files besides the executable that the platform needs at run -# time, relative to the package root. They are taken from the -# runtime directory of the build and must exist. -schema: 1 -addon: memory -executable: memory -manifest: addons/memory/manifest.json -# The directory whose content is laid at the package root (ui/memory.js ...). -ui: addons/memory/ui/dist -# The skills laid at the package root as skills/ (skills/memory/SKILL.md ...). -skills: addons/memory/skills -platforms: - - platform: linux/amd64 - enabled: true - runner: ubuntu-24.04 - native_check: executable-start - - platform: linux/arm64 - enabled: true - runner: ubuntu-24.04-arm - native_check: executable-start - - platform: darwin/arm64 - enabled: true - runner: macos-15 - native_check: executable-start - - platform: darwin/amd64 - enabled: true - runner: macos-15-intel - native_check: executable-start diff --git a/core/services/addons/catalog/official_test.go b/core/services/addons/catalog/official_test.go index d025d6cb8e..73a69505c8 100644 --- a/core/services/addons/catalog/official_test.go +++ b/core/services/addons/catalog/official_test.go @@ -92,7 +92,7 @@ var _ = Describe("official library index", func() { Expect(versionPattern.MatchString(r.Version)).To(BeTrue(), r.ID) Expect(r.Artifact).To(HavePrefix("oci://"), r.ID) } - Expect(slices.Compact(slices.Sorted(slices.Values(ids)))).To(ConsistOf("fine-tuning", "quantization", "voice", "face", "studio", "talk", "telegram", "slack", "discord", "github", "home-assistant", "jellyfin", "pikvm", "tables", "office", "sandbox", "web", "memory")) + Expect(slices.Compact(slices.Sorted(slices.Values(ids)))).To(ConsistOf("fine-tuning", "quantization", "voice", "face", "studio", "talk", "telegram", "slack", "discord", "github", "home-assistant", "jellyfin", "pikvm", "tables", "office", "sandbox", "web")) }) }) diff --git a/docs/content/features/addons.md b/docs/content/features/addons.md index 83a5dcd2a8..1f3e32589a 100644 --- a/docs/content/features/addons.md +++ b/docs/content/features/addons.md @@ -974,7 +974,7 @@ list. On the first start, when the owner has no `sources.json` in the `addons` folder yet, LocalAI registers one library with the ID `official`. It is a YAML index of the first-party add-ons (Tables, Voice, Face, Fine-tuning, Quantization, Studio, Talk, Simple Office, -Sandbox, Web and Short memory). The index has one entry for each enabled platform of each add-on, so an +Sandbox and Web, plus the other first-party add-ons). The index has one entry for each enabled platform of each add-on, so an install on Linux (amd64 or arm64) and on macOS (Apple silicon or Intel) finds the add-ons for its own platform. The Sandbox add-on is Linux only. No add-on is built for Windows yet, so the official library lists nothing there. @@ -1145,7 +1145,7 @@ and prints what it holds. `local-ai addons install ` checks it, uploads it to a running server and prints the link of the page that finishes the install: ```bash -local-ai addons install dist/addons/memory-0.1.0-linux-amd64.zip \ +local-ai addons install dist/addons/web-0.1.0-linux-amd64.zip \ --target http://localhost:8080 --api-key "$LOCALAI_API_KEY" ``` @@ -1218,21 +1218,21 @@ second build path: the zip holds the same files as the registry package. ```bash # One add-on, for the platform of this machine -make addons-zip ADDON=memory +make addons-zip ADDON=web # Every add-on, for the platform of this machine make addons-zip # Other platforms need the native executables -make addons-zip ADDON=memory PLATFORMS=linux/amd64,darwin/arm64 \ +make addons-zip ADDON=web PLATFORMS=linux/amd64,darwin/arm64 \ ADDON_EXECUTABLES=/path/to/executables ``` The files go to `dist/addons` (`ADDONS_ZIP_DIR` changes it): ```text -dist/addons/memory-0.1.0-linux-amd64.zip -dist/addons/memory-0.1.0-linux-amd64.zip.sha256 +dist/addons/web-0.1.0-linux-amd64.zip +dist/addons/web-0.1.0-linux-amd64.zip.sha256 ``` | Variable | Meaning | @@ -1253,8 +1253,8 @@ zip bytes, so you can rebuild a file and compare the sha256. To build and install one add-on: ```bash -make addons-zip ADDON=memory -local-ai addons install dist/addons/memory-0.1.0-linux-amd64.zip +make addons-zip ADDON=web +local-ai addons install dist/addons/web-0.1.0-linux-amd64.zip ``` ## Library sources @@ -3245,7 +3245,8 @@ anything is sent. A manifest that does not is refused. ### The retired Memory add-on The notes are built in, and the add-on `memory` that used to read them is an alias of the -built-in provider. A copy that is still installed keeps working: the host does not list it +built-in provider. Its package is retired: it is no longer in the library or built by the +package workflow, so it is not offered for a new install. A copy that is still installed keeps working: the host does not list it as a provider, a choice that names it means the built-in provider, and its index files and skills are ignored so the notes do not load twice. Nothing is deleted. A new provider must use another ID. diff --git a/docs/content/features/short-memory.md b/docs/content/features/short-memory.md index c2ac7dc84f..167bd78945 100644 --- a/docs/content/features/short-memory.md +++ b/docs/content/features/short-memory.md @@ -256,7 +256,7 @@ or on the Files page. ## If you used the Memory add-on -The add-on "Short memory" is no longer needed. Its notes, its save choice and its +The add-on "Short memory" is no longer needed, and it is no longer offered in the library. Its notes, its save choice and its agent setting keep working, and the server does not load its index files or skills twice. You can leave it installed or remove it; no note is lost. If you disabled the add-on to stop memory and never chose otherwise, memory stays off for you. diff --git a/gallery/addons/README.md b/gallery/addons/README.md index f8168ff5ba..c85fc1c8a3 100644 --- a/gallery/addons/README.md +++ b/gallery/addons/README.md @@ -3,7 +3,7 @@ This directory holds the template of the catalog entries of the first-party add-ons. It holds no live URL, registry or namespace. The registry and repository are inputs of the release workflow (`ADDON_OCI_REPOSITORY`). Each first-party add-on has its own -template (`tables`, `voice`, `face`, `fine-tuning`, `quantization`, `studio`, `talk`, `office`, `sandbox`, `web`, `memory`, `github`, `jellyfin`, `pikvm`, `discord`) and its own release +template (`tables`, `voice`, `face`, `fine-tuning`, `quantization`, `studio`, `talk`, `office`, `sandbox`, `web`, `github`, `jellyfin`, `pikvm`, `discord`) and its own release platform matrix, `addons//package/platforms.yaml`. The templates differ in `name:` only. ## Generate the index @@ -57,7 +57,7 @@ go run ./scripts/addons/cmd/addonpkg catalog \ --merged ... # the other flags as above ``` -Use `face`, `fine-tuning`, `quantization`, `studio`, `talk`, `office`, `sandbox`, `web` or `memory` in place of `voice` for the other packages. +Use `face`, `fine-tuning`, `quantization`, `studio`, `talk`, `office`, `sandbox`, `web` in place of `voice` for the other packages. All packages share one repository, so pass the same repository for each. The artifact of an entry is `oci://:-`, for example `...:voice-sha-50f0f3de26d2`. diff --git a/gallery/addons/index.yaml b/gallery/addons/index.yaml index b6df21695d..60524f5968 100644 --- a/gallery/addons/index.yaml +++ b/gallery/addons/index.yaml @@ -1102,150 +1102,6 @@ - "mark-played" - "set-favorite" - "add-to-playlist" -- id: "memory" - name: Short memory - description: "Your chats keep short notes about you and read them before they answer. By default a new note is saved only after you confirm it; you can choose to have it saved at once with an Undo, or never." - version: "0.0.0-development" - channel: "development" - artifact: "oci://quay.io/go-skynet/local-ai-addons:memory-development" - mutable: true - os: "darwin" - arch: "amd64" - policy: - requireSignature: true - issuer: "https://token.actions.githubusercontent.com" - identity: "https://github.com/mudler/LocalAI/.github/workflows/addons-package.yml@refs/heads/master" - ui: - title: "Short memory" - description: "Your chats keep short notes about you and read them before they answer. By default a new note is saved only after you confirm it; you can choose to have it saved at once with an Undo, or never." - mainPage: "memory" - icon: "ui/icon.png" - titles: - "de": "Kurzzeitgedächtnis" - "es": "Memoria breve" - "fr": "Mémoire courte" - "id": "Memori singkat" - "it": "Memoria breve" - "ko": "짧은 기억" - "pt-BR": "Memória curta" - "zh-CN": "简短记忆" - descriptions: - "de": "Ihre Chats führen kurze Notizen über Sie und lesen sie, bevor sie antworten. Standardmäßig wird eine neue Notiz erst nach Ihrer Bestätigung gespeichert; Sie können sie auch sofort mit Rückgängig-Option speichern lassen oder nie." - "es": "Tus chats guardan notas breves sobre ti y las leen antes de responder. De forma predeterminada, una nota nueva se guarda solo después de que la confirmes; puedes elegir que se guarde al instante con la opción de deshacer, o que nunca se guarde." - "fr": "Vos conversations gardent de courtes notes sur vous et les lisent avant de répondre. Par défaut, une nouvelle note n'est enregistrée qu'après votre confirmation ; vous pouvez choisir de l'enregistrer immédiatement avec une option Annuler, ou jamais." - "id": "Obrolan Anda menyimpan catatan singkat tentang Anda dan membacanya sebelum menjawab. Secara bawaan, catatan baru disimpan hanya setelah Anda mengonfirmasinya; Anda dapat memilih agar langsung disimpan dengan opsi Urungkan, atau tidak pernah." - "it": "Le tue chat conservano brevi note su di te e le leggono prima di rispondere. Di norma una nuova nota viene salvata solo dopo la tua conferma; puoi scegliere di salvarla subito con un Annulla, oppure mai." - "ko": "채팅이 나에 대한 짧은 메모를 보관하고, 답하기 전에 읽습니다. 기본적으로 새 메모는 확인한 후에만 저장되며, 실행 취소와 함께 바로 저장하거나 저장하지 않도록 선택할 수 있습니다." - "pt-BR": "Seus chats guardam notas curtas sobre você e as leem antes de responder. Por padrão, uma nova nota só é salva depois que você a confirma; você pode escolher salvá-la na hora, com a opção de desfazer, ou nunca." - "zh-CN": "你的聊天会记下关于你的简短笔记,并在回答前读取它们。默认情况下,新笔记须经你确认后才会保存;你也可以选择立即保存并提供撤销,或从不保存。" -- id: "memory" - name: Short memory - description: "Your chats keep short notes about you and read them before they answer. By default a new note is saved only after you confirm it; you can choose to have it saved at once with an Undo, or never." - version: "0.0.0-development" - channel: "development" - artifact: "oci://quay.io/go-skynet/local-ai-addons:memory-development" - mutable: true - os: "darwin" - arch: "arm64" - policy: - requireSignature: true - issuer: "https://token.actions.githubusercontent.com" - identity: "https://github.com/mudler/LocalAI/.github/workflows/addons-package.yml@refs/heads/master" - ui: - title: "Short memory" - description: "Your chats keep short notes about you and read them before they answer. By default a new note is saved only after you confirm it; you can choose to have it saved at once with an Undo, or never." - mainPage: "memory" - icon: "ui/icon.png" - titles: - "de": "Kurzzeitgedächtnis" - "es": "Memoria breve" - "fr": "Mémoire courte" - "id": "Memori singkat" - "it": "Memoria breve" - "ko": "짧은 기억" - "pt-BR": "Memória curta" - "zh-CN": "简短记忆" - descriptions: - "de": "Ihre Chats führen kurze Notizen über Sie und lesen sie, bevor sie antworten. Standardmäßig wird eine neue Notiz erst nach Ihrer Bestätigung gespeichert; Sie können sie auch sofort mit Rückgängig-Option speichern lassen oder nie." - "es": "Tus chats guardan notas breves sobre ti y las leen antes de responder. De forma predeterminada, una nota nueva se guarda solo después de que la confirmes; puedes elegir que se guarde al instante con la opción de deshacer, o que nunca se guarde." - "fr": "Vos conversations gardent de courtes notes sur vous et les lisent avant de répondre. Par défaut, une nouvelle note n'est enregistrée qu'après votre confirmation ; vous pouvez choisir de l'enregistrer immédiatement avec une option Annuler, ou jamais." - "id": "Obrolan Anda menyimpan catatan singkat tentang Anda dan membacanya sebelum menjawab. Secara bawaan, catatan baru disimpan hanya setelah Anda mengonfirmasinya; Anda dapat memilih agar langsung disimpan dengan opsi Urungkan, atau tidak pernah." - "it": "Le tue chat conservano brevi note su di te e le leggono prima di rispondere. Di norma una nuova nota viene salvata solo dopo la tua conferma; puoi scegliere di salvarla subito con un Annulla, oppure mai." - "ko": "채팅이 나에 대한 짧은 메모를 보관하고, 답하기 전에 읽습니다. 기본적으로 새 메모는 확인한 후에만 저장되며, 실행 취소와 함께 바로 저장하거나 저장하지 않도록 선택할 수 있습니다." - "pt-BR": "Seus chats guardam notas curtas sobre você e as leem antes de responder. Por padrão, uma nova nota só é salva depois que você a confirma; você pode escolher salvá-la na hora, com a opção de desfazer, ou nunca." - "zh-CN": "你的聊天会记下关于你的简短笔记,并在回答前读取它们。默认情况下,新笔记须经你确认后才会保存;你也可以选择立即保存并提供撤销,或从不保存。" -- id: "memory" - name: Short memory - description: "Your chats keep short notes about you and read them before they answer. By default a new note is saved only after you confirm it; you can choose to have it saved at once with an Undo, or never." - version: "0.0.0-development" - channel: "development" - artifact: "oci://quay.io/go-skynet/local-ai-addons:memory-development" - mutable: true - os: "linux" - arch: "amd64" - policy: - requireSignature: true - issuer: "https://token.actions.githubusercontent.com" - identity: "https://github.com/mudler/LocalAI/.github/workflows/addons-package.yml@refs/heads/master" - ui: - title: "Short memory" - description: "Your chats keep short notes about you and read them before they answer. By default a new note is saved only after you confirm it; you can choose to have it saved at once with an Undo, or never." - mainPage: "memory" - icon: "ui/icon.png" - titles: - "de": "Kurzzeitgedächtnis" - "es": "Memoria breve" - "fr": "Mémoire courte" - "id": "Memori singkat" - "it": "Memoria breve" - "ko": "짧은 기억" - "pt-BR": "Memória curta" - "zh-CN": "简短记忆" - descriptions: - "de": "Ihre Chats führen kurze Notizen über Sie und lesen sie, bevor sie antworten. Standardmäßig wird eine neue Notiz erst nach Ihrer Bestätigung gespeichert; Sie können sie auch sofort mit Rückgängig-Option speichern lassen oder nie." - "es": "Tus chats guardan notas breves sobre ti y las leen antes de responder. De forma predeterminada, una nota nueva se guarda solo después de que la confirmes; puedes elegir que se guarde al instante con la opción de deshacer, o que nunca se guarde." - "fr": "Vos conversations gardent de courtes notes sur vous et les lisent avant de répondre. Par défaut, une nouvelle note n'est enregistrée qu'après votre confirmation ; vous pouvez choisir de l'enregistrer immédiatement avec une option Annuler, ou jamais." - "id": "Obrolan Anda menyimpan catatan singkat tentang Anda dan membacanya sebelum menjawab. Secara bawaan, catatan baru disimpan hanya setelah Anda mengonfirmasinya; Anda dapat memilih agar langsung disimpan dengan opsi Urungkan, atau tidak pernah." - "it": "Le tue chat conservano brevi note su di te e le leggono prima di rispondere. Di norma una nuova nota viene salvata solo dopo la tua conferma; puoi scegliere di salvarla subito con un Annulla, oppure mai." - "ko": "채팅이 나에 대한 짧은 메모를 보관하고, 답하기 전에 읽습니다. 기본적으로 새 메모는 확인한 후에만 저장되며, 실행 취소와 함께 바로 저장하거나 저장하지 않도록 선택할 수 있습니다." - "pt-BR": "Seus chats guardam notas curtas sobre você e as leem antes de responder. Por padrão, uma nova nota só é salva depois que você a confirma; você pode escolher salvá-la na hora, com a opção de desfazer, ou nunca." - "zh-CN": "你的聊天会记下关于你的简短笔记,并在回答前读取它们。默认情况下,新笔记须经你确认后才会保存;你也可以选择立即保存并提供撤销,或从不保存。" -- id: "memory" - name: Short memory - description: "Your chats keep short notes about you and read them before they answer. By default a new note is saved only after you confirm it; you can choose to have it saved at once with an Undo, or never." - version: "0.0.0-development" - channel: "development" - artifact: "oci://quay.io/go-skynet/local-ai-addons:memory-development" - mutable: true - os: "linux" - arch: "arm64" - policy: - requireSignature: true - issuer: "https://token.actions.githubusercontent.com" - identity: "https://github.com/mudler/LocalAI/.github/workflows/addons-package.yml@refs/heads/master" - ui: - title: "Short memory" - description: "Your chats keep short notes about you and read them before they answer. By default a new note is saved only after you confirm it; you can choose to have it saved at once with an Undo, or never." - mainPage: "memory" - icon: "ui/icon.png" - titles: - "de": "Kurzzeitgedächtnis" - "es": "Memoria breve" - "fr": "Mémoire courte" - "id": "Memori singkat" - "it": "Memoria breve" - "ko": "짧은 기억" - "pt-BR": "Memória curta" - "zh-CN": "简短记忆" - descriptions: - "de": "Ihre Chats führen kurze Notizen über Sie und lesen sie, bevor sie antworten. Standardmäßig wird eine neue Notiz erst nach Ihrer Bestätigung gespeichert; Sie können sie auch sofort mit Rückgängig-Option speichern lassen oder nie." - "es": "Tus chats guardan notas breves sobre ti y las leen antes de responder. De forma predeterminada, una nota nueva se guarda solo después de que la confirmes; puedes elegir que se guarde al instante con la opción de deshacer, o que nunca se guarde." - "fr": "Vos conversations gardent de courtes notes sur vous et les lisent avant de répondre. Par défaut, une nouvelle note n'est enregistrée qu'après votre confirmation ; vous pouvez choisir de l'enregistrer immédiatement avec une option Annuler, ou jamais." - "id": "Obrolan Anda menyimpan catatan singkat tentang Anda dan membacanya sebelum menjawab. Secara bawaan, catatan baru disimpan hanya setelah Anda mengonfirmasinya; Anda dapat memilih agar langsung disimpan dengan opsi Urungkan, atau tidak pernah." - "it": "Le tue chat conservano brevi note su di te e le leggono prima di rispondere. Di norma una nuova nota viene salvata solo dopo la tua conferma; puoi scegliere di salvarla subito con un Annulla, oppure mai." - "ko": "채팅이 나에 대한 짧은 메모를 보관하고, 답하기 전에 읽습니다. 기본적으로 새 메모는 확인한 후에만 저장되며, 실행 취소와 함께 바로 저장하거나 저장하지 않도록 선택할 수 있습니다." - "pt-BR": "Seus chats guardam notas curtas sobre você e as leem antes de responder. Por padrão, uma nova nota só é salva depois que você a confirma; você pode escolher salvá-la na hora, com a opção de desfazer, ou nunca." - "zh-CN": "你的聊天会记下关于你的简短笔记,并在回答前读取它们。默认情况下,新笔记须经你确认后才会保存;你也可以选择立即保存并提供撤销,或从不保存。" - id: "office" name: Simple Office description: "Lightweight basic Word, Excel, PowerPoint and PDF file work from your chats, without requiring Sandbox." diff --git a/gallery/addons/memory.yaml.tmpl b/gallery/addons/memory.yaml.tmpl deleted file mode 100644 index 971e1f0868..0000000000 --- a/gallery/addons/memory.yaml.tmpl +++ /dev/null @@ -1,18 +0,0 @@ -id: "{{addon}}" -name: Short memory -description: "{{description}}" -version: "{{version}}" -channel: "{{channel}}" -artifact: "oci://{{repository}}:{{tag}}" -digest: "{{digest}}" -os: "{{os}}" -arch: "{{arch}}" -policy: - requireSignature: true - issuer: "{{issuer}}" - identity: "{{identity}}" -ui: - title: "{{title}}" - description: "{{description}}" - mainPage: "{{main_page}}" - icon: "{{icon}}" diff --git a/pkg/addons/packaging/packaging_test.go b/pkg/addons/packaging/packaging_test.go index b3849d7a73..f2a3cd4d2d 100644 --- a/pkg/addons/packaging/packaging_test.go +++ b/pkg/addons/packaging/packaging_test.go @@ -954,7 +954,7 @@ var _ = Describe("catalog template", func() { Expect(err).To(MatchError(ContainSubstring("development channel only"))) }) It("renders an entry for every first-party add-on from its own template", func() { - for _, id := range []string{"tables", "voice", "face", "fine-tuning", "quantization", "studio", "talk", "telegram", "slack", "discord", "github", "home-assistant", "jellyfin", "office", "pikvm", "sandbox", "web", "memory"} { + for _, id := range []string{"tables", "voice", "face", "fine-tuning", "quantization", "studio", "talk", "telegram", "slack", "discord", "github", "home-assistant", "jellyfin", "office", "pikvm", "sandbox", "web"} { p := newProjectFor(id, both) m := p.merged("1.2.3", rev, nil) repoName := newRegistry().repo("addons") @@ -977,7 +977,7 @@ var _ = Describe("catalog template", func() { } }) It("reports the chat tools of the manifest on each entry and not the admin tools", func() { - counts := map[string]int{"tables": 16, "fine-tuning": 8, "quantization": 6, "voice": 0, "office": 11, "sandbox": 5, "web": 5, "memory": 0} + counts := map[string]int{"tables": 16, "fine-tuning": 8, "quantization": 6, "voice": 0, "office": 11, "sandbox": 5, "web": 5} for id, want := range counts { p := newProjectFor(id, both) m := p.merged("1.2.3", rev, nil) @@ -1051,7 +1051,7 @@ var _ = Describe("catalog template", func() { for _, e := range entries { got[e.ID] = e.ToolCount } - Expect(got).To(Equal(map[string]int{"tables": 16, "fine-tuning": 8, "quantization": 6, "voice": 0, "face": 0, "studio": 0, "talk": 0, "telegram": 0, "slack": 0, "discord": 0, "github": 14, "home-assistant": 11, "jellyfin": 16, "office": 11, "pikvm": 8, "sandbox": 5, "web": 5, "memory": 0})) + Expect(got).To(Equal(map[string]int{"tables": 16, "fine-tuning": 8, "quantization": 6, "voice": 0, "face": 0, "studio": 0, "talk": 0, "telegram": 0, "slack": 0, "discord": 0, "github": 14, "home-assistant": 11, "jellyfin": 16, "office": 11, "pikvm": 8, "sandbox": 5, "web": 5})) }) It("refuses missing inputs, backend repositories, bad channels and unknown placeholders", func() { reg := newRegistry() @@ -1213,7 +1213,7 @@ var _ = Describe("workflow policy", func() { }) It("rejects a workflow that names one add-on by path or skips an add-on in the matrix", func() { expect(mutate("node \"addons/$ADDON/ui/build.mjs\"\n - name: Fill", "node addons/tables/ui/build.mjs\n - name: Fill"), "P_ADDON_PATH") - expect(mutate(" addon: [tables, voice, face, fine-tuning, quantization, studio, talk, telegram, slack, discord, github, home-assistant, jellyfin, office, pikvm, sandbox, web, memory]\n", " platform: [x]\n"), "P_MATRIX") + expect(mutate(" addon: [tables, voice, face, fine-tuning, quantization, studio, talk, telegram, slack, discord, github, home-assistant, jellyfin, office, pikvm, sandbox, web]\n", " platform: [x]\n"), "P_MATRIX") }) It("rejects a plan that does not refuse an add-on without an enabled platform", func() { expect(mutate("has no enabled platform; refusing to publish", "has no platform"), "P_FAIL_CLOSED") @@ -1263,7 +1263,7 @@ var _ = Describe("workflow policy", func() { // firstPartyAddons are the add-ons the release workflow packages. The list is // written out so a new add-on is a deliberate change here and in the workflow. -var firstPartyAddons = []string{"tables", "voice", "face", "fine-tuning", "quantization", "studio", "talk", "telegram", "slack", "discord", "github", "home-assistant", "jellyfin", "office", "pikvm", "sandbox", "web", "memory"} +var firstPartyAddons = []string{"tables", "voice", "face", "fine-tuning", "quantization", "studio", "talk", "telegram", "slack", "discord", "github", "home-assistant", "jellyfin", "office", "pikvm", "sandbox", "web"} func readWorkflow() string { GinkgoHelper() diff --git a/pkg/addons/packaging/platforms_test.go b/pkg/addons/packaging/platforms_test.go index 8e7a963c2a..a23caabb88 100644 --- a/pkg/addons/packaging/platforms_test.go +++ b/pkg/addons/packaging/platforms_test.go @@ -30,7 +30,7 @@ var nativeChecked = map[string]bool{"linux/amd64": true, "linux/arm64": true, "d // platforms stay listed and disabled. var linuxOnly = map[string]bool{"sandbox": true} -var packagedAddons = []string{"tables", "voice", "face", "fine-tuning", "quantization", "studio", "talk", "office", "sandbox", "web", "memory"} +var packagedAddons = []string{"tables", "voice", "face", "fine-tuning", "quantization", "studio", "talk", "office", "sandbox", "web"} var _ = Describe("the packaged add-ons", func() { for _, id := range packagedAddons { diff --git a/pkg/addons/packaging/translations_test.go b/pkg/addons/packaging/translations_test.go index 0405ac0ccb..ebb716399a 100644 --- a/pkg/addons/packaging/translations_test.go +++ b/pkg/addons/packaging/translations_test.go @@ -100,7 +100,13 @@ var _ = Describe("first-party add-on translations", func() { Expect(err).NotTo(HaveOccurred()) var ids []string for _, d := range dirs { - ids = append(ids, filepath.Base(filepath.Dir(d))) + id := filepath.Base(filepath.Dir(d)) + // The retired Memory add-on is no longer packaged or offered. Its + // sources stay as the fixture of the copies that are still installed. + if id == retiredAddon { + continue + } + ids = append(ids, id) } slices.Sort(ids) want := slices.Clone(firstPartyAddons) @@ -109,6 +115,9 @@ var _ = Describe("first-party add-on translations", func() { }) }) +// retiredAddon is the add-on whose package was retired. See addons/memory. +const retiredAddon = "memory" + var _ = Describe("translations in the package and the library", func() { It("changes the package digest when a translation changes, and the package still verifies", func() { build := func(edit func(string) string) (string, string) { diff --git a/scripts/addons/package_test.sh b/scripts/addons/package_test.sh index 1b70fd7a61..3bb259084d 100755 --- a/scripts/addons/package_test.sh +++ b/scripts/addons/package_test.sh @@ -89,7 +89,7 @@ test -f "$work/voice/receipt.json" case_ok 'package.sh builds and verifies the voice add-on for the host' # A platform other than the host is refused for every add-on, whatever the config. if [ "$host" = linux/amd64 ]; then foreign=linux/arm64; else foreign=linux/amd64; fi -for id in tables voice face fine-tuning quantization studio talk telegram slack discord office sandbox web memory; do +for id in tables voice face fine-tuning quantization studio talk telegram slack discord office sandbox web; do expect_fail "package.sh refuses a foreign platform without an executable: $id" 'is not this host' sh scripts/addons/package.sh --config "addons/$id/package/platforms.yaml" --layout "$work/foreign-$id" --version 1.2.3 --platform "$foreign" --local-check done case_ok 'package.sh refuses a foreign platform without an executable for every add-on' @@ -123,11 +123,11 @@ mkdir -p "$work/runtime/gvisor-bin" for f in runsc gvisor-profile cloud-hypervisor virtiofsd gvisor-bin/checkpointgofer gvisor-bin/gvisor-sentry-prewarmer gvisor-bin/gvisor_sentry gvisor-bin/runsc-fd-parking gvisor-bin/runsc-metric-server; do printf 'stand-in\n' >"$work/runtime/$f" done -for id in tables voice face fine-tuning quantization studio talk telegram slack discord office sandbox web memory; do +for id in tables voice face fine-tuning quantization studio talk telegram slack discord office sandbox web; do PATH="$work/stubbin:$PATH" sh scripts/addons/package.sh --config "addons/$id/package/platforms.yaml" --layout "$work/stub-$id" --version 1.2.3 --platform "$host" --runtime-dir "$work/runtime" --local-check >"$work/out" 2>&1 || { cat "$work/out" >&2; exit 1; } done grep -x './addons/tables/cmd/tables CGO_ENABLED=1' "$work/gobuild.log" >/dev/null -for id in voice face fine-tuning quantization studio talk telegram slack discord office sandbox web memory; do +for id in voice face fine-tuning quantization studio talk telegram slack discord office sandbox web; do grep -x "./addons/$id/cmd/$id CGO_ENABLED=0" "$work/gobuild.log" >/dev/null || { echo "FAIL: $id is not built with CGO_ENABLED=0" >&2; cat "$work/gobuild.log" >&2; exit 1; } done case_ok 'package.sh builds Tables with cgo and the pure Go add-ons without' diff --git a/scripts/addons/suites.json b/scripts/addons/suites.json index 78ec0fcbae..d8c242b0be 100644 --- a/scripts/addons/suites.json +++ b/scripts/addons/suites.json @@ -534,7 +534,6 @@ "audits actual host calls and strict package contract for telegram", "audits actual host calls and strict package contract for voice", "audits actual host calls and strict package contract for web", - "audits actual host calls and strict package contract for memory", "lists every release platform with its runner", "lists every release platform with its runner", "lists every release platform with its runner", @@ -606,7 +605,6 @@ "has consistent package files for telegram", "has consistent package files for voice", "has consistent package files for web", - "has consistent package files for memory", "refuses missing and backend repositories before any request", "pushes platform digests then the index, and a retry is digest-identical", "rejects overwriting an immutable version with different content", @@ -723,7 +721,6 @@ "gives every translated connector kind of github the fields of its English kind, and no others", "gives every translated connector kind of home-assistant the fields of its English kind, and no others", "gives every translated connector kind of jellyfin the fields of its English kind, and no others", - "gives every translated connector kind of memory the fields of its English kind, and no others", "gives every translated connector kind of office the fields of its English kind, and no others", "gives every translated connector kind of pikvm the fields of its English kind, and no others", "gives every translated connector kind of quantization the fields of its English kind, and no others", @@ -744,7 +741,6 @@ "translates the title and the description of github in every main language", "translates the title and the description of home-assistant in every main language", "translates the title and the description of jellyfin in every main language", - "translates the title and the description of memory in every main language", "translates the title and the description of office in every main language", "translates the title and the description of pikvm in every main language", "translates the title and the description of quantization in every main language", @@ -4680,7 +4676,6 @@ "go: has consistent package files for telegram", "go: has consistent package files for voice", "go: has consistent package files for web", - "go: has consistent package files for memory", "go: has no hard-coded add-on path", "go: lays the skills of the add-on in their own layer and verifies them with the install rules", "go: lets only the release-index job write the contents of the repository", @@ -4712,7 +4707,6 @@ "package.sh refuses a foreign platform without an executable: office", "package.sh refuses a foreign platform without an executable: sandbox", "package.sh refuses a foreign platform without an executable: web", - "package.sh refuses a foreign platform without an executable: memory", "package.sh refuses a guest image that is not by digest", "package.sh refuses a sandbox release build without SANDBOX_GUEST_IMAGE", "package.sh stamps the sandbox executable with a guest image in a local check", @@ -4724,7 +4718,6 @@ "go: audits actual host calls and strict package contract for github", "go: audits actual host calls and strict package contract for home-assistant", "go: audits actual host calls and strict package contract for jellyfin", - "go: audits actual host calls and strict package contract for memory", "go: audits actual host calls and strict package contract for office", "go: audits actual host calls and strict package contract for pikvm", "go: audits actual host calls and strict package contract for quantization",