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

add time parse test samplers #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

baallan
Copy link
Collaborator

@baallan baallan commented Dec 7, 2021

python3 yaml does some odd things with time strings for interval/offset/reconnect. This file adds sampler configs with demonstrators of the problem.

@baallan
Copy link
Collaborator Author

baallan commented Dec 7, 2021

@nick-enoent what's really needed rather than adding this file is to move the 'samplers:' section from this file into orion.yaml as part of your ongoing refactoring.

@baallan
Copy link
Collaborator Author

baallan commented Dec 8, 2021

@tom95858 @nick-enoent I replied to Tom's reply to this that he posted at #33. I'm duplicating the reply here:

@tom95858 'odd things' means python/c yaml parser layer behavior equivalent to:

  • explicit quotes are stripped
    
  • Nu (where N is digits and u is what looks to us like a unit string) is converted to some int according to pyyaml notions of time.
    
  • the unit multiplier seems like it may only have 1 significant character in some cases
    
  • where the user may normally expect implicit quoting, it does not occur in favor of time conversion.
    

My test case demonstrates a few of these that result in int being delivered to our cvt function.
Assuming that we will stay dependent on python builtin yaml parsing, the oddities here are sufficient that I am in favor of dropping support for time units altogether and sticking with the C-defined time parameters we have today.
I have not managed to find documented python libyaml 1.1 unit parsing rules. The time feature is apparently so disgusting in general that the yaml 1.2 specification (Which python doesn't follow) removed it.

@nick-enoent
Copy link
Collaborator

@baallan Thanks for pointing out the issues with timestamp notation. As of now, this yaml configuration's sampler timestamps will generate the correct timestamps with the new top of tree; however, the config will throw errors when maestro attempts to load these plugins, as procstat1 is not an actual ldms plugin. As this is the expected behavior, it would be fine as long as it's documented in a test script of some sort, but I don't think we should append it to the existing orion.yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants