-
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 adds keyhash to files db table #1073
Conversation
ecec008
to
ceecb05
Compare
1cfac07
to
5fc3703
Compare
This PR should not have to be dependent on #1036 |
9c42595
to
f6ab0a7
Compare
ca919ba
to
910a2db
Compare
cba4dff
to
97893e3
Compare
910a2db
to
b6b5fcd
Compare
440b590
to
b488b73
Compare
85f4ef9
to
0f68dbe
Compare
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.
Very good job. Just an extremely minor thing, in the PR's description I would change the part saying that it prints a warning if the keyhash does not exist in the sda.encryption_keys
table because in reality it will through an error. I know that maybe is too much but my eye caught it :)
Thanks @kostas-kou! The description was indeed outdated, very good that you noticed! It's updated now. |
exit 1 | ||
fi | ||
|
||
apt-get -o DPkg::Lock::Timeout=60 update >/dev/null |
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.
It is inefficient and waste of time to (potentially) run apt-get update
multiple times. It can be refactored to run apt-get update
only once.
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. I added a few comments in the integrations test shell scripts and some questions regarding error handling in the go code.
0f68dbe
to
6f8ebfa
Compare
Rebase on top of Main |
8ef959e
to
73194a3
Compare
73194a3
to
1fec28c
Compare
Closed in favor of #1126 . |
@@ -388,6 +390,20 @@ func main() { | |||
continue mainWorkLoop | |||
} | |||
|
|||
// Set the file's hex encoded public key | |||
log.Debugln("Compute and set key hash") |
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.
Will these get ignored when deployed? I don't remember the loglevel we set. Just wondering if they add any value or if they will flood our logs.
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 great overall!
Related issue(s) and PR(s)
This PR closes #893.
It will be undrafted when #1036 is closed.
Commit tmp: temporary fixes to api/hash will not be included in the final version of this PR.
Description
sda.files
tablesda.encryption_keys
, an error is thrown and ingest stopsHow to test
Add the hashed public key to
sda.encryption_keys
and then try to ingest a file. See the integration test for details.