OpenFn / OpenFn/kit

worker: take a single lightning baseURL as an argument

Open
#809 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DevX
Dominant language
TypeScript
Stars
21
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
17

Description

I'm about to implement a new argument to the worker to support collections - --collections-url

But it's a bit annoying because we already take a lightning-service-url. We can't use it because it points to a websocket.

I wonder if we can just take a --lightning-url as an argument, which points to http(s)://, and from that we derive the websocket (ws(s)://<lightning>/worker) and collections (http(s)://<lightning>/collections endpoints.

That's a breaking change because we're changing startup arguments which will break deployments. I'd suggest we introduce the new argument but leave the other two in place.

When we do worker 2.0, we'll drop the old arguments.

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 by locating the worker's startup argument parsing and the code that consumes lightning-service-url, collections-url, and the worker WebSocket URL. Trace how deployment configuration supplies these arguments. Done means a single --lightning-url can derive the HTTP collections and worker WebSocket endpoints while the existing arguments remain supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.