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

Have fallbacks for retrieving providers list #450

Closed
CasperWA opened this issue Aug 3, 2020 · 3 comments · Fixed by #455
Closed

Have fallbacks for retrieving providers list #450

CasperWA opened this issue Aug 3, 2020 · 3 comments · Fixed by #455
Assignees
Labels
bug Something isn't working deployment An app serves the OPTIMADE regular server priority/medium Issue or PR with a consensus of medium priority

Comments

@CasperWA
Copy link
Member

CasperWA commented Aug 3, 2020

Heroku is currently failing, since providers.optimade.org is down.

I suggest we implement the following fallbacks (in order):

  1. Try providers.optimade.org.
  2. Try Materials-Consortia/providers on GitHub (raw providers.json file).
  3. Go through providers submodule, if available.
  4. Log warning, don't include providers.

Is this actually the original reason we include providers as a submodule? If yes, then I suggest to remove it as a submodule, removing also option 3 from above, since I don't consider the addition of the list of providers crucial if the list is not guaranteed to be updated. But that's my personal opinion :)

@CasperWA CasperWA added bug Something isn't working priority/medium Issue or PR with a consensus of medium priority deployment An app serves the OPTIMADE regular server priority/high Issue or PR with a consensus of high priority and removed priority/medium Issue or PR with a consensus of medium priority labels Aug 3, 2020
@CasperWA CasperWA self-assigned this Aug 4, 2020
@CasperWA CasperWA added priority/medium Issue or PR with a consensus of medium priority and removed priority/high Issue or PR with a consensus of high priority labels Aug 4, 2020
@CasperWA
Copy link
Member Author

CasperWA commented Aug 4, 2020

Reducing the urgency of this issue, since the SSL issues with providers.optimade.org seems to have been fixed. See Materials-Consortia/providers#45.

@CasperWA
Copy link
Member Author

CasperWA commented Aug 4, 2020

Concerning this, I actually think we should remove the providers submodule and simply try for first providers.optimade.org, then GitHub, and if nothing is returned, or the returned providers cannot be cast to the Provider pydantic model, then simply create a warning in the response?
I don't consider it essential to a successful response that the list of providers is included in the /links-endpoint. But it's worth warning about, since it should be included. Especially in this example server.

What do you think @shyamd and @ml-evs?

@shyamd
Copy link
Contributor

shyamd commented Aug 4, 2020

The original reason was to be able to better track changes in providers and have tests run on those changes so we can see what broke. I have no problem not even getting data from the providers sub-module, but I'd like to keep it for dependabot. It's already saved a lot of headache once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deployment An app serves the OPTIMADE regular server priority/medium Issue or PR with a consensus of medium priority
Projects
None yet
2 participants