OpenFn / OpenFn/lightning

Error when loading runs

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

Nobody has claimed this yet.

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

Description

Sentry Issue: LIGHTNING-3B

Ecto.Query.CastError: /app/apps/lightning/lib/lightning/runs.ex:88: value `"d51daa64-26d9-4c64-9f00-66ac35bdc67f&sa=D&s...

Ecto.Query.CastError: /app/apps/lightning/lib/lightning/runs.ex:88: value `"d51daa64-26d9-4c64-9f00-66ac35bdc67f&sa=D&source=editors&ust=1738609616437384&usg=AOvVaw2nOUuZgslYo8_0HGwBIIEM"` cannot be dumped to type :binary_id in query:

from r0 in Lightning.Run,
  prefix: "public",
  where: r0.id ==
  ^"d51daa64-26d9-4c64-9f00-66ac35bdc67f&sa=D&source=editors&ust=1738609616437384&usg=AOvVaw2nOUuZgslYo8_0HGwBIIEM",
  select: r0,
  preload: [steps: [:job, {:snapshot, [triggers: :webhook_auth_methods]}], workflow: [:project], snapshot: [triggers: :webhook_auth_methods]]

  File "lib/enum.ex", line 2528, in Enum."-reduce/3-lists^foldl/2-0-"/3
  File "lib/enum.ex", line 1826, in Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3

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 at lib/lightning/runs.ex:88 and review the Sentry report for issue 4147548271. Trace how the run ID reaches the Ecto query and investigate why the value includes additional query-string text instead of a valid binary ID. Done means loading the affected run no longer raises Ecto.Query.CastError.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.