[WIP] fail when repository cannot init
Overview
This PR causes pycsw to fail on repository initialization if a connection cannot be made to the underlying metadata repository (current behaviour fails silently on repository init, and provides misleading error on subsequent interactions with self.repository).
Related Issue / Discussion
None
Additional Information
None
Contributions and Licensing
(as per https://github.com/geopython/pycsw/blob/master/CONTRIBUTING.rst#contributions-and-licensing)
- [x] I'd like to contribute [feature X|bugfix Y|docs|something else] to pycsw. I confirm that my contributions to pycsw will be compatible with the pycsw license guidelines at the time of contribution.
- [x] I have already previously agreed to the pycsw Contributions and Licensing Guidelines
@epifanio see the 3 commits in this PR which represent different approaches that you can test in your deployment when you have a chance:
- 2391ff9cf79eaf58a6eb42a43cb8f64a3d447c96: IMHO this will not work because the repo init will fail on the first load
- 0bd11f5db2f2f7aa6ec00f0b3dd72eaef6ad4aa5: pycsw fails fast, and the server will not start (hard stop). Not sure if this is too strict of an approach
- a2899098531aa02171018dd2f3a4abbc29a7bb07: raises on last attempt, throws error (server will not start, hard stop)
cc @kalxas @ricardogsilva
Only 0bd11f5 makes sense in the while loop context. The other commits would be better if they removed the while loop.
This Pull Request has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days.
Still valid/in scope.