learningequality / learningequality/studio
Call embed-channel after public channel publishing
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 191
- Forks
- 307
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 10
Description
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Dependent on: https://github.com/learningequality/curriculum-automation/issues/58
Current behavior
We're not currently using the curriculum automation API to embed content from Studio, and so when a public channel is updated, we must manually regenerate embeddings for its content.
Desired behavior
- A new request class
EmbedChannelRequest(EmbeddingsRequest)should exist for making POST requests to/embed-channelwith achannel_id(we're hardcoding the request schema at this time) - A new method should be added to
RecommendationsAdapterto accept and execute theEmbedChannelRequest - A new method should be added to
AutomationManagerto call the above method, accepting achannel_idand creating aEmbedChannelRequest - The function
publish_channelshould:- call the above method if and only if its a public channel
- not fail publishing if calling embed-channel fails, but does report the failure to sentry
Value add
Automates bulk regeneration of embeddings for public channels after they're updated, until we've improved performance and implemented tighter API integration using embed-content requests
Possible tradeoffs
We have API methods that we specced to embed content on a node by node basis. Long term, that will be helpful to integrate into Studio's workflows, but will require us to be thoughtful on its impact to the performance of channel publishing. Also, we need to improve the performance of embedding storage to minimize request time.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing publish_channel and how it reaches AutomationManager and RecommendationsAdapter; the issue also depends on curriculum-automation issue 58. Verify the existing request classes and publishing flow before adding the embed-channel request path. Done means public-channel publishing triggers the request, failures are reported to Sentry without aborting publication, and non-public channels do not trigger it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100