You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[bugfix] repo:install-and-deploy respect explicitly-requested version
When a higher version of a package is already in the EXPath registry,
calling repo:install-and-deploy(name, "<lower>", url) would correctly
fetch the requested XAR and install it into the registry, but the
subsequent deploy() step would re-resolve by name via packages.latest()
and deploy the existing higher version's directory instead. The user
sees a successful "ok" status, but the deployed application is the
higher version, not the one they asked for.
Two changes:
1. Deployment.deploy(...) now has a Package-based overload that takes
the freshly-installed Package directly. The by-name overload is kept
and delegates to the new one via getPackage(pkgName, repo).
2. installAndDeploy(...) looks up the package by the version extracted
from the XAR descriptor (via Packages.version(...)) and passes it to
the Package-based deploy overload, bypassing packages.latest().
Includes XQSuite regression test (deploy:install-lower-version-after-higher):
install 1.0.0, then install 0.5.0 over it, and verify the deployed
expath-pkg.xml in the target collection is 0.5.0's, not 1.0.0's.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
%test:name("install-and-deploy respects the freshly installed package version (regression for Deployment.installAndDeploy deploying packages.latest() instead of the version just installed)")
0 commit comments