Commit Graph
336 Commits
Author SHA1 Message Date
Yota Hamada bf4a61cbb6 Restore the tokenless window for first-run setup
Requiring the token from the first request broke first-run setup for
anyone who opens the Web UI instead of the printed setup URL, such as a
fresh install from the Windows installer. First install has to work
without extra steps, so this goes back to the reviewed behavior.
2026-11-23 14:30:08 +09:00
Yota Hamada 7fefd02fd7 Require the setup token from the first request
A ten-minute tokenless window after start still let anyone who could
reach a fresh server create the admin, and it reopened on every
restart. Setup now needs the token as soon as the server creates it.

The setup page asks for the token when the URL carries none, since
visitors also reach it through other pages. The field is optional
because a server that cannot store a token accepts setup without one.
2026-11-23 14:22:40 +09:00
Yota Hamada 615f6db47f Merge remote-tracking branch 'origin/main' into fix/setup-token
# Conflicts:
#	api/v1/api.gen.go
2026-11-23 13:46:57 +09:00
Yota Hamada 1b395ce25d Name the setup token file and remove it once an admin exists
In quiet mode the server prints no setup URL, so after ten minutes the
setup token was only in a file that nothing named. The 401 message, the
setup page, and the API description now name auth/setup-token in the
data directory, and startup logs its path. The API description also says
that setup needs no token when the server cannot store one.

