-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$CYLC_WORKFLOW_LOG_DIR
points to log/scheduler
instead of just log
#6494
Comments
Historically, I suspect this reflects the distinction between "workflow log" (i.e. scheduler log) vs "job logs". But I can't think why jobs should need to know the scheduler log location. |
Changing it to point at the main log directory could break some workflows unfortunately (though it wouldn't hurt to do a grep on site to get some numbers). So maybe we could just rename it to |
I don't see this as a problem/quirk the "workflow log" environment variable points at the directory where we store the "workflow's log files", seems legit right? The distinction between job logs and workflow logs seems reasonable. If you would like an env var pointing at the root log dir, that could be done, but what for? |
I think most users would expect Now, we don't necessarily need one that points to the root log dir (although I guess you could argue the same for work or share), but I think the one that points to the scheduler log dir should be named as such. |
We can spin that both ways, I think most users would expect to find the workflow logs in the workflow log dir? Either way, probs not concerning enough to change? |
We could resolve the ambiguity like this:
Rationale: the "workflow" has a scheduler log and job logs. Or (simpler) only:
Rationale: as above, but let users add "job" or "scheduler" as needed. I'd be in favour of doing this. If we leave small ambiguities and inconsistencies as-is they eventually accumulate and make a bad smell. Of course we have to trade off with the damage caused by breaking changes. But in this case I highly doubt anyone is using WORKFLOW_LOG_DIR as it currently is, in job environments. ... especially as, as @MetRonnie noted above, it's not even documented. |
(Note the variable appears 23 times in our tests.) |
Got a grep on site running for a while, still no results, may leave it overnight |
I've found 1 case: # app/housekeeping/rose-app.conf
[env]
LOG_DIR=${CYLC_WORKFLOW_LOG_DIR} And guess what: # app/housekeeping/bin/housekeeping_logs.sh
LOG_DIR=$(dirname ${LOG_DIR}) So they're accessing the root log dir anyway 😆 |
A quirk is that this points to
cylc-flow/cylc/flow/etc/job.sh
Line 73 in 08ab96c
rather than just
${$CYLC_WORKFLOW_RUN_DIR}/log
.From examination of the blame, this is due to it changing from
CYLC_SUITE_LOG_DIR="${CYLC_SUITE_RUN_DIR}/log/suite"
(Cylc 7)CYLC_WORKFLOW_LOG_DIR="${CYLC_WORKFLOW_RUN_DIR}/log/workflow"
(Cylc 8 beta)CYLC_WORKFLOW_LOG_DIR="${CYLC_WORKFLOW_RUN_DIR}/log/scheduler"
(Cylc 8)Also, this env var is undocumented: cylc-doc issue opened for it: cylc/cylc-doc#779
Question: are we going to do anything about this? Edit: main proposal is to rename it to
CYLC_SCHEDULER_LOG_DIR
and makeCYLC_WORKFLOW_LOG_DIR
deprecated with a warning, and add/update acylc lint
rule for this.The text was updated successfully, but these errors were encountered: