-
Notifications
You must be signed in to change notification settings - Fork 7
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
[ingest] Check for keyhash on startup #1189
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for some minor comments, the PR works as expected. Great job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Check that a keyhash exists in the database before start processing any messages. A timer counts down for 5 minutes and if no keyhash exists by then an error will be logged and ingest will restart.
77f9b05
to
73f8a7c
Compare
Rebased so needs to be reapproved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Related issue(s) and PR(s)
This PR closes #1164 .
Description
Check that a keyhash exists in the database before start processing any messages. A timer counts down for 5 minutes and if no keyhash exists by then an error will be logged and ingest will restart.
No messages will be processed before this check completes.
How to test
make build-all
make sda-s3-up
docker logs -f ingest
"no crypt4gh key hash registered" will be printed every 30 seconds and after 5 minutes the container will restart.
If
make integrationtest-sda
is used ingest will Print the same message a few times until the tests reaches11_api_test
. Then it will process the messages as normal for the ingestion test.