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

Throw an error when there is no database loaded yet #295

Closed
fengelniederhammer opened this issue Feb 22, 2024 · 3 comments · Fixed by #299
Closed

Throw an error when there is no database loaded yet #295

fengelniederhammer opened this issue Feb 22, 2024 · 3 comments · Fixed by #299
Assignees
Labels
LAPIS Tasks/PR related to LAPIS
Milestone

Comments

@fengelniederhammer
Copy link
Contributor

So that it doesn't show "count = 0" when it's still loading the initial database.

@fengelniederhammer fengelniederhammer added the LAPIS Tasks/PR related to LAPIS label Feb 22, 2024
@fengelniederhammer fengelniederhammer added this to the COVID-LAPIS milestone Feb 22, 2024
@fengelniederhammer
Copy link
Contributor Author

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After

We could throw "503 Service Unavailable" and set a configurable Retry-After header. From experience, maintainers will roughly know how long SILO takes to read initial data, so they could pass that value into SILO. We could set the header to "start time of SILO + initial startup period".

On CoV-Spectrum, we could check that header and display a message when users should try again.

@chaoran-chen @Taepper ?

@Taepper
Copy link
Collaborator

Taepper commented Feb 22, 2024

I think there are many ways to go about this and it is also related to #244, and is in some sense orthogonal to it

A check on the data version would also be possible to see that no data has been loaded (but a schema could already be loaded once #244 is implemented)

@chaoran-chen
Copy link
Member

The 503 and Retry-After idea sounds good to me.

@fengelniederhammer fengelniederhammer self-assigned this Feb 26, 2024
fengelniederhammer added a commit that referenced this issue Feb 26, 2024
fengelniederhammer added a commit that referenced this issue Feb 26, 2024
fengelniederhammer added a commit to loculus-project/loculus that referenced this issue Feb 26, 2024
See GenSpectrum/LAPIS-SILO#295
SILO throws an error now when it did not load a database yet.
fengelniederhammer added a commit to loculus-project/loculus that referenced this issue Feb 26, 2024
See GenSpectrum/LAPIS-SILO#295
SILO throws an error now when it did not load a database yet.
fengelniederhammer added a commit to loculus-project/loculus that referenced this issue Feb 26, 2024
See GenSpectrum/LAPIS-SILO#295
SILO throws an error now when it did not load a database yet.
@github-actions github-actions bot mentioned this issue Aug 6, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LAPIS Tasks/PR related to LAPIS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants