DAG files not being generated

Hello!

I’m trying to distribute the different log files across a folder structure to avoid having too many in a single folder.
With your help, I managed to get to a configuration like:

params {
    ...
    // Timestamps config
    raw_timestamp = java.time.LocalDateTime.now()
    timestamp     = String.format('%tFT%<tH:%<tM', raw_timestamp)
    month_folder  = String.format('/%tY/%<tm', raw_timestamp)
}
...
dag {
    enabled = true
    file = "dag" + params.month_folder + "/dag-" + params.timestamp + ".html"
    overwrite = true
}

report {
    enabled = true
    file = "report" + params.month_folder + "/report-" + params.timestamp + ".html"
    overwrite = true
}

timeline {
    enabled = true
    file = "timeline" + params.month_folder + "/timeline-" + params.timestamp + ".html"
    overwrite = true
}

trace {
    enabled = true
    file = "trace" + params.month_folder + "/trace-" + params.timestamp + ".txt"
    overwrite = true
}

That should create the files in file/folders like: report/2024/11/report-2024-11-20T12:15.html
dag, report, timeline and trace have all been configured using the same pattern, just changing the report type in the strings.
The issue is: I got this files generated for report, timeline and trace, but nothing at all for dag. No dag folder and no dag files anywhere in the folder structure (checked with find).

Looking at the .nextflow.log file, I can see a stack trace that starts with:

Nov-20 10:39:39.620 [main] DEBUG nextflow.trace.TraceFileObserver - Workflow completed -- saving trace file
Nov-20 10:39:39.629 [main] DEBUG nextflow.trace.ReportObserver - Workflow completed -- rendering execution report
Nov-20 10:39:40.823 [main] DEBUG nextflow.trace.TimelineObserver - Workflow completed -- rendering execution timeline
Nov-20 10:39:41.017 [main] DEBUG nextflow.Session - Failed to invoke observer completion handler: nextflow.trace.GraphObserver@2a5ed225
java.nio.file.NoSuchFileException: /home/user/devel/nf-pipeline/dag/2024/11/dag-2024-11-20T10:33.html

But this file is supposed to be created by Nextflow so… why the complaint?

Anyone have some idea of why I’m not getting the dag files generated?

As a secondary question, the raw_timestamp, timestamp and month_folder variables have been defined inside params because outside was an issue for the linter. But I don’t want these variables to be able to be overwritten by a user setting them in the command line. Where should I put those calculus so that they are not in the params section?