Goss tests broken on anything that does not define OS_VERSION
What steps did you take and what happened:
Build a Flatcar image for QEMU
What did you expect to happen:
Successful goss test run
Anything else you would like to add:
This appears to be broken since #1062 was merged. This PR removes the conditional in images/capi/packer/goss/goss-package.yaml that restricted this test to ova
Goss tests now fail on anything that does not use ova/sig/vhd / does not define OS_VERSION
==> qemu: Running goss tests...
==> qemu: Running GOSS render command: cd /tmp/goss && /tmp/goss-0.3.16-linux-amd64 --gossfile goss/goss.yaml --vars /tmp/goss/goss-vars.yaml --vars-inline '{"ARCH":"amd64","OS":"flatcar","PROVIDER":"qemu","containerd_version":"1.6.15","kubernetes_cni_deb_version":"1.2.0-00","kubernetes_cni_rpm_version":"1.2.0","kubernetes_cni_source_type":"http","kubernetes_cni_version":"1.2.0","kubernetes_deb_version":"1.23.15-00","kubernetes_rpm_version":"1.23.15","kubernetes_source_type":"http","kubernetes_version":"1.25.6"}' render > /tmp/goss-spec.yaml
==> qemu: could not read json data in goss/goss-package.yaml: template: test:60:26: executing "test" at <.Vars.OS_VERSION>: map has no entry for key "OS_VERSION"
==> qemu: Goss render failed
==> qemu: Inspect mode on : proceeding without failing Packer
==> qemu: Running GOSS render debug command: cd /tmp/goss && /tmp/goss-0.3.16-linux-amd64 --gossfile goss/goss.yaml --vars /tmp/goss/goss-vars.yaml --vars-inline '{"ARCH":"amd64","OS":"flatcar","PROVIDER":"qemu","containerd_version":"1.6.15","kubernetes_cni_deb_version":"1.2.0-00","kubernetes_cni_rpm_version":"1.2.0","kubernetes_cni_source_type":"http","kubernetes_cni_version":"1.2.0","kubernetes_deb_version":"1.23.15-00","kubernetes_rpm_version":"1.23.15","kubernetes_source_type":"http","kubernetes_version":"1.25.6"}' render -d > /tmp/debug-goss-spec.yaml
==> qemu: could not read json data in goss/goss-package.yaml: template: test:60:26: executing "test" at <.Vars.OS_VERSION>: map has no entry for key "OS_VERSION"
==> qemu: Goss render debug failed
==> qemu: Inspect mode on : proceeding without failing Packer
==> qemu: Running GOSS validate command: cd /tmp/goss && sudo /tmp/goss-0.3.16-linux-amd64 --gossfile goss/goss.yaml --vars /tmp/goss/goss-vars.yaml --vars-inline '{"ARCH":"amd64","OS":"flatcar","PROVIDER":"qemu","containerd_version":"1.6.15","kubernetes_cni_deb_version":"1.2.0-00","kubernetes_cni_rpm_version":"1.2.0","kubernetes_cni_source_type":"http","kubernetes_cni_version":"1.2.0","kubernetes_deb_version":"1.23.15-00","kubernetes_rpm_version":"1.23.15","kubernetes_source_type":"http","kubernetes_version":"1.25.6"}' validate --retry-timeout 0s --sleep 1s -f json -o pretty
qemu: Error: could not read json data in goss/goss-package.yaml: template: test:60:26: executing "test" at <.Vars.OS_VERSION>: map has no entry for key "OS_VERSION"
==> qemu: Goss validate failed
/kind bug [One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels]
Ran into the same issue when building build-qemu-ubuntu-2004
==> qemu: could not read json data in goss/goss-package.yaml: template: test:60:26: executing "test" at <.Vars.OS_VERSION>: map has no entry for key "OS_VERSION"
==> qemu: Goss render failed
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
mm, same here in 2025, stability
https://github.com/kubernetes-sigs/image-builder/issues/1638