Repository navigation
Add test guarding veraPDF default version against configuration drift - #15302
Merged
Merged
Conversation
The veraPDF version is declared twice: VERAPDF in `configuration` drives the build (archive-bin-deps uploads that version), while packaged installs, which don't ship `configuration`, fall back to kDefaultVersion in src/tools/impl/verapdf.ts when running `quarto install verapdf`. The Windows dev launcher loads `configuration` into the environment, so VERAPDF is set there and the constant is never used. A bump that missed the constant would go unnoticed in a Windows dev checkout and ship the old veraPDF to users, which nearly happened in the v1.12 dependency update. The new unit test compares the two values and fails CI on a mismatch. The existing check-versions smoke test can't cover this: it compares installed binaries through `quarto check versions`, and veraPDF is neither part of that command nor installed in every test environment.
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bundled veraPDF version is set in two places.
VERAPDFinconfigurationdecides which version the build uploads, butconfigurationisn't packaged, soquarto install verapdfin an installed Quarto falls back to thekDefaultVersionconstant insrc/tools/impl/verapdf.ts. In #15275,configurationwas bumped to 1.30.3 while the constant stayed at 1.28.2, so users would have kept installing 1.28.2. Review caught it, but nothing checks it.The mismatch is also invisible in a Windows dev checkout: the dev launcher sets
VERAPDFfromconfiguration, so the constant is never used there.A new unit test reads
VERAPDFfromconfigurationand compares it tokDefaultVersion, so a bump that misses one of them fails CI.kDefaultVersionis now exported for the test, andconfigurationhas a comment next toVERAPDFpointing to the second place.Extending
tests/smoke/check/check-versions-no-mismatch.test.tswas considered, but that test compares installed binaries throughquarto check versions, and veraPDF is neither part of that command nor installed in every test environment. Shipping the dependency versions in a packaged file would remove the duplication, but that is more plumbing than a single value needs for now.Checklist
I have (if applicable):
AI-assisted PR
Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.