A token left by an earlier start stayed after initial_admin created the
admin on the next start. It is now removed whenever an admin exists.
2026-11-23 13:42:28 +09:00
Yota HamadaandSCcagg5 cd32bc0293 List the recent activity of each DAG (#4041)
Co-authored-by: SCcagg5 <sccagg5@gmail.com>
2026-11-23 12:41:31 +09:00
Yota Hamada 06a68fabcf Need a setup token for first-run setup after ten minutes
Until the first admin exists, anyone who could reach the server could
create it and take over the server. Scripts create the admin through
the same endpoint as the server starts, so a token cannot be required
from the first second without breaking them.

A server that starts without an admin now keeps a one-time setup token
in <data_dir>/auth/setup-token and prints the setup URL with the token,
in the startup banner or the log. For the first ten minutes after
start, setup works as before. After that, it needs the token, and
returns 401 without it. The token file is removed once the admin
exists. Servers with an admin, or with auth.builtin.initial_admin, are
unchanged, and so is setup when the token cannot be written.
2026-11-23 12:36:37 +09:00
Yota Hamada 2f8bdf1c20 Test node connections and trust host keys (#4046)
Add server-side APIs to test inventory node connections and enroll
verified SSH host keys. Require explicit replacement fingerprints and
role checks so unknown hosts never receive credentials.

Share SSH connection logic with workflow execution so connection tests
use the same host-key checks, credentials, and shell behavior.
2026-11-23 11:02:45 +09:00
Yota Hamada 3fca5a2a27 Read and import inventories over the API (N12) (#3945) 2026-11-22 23:04:49 +09:00
Yota Hamada 9653a783f8 Serve the run history of service DAGs (#4020)
Since #4009 the scheduler keeps a long-term history of the runs of each
service DAG, but nothing read it. Three API routes now serve it: the
samples in buckets, the failed, recovered and gap events, and the
availability of four windows, each with its uptime.

A sample is written only when a run ends, so the routes add the run in
progress to the uptime at the time of the query, without counting the
time the history already recorded. A DAG that is no longer a service
DAG keeps serving its history, and its live run adds no up time. A
plain DAG with no history gets 404.

StepSamples and StepAvailability become aliases of the shared schemas,
so the step routes answer as before. A conformance suite checks the
routes against a real scheduler and server.
2026-11-22 21:34:25 +09:00
Yota Hamada 885f727f32 Edit and show schedule param overrides with types (#3987) 2026-11-19 15:35:17 +09:00
Tom BrandenburgandYota Hamada e81d29f4e0 Edit schedule param overrides in the visual editor (#3978)
Co-authored-by: Yota Hamada <yohamta@gmail.com>
2026-11-18 19:53:56 +09:00
Yota Hamada 8ec6f83b4e Give names that SafeName merged their own entries (#3959) 2026-11-16 17:35:57 +09:00
Yota Hamada 269ef32c8c Count missed slots from outage, pause, and suspension periods (#3957) 2026-11-16 16:26:51 +09:00
Yota Hamada 1f2313666f Offer backfills only to DAGs that read their slot (#3948) 2026-11-15 20:06:40 +09:00
Yota Hamada cc2451d648 Offer a backfill of the slots a DAG missed (#3905) 2026-11-15 19:08:27 +09:00
Yota Hamada 9b7a8cfcda Upgrade Dagu from the web UI (#3924) 2026-11-15 18:42:09 +09:00
Yota Hamada 0737943d49 Stop waiting DAG runs without running them (#3939) 2026-11-15 16:12:01 +09:00
Yota Hamada 8603535590 Show which workers run another Dagu version (#3920) 2026-11-15 13:48:03 +09:00
Yota Hamada b4d70f020d Rerun steps sharing a browser together on reuse (#3911) 2026-11-14 22:52:28 +09:00
Yota Hamada 6e7f49aeb2 Show a DAG's backfill in the DAG list (#3907) 2026-11-14 20:10:34 +09:00
Yota Hamada bde5770ee3 Rerun only the steps that changed since a run (#3909)
Checking a DAG while editing it reran every step, so a one-line change
to a filter at the end reopened the site and asked the model to read
it again, though nothing that step read had changed.

A run may name an earlier finished run of the same DAG to reuse, as
reuseFrom in the API or --reuse-from on dagu start. A step whose
definition, the DAG's other settings, the base config, the resolved
parameters, the runtime profile, and the steps it depends on are as
they were there, and that succeeded there or carried outputs into it,
is skipped and carries its outputs; the changed steps and the steps
after them run. When nothing changed or nothing can be reused, every
step runs. It builds on the selected-steps run, so a reused step is
recorded as it is for outputsFromRuns, and the run takes that run's
work directory.
2026-11-14 19:44:38 +09:00
Yota Hamada 0958dc6189 Share the params form with the backfill panel (#3896) 2026-11-14 19:19:17 +09:00
Yota Hamada fe8e5e63e1 Filter backfill runs on the run and queue pages (#3899) 2026-11-14 18:13:58 +09:00
Yota Hamada 9074ccbf68 Mark backfill slots that ran another definition (#3894) 2026-11-14 17:26:56 +09:00
Yota Hamada 477afef555 Group a backfill's failed slots by how they failed (#3886) 2026-11-14 13:16:33 +09:00
Yota Hamada e339efa806 Tell a backfill's time left and link its blocked run (#3884) 2026-11-14 12:41:34 +09:00
Yota Hamada dc5286b6fd Label a DAG's slots with the dates they load (#3881) 2026-11-14 12:03:19 +09:00
Yota Hamada fb5abb15b2 Filter the run list by whether runs are backfill runs (#3883) 2026-11-14 09:20:10 +09:00
Yota Hamada fede36b212 Tell a backfill run's slot and mark it in the queue (#3882) 2026-11-14 08:56:37 +09:00
Yota Hamada a27226da42 Show a param's date from the slot in the run dialog (#3877) 2026-11-14 07:32:48 +09:00
Yota Hamada a363db1c59 Preview a slot's dates in the run dialog (#3874) 2026-11-14 05:07:42 +09:00
Yota Hamada ba8042fa53 Preview a slot's dates in the API and MCP (#3871) 2026-11-14 04:04:32 +09:00
4b610bd81b feat: support parameter overrides per schedule entry (#3800)
Co-authored-by: Tom Brandenburg <t_bh@gmx.de>
Co-authored-by: Yota Hamada <yohamta@gmail.com>
2026-11-14 03:19:54 +09:00
Yota Hamada fc35bd1e39 Select backfill slots by a date with --by (#3870) 2026-11-14 02:20:39 +09:00
Yota Hamada e6be8cf8ce Resolve and record run dates, and read them as ${dates.NAME} (#3867) 2026-11-14 00:52:34 +09:00
Yota Hamada 4a42b5883b Make ! negate any label filter term (#3820) 2026-11-13 22:03:32 +09:00
Yota Hamada 58ba06a9ab List a backfill's runs and stream a backfill live (#3804) 2026-11-13 18:29:26 +09:00
Yota Hamada ee1a37abcd Add the backfill API, status, and live-view additions (#3792) 2026-11-12 21:03:55 +09:00
Yota Hamada f57d31c0ac Fix service DAG follow-up bugs (#3782) 2026-11-12 18:12:23 +09:00
Yota Hamada c6fc44daec Mark backfill runs and keep the mark on retries (#3779) 2026-11-12 17:52:44 +09:00
SCcagg5andYota Hamada 0d98431f7f ui: show service DAGs apart from their runs (#3261)
Co-authored-by: Yota Hamada <yohamta@gmail.com>
2026-11-12 16:18:49 +09:00
Yota Hamada 014425a2b9 Show MCP client setup and the last call in remote access (#3746) 2026-11-12 11:02:42 +09:00
Yota Hamada 540c33840e Carry the schedule slot into sub-DAGs and reruns (#3729) 2026-11-12 04:04:39 +09:00
Yota Hamada bf7f34b7fc Choose a schedule slot in the run dialog (#3727) 2026-11-12 03:26:43 +09:00
Yota Hamada 0182a3ceb2 Accept a schedule slot in the API, remote CLI, and MCP (#3725) 2026-11-12 02:12:14 +09:00
Yota Hamada ce709f0af2 Guide trial users to MCP from Claude and ChatGPT (#3723) 2026-11-12 01:30:32 +09:00
Yota Hamada 52d02966cf Warn when a step command is not found (#3682)
A step that calls a missing executable passed validation in the DAG
editor and failed only at run time. Validation now returns a non-fatal
warning for such a command, with the step and the field, so the editor
marks it. The DAG stays valid, and saving and running stay allowed.

The check reads the server host, so it reports nothing when the host
cannot answer: container, SSH, and worker-dispatched steps, commands
that hold a variable or a substitution, scripts, shell built-ins,
relative paths, and bare names when the DAG or the step sets PATH or
installs tools. Only a caller that may edit DAGs gets the warning,
because it reveals which paths exist on the server.

Closes #3679
2026-11-10 16:20:04 +09:00
SCcagg5andYota Hamada 67030e28a4 api: list service DAGs apart from their runs (#3260)
Co-authored-by: Yota Hamada <yohamta@gmail.com>
2026-11-08 22:25:29 +09:00
Yota Hamada 751c6aa037 Warn when picking model output for a shell (#3637)
Since #3621, dagu validate warns when a command writes a model's reply
into its shell text, because a shell can run that text as code. The
reference list still offered those outputs in a command with no hint, so
an author learned of the risk only after choosing one.

The scope now flags such an output, and a field that a shell reads marks
it as not safe, with what to do instead. That covers run fields in
foreach bodies and parallel groups, where the validator warns too. Env
offers it plainly, since passing the value through env is the fix. An
output that its schema limits to an enum or a non-text type is not
flagged.

The rule follows the validator's private functions rather than exporting
them, and a test runs real YAML through both to keep them in step.

Refs #3616
2026-11-06 21:22:27 +09:00
SCcagg5andYota Hamada bee8de0b96 feat: add the DAG restart_policy (#3156)
Co-authored-by: Yota Hamada <yohamta@gmail.com>
2026-11-06 19:51:19 +09:00