diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eee261e..d61c742 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,6 +68,24 @@ jobs: --examples-root=examples/fabric \ -o configuration-avd-ci.xpkg + # The Function package's own build, minus the runtime image -- embedding + # needs a built tarball, and nothing here depends on it to answer the + # question this step asks: does `package/` plus the examples still parse? + # + # Added after the v0.1.4 release failed on exactly this. `--examples-root` + # defaults to ./examples, so this build collected a helm values file that + # had just landed under examples/ and rejected it -- a failure reachable + # only from the release, i.e. after the tag. The configuration build above + # could not have caught it: it names a narrower examples root, so the two + # builds disagreed about what "the examples" are. + - name: Build the Function package + run: | + set -euo pipefail + crossplane xpkg build \ + --package-root=package \ + --examples-root=examples/fabric \ + -o function-avd-ci.xpkg + # The offline suite runs on the runner's interpreter, so it says nothing about # the image the xpkg actually embeds. Without this job a Dockerfile, uv or # Python bump is only exercised by the release build -- i.e. after the tag, diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 34b0175..944ce43 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -128,11 +128,23 @@ jobs: sudo mv ./crossplane /usr/local/bin/crossplane crossplane version --client + # --examples-root is stated even though `package/` is the package root, + # because it is NOT optional: it defaults to ./examples, so leaving it out + # does not mean "no examples" -- it means "every YAML under examples/, + # whatever ends up there". That default broke the v0.1.4 release, when + # examples/lab/topology.yaml (helm values, no `kind`) landed beside the + # fabric examples and this build rejected it with "Object 'Kind' is + # missing". --ignore is no help: it does not reach --examples-root. + # + # examples/fabric is what both packages ship, and it holds Fabric XRs and + # nothing else. examples/lab is lab scaffolding, not a demonstration of + # the API. - name: Build the package run: | set -euo pipefail crossplane xpkg build \ --package-root=package \ + --examples-root=examples/fabric \ --embed-runtime-image-tarball="runtime-${{ matrix.arch }}.tar" \ -o "function-avd-${{ matrix.arch }}.xpkg" diff --git a/pyproject.toml b/pyproject.toml index 67bccf5..afd3ad0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "function-avd" -version = "0.1.4" +version = "0.1.5" description = "Living AVD model driven by Crossplane XRs (Fabric -> Device composite function)" readme = "README.md" authors = [ diff --git a/uv.lock b/uv.lock index 04f1d68..dbbba70 100644 --- a/uv.lock +++ b/uv.lock @@ -327,7 +327,7 @@ wheels = [ [[package]] name = "function-avd" -version = "0.1.4" +version = "0.1.5" source = { editable = "." } dependencies = [ { name = "crossplane-function-sdk-python" },