Typings & metadata for local adaptors seems to have broken
Nobody has claimed this yet.
- Dominant language
- Elixir
- Stars
- 296
- Forks
- 86
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 50
Description
When passing LOCAL_ADAPTORS=true, I expect to be able to run lightning with adaptors from my local adaptors repo.
I don't seem to be able to get types of metadata (still investigating)
I see this error in Lightning:
[error] Task #PID<0.1546.0> started from #PID<0.1545.0> terminating
** (Version.InvalidRequirementError) invalid requirement: "== local"
(elixir 1.18.3) lib/version.ex:453: Version.parse_requirement!/1
(lightning 2.14.6-pre1) lib/lightning/adaptor_service.ex:240: Lightning.AdaptorService.find_adaptor/2
(lightning 2.14.6-pre1) lib/lightning/adaptor_service.ex:293: Lightning.AdaptorService.install/2
(lightning 2.14.6-pre1) lib/lightning/metadata_service.ex:99: Lightning.MetadataService.get_adaptor_path/1
(lightning 2.14.6-pre1) lib/lightning/metadata_service.ex:57: Lightning.MetadataService.do_fetch/2
(lightning 2.14.6-pre1) lib/lightning_web/telemetry.ex:143: anonymous fn/2 in LightningWeb.Telemetry.with_span/3
(telemetry 1.3.0) /home/joe/repo/openfn/lightning/deps/telemetry/src/telemetry.erl:324: :telemetry.span/3
(elixir 1.18.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
(elixir 1.18.3) lib/task/supervised.ex:36: Task.Supervised.reply/4
Function: #Function<0.42153183/0 in Lightning.MetadataService.fetch/2>
In the browser window I get:
useDocs.tsx:28 NotFound: Got 404 from Unpkg for: @openfn/language-dhis2@local/package.json
at fetchFile (index.js:446:13)
The @local version used to work properly but seems to have died somewhere down the line.
Broken in v2.14.3 too (I'll try some random versions and see if any work)
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
Reproduce with LOCAL_ADAPTORS=true and inspect Lightning.AdaptorService.find_adaptor/2 and install/2 in lib/lightning/adaptor_service.ex, then follow the calls from lib/lightning/metadata_service.ex. Check useDocs.tsx for the browser-side metadata request. Done means local adaptor metadata and types resolve without the invalid requirement or Unpkg 404.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir, typescript
- Domain
- backend, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100