OpenFn / OpenFn/lightning

Don't require ws-worker keys to run migrations in prod

Open
#2,211 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

When running OpenFn in production mode on kubernetes, some folks may choose to automatically run migrations using an initContainer:

initContainers:
        - name: migrate-demo
          image: *demoImage
          command: ["/app/bin/lightning", "eval", "Lightning.Release.migrate"]

You shouldn't have to pass in a whole bunch of worker secrets and keys to this container only to run the migrations.

It would be great to be able to run migrations with the bare minimum in terms of secrets.

  • db url (yes.)
  • secret key base (maybe?)
  • primary encryption key (maybe?)

Contributor guide

No contributing guide indexed for this repository

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 with the Lightning.Release.migrate entry point shown in the Kubernetes initContainer example, then inspect which production secrets migration startup requires. Confirm the minimum environment needed for the database migration and verify that it runs without worker secrets or keys.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir, kubernetes
Domain
backend, databases, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.