Skip to content

test(release-smoke): cover the render-pptx and render-docx artifacts#440

Open
DemchaAV wants to merge 1 commit into
developfrom
test/release-smoke-pptx-docx
Open

test(release-smoke): cover the render-pptx and render-docx artifacts#440
DemchaAV wants to merge 1 commit into
developfrom
test/release-smoke-pptx-docx

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

The consumer smoke harness is the authoritative "a real user can install this" gate, but it only ever exercised the PDF stack (s1–s6). Both POI backends could ship with a broken pom, a missing META-INF/services resource, or an unpublished coordinate and the harness would still report green — and graph-compose-render-pptx is the headline artifact of 2.1.0.

Separately, four files hard-coded the version to smoke-test when none is passed, and the release script never touched them. A post-release run that accepted the prefilled default re-verified the previous release and reported green — the one failure mode a release gate must not have.

What changed

s7 — graph-compose-core + graph-compose-render-pptx. Asserts more than a valid ZIP header, which an empty file would satisfy: exactly one slide part, the 16:9 slide dimensions in EMU, editable text runs, native shapes, and no picture at all — the failure mode that would mean the backend silently rasterised everything. Also resolves the provider by format. Requires 2.1.0+, since neither the fixed-layout backend nor DocumentPageSize.SLIDE_16_9 exists in 2.0.0.

s8 — graph-compose-core + graph-compose-render-docx + graph-compose-render-pdf. The PDF backend is in the set because the combination does not work without it: opening a DocumentSession resolves a FontMetricsProvider, and render-pdf is the only artifact that publishes one. render-docx/pom.xml declares it at test scope for its own suite, so the module's tests pass while a consumer installing core + render-docx alone fails at create() with MissingBackendException before any export runs. This PR documents the requirement in render-docx/README.md; the underlying packaging fix belongs to the backend-neutral font-measurement extraction and is filed separately.

Both scenarios inspect the emitted OPC package with java.util.zip rather than Apache POI. The point is to prove the published artifacts work for a consumer who installed nothing else, so a scenario must not pull a parsing library of its own to make its assertions pass.

Harness default version is now bumped by cut-release.ps1. Six sites across run.sh, run.ps1, release-smoke.yml and the harness README, each pattern anchored to its own construct so a bump cannot smear across unrelated version strings. It sits on the final-release path, so a release candidate correctly leaves it alone.

Verification

  • ./mvnw -B -ntp clean verify — BUILD SUCCESS, 1518 tests, 0 failures.
  • Both scenarios run green against a locally installed 2.1.0-SNAPSHOT. s8 fails without render-pdf — that is how the packaging gap surfaced, not a guess.
  • All three cut-release.ps1 dry-run modes pass: the full cut bumps all six sites and stages the four files; -PostReleaseOnly is clean; the RC path performs zero smoke bumps.
  • The <p:pic> assertion was checked against a generated deck that does contain a picture (maven-banner.pptx): POI emits the literal <p:pic>, and <p:sp> does not collide with <p:spTree / <p:spPr>. Neither assertion is vacuously true.

The consumer smoke harness is the authoritative "a real user can install this"
gate, but it only ever exercised the PDF stack. Both POI backends could ship with
a broken pom, a missing ServiceLoader resource, or an unpublished coordinate and
the harness would still report green — and render-pptx is the headline artifact
of this release.

Add s7 (core + render-pptx) and s8 (core + render-docx + render-pdf). Both inspect
the emitted OPC package with java.util.zip rather than Apache POI: the point is to
prove the published artifacts work for a consumer who installed nothing else, so a
scenario must not pull a parsing library of its own to make its assertions pass.

s7 asserts more than a valid ZIP header, which an empty file would satisfy: exactly
one slide part, the 16:9 slide dimensions in EMU, editable text runs, native shapes,
and no picture at all — the failure mode that would mean the backend silently
rasterised everything. It also resolves the provider by format. It needs 2.1.0 or
later, since neither the fixed-layout backend nor DocumentPageSize.SLIDE_16_9 exists
in 2.0.0.

s8 carries render-pdf because the combination does not work without it: opening a
DocumentSession resolves a FontMetricsProvider, and render-pdf is the only artifact
that publishes one. render-docx declares it at test scope for its own suite, so the
module's tests pass while a consumer installing core + render-docx alone fails at
create() before any export runs. render-docx/README.md now states that requirement.

Bump the harness's default version from the release script. Four files hard-coded
the version to smoke-test when none is passed, and the script never touched them, so
a post-release run that accepted the prefilled default re-verified the *previous*
release and reported green — the one failure mode a release gate must not have. Each
pattern is anchored to its own construct, and the bump sits on the final-release path
so a release candidate correctly leaves it alone.

Verified: full reactor clean verify green (1518 tests, 0 failures). Both scenarios
run green against a locally installed 2.1.0-SNAPSHOT; s8 fails without render-pdf,
which is how the packaging gap surfaced. All three cut-release dry-run modes pass —
the full cut bumps all six sites and stages the four files, the RC path performs zero
smoke bumps. The <p:pic> assertion was checked against a generated deck that does
contain a picture, so it is not vacuously true.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant