Skip to content

feat: oban scheduler for alerts, enable/disable, execution history#3167

Merged
Ziinc merged 19 commits intomainfrom
feat/oban-scheduler
Feb 27, 2026
Merged

feat: oban scheduler for alerts, enable/disable, execution history#3167
Ziinc merged 19 commits intomainfrom
feat/oban-scheduler

Conversation

@Ziinc
Copy link
Copy Markdown
Contributor

@Ziinc Ziinc commented Feb 17, 2026

This PR adds in the following:

  • Oban for global scheduling for cross-cluster execution and execution history
  • adds in enable/disable of alerts
  • adds in a simple testing interface in edit page
  • changes json viewer of results to table viewer
  • allows enabling/disabling of alerts execution on a per-instance basis via env var

Prod setup remains the same, alerts is still maintained and functioning in only one cluster.

Part of O11Y-321
Closes O11Y-1461
Closes O11Y-195

@Ziinc Ziinc changed the title feat: initial oban scheduler feat: initial oban scheduler for alerts Feb 17, 2026
@Ziinc Ziinc changed the title feat: initial oban scheduler for alerts feat: oban scheduler for alerts, enable/disable, execution history Feb 20, 2026
@Ziinc Ziinc force-pushed the feat/oban-scheduler branch from f236c6c to f3d2aee Compare February 20, 2026 12:32
@Ziinc Ziinc marked this pull request as ready for review February 20, 2026 12:33
@Ziinc Ziinc force-pushed the feat/oban-scheduler branch from 31bbe35 to 3ab1304 Compare February 24, 2026 08:31
@Ziinc Ziinc requested a review from a team February 27, 2026 03:52
@Ziinc
Copy link
Copy Markdown
Contributor Author

Ziinc commented Feb 27, 2026

will be merging this in first to get it over with

@Ziinc Ziinc merged commit 7832ba9 into main Feb 27, 2026
15 of 16 checks passed
@Ziinc Ziinc deleted the feat/oban-scheduler branch February 27, 2026 05:47
Copy link
Copy Markdown
Contributor

@josevalim josevalim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great to me, just two minor comments.

I have to say: it is really nice that we can just emit regular queries when we need to manipulate existing Oban jobs!

Comment on lines +22 to +23
<td :for={col <- Map.keys(hd(@query_result_rows))}>
<% val = Map.get(row, col) %>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you still need to do the Map.keys dance or could you traverse on the values directly?

Suggested change
<td :for={col <- Map.keys(hd(@query_result_rows))}>
<% val = Map.get(row, col) %>
<td :for={{col, val} <- row}>

end

defp truncate_reason(reason, _max_length) when is_binary(reason), do: reason
defp truncate_reason(reason, max_length), do: truncate_reason(inspect(reason), max_length)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be worth extracting some of these helpers (truncate_reason, format_bytes, time_ago) into a separate module for unit testing in a future commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants