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

Prep 7.7.0 release #2661

Merged
merged 23 commits into from
May 15, 2018
Merged

Prep 7.7.0 release #2661

merged 23 commits into from
May 15, 2018

Conversation

hjoliver
Copy link
Member

@hjoliver hjoliver commented May 12, 2018

Updates to change log etc. for 7.7.0 release.

[update] close #1113

@hjoliver hjoliver force-pushed the prep-7.7.0 branch 13 times, most recently from 34749d5 to f8c3945 Compare May 12, 2018 11:35
@hjoliver hjoliver self-assigned this May 12, 2018
@hjoliver hjoliver added this to the next release milestone May 12, 2018
@oliver-sanders oliver-sanders self-requested a review May 14, 2018 10:33
Copy link
Contributor

@matthewrmshin matthewrmshin left a comment

Choose a reason for hiding this comment

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

Should also mention the directory restructure in CHANGES.md, e.g. new expected locations for site *.rc files and new locations for editor syntax highlight files.

\lstinline=rose suite-run= on \lstinline=vagrant@localhost=. The suite
submits a single task called \lstinline=foo= to \lstinline=hobo@otherhost=.
The operator polls then kills the task, then shuts the suite down.
Security-conscious sites may want to restrict access to job hosts with SSH
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we tone this down slightly? It is not that other sites are not security conscious. It is that sites may have different security audit requirements.

\lstset{language=sh}
{\scriptsize
\dirtree{%
.1 /home/hjoliver/cylc-run/suitex.
Copy link
Contributor

Choose a reason for hiding this comment

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

Use ~/ to make it more general?

Result:
{\scriptsize
\dirtree{%
.1 /home/hjoliver/cylc-run/suitex.
Copy link
Contributor

Choose a reason for hiding this comment

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

Use ~/?

Result:
{\scriptsize
\dirtree{%
.1 /home/hjoliver/cylc-run/suitex.
Copy link
Contributor

Choose a reason for hiding this comment

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

Use ~/?

perl -pi -e "s/(initial cycle point\s*=)\s*.*/\1 20130808T00/g" suite.rc
perl -pi -e "s/(final cycle point\s*=)\s*.*/\1 20130808T12/g" suite.rc

if grep "cycling mode = integer" suite.rc > /dev/null; then
Copy link
Contributor

Choose a reason for hiding this comment

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

grep -q ...?

@hjoliver
Copy link
Member Author

@matthewrmshin - feedback all addressed. Over 'n out for today.

@matthewrmshin
Copy link
Contributor

See also #1113 (comment) for issue with global.rc.

@matthewrmshin
Copy link
Contributor

(I think it is worth moving site global to etc/global.rc, with back compat logic to also search for the file under conf/global.rc.)

Copy link
Contributor

@matthewrmshin matthewrmshin left a comment

Choose a reason for hiding this comment

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

Looks good enough.

@matthewrmshin
Copy link
Contributor

(My bad.) You may want to update the docs for cylc message with something like this:

diff --git a/bin/cylc-message b/bin/cylc-message
index 8f172c086..08578d8dc 100755
--- a/bin/cylc-message
+++ b/bin/cylc-message
@@ -15,7 +15,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
-"""cylc [task] message [OPTIONS] -- ARGS
+r"""cylc [task] message [OPTIONS] -- ARGS
 
 Record task job messages.
 
@@ -30,7 +30,22 @@ and to report registered task outputs.
 
 Messages can be specified as arguments. A '-' indicates that the command should
 read messages from STDIN. When reading from STDIN, multiple messages are
-separated by empty lines.
+separated by empty lines. E.g.:
+
+Single message as an argument:
+  % cylc message -- "${CYLC_SUITE_NAME}" "${CYLC_TASK_JOB}" 'Hello world!'
+Multiple messages as arguments:
+  % cylc message -- "${CYLC_SUITE_NAME}" "${CYLC_TASK_JOB}" \
+  %     'Hello world!' 'Hi' 'WARNING:Hey!'
+Multiple messages on STDIN:
+  % cylc message -- "${CYLC_SUITE_NAME}" "${CYLC_TASK_JOB}" - <<'__STDIN__'
+  % Hello
+  % world!
+  %
+  % Hi
+  %
+  % WARNING:Hey!
+  % __STDIN__
 
 Each message can be prefixed with a severity level using the syntax 'SEVERITY:
 MESSAGE'.
diff --git a/doc/src/cylc-user-guide/cug.tex b/doc/src/cylc-user-guide/cug.tex
index f2df8cf41..955da6312 100644
--- a/doc/src/cylc-user-guide/cug.tex
+++ b/doc/src/cylc-user-guide/cug.tex
@@ -5503,14 +5503,14 @@ Normal severity messages are printed to \lstinline=job.out= and logged by the
 suite server program:
 \lstset{language=bash}
 \begin{lstlisting}
-cylc message "Hello from ${CYLC_TASK_ID}"
+cylc message -- "${CYLC_SUITE_NAME}" "${CYLC_TASK_JOB}" "Hello from ${CYLC_TASK_ID}"
 \end{lstlisting}
 
 CUSTOM severity messages are printed to \lstinline=job.out=, logged by the
 suite server program, and can be used to trigger {\em custom} event handlers:
 \lstset{language=bash}
 \begin{lstlisting}
-cylc message -p CUSTOM "data available for ${CYLC_TASK_CYCLE_POINT}"
+cylc message -- "${CYLC_SUITE_NAME}" "${CYLC_TASK_JOB}" "CUSTOM:data available for ${CYLC_TASK_CYCLE_POINT}"
 \end{lstlisting}
 Task output messages, used for triggering other tasks, can also be sent with
 custom severity if need be
@@ -5518,13 +5518,13 @@ custom severity if need be
 WARNING severity messages are printed to \lstinline=job.err=, logged by the
 suite server program, and can be passed to {\em warning} event handlers:
 \begin{lstlisting}
-cylc message -p WARNING "Uh-oh, something's not right here."
+cylc message -- "${CYLC_SUITE_NAME}" "${CYLC_TASK_JOB}" "WARNING:Uh-oh, something's not right here."
 \end{lstlisting}
 
 CRITICAL severity messages are printed to \lstinline=job.err=, logged by the
 suite server program, and can be passed to {\em critical} event handlers:
 \begin{lstlisting}
-cylc message -p CRITICAL "ERROR occurred in process X!"
+cylc message -- "${CYLC_SUITE_NAME}" "${CYLC_TASK_JOB}" "CRITICAL:ERROR occurred in process X!"
 \end{lstlisting}
 
 \subsection{Aborting Job Scripts on Error}
@@ -5563,7 +5563,7 @@ For failures detected by the scripting you could send a critical message back
 before aborting, potentially triggering a {\em critical} task event handler:
 \begin{lstlisting}
 if ! /bin/false; then
-  cylc message -p CRITICAL "ERROR: /bin/false failed!"
+  cylc message -- "${CYLC_SUITE_NAME}" "${CYLC_TASK_JOB}" "CRITICAL:/bin/false failed!"
   exit 1
 fi
 \end{lstlisting}
diff --git a/etc/examples/message-triggers/suite.rc b/etc/examples/message-triggers/suite.rc
index 32d423c6f..8ec50fe64 100644
--- a/etc/examples/message-triggers/suite.rc
+++ b/etc/examples/message-triggers/suite.rc
@@ -12,9 +12,9 @@
     [[foo]]
         script = """
 sleep 5
-cylc message "file 1 done"
+cylc message -- "${CYLC_SUITE_NAME}" "${CYLC_TASK_JOB}" 'file 1 done'
 sleep 10
-cylc message "file 2 done"
+cylc message -- "${CYLC_SUITE_NAME}" "${CYLC_TASK_JOB}" 'file 2 done'
 sleep 10"""
         [[[outputs]]]
             out1 = "file 1 done"

The new interface of the cylc message command is backward compatible, so no big deal.

@hjoliver
Copy link
Member Author

cylc message help and docs updated.

@hjoliver
Copy link
Member Author

(I think it is worth moving site global to etc/global.rc, with back compat logic to also search for the file under conf/global.rc.)

OK, I've done that now. Note I've dropped the deprecated site.rc and user.rc filename variants - they are years old now, no one should be using them.

@hjoliver
Copy link
Member Author

hjoliver commented May 15, 2018

See also #1113 (comment) for issue with global.rc.

Well, you asked for it. I've had a crack at this now. My new solution mimics the site update method (keep it version specific):

~/.cylc/x.y.z/global.rc

where x.y.z is cylc version (and is truncated beyond z, for use in git clones); falling back to ~/.cylc/global.rc.

New file etc/global.rc.eg explains the rationale. I think this is better than what we have now, because it allows users to work with multiple versions at once, which may not be possible at the moment depending on your global settings. On the downside, they have to know to copy over the global config file before using a new version. But mitigating that, if they only have simple global.rc needs (e.g. set editor) they can stick with the non version-specific location. The original proposal of #1113 would probably be better, but that is at least arguable because it can't distinguish between errors and version incompatibilities.

Thoughts?

@matthewrmshin
Copy link
Contributor

3 tests broken by directory restructure. Need to make this change:

diff --git a/lib/cylc/version.py b/lib/cylc/version.py
index 8c339bd0b..26a91190d 100644
--- a/lib/cylc/version.py
+++ b/lib/cylc/version.py
@@ -34,8 +34,8 @@ def _get_cylc_version():
         # We're running in a cylc git repository, so dynamically determine
         # the cylc version string.  Enclose the path in quotes to handle
         # avoid failure when cylc_dir contains spaces.
-        is_ok, outlines = run_get_stdout(
-            '"%s"' % os.path.join(cylc_dir, "etc", "bin", "get-repo-version"))
+        is_ok, outlines = run_get_stdout('"%s"' % os.path.join(
+            cylc_dir, "etc", "dev-bin", "get-repo-version"))
         if is_ok and outlines:
             return outlines[0]
         else:

@matthewrmshin
Copy link
Contributor

I think we should close #1113 after this - the intended requirement is met by this solution.

@hjoliver
Copy link
Member Author

(Marked #1113 to close when this is merged)

(These were regenerated a few commits ago without updated the generating
script with --no-detach)
@hjoliver
Copy link
Member Author

Final commit makes the regenerated tutorial reference tests non-detaching (as reference tests are supposed to be ... but unfortunately suite_run_ok cylc run foo --reference-test just passes if --no-detach is omitted).

That should be it ... hopefully I can make the release tomorrow.

@matthewrmshin
Copy link
Contributor

@oliver-sanders please do a final sanity check.

Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

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

All seems good to me.

@@ -3779,7 +3794,7 @@ \subsubsection{Trigger Types}
message. Other tasks can trigger off the externally triggered task as required,
of course.

\lstinline=$CYLC_DIR/examples/satellite/ext-triggers/suite.rc= is a working
\lstinline=<cylc-dir>/etc/examples/satellite/ext-triggers/suite.rc= is a working
Copy link
Member

Choose a reason for hiding this comment

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

I like the <substitution> syntax, in the rose documentation we now have a pygments lexer for highlighting these in code blocks e.g: http://metomi.github.io/rose/doc/html/cheat-sheet.html

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice, looking foward to going cylc docs going this way...

@oliver-sanders oliver-sanders merged commit e154833 into cylc:master May 15, 2018
@hjoliver hjoliver deleted the prep-7.7.0 branch May 15, 2018 20:55
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.

parsec should ignore unknown items, not abort
3 participants