Skip to content
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

Testing #307

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: configure node
uses: actions/setup-node@v1
with:
node-version: '10.x'
node-version: '16'

- name: checkout cylc-doc
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion src/tutorial/furthertopics/broadcast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Add the following runtime configuration to the ``runtime`` section:
WORD=${WORDS[$(date +%s) % ${#WORDS[@]}]}

# Broadcast random word to the announce task.
cylc broadcast $CYLC_WORKFLOW_NAME -n announce -s "[environment]WORD=${WORD}"
cylc broadcast $CYLC_WORKFLOW_ID -n announce -s "[environment]WORD=${WORD}"
"""
[[[environment]]]
WORDS = ni, it, ekke ekke ptang zoo boing
Expand Down
16 changes: 8 additions & 8 deletions src/tutorial/furthertopics/message-triggers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ In order to get our workflow to trigger messages, we need to:
* specify our custom message in a section called ``[[outputs]]`` within the
``[runtime]`` section of our workflow,

* add ``cylc message -- "${CYLC_WORKFLOW_NAME}" "${CYLC_TASK_JOB}" "YOUR CHOSEN TRIGGER MESSAGE"``
* add ``cylc message -- "${CYLC_WORKFLOW_ID}" "${CYLC_TASK_JOB}" "YOUR CHOSEN TRIGGER MESSAGE"``
to the ``script`` section of ``[runtime]``, your chosen trigger message
should be unique and should exactly match the message defined in
``[[outputs]]``.
Expand All @@ -69,7 +69,7 @@ triggers another task bar and when fully completed triggers another task, baz.
[[foo]]
script = """
sleep 5
cylc message -- "${CYLC_WORKFLOW_NAME}" "${CYLC_TASK_JOB}" "file 1 done"
cylc message -- "${CYLC_WORKFLOW_ID}" "${CYLC_TASK_JOB}" "file 1 done"
sleep 10
"""
[[[outputs]]]
Expand Down Expand Up @@ -251,11 +251,11 @@ triggers another task bar and when fully completed triggers another task, baz.
script = """
sleep 2
random.sh
+ cylc message -- "${CYLC_WORKFLOW_NAME}" "${CYLC_TASK_JOB}" \
+ cylc message -- "${CYLC_WORKFLOW_ID}" "${CYLC_TASK_JOB}" \
"Task partially complete, report ready to view"
sleep 2
random.sh
+ cylc message -- "${CYLC_WORKFLOW_NAME}" "${CYLC_TASK_JOB}" \
+ cylc message -- "${CYLC_WORKFLOW_ID}" "${CYLC_TASK_JOB}" \
"Task partially complete, report updated"
sleep 2
random.sh
Expand Down Expand Up @@ -312,11 +312,11 @@ triggers another task bar and when fully completed triggers another task, baz.
script = """
sleep 2
random.sh
cylc message -- "${CYLC_WORKFLOW_NAME}" "${CYLC_TASK_JOB}" \
cylc message -- "${CYLC_WORKFLOW_ID}" "${CYLC_TASK_JOB}" \
"Task partially complete, report ready to view"
sleep 2
random.sh
cylc message -- "${CYLC_WORKFLOW_NAME}" "${CYLC_TASK_JOB}" \
cylc message -- "${CYLC_WORKFLOW_ID}" "${CYLC_TASK_JOB}" \
"Task partially complete, report updated"
sleep 2
random.sh
Expand Down Expand Up @@ -413,11 +413,11 @@ triggers another task bar and when fully completed triggers another task, baz.
script = """
sleep 2
random.sh
cylc message -- "${CYLC_WORKFLOW_NAME}" "${CYLC_TASK_JOB}" \
cylc message -- "${CYLC_WORKFLOW_ID}" "${CYLC_TASK_JOB}" \
"Task partially complete, report ready to view"
sleep 2
random.sh
cylc message -- "${CYLC_WORKFLOW_NAME}" "${CYLC_TASK_JOB}" \
cylc message -- "${CYLC_WORKFLOW_ID}" "${CYLC_TASK_JOB}" \
"Task partially complete, report updated"
sleep 2
random.sh
Expand Down
10 changes: 5 additions & 5 deletions src/user-guide/task-implementation/job-scripts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Normal severity messages are printed to ``job.out`` and logged by the scheduler:

.. code-block:: bash

cylc message -- "${CYLC_WORKFLOW_NAME}" "${CYLC_TASK_JOB}" \
cylc message -- "${CYLC_WORKFLOW_ID}" "${CYLC_TASK_JOB}" \
"Hello from ${CYLC_TASK_ID}"

"CUSTOM" severity messages are printed to ``job.out``, logged by the
Expand All @@ -150,7 +150,7 @@ event handlers:

.. code-block:: bash

cylc message -- "${CYLC_WORKFLOW_NAME}" "${CYLC_TASK_JOB}" \
cylc message -- "${CYLC_WORKFLOW_ID}" "${CYLC_TASK_JOB}" \
"CUSTOM:data available for ${CYLC_TASK_CYCLE_POINT}"

These can be used to signal special events that are neither routine
Expand All @@ -162,15 +162,15 @@ file (a "data availability" event).

.. code-block:: bash

cylc message -- "${CYLC_WORKFLOW_NAME}" "${CYLC_TASK_JOB}" \
cylc message -- "${CYLC_WORKFLOW_ID}" "${CYLC_TASK_JOB}" \
"WARNING:Uh-oh, something's not right here."

"CRITICAL" severity messages are printed to ``job.err``, logged by the
:term:`scheduler`, and can be passed to *critical* event handlers:

.. code-block:: bash

cylc message -- "${CYLC_WORKFLOW_NAME}" "${CYLC_TASK_JOB}" \
cylc message -- "${CYLC_WORKFLOW_ID}" "${CYLC_TASK_JOB}" \
"CRITICAL:ERROR occurred in process X!"

Task jobs no longer (since Cylc 8) attempt to resend messages if the server
Expand Down Expand Up @@ -226,7 +226,7 @@ before aborting, potentially triggering a *critical* task event handler:
.. code-block:: bash

if ! /bin/false; then
cylc message -- "${CYLC_WORKFLOW_NAME}" "${CYLC_TASK_JOB}" \
cylc message -- "${CYLC_WORKFLOW_ID}" "${CYLC_TASK_JOB}" \
"CRITICAL:ERROR: /bin/false failed!"
exit 1
fi
Expand Down
1 change: 1 addition & 0 deletions src/user-guide/writing-workflows/jinja2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ prior to configuration parsing to provide workflow context:
CYLC_VERBOSE # Verbose mode, True or False
CYLC_VERSION # Version of cylc installation used

CYLC_WORKFLOW_ID # Workflow ID
CYLC_WORKFLOW_NAME # Workflow name

CYLC_WORKFLOW_LOG_DIR # Workflow log directory.
Expand Down
5 changes: 3 additions & 2 deletions src/user-guide/writing-workflows/runtime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ The task job script may export the following environment variables:
# when in any date-time cycling mode
CYLC_WORKFLOW_FINAL_CYCLE_POINT # Final cycle point
CYLC_WORKFLOW_INITIAL_CYCLE_POINT # Initial cycle point
CYLC_WORKFLOW_ID # Workflow ID - the WORKFLOW_NAME plus the run directory
CYLC_WORKFLOW_NAME # Workflow name
CYLC_UTC # UTC mode, True or False
CYLC_VERBOSE # Verbose mode, True or False
Expand Down Expand Up @@ -505,7 +506,7 @@ this case.) E.g. to send an email on (submission) failed and retry:
[[foo]]
script = """
test ${CYLC_TASK_TRY_NUMBER} -eq 3
cylc message -- "${CYLC_WORKFLOW_NAME}" "${CYLC_TASK_JOB}" 'oopsy daisy'
cylc message -- "${CYLC_WORKFLOW_ID}" "${CYLC_TASK_JOB}" 'oopsy daisy'
"""
execution retry delays = PT0S, PT30S
[[[events]]]
Expand Down Expand Up @@ -611,7 +612,7 @@ event handlers using the alternate methods:
[[foo]]
script = """
test ${CYLC_TASK_TRY_NUMBER} -eq 2
cylc message -- "${CYLC_WORKFLOW_NAME}" "${CYLC_TASK_JOB}" 'oopsy daisy'
cylc message -- "${CYLC_WORKFLOW_ID}" "${CYLC_TASK_JOB}" 'oopsy daisy'
"""
execution retry delays = PT0S, PT30S
[[[events]]]
Expand Down