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

/analyze-hashed endpoint using cached pcontext #1054

Open
wants to merge 9 commits into
base: zane-server-translate
Choose a base branch
from

Conversation

zaneenders
Copy link
Collaborator

@zaneenders zaneenders commented Nov 16, 2024

This introduces a /analyze-hashed endpoint for Odyssey to avoid sending the pcontext back and forth. This should fix #1048

@zaneenders zaneenders changed the base branch from main to zane-server-translate November 16, 2024 11:25
@zaneenders zaneenders marked this pull request as ready for review November 16, 2024 11:55
@zaneenders zaneenders changed the title Zane cache pcontext /analyze-hashed endpoint using cached pcontext Nov 16, 2024
Comment on lines +158 to +171
(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])
Copy link
Contributor

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?).

@zaneenders zaneenders force-pushed the zane-server-translate branch from 1979a2f to e34c789 Compare November 21, 2024 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants