-
Notifications
You must be signed in to change notification settings - Fork 34
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
/analyze-hashed
endpoint using cached pcontext
#1054
base: zane-server-translate
Are you sure you want to change the base?
Conversation
/analyze-hashed
endpoint using cached pcontext
(match type | ||
['errors-hash | ||
(when (hash-has-key? completed-work pcontext) | ||
(set! command | ||
(herbie-command 'errors | ||
test | ||
seed | ||
(json->pcontext (hash-ref (hash-ref completed-work pcontext) | ||
'points) | ||
(test-context test)) | ||
profile? | ||
timeline-disabled?)) | ||
(set! action (server-action 'herbie-command command)))] | ||
[_ empty]) |
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.
This is a crazy design. Why is this a new type of job? Why not handle this when parsing the pcontext from JSON? Why do we even need a separate endpoint?
Separately, where's the error handling? We should gracefully inform Odyssey if the hash can't be found, say if the server got restarted while Odyssey was working. And Odyssey should ideally know how to handle this correctly, not sure what that would be (maybe re-submit without caching?).
1979a2f
to
e34c789
Compare
This introduces a
/analyze-hashed
endpoint for Odyssey to avoid sending the pcontext back and forth. This should fix #1048