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

Deploy webhook using ansible #36

Merged
merged 6 commits into from
Aug 3, 2023
Merged

Conversation

jimallman
Copy link
Member

This should install an appropriate webhook to update otindex when a study is saved in the curation app.

@jimallman jimallman changed the base branch from main to development July 24, 2023 21:27
@jimallman
Copy link
Member Author

@snacktavish NB - Regarding the amendments webhook, the old (pre-Pyramid) handler is on branch before-pyr, and of course it's currently failing. More importantly, I don't believe we're currently caching amendments or taxa, so it's moot for now.

I'll comment this out in the Ansible playbook, but keep the main (study) webhook. I believe this is pointing to the correct (new) URL.

@jimallman
Copy link
Member Author

jimallman commented Jul 24, 2023

@snacktavish I spoke too soon! It looks like the amendments webhook handler doesn't just clear stale amendments from the cache -- it also does some processing via v3/taxonomy/process_additions. I'll check to see if this method is in the currently deployed code.

EDIT: I found this old method in taxomachine. I'm guessing there's a newer implementation that we should call instead..? Or we need to write one.

@snacktavish
Copy link
Member

Yep - we need to put it into otindex.
I made an issue here:
OpenTreeOfLife/otindex#61

And I pulled the code that was in phylesystem API here:
https://github.com/OpenTreeOfLife/otindex/blob/webhook/otindex/views.py#L338

But haven't had a chance to look at the taxon updates yet. Feel free to take a crack at it if you want!

This mirrors our explicit rewriting of /cached/ calls.
We'll install the amendments webhook once we have a working handler and
URL for processing newly-saved amendments.
@jimallman
Copy link
Member Author

NB - Managing Github webhooks requires the Ansible user to have a valid personal access token on their local filesystem, at ~/.ssh/opentree/OPENTREEAPI_OAUTH_TOKEN. Or put it anywhere, and update the local_api_token_path variable to match.

@jimallman
Copy link
Member Author

These changes are working now on devtree/devapi. Ready to merge?

@jimallman jimallman requested a review from snacktavish August 1, 2023 16:31
This is here just as a reminder that we should redirect *both*
cache-related URLs if this config template is used.
@jimallman jimallman merged commit 8554a7e into development Aug 3, 2023
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