Skip to content

Conversation

@MetRonnie
Copy link
Member

@MetRonnie MetRonnie commented Oct 13, 2025

Closes #6994

Stop trying to submit the triggered tasks once itask.waiting_on_job_prep == False.

This is kind of a follow-up to #6836, #6768, #6345, #5062. It also predates and fixes the same bug as #7054.

Also fixes a scheduler TypeError crash if platform subshell evaluates to an empty string.

Also fixes an incomplete warning message

A mixture of Cylc 7 (host) and Cylc 8 (platform) logic should not be used. In this case for the task "1/foo" the following are not compatible:

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).
  • No dependency changes
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included if this is a change that can affect users
  • No docs needed
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@MetRonnie MetRonnie added this to the 8.6.x milestone Oct 13, 2025
@MetRonnie MetRonnie requested review from hjoliver and wxtim October 13, 2025 17:26
@MetRonnie MetRonnie self-assigned this Oct 13, 2025
@MetRonnie MetRonnie added the bug Something is wrong :( label Oct 13, 2025
Comment on lines 699 to 703
async def test_trigger_whilst_paused_preparing(flow, scheduler, run, complete):
"""It should run "preparing" tasks even if the workflow is paused.
Remote init leaves tasks as preparing for a while. These must still be
pushed through to running, even if triggered while the workflow is paused.

This comment was marked as outdated.

Copy link
Member Author

@MetRonnie MetRonnie Nov 7, 2025

Choose a reason for hiding this comment

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

Test added back in d3f5f68 since it was changed on 8.6.x

Comment on lines -32 to -35
# Both of these cases should validate ok.
run_ok "${TEST_NAME_BASE}-validate" \
cylc validate "${WORKFLOW_NAME}"

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it should validate ok! This is detectable at config parse time, however we are unlikely to fix this now as the deprecated syntax is to be removed in the next minor release

@MetRonnie MetRonnie force-pushed the paused-trigger-platform branch from 4aea66b to c2d5048 Compare October 14, 2025 11:02
@MetRonnie MetRonnie force-pushed the paused-trigger-platform branch from c2d5048 to dfcdcab Compare October 14, 2025 11:15
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.

LGTM @MetRonnie - but I'll leave you to check the conflict with #7054 (huh, this PR is older than that one!)

@MetRonnie MetRonnie modified the milestones: 8.6.x, 8.6.1 Nov 7, 2025
Comment on lines 1369 to 1373
pre_prep_tasks.update({
itask
for itask in self.pool.get_tasks()
if itask.state(TASK_STATUS_PREPARING)
}
and itask.waiting_on_job_prep
})
Copy link
Member Author

@MetRonnie MetRonnie Nov 7, 2025

Choose a reason for hiding this comment

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

@oliver-sanders This PR pre-dated #7054 and had basically the same fix.

However #7054 missed L1376 - I have consolidated the two in this PR.

One difference here is that I did not delete the check for itask.state(TASK_STATUS_PREPARING), I added the check for itask.waiting_on_job_prep in addition.

Copy link
Member

Choose a reason for hiding this comment

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

OK now waiting on @oliver-sanders to check that.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think there's any need to have itask.state(TASK_STATUS_PREPARING) in combination with itask.waiting_on_job_prep, but it can't do any harm.

- All task proxies that are `waiting_on_job_prep` should be in the preparing state, so remove redundant check
- Add back in simple trigger-while-paused integration test
@MetRonnie MetRonnie force-pushed the paused-trigger-platform branch from d3f5f68 to a3ddfc5 Compare November 10, 2025 15:53
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.

Platform subshell can cause remote init to happen on a different platform if triggering a task while paused

4 participants