*** The wcm.io Project is closing down this JIRA Instance in favor of GitHub issues. *** Please use the corresponding GitHub projects to report issues - or the mailing list for general discussion.

wcmio-content-package-maven-plugin should fail if bundles are not up & running after 360 sec

Description

https://github.com/wcm-io/wcm-io-tooling/blob/57d0586478b7fe9152d355881604faacae331e0e/commons/crx-packmgr-helper/src/main/java/io/wcm/tooling/commons/packmgr/PackageManagerHelper.java#L297

It looks like, by default, retries will be done for 360 sec, which is nice. But, if the retries are still failing after 360 sec, it will just "assume" that everything went okay, even though the bundles are not up & running.

In our case, this masked underlying issues (where we had the wrong SP installed on one of our servers). I would have loved for this build to have failed, so that I would have seen it more easily.

Activity

Show:

Stefan Seifert November 2, 2021 at 8:08 AM

i understand your use case, but consider following scenario where the current behavior makes sense:

  • you have a deployment consisting of two packages A and B, both containing a couple of OSGi bundles

  • B contains a bundle depending on a bundle from A with major version 1.0

  • in a new deployment, the bundle in A is updated to 2.0, and the bundles in B are also recompiled to reference 2.x instead of 1.x from the A bundle

  • in the usual order package A is redeployed before package B. but when package A is deployed, the existing bundles from package B cannot start, because the still reference version 1.0 from A (the updated package B is not yet deployed).

  • this leads to the 360 sec delay, until the deployment continues and then package B is deployed and all is fine

i understand that this is a bit an edge case and does not happen that often - but it happens. we do not have a heuristic in place that automatically detects whether a failure after 360sec is really a failure, or only a temporarily one for an edge case as described above.

having said that, it still might make sense to introduce a new config parameter that allows to control the behavior whether to continue after the 360sec or fail the build, than every user can decide and probably switch it on only if such an edge case occurs.

do you want to come up with a PR?

Details

Assignee

Reporter

Priority

Created October 28, 2021 at 8:32 PM
Updated November 2, 2021 at 8:08 AM