learningequality / learningequality/studio

Call embed-channel after public channel publishing

Open
#5,583 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DEV: backend P1 - important
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-channel with a channel_id (we're hardcoding the request schema at this time)
  • A new method should be added to RecommendationsAdapter to accept and execute the EmbedChannelRequest
  • A new method should be added to AutomationManager to call the above method, accepting a channel_id and creating a EmbedChannelRequest
  • The function publish_channel should:
    • 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.