From 14c25f8a15d57c318c5e6d94e137ec0312eac136 Mon Sep 17 00:00:00 2001 From: Seth Fitzsimmons Date: Fri, 31 Jul 2026 12:29:19 -0700 Subject: [PATCH 1/2] fix(ci): generate pyspark expressions before building the published wheel overture-schema-pyspark's generated validation expressions are no longer committed to git; they are regenerated on demand from the Pydantic models. The publish workflow synced the workspace and ran `uv build` with no codegen step, so `expressions/generated/` was absent on disk at build time and the wheel (and sdist) shipped without it -- validate_model() would discover no models to run. uv_build silently produced the empty wheel. Generate the tree before building (only for overture-schema-pyspark), and add a post-build guard that aborts publish if the wheel carries no generated expressions, so a future regression fails loudly instead of shipping a hollow package. Verified end to end under the uv_build backend: without the generate step the wheel and sdist contain zero generated modules and the guard fires; with it, all generated model modules ship in both and the guard passes. Signed-off-by: Seth Fitzsimmons --- .github/workflows/publish-python-packages.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/publish-python-packages.yaml b/.github/workflows/publish-python-packages.yaml index c2502297e..1c4a9802c 100644 --- a/.github/workflows/publish-python-packages.yaml +++ b/.github/workflows/publish-python-packages.yaml @@ -79,6 +79,16 @@ jobs: id: get-code-artifact-params uses: ./.github/actions/code-artifact + # overture-schema-pyspark ships generated validation expressions that are + # not committed to git -- they are regenerated on demand from the Pydantic + # models. `uv build` packages whatever is on disk under the module root, so + # the tree must be generated here before the build, or the published wheel + # ships without its `expressions/generated/` modules and validate_model() + # discovers nothing to run. + - name: Generate PySpark expressions before build + if: matrix.package == 'overture-schema-pyspark' + run: make generate-pyspark + - name: Publish package ${{ matrix.package }} version ${{ matrix.after }} to PyPI env: CA_TOKEN: ${{ steps.get-code-artifact-params.outputs.token }} @@ -94,6 +104,14 @@ jobs: echo " Wheel file [$wheel] not found. Aborting!" exit 1 fi + # Guard against a silently empty wheel: if the generate step above ever + # regresses, overture-schema-pyspark would publish with no validation + # expressions. Fail loudly instead of shipping a hollow package. + if [ "$PACKAGE" = "overture-schema-pyspark" ] && \ + ! unzip -l "$wheel" | grep -q 'expressions/generated/.*\.py'; then + echo " Wheel [$wheel] has no generated expressions -- codegen did not run. Aborting!" + exit 1 + fi tarball="dist/${PACKAGE//-/_}-${AFTER}.tar.gz" if [ ! -f "$tarball" ]; then echo " Source tarball file [$tarball] not found. Aborting!" From 1609375030a251cb3ca75fb2ce6cac4e5c273959 Mon Sep 17 00:00:00 2001 From: Seth Fitzsimmons Date: Wed, 5 Aug 2026 08:57:29 -0700 Subject: [PATCH 2/2] chore(pyspark): add changelog fragment for wheel packaging fix Signed-off-by: Seth Fitzsimmons --- packages/overture-schema-pyspark/changelog.d/625.bugfix.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 packages/overture-schema-pyspark/changelog.d/625.bugfix.md diff --git a/packages/overture-schema-pyspark/changelog.d/625.bugfix.md b/packages/overture-schema-pyspark/changelog.d/625.bugfix.md new file mode 100644 index 000000000..67d1c8953 --- /dev/null +++ b/packages/overture-schema-pyspark/changelog.d/625.bugfix.md @@ -0,0 +1 @@ +Fixed published wheels and sdists shipping without the generated validation expressions, which left an installed `validate_model()` unable to discover any models.