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

Permit syntax errors with trigger edits. #2592

Merged
merged 3 commits into from
Mar 20, 2018

Conversation

oliver-sanders
Copy link
Member

At present the cylc job file writer aborts on syntax error, this causes cylc trigger to hang as no job file is written. This PR skips the syntax check for dry runs so that users can attempt to fix their scripts at runtime via cylc trigger --edit.

Possibly related to reported intermittent hanging of cylc trigger --edit.

@oliver-sanders oliver-sanders added the bug Something is wrong :( label Mar 2, 2018
@oliver-sanders oliver-sanders added this to the next release milestone Mar 2, 2018
@oliver-sanders oliver-sanders self-assigned this Mar 2, 2018
@hjoliver
Copy link
Member

hjoliver commented Mar 7, 2018

(a couple of test failures need addressing)

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.

Good. (approving with one trivial question).

"""Prepare job file for a task.

items[0] is an identifier for matching a task proxy.
"""
self._check_access_priv_and_report(PRIV_FULL_CONTROL)
if not isinstance(items, list):
items = [items]
self.schd.command_queue.put(("dry_run_tasks", (items,), {}))
check_syntax = check_syntax in [True, 'True']
Copy link
Member

@hjoliver hjoliver Mar 12, 2018

Choose a reason for hiding this comment

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

Is there any need for this? The new arg doesn't come from user input or code.

Copy link
Member Author

Choose a reason for hiding this comment

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

Everything gets "stringised" when its passed over the network interface. I've just remembered that matt changed these if in statements to literal_evals as a more elegant solution to the problem:

group_all = self._literal_eval('group_all', group_all)

I'll amend the code to use this approach.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, right.

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.

re-approved!

@matthewrmshin matthewrmshin merged commit ea1f378 into cylc:master Mar 20, 2018
matthewrmshin added a commit to matthewrmshin/cylc-flow that referenced this pull request Mar 26, 2018
* cylc#2606 Fix poll when job.status has no batch sys info
* cylc#2604 Lowercase for shell bool vars
* cylc#2603 Fix gui insert nested family
* cylc#2602 gcylc: prevent negative job progress
* cylc#2596 Fix ref by value of parameters with plus/minus
* cylc#2592 Permit syntax errors with trigger edits
* cylc#2588 Fix trigger --edit with host select
* cylc#2586 Fix gcylc zero division error from task mean elapsed time
* cylc#2585 Fix recovery of a failed host select command
* cylc#2579 Fix gscan exception hook dialog closure incapacity
* cylc#2574 Fix gscan host port range owner behaviour
* cylc#2571 gcylc: fix tailer of remote job log
@oliver-sanders oliver-sanders deleted the trigger-edit-syntax-error branch May 18, 2018 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :(
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants