Skip to content

Allow feature names to start with a digit #3723

Description

@satishskamath
[2026-09-08T16:05:03.799945] debug: reframe: Loading user configuration
[2026-09-08T16:05:03.800691] debug: reframe: Loading the builtin configuration
[2026-09-08T16:05:03.800969] debug: reframe: Loading configuration file: '/gpfs/home5/satishk/projects/eessi_reframe/settings_example.py'
[2026-09-08T16:05:03.823138] debug: reframe: '16_nodes' does not match '^[a-zA-Z_](?:[a-zA-Z0-9_-])*$'

Failed validating 'pattern' in schema['properties']['systems']['items']['properties']['partitions']['items']['properties']['features']['items']:
    {'type': 'string', 'pattern': '^[a-zA-Z_](?:[a-zA-Z0-9_-])*$'}

On instance['systems'][0]['partitions'][3]['features'][13]:
    '16_nodes'
[2026-09-08T16:05:03.823379] error: reframe: �[31mERROR: failed to load configuration: could not validate configuration files: `<builtin>`, `/gpfs/home5/satishk/projects/eessi_reframe/settings_example.py`: '16_nodes' does not match '^[a-zA-Z_](?:[a-zA-Z0-9_-])*$'�[0m
[2026-09-08T16:05:03.823557] info: reframe: Log file(s) saved in '/tmp/rfm-dzi295w_.log'

In the EESSI test-suite we use features where the number is used first and then the string for scales which are used as features for partitions within the configuration files.
@vkarak Can you relax this regex condition back to alphanumeric from just alpha? This started happening since we started to use ReFrame 4.10.2/4.10.3

Activity

  1. satishskamath commented on Sep 8, 2026

    @satishskamath
    Author

    Related issue #3645 , is it possible to release a patch or a minor version to fix this?

  2. vkarak commented on Sep 9, 2026

    @vkarak
    Contributor

    This is not a regression, but rather enforcing what the documentation states about partition/environment features:

    The values of this list must be alphanumeric strings starting with a non-digit character and may also contain a -.

    This pattern was enforced correctly since 4.10.1 by #3685.

  3. vkarak commented on Sep 9, 2026

    @vkarak
    Contributor

    However, I must admit that there is an inconsistency as the valid_systems mini-language allows for both leading zeros and .:

    _F = rf'([+-]{_N})' # feature

  4. vkarak commented on Sep 9, 2026

    @vkarak
    Contributor

    I will rephrase this issue as feature request, as it is not a bug. I'm working on a PR that will address both #3645 and resolve the inconsistency reported here.

  5. changed the title [-]Reframe errors out on config file features not supporting regex pattern on features[/-] [+]Allow feature names to start with a digit[/+] on Sep 9, 2026
  6. self-assigned this
    on Sep 9, 2026
  7. added theissue type on Sep 9, 2026
  8. added this to the ReFrame 4.11 milestone on Sep 9, 2026
  9. vkarak commented on Sep 9, 2026

    @vkarak
    Contributor

    Related issue #3645 , is it possible to release a patch or a minor version to fix this?

    It is going to be addressed in 4.11, but if you would like an earlier deployment, we could tag a dev release once it is merged.

  10. moved this from Todo to In Progress in ReFrame Backlogon Sep 9, 2026
  11. vkarak commented on Sep 9, 2026

    @vkarak
    Contributor

    @satishskamath Can you try #3725 ?

  12. boegel commented on Sep 10, 2026

    @boegel
    Contributor

    This is not a regression, but rather enforcing what the documentation states about partition/environment features:

    The values of this list must be alphanumeric strings starting with a non-digit character and may also contain a -.

    This pattern was enforced correctly since 4.10.1 by #3685.

    I respectfully disagree here...

    I think this change should be treated as a bug/regression, exactly because it was fine to have values that start with digits for so long. In my view, the documentation was wrong here, and fixing that (and going back to allowing values with leading digits) would be sensible approach. That's just my view of course, this isn't my project. ;-)

    Is there a specific reason why values with leading digits are problematic?

    Not allowing values that start with a digit is problematic for the EESSI test suite, because it effectively makes the scale tags we have (see https://www.eessi.io/docs/test-suite/usage/#scale-tags) invalid all of a sudden. We could rename those of course, but that's quite annoying to anyone who's using the EESSI test suite, as they'll need to adjust accordingly...

    The easier approach for us would be to detect which ReFrame version is used, and print a warning (or flat out refuse) if a ReFrame version that doesn't accept our scale tags as being valid (not sure if that's possible easily though).

    cc @casparvl, @laraPPr, @smoors

  13. vkarak commented on Sep 10, 2026

    @vkarak
    Contributor

    I think this change should be treated as a bug/regression, exactly because it was fine to have values that start with digits for so long. In my view, the documentation was wrong here, and fixing that (and going back to allowing values with leading digits) would be sensible approach. That's just my view of course, this isn't my project. ;-)

    I understand your view and it makes sense from the user's point of view. But I believe the docs expressed the original intent here (see the rationale below).

    Is there a specific reason why values with leading digits are problematic?

    Historically, the reason is that we wanted to be conservative with all the names that could appear in paths (system/partition/environment names). So originally we had two types of patterns: strict POSIX names and a relaxed version allowing hyphens. The problem was that these patterns were not anchored, so they matched anywhere in the string, effectively defying the original intent up until 4.10.1. I also just discovered a bug that since 3.11 all env_vars names in the configuration could allow hyphens (and before the strict enforcement, practically anything), leading to invalid export statements in the generated job scripts. Technically, this could have been used as a "feature" too.

    When the features were introduced, we didn't want to introduce yet another pattern, so we reused the alphanum_ext_string. Technically, digits and other symbols could be part of the features, but historically, this hasn't been the intent.

    This is what #3725 addresses in --I believe-- the correct way. Relaxes intentionally the syntax for system/partitions/environment/features and fixes the consistency between the features and the validation mini-language of valid_systems etc.

    Not allowing values that start with a digit is problematic for the EESSI test suite, because it effectively makes the scale tags we have (see https://www.eessi.io/docs/test-suite/usage/#scale-tags) invalid all of a sudden. We could rename those of course, but that's quite annoying to anyone who's using the EESSI test suite, as they'll need to adjust accordingly...

    You don't have to, because 4.11 will introduce these properly (#3725). Also how the tags in the docs you pointed above (which can be anything even now) are associated with the features that this PR mentions?

  14. boegel commented on Sep 10, 2026

    @boegel
    Contributor

    @vkarak Thanks for clarifying

    Not allowing values that start with a digit is problematic for the EESSI test suite, because it effectively makes the scale tags we have (see https://www.eessi.io/docs/test-suite/usage/#scale-tags) invalid all of a sudden. We could rename those of course, but that's quite annoying to anyone who's using the EESSI test suite, as they'll need to adjust accordingly...

    You don't have to, because 4.11 will introduce these properly (#3725). Also how the tags in the docs you pointed above (which can be anything even now) are associated with the features that this PR mentions?

    OK, that's helpful. We still may need to refuse particular ReFrame versions though, to avoid people hitting the problem originally reported.

    Note that the original error was exactly for one of these scaling tags, 16_nodes.
    I'm not very familiar with the relation between these tags and features in ReFrame though, maybe @satishskamath (or someone else) can pitch in here...

  15. satishskamath commented on Sep 10, 2026

    @satishskamath
    Author

    @boegel and @vkarak
    Thank you for the clarification and discussion.

    You don't have to, because 4.11 will introduce these properly (#3725). Also how the tags in the docs you pointed above (which can be anything even now) are associated with the features that this PR mentions?

    We essentially use these scaling tags as features for partitions in the config files. This allows the sites to set the scales that are valid for them, the way their systems are configured. They can ban certain scales which are not useful or valid within their systems.

    I agree with @boegel here that this was allowed until now, even though the documentation might have differed. Changing tag names also means that we may have to modify, certain other scripts within the EESSI project where these tests are regularly used.

  16. vkarak commented on Sep 10, 2026

    @vkarak
    Contributor

    Changing tag names also means that we may have to modify, certain other scripts within the EESSI project where these tests are regularly used.

    Yes, but 4.11 addresses this properly in #3725. So, essentially, you are asking for a patch release to revert the enforcement?

  17. vkarak commented on Sep 10, 2026

    @vkarak
    Contributor

    OK, that's helpful. We still may need to refuse particular ReFrame versions though, to avoid people hitting the problem originally reported.

    @boegel This is also the case now. You have to refuse 4.10.1 to 4.10.3. 🤔

  18. boegel commented on Sep 10, 2026

    @boegel
    Contributor

    OK, that's helpful. We still may need to refuse particular ReFrame versions though, to avoid people hitting the problem originally reported.

    @boegel This is also the case now. You have to refuse 4.10.1 to 4.10.3. 🤔

    I agree. So I'm not really asking for a patch release, unless that can be done way faster than getting 4.11 out

  19. vkarak commented on Sep 10, 2026

    @vkarak
    Contributor

    I agree. So I'm not really asking for a patch release, unless that can be done way faster than getting 4.11 out

    We can do a dev release tag once this is merged, if you don't mind using dev releases.

  20. vkarak commented on Sep 10, 2026

    @vkarak
    Contributor

    We can do a dev release tag once this is merged, if you don't mind using dev releases.

    @boegel The dev releases are just tags in the github repo, which you can install with using the git path, e.g., git+https://github.com/reframe-hpc/reframe.git@v4.10.2. They are not published as packages in PyPI. Hope that's fine for you.

  21. boegel commented on Sep 10, 2026

    @boegel
    Contributor

    We can do a dev release tag once this is merged, if you don't mind using dev releases.

    @boegel The dev releases are just tags in the github repo, which you can install with using the git path, e.g., git+https://github.com/reframe-hpc/reframe.git@v4.10.2. They are not published as packages in PyPI. Hope that's fine for you.

    That wouldn't really help us, we prefer using "proper" releases (and we don't control which ReFrame version others use anyway)

  22. satishskamath commented on Sep 18, 2026

    @satishskamath
    Author

    @boegel and @vkarak see #3725 (comment)
    So #3725 does solve the problem.

  23. moved this from In Progress to Done in ReFrame Backlogon Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions