Updates SI to render /lookup even if reply files are missing from storage #5497
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Status
Ready for review / Work in progress
Description of Changes
Fixes #5402
Adds exception handling to cover the case when a source has replies in the db
whose corresponding files are missing from disk. Previously the /lookup path
would fail, preventing the source from viewing replies or uploading submissions.
Testing
dev environment:
make dev
docker ps
in a separate terminal to determine the ID for the dev containerdocker exec -it <dockerID> bash
to connect to the dev container/var/lib/securedrop/store
.localhost:8080
and log in with the source codename:/lookup
page is displayed[2020-09-15 17:49:31,400] ERROR in main: Reply file missing: 3-blameless_fumble-reply.gpg
is printed in the docker output.staging environment:
make staging
app
staging serve, andr find and delete the reply file for the source, under/var/lib/securedrop/store
./lookup
page is displayedReply file missing: 3-blameless_fumble-reply.gpg
is printed in the source error log on the app server.Deployment
No special deployment requirements.
Checklist
If you made changes to the server application code:
make lint
) and tests (make test
) pass in the development containerIf you made non-trivial code changes: