Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/publish-python-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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!"
Expand Down
1 change: 1 addition & 0 deletions packages/overture-schema-pyspark/changelog.d/625.bugfix.md
Original file line number Diff line number Diff line change
@@ -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.