Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] fail when repository cannot init #987

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tomkralidis
Copy link
Member

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)

  • 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.
  • I have already previously agreed to the pycsw Contributions and Licensing Guidelines

@tomkralidis tomkralidis added the bug label Aug 3, 2024
@tomkralidis
Copy link
Member Author

@epifanio see the 3 commits in this PR which represent different approaches that you can test in your deployment when you have a chance:

  • 2391ff9: IMHO this will not work because the repo init will fail on the first load
  • 0bd11f5: pycsw fails fast, and the server will not start (hard stop). Not sure if this is too strict of an approach
  • a289909: raises on last attempt, throws error (server will not start, hard stop)

cc @kalxas @ricardogsilva

@DK96-OS
Copy link

DK96-OS commented Aug 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants