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

provided a alt list of states for filtering Cylc 8 tasks #4897

Merged
merged 4 commits into from
Jun 7, 2022

Conversation

wxtim
Copy link
Member

@wxtim wxtim commented May 24, 2022

These changes partially address #4782

Features check-list
In cylc review...

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg and conda-environment.yml.
  • Does not need tests - to be manually tested (see below)
  • Appropriate change log entry included.
  • No documentation update required.

How I tested

# global.cylc (end of)
[platforms]
    [[submitfail]]
        hosts = notahost
    [[submitted]]
        hosts = exvcylcdev01
        install target = exvcylcdev01
        communication method = poll
        submission polling intervals = P1Y
# flow.cylc
[scheduler]
    allow implicit tasks = true
[scheduling]
    initial cycle point = 1
    [[dependencies]]
        R1 = """
             expired & preparing & submitted  => waiting
             running & submit-failed & succeeded & failed =>waiting
            """

[runtime]
    [[submitted]]
        platform = submitted
    [[submit-failed]]
        platform = submitfail
    [[running]]
        script = while true; do sleep 30; done
    [[failed]]
        script = exit 1

and add the following hack to Cylc flow:

diff --git a/cylc/flow/task_job_mgr.py b/cylc/flow/task_job_mgr.py
index ab4174b55..9f3eeadba 100644
--- a/cylc/flow/task_job_mgr.py
+++ b/cylc/flow/task_job_mgr.py
@@ -1082,6 +1082,11 @@ class TaskJobManager:
         Return itask on a good preparation.
 
         """
+        if 'preparing' in itask.identity:
+            LOG.critical('Prevent task called preparing ever being marked as prepped.')
+            return False
+
+
         if itask.local_job_file_path:
             return itask

Note: Don't forget to check that the change hasn't done anything bad to Cylc Review's ability to read Cylc flow.

Another Note: Recent versions of the wrapper script may re-direct you to the wrong version of cylc review, I found it worthwhile running explicitly from a path - i.e. ${HOME}/cylc-7/bin/cylc review start

@wxtim wxtim self-assigned this May 24, 2022
@wxtim wxtim marked this pull request as draft May 24, 2022 14:55
@wxtim wxtim requested review from datamel and hjoliver May 24, 2022 14:56
@wxtim wxtim added the bug? label May 24, 2022
@wxtim wxtim added this to the cylc-7.8.x milestone May 24, 2022
@wxtim wxtim force-pushed the 7.8.x.cylc_review_upgrades branch from 7c4b139 to b92f095 Compare May 24, 2022 15:01
@wxtim wxtim marked this pull request as ready for review May 24, 2022 15:01
Copy link
Contributor

@datamel datamel left a comment

Choose a reason for hiding this comment

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

Minor points, working as expected for me. Thanks @wxtim.

lib/cylc/review.py Show resolved Hide resolved
lib/cylc/review.py Outdated Show resolved Hide resolved
lib/cylc/review.py Show resolved Hide resolved
lib/cylc/review.py Outdated Show resolved Hide resolved
wxtim and others added 2 commits June 7, 2022 14:30
Co-authored-by: Melanie Hall <37735232+datamel@users.noreply.github.com>
@wxtim wxtim requested a review from datamel June 7, 2022 13:36
Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

Note to self: another Cylc 7 release needed. (I'll add to the next meeting agenda).

@hjoliver hjoliver merged commit 9b67b3a into cylc:7.8.x Jun 7, 2022
@wxtim wxtim deleted the 7.8.x.cylc_review_upgrades branch June 8, 2022 10:11
@hjoliver hjoliver modified the milestones: cylc-7.8.x, 7.8.12 Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants