Skip to content

Call embed-channel after public channel publishing #5583

@bjester

Description

@bjester

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions