pycsw icon indicating copy to clipboard operation
pycsw copied to clipboard

[WIP] fail when repository cannot init

Open tomkralidis opened this issue 1 year ago • 4 comments

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

tomkralidis avatar Aug 03 '24 17:08 tomkralidis

@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

tomkralidis avatar Aug 03 '24 17:08 tomkralidis

Only 0bd11f5 makes sense in the while loop context. The other commits would be better if they removed the while loop.

DK96-OS avatar Aug 08 '24 16:08 DK96-OS

This Pull Request has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days.

github-actions[bot] avatar Sep 21 '25 03:09 github-actions[bot]

Still valid/in scope.

tomkralidis avatar Sep 21 '25 12:09 tomkralidis