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

Add unmet prerequisite dumping on stall. #1888

Merged
merged 4 commits into from
Jun 22, 2016

Conversation

arjclark
Copy link
Contributor

@arjclark arjclark commented Jun 15, 2016

Close #1585. Addresses this comment: #1585 (comment)

On stalling the suite will now print out a list of unmet prerequisites for waiting tasks. Where those prerequisites are transitive they will be pruned down as much as possible. i.e. for:

foo => bar => baz

in the event of a stall due to failure of foo only bar will report unmet prerequisites. baz won't as it is waiting on the completion of a waiting task (bar) that hasn't got all its prereqs met.

See the test for the slightly more awkward problem when a task proxy doesn't exist at a cycle, thus resulting in an unmet prerequisite which gets reported (not massively different from what you'd end up with from manually inspecting the task in gcylc).

@hjoliver - please review 1
@matthewrmshin - please review 2

@arjclark arjclark added this to the next release milestone Jun 15, 2016

# prune tree to ignore items that are elsewhere in it
clean_keys = []
for item in prereq_tree.keys():
Copy link
Contributor

Choose a reason for hiding this comment

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

You can just do for item in prereq_tree:. There is no need to call the .keys() methods.

@arjclark
Copy link
Contributor Author

@matthewrmshin - tweaked as requested.

for unsatisfied in prereq_tree[item]['prereqs']:
unsatisfied_id = unsatisfied.split()[0]
# Clear out tasks with dependencies on other waiting tasks
if unsatisfied_id in prereq_tree.keys():
Copy link
Contributor

Choose a reason for hiding this comment

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

if unsatisfied_id in prereq_tree:

@matthewrmshin
Copy link
Contributor

Some more comments. Otherwise looks OK. Tests OK in my environment.

@arjclark
Copy link
Contributor Author

@matthewrmshin - addressed.

@hjoliver
Copy link
Member

(this will close #1585, right?)

@arjclark
Copy link
Contributor Author

@hjoliver - that is my hope. Just with you for review now.

@hjoliver
Copy link
Member

Pruning doesn't seem to work downstream of an unmet family:

[scheduling]
    [[dependencies]]
        graph = """foo => FAM
            FAM:succeed-any => bar"""
[runtime]
    [[foo]]
        script = false
    [[FAM]]
    [[f_1, f_2, f_3]]
        inherit = FAM
2016-06-20T08:33:02Z CRITICAL - [foo.1] -(current:running)> failed at 2016-06-20T08:33:01Z
2016-06-20T08:33:04Z WARNING - suite stalled
2016-06-20T08:33:04Z WARNING - Unmet prerequisites for f_1.1:
2016-06-20T08:33:04Z WARNING -  * foo.1 succeeded
2016-06-20T08:33:04Z WARNING - Unmet prerequisites for f_3.1:
2016-06-20T08:33:04Z WARNING -  * foo.1 succeeded
2016-06-20T08:33:04Z WARNING - Unmet prerequisites for bar.1:  <------------!!!!!!!!!!!!!!!!
2016-06-20T08:33:04Z WARNING -  *     LABEL: f_3_colon_succeed = f_3.1 succeeded
2016-06-20T08:33:04Z WARNING -  *     LABEL: f_2_colon_succeed = f_2.1 succeeded
2016-06-20T08:33:04Z WARNING -  *     LABEL: f_1_colon_succeed = f_1.1 succeeded
2016-06-20T08:33:04Z WARNING -  * CONDITION: (f_1_colon_succeed | f_2_colon_succeed | f_3_colon_succeed)
2016-06-20T08:33:04Z WARNING - Unmet prerequisites for f_2.1:
2016-06-20T08:33:04Z WARNING -  * foo.1 succeeded

@arjclark
Copy link
Contributor Author

@hjoliver - fixed (I think).

@arjclark
Copy link
Contributor Author

(also added a test to capture that kind of prereq filtering)

@hjoliver
Copy link
Member

Review 2 - good, tests pass here.

@hjoliver hjoliver merged commit 3583970 into cylc:master Jun 22, 2016
@arjclark arjclark deleted the dump_unmet_prereqs_on_stall branch June 22, 2016 13:25
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.

3 participants