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

metadata fail-if not working as expected in rose edit #2775

Closed
wxtim opened this issue Apr 16, 2024 · 2 comments
Closed

metadata fail-if not working as expected in rose edit #2775

wxtim opened this issue Apr 16, 2024 · 2 comments
Labels

Comments

@wxtim
Copy link
Contributor

wxtim commented Apr 16, 2024

As described by @kaday (to whom many thanks for boiling it down to the toy example below):

The following rose config

#!/bin/bash

SRC=$(mktemp -d)

cat > "${SRC}/rose-suite.conf" <<__ICI__
[template variables]
DATE_END=20211203
DATE_START=20211202

__ICI__

mkdir "${SRC}/meta"

cat > "${SRC}/meta/rose-meta.conf" <<__ICI__
[template variables=DATE_END]
compulsory=false
description=Set end date of trial, YYYYMMDD format.
sort-key=a-03
type=integer
fail-if=this > 0 and this <= template variables=DATE_START;
ns=Control
help=This is the end date of the data you wish to plot

[template variables=DATE_START]
compulsory=true
description=Set start date of trial, YYYYMMDD format.
sort-key=a-02
type=integer
ns=Control
help=This is the start date of the data you wish to plot

__ICI__

tree "${SRC}"

rose metadata-check -C "${SRC}/meta"

Results in an unexpected failure:

[V] rose.metadata_check.MetadataChecker: issues: 1
    template variables=DATE_END=fail-if=this > 0 and this <= template variables=DATE_START;
        Not found: variables=DATE_START
@wxtim wxtim added the bug label Apr 16, 2024
@wxtim wxtim added this to the 2.1.1 milestone Apr 16, 2024
@oliver-sanders oliver-sanders changed the title Cylc8 metadata fail-if not working as expected in rose edit metadata fail-if not working as expected in rose edit Apr 16, 2024
@oliver-sanders
Copy link
Member

Likely a duplicate of #2737

@MetRonnie MetRonnie modified the milestones: 2.1.1, 2.3.0 May 23, 2024
@oliver-sanders oliver-sanders modified the milestones: 2.3.0, 2.4.0 May 23, 2024
@oliver-sanders
Copy link
Member

Closing as a duplicate of #2737

@oliver-sanders oliver-sanders removed this from the 2.4.0 milestone May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants