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

feat(ingest/backend): add and use 'x-total-record' header for /get-original-metadata endpoint #2857

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

corneliusroemer
Copy link
Contributor

@corneliusroemer corneliusroemer commented Sep 22, 2024

resolves #2847

preview URL: https://original-x-count.loculus.org

Summary

Add and use 'x-total-record' header for /get-original-metadata endpoint in ingest and backend.

Screenshot

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by an appropriate test.

@corneliusroemer corneliusroemer added the preview Triggers a deployment to argocd label Sep 22, 2024
Copy link
Contributor

@anna-parker anna-parker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thought but overall LGTM :-)

@@ -327,6 +328,10 @@ def get_submitted(config: Config):
logger.error(f"Error decoding JSON from /get-original-metadata: {response_summary}")
raise ValueError from err

if len(entries) != expected_record_count:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only wonder if we should retry here instead of raising an error. The case len(entries) != expected_record_count is most likely to happen at the start of ingest and we then have to wait 30min until the approve rule finishes for the pods to restart.

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

Successfully merging this pull request may close these issues.

Add x-record-total to get-original-metadata
2 participants