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

Cylc Validate failed to catch bad offset #5448

Closed
ukmo-ccbunney opened this issue Apr 3, 2023 · 3 comments · Fixed by #5955
Closed

Cylc Validate failed to catch bad offset #5448

ukmo-ccbunney opened this issue Apr 3, 2023 · 3 comments · Fixed by #5955
Assignees
Labels
bug Something is wrong :(
Milestone

Comments

@ukmo-ccbunney
Copy link

Description

An invalid isodatetime in the [[xtriggers]] section can get past cylc validate and cause a suite to fail.
I'm not sure if cylc validate should be expected to catch this typo, but I will raise it just in case:

    [[xtriggers]]
        L1_trigger = wall_clock(offset=PT755MH):PT30S  # <-- bad offset

I meant to type PT7H55M, but instead made a typo and wrote an offset of 755MH

My suite kept failing to start (it just launched immediately into a "stopped" state) and I couldn't figure out why.
I only realised my error when I checked the "Workflow log file"

2023-04-03T13:37:42Z ERROR - could not convert string to float: '755M'
    Traceback (most recent call last):
      File "/home/h03/fcm/cylc-8.1.2-2/lib/python3.9/site-packages/cylc/flow/cycling/iso8601.py", line 881, in interval_parse
        return _interval_parse(interval_string)
      File "/home/h03/fcm/cylc-8.1.2-2/lib/python3.9/site-packages/cylc/flow/cycling/iso8601.py", line 902, in _interval_parse
        return WorkflowSpecifics.interval_parser.parse(interval_string)
      File "/home/h03/fcm/cylc-8.1.2-2/lib/python3.9/site-packages/metomi/isodatetime/parsers.py", line 575, in parse
        value = float(value)
    ValueError: could not convert string to float: '755M'

Cylc validate usually shouts about these kind of isodatetime errors, but not in this case.

Reproducible Example

Add the above section into a flow.cylc and run as usual (I use cylc vip)

Expected Behaviour

Suite will validate and install ok, but will immediately show in UI as "stopped".
Check workflow log, you should see the error above.

@ukmo-ccbunney ukmo-ccbunney added the bug Something is wrong :( label Apr 3, 2023
@hjoliver
Copy link
Member

hjoliver commented Apr 4, 2023

Confirmed. Thanks for the bug report!

@hjoliver hjoliver self-assigned this Apr 4, 2023
@hjoliver
Copy link
Member

hjoliver commented Apr 4, 2023

(Fix done, just testing it ...)

@ukmo-ccbunney
Copy link
Author

Ace. Thanks for the speedy fix!

@MetRonnie MetRonnie modified the milestones: cylc-8.1.5, cylc-8.2.0 May 15, 2023
@oliver-sanders oliver-sanders modified the milestones: cylc-8.2.0, cylc-8.2.1 Jul 11, 2023
@oliver-sanders oliver-sanders modified the milestones: cylc-8.2.1, cylc-8.2.2 Aug 14, 2023
@oliver-sanders oliver-sanders modified the milestones: cylc-8.2.2, cylc-8.2.3 Oct 4, 2023
@oliver-sanders oliver-sanders modified the milestones: cylc-8.2.3, cylc-8.2.4 Nov 1, 2023
@oliver-sanders oliver-sanders modified the milestones: cylc-8.2.4, 8.2.5 Jan 8, 2024
@oliver-sanders oliver-sanders modified the milestones: cylc-8.2.5, cylc-8.4.0 Feb 19, 2024
@oliver-sanders oliver-sanders modified the milestones: cylc-8.4.0, cylc-8.3.0 Feb 22, 2024
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 a pull request may close this issue.

4 participants