fix(ci): give tables a platform so add-on packages publish (#12879)

The plan job of the add-on package workflow runs the platform matrix
for every add-on. On a publishing event it fails closed when an add-on
has no enabled platform. The Tables platform file listed three
platforms, all with enabled: false, so every master push failed
the plan and nothing was published or signed.

Enable the same four platforms as the other first-party add-ons
(linux/amd64, linux/arm64, darwin/arm64, darwin/amd64), each with its
native runner and the executable-start check. The fail-closed check in
the workflow is unchanged.

The tests assumed Tables was disabled. The matrix spec now requires at
least one enabled platform in the checked-in Tables file. The platform
spec covers Tables like the other add-ons. The shell suite builds a
disabled copy of the Tables file for the two fail-closed cases.


Assisted-by: Claude:claude-sonnet-5-5 [Claude Code]

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
mudler-agentandEttore Di Giacinto authored and GitHub committed 2026-10-24 18:08:54 +02:00
1 parent 9c4a8b2a87
commit 34306b852d
4 files changed
+15 -13

No files matched your search

+7 -3
View File
@@ -21,14 +21,18 @@ manifest: addons/tables/manifest.json
ui: addons/tables/ui/dist
platforms:
- platform: linux/amd64
enabled: false
enabled: true
runner: ubuntu-24.04
native_check: executable-start
- platform: linux/arm64
enabled: false
enabled: true
runner: ubuntu-24.04-arm
native_check: executable-start
- platform: darwin/arm64
enabled: false
enabled: true
runner: macos-14
native_check: executable-start
- platform: darwin/amd64
enabled: true
runner: macos-15-intel
native_check: executable-start
+4 -7
View File
@@ -322,15 +322,12 @@ var _ = Describe("platform matrix", func() {
Expect(err).NotTo(HaveOccurred())
Expect(strings.TrimSpace(out)).To(Equal(`{"include":[{"platform":"linux/amd64","runner":"r1","slug":"linux-amd64"},{"platform":"linux/arm64","runner":"r2","slug":"linux-arm64"}]}`))
})
It("ships the checked-in matrix with every platform disabled until its native check passes", func() {
It("ships a checked-in Tables matrix with at least one enabled platform", func() {
cfg, err := loadPlatforms("../../../addons/tables/package/platforms.yaml")
Expect(err).NotTo(HaveOccurred())
Expect(cfg.Platforms).NotTo(BeEmpty())
for _, e := range cfg.Platforms {
Expect(e.Enabled).To(BeFalse(), e.Platform)
}
_, err = cfg.enabled()
Expect(err).To(HaveOccurred())
enabled, err := cfg.enabled()
Expect(err).NotTo(HaveOccurred())
Expect(enabled).NotTo(BeEmpty())
})
})
+1 -1
View File
@@ -26,7 +26,7 @@ var releasePlatforms = map[string]string{
// request. Enabling without this record, or recording without enabling, fails.
var nativeChecked = map[string]bool{"linux/amd64": true, "linux/arm64": true, "darwin/arm64": true, "darwin/amd64": true}
var packagedAddons = []string{"voice", "face", "fine-tuning", "quantization", "studio", "talk"}
var packagedAddons = []string{"tables", "voice", "face", "fine-tuning", "quantization", "studio", "talk"}
var _ = Describe("the packaged add-ons", func() {
for _, id := range packagedAddons {
+3 -2
View File
@@ -76,7 +76,8 @@ sh scripts/addons/package.sh --layout "$work/leg" --version 1.2.3 --platform "$h
grep -F 'publishable=false' "$work/out" >/dev/null && grep -F 'verified=tables 1.2.3' "$work/out" >/dev/null
test -f "$work/leg/receipt.json" && test -f "$work/leg/index.json" && test -f "$work/leg/oci-layout"
case_ok 'package.sh builds and verifies a local check layout'
expect_fail 'package.sh refuses a platform the matrix has not enabled' 'not enabled' sh scripts/addons/package.sh --layout "$work/leg2" --version 1.2.3 --platform "$host" --executable "$work/stub"
sed 's/enabled: true/enabled: false/' addons/tables/package/platforms.yaml >"$work/disabled.yaml"
expect_fail 'package.sh refuses a platform the matrix has not enabled' 'not enabled' sh scripts/addons/package.sh --config "$work/disabled.yaml" --layout "$work/leg2" --version 1.2.3 --platform "$host" --executable "$work/stub"
expect_fail 'package.sh refuses an existing non-empty layout' 'not empty' sh scripts/addons/package.sh --layout "$work/leg" --version 1.2.3 --platform "$host" --executable "$work/stub" --local-check
expect_fail 'package.sh requires its arguments' 'usage:' sh scripts/addons/package.sh --version 1.2.3
expect_fail 'package.sh refuses an invalid version' 'semantic version' sh scripts/addons/package.sh --layout "$work/leg3" --version v1 --platform "$host" --executable "$work/stub" --local-check
@@ -122,7 +123,7 @@ for id in voice face fine-tuning quantization studio talk; 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'
expect_fail 'matrix fails closed while no platform is enabled' 'no enabled platform' "$tool" matrix --config addons/tables/package/platforms.yaml
expect_fail 'matrix fails closed while no platform is enabled' 'no enabled platform' "$tool" matrix --config "$work/disabled.yaml"
expect_fail 'matrix fails closed without a file' 'platform matrix' "$tool" matrix --config "$work/absent.yaml"
# channel.sh.