Make AWS creds optional: langfuse/measures edition by snickell · Pull Request #71274 · code-dot-org/code-dot-org

Conversation

@snickell

We want dashboard to boot up without having AWS credentials.

This PR makes the following secrets not loaded at boot time on development:

  • CDO.openai_measures_of_learning_api_key
  • CDO.langfuse_secret_key
  • CDO.langfuse_public_key

Yay we get to have our cake and eat it too! 🥳

  1. They are still loaded at boot in prod/staging/test as required keys, and those environments should auto raise an exception if they're not present.
  2. We don't need to cache the value because CDO.* already caches secrets for us.

Testing

Untested beyond drone.

@snickell snickell changed the title Make AWS optional for Erin deployment Make AWS creds optional: langfuse/measures edition

Mar 11, 2026

Erin007

@@ -1,6 +1,5 @@
module OpenaiPersonalizationHelper
# NEED TO CHANGE THIS KEY
API_KEY = CDO.openai_measures_of_learning_api_key

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm less concerned about the change you made, @snickell and more about the comment that this key needs to change... @code-dot-org/teacher-tools is there a different OpenAI key in place for personalization?

@Erin007

@snickell Good timing! I am in the process of separating out the Langfuse keys so we have one for the ai-tutor project and one for teaching assistant. I assume I'd just need to make analogous changes on that PR?

@snickell

@Erin007 Yes, scanned the other PR and analogous changes look like they'd be suitable. Are you rather close to merging that PR? It would unblock me today if we could merge this one in the interim, although I know that'll require resolving a merge conflict on your branch.

…use_public_key, openai_measures_of_learning_api_key from list

Erin007

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No opposition from me! Thanks for picking this up.

@snickell snickell deleted the seth/make-aws-optional-erin branch

March 11, 2026 20:30

2 participants

@snickell @Erin007