Syncing across multiple envs is a bit difficult
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 23
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 17
Description
(not sure if I have an issue for already)
Using CLI sync in multiple environments is quite hard.
You need two things to sync: an endpoint (a URL to a lightning instance) and an API key.
If you have a project on github that connects to two instances, it's hard to manage these two variables.
Usually you'll have an environment set up with a single endpoint and api key, so you can just do:
openfn pull main
And it'll update your main from the environment.
But on instance two, you have to do:
openfn pull main --api-key $OTHER_API_KEY --endpoint $OTHER_ENDPOINT
Which is just a pain.
After you've fetched the project once, the project.yaml file will remember the endpoint. So with aliasing you can at least do:
openfn pull prod --api-key $OTHER_API_KEY
Which is one less thing, but still not great.
The problem really is that the API hey is sensitive and we don't want to risk checking it in to github.
Solutions:
- In the
clisection of project file, store an env var name for the API key. - Or in the
clisection, put a path to an env file generally - Set up some global CLI config which binds an API key to an endpoint. Now whenever the CLI calls one endpoint, it'll use the same API key
Contributor guide
No contributing guide indexed for this repository
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 the CLI handling for project.yaml, endpoints, and API keys, then compare the proposed environment-variable, env-file, and global-config approaches. Define how users select credentials for each endpoint without committing secrets, and add coverage for the chosen configuration behavior before validating pull and sync flows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100