-
Notifications
You must be signed in to change notification settings - Fork 47
Making norun_tests env_types combinations robust #205
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
Open
narasimhan-v
wants to merge
1
commit into
lop-devops:master
Choose a base branch
from
narasimhan-v:no_run_tests_robust
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering we have all combinations covered at length 2, do we need a length of 3 and 4? Just a thought that we can cover what we need at length 1 and 2.
It also matches what we have in the config now. Config would be better to maintain this way.
Possibly we can extend the length when needed, but I doubt if we would need to.
What are your thoughts here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right in this case alone. Because we have rhel, rhel8, rhel8.1 as different entries, we have this
luxuryto cover all needed combinations. And since we are not doing too much extra work to generate those extra permutations, I have included all possible ones.We are not going to touch the config. Just that the current config limits users in certain ways (like not able to cover certain permutations), which this code the future config can have more entries, but this in no way forces changes or limitations in current config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only worry was not to make the config clumsy. Because when we have various ways to use the config we may tend to use different section name for same type of use case.
Ex.
norun_rhel8.1_NVnorun_rhel_rhel8_rhel8.2_NVBut yes of course it does not harm anything. So it is your call if we can go with current implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get your point. My goal was to make it easier for user to go with any order they want, without knowing what order the code computes (this should ideally be the case as well).
2a. Does it cover all possible permutations - Yes
2b. Does it make the user's job easier to create whatever permutation they want to - Yes
For me, advantages of 2a and 2b weigh in more than the clumsiness, and the disadvantages of that clumsiness is something I don't mind :)
On a side note, I was even planning to remove the
norun_from the config section names, since that is irrelevant.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@narasimhan-v one of the concern that I had is already getting discussed here, I agree with @harish-24, we do not need more depth combinations, rather let's try to have layered, but that is not possible with current implementation or topic for current one, let's have another discussion[1].
I would say it is better not to confuse user, and we need to have some rules for user so the documentation, I do NOT agree on what ever user give we should should parse, probably we can add the example for valid patterns that user can provide.
how about make it generic, I guess it is already we use it but not in the order, probably that can be corrected, which would be cleaner addition for user, what say?
example for each :
Platform: KVM, NV, PHYP
Distro: rhel, sles, ubuntu
MajorNo: 8, 11, 14
MinorNo: 2, sp4, 04
Additionally, what is the issue with current implementation and why we need this change is not clear from commit message, for me it looks like we are trying to ease user for his wrongly configured environment, which might lead other failures going forward.
[1]: How about having a yaml implementation of norun config, so that we can approach it as
layered, am not big user/fan of yaml, I know you have been using in avocado misc tests, and i feel it would suite this need for long run and we can avoid duplication, this can wait and we can discuss more on such design.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To start with, we are not allowing users to provide norun tests for these type of combinations now.
Another issue we will face is, we are not at all looking at processor generation and system type today (P8 vs P9, OpenPower vs IBM), and these are valid use cases where some people do not want a test to run on certain systems where it is harmful.
Forcing users to go with a particular order is not intuitive. I, as a user, will feel norun_P9_NV_... is right, and someone else might feel norun_NV_P9 is right. And we should not be spending time on defining the right order, IMO.
I like this idea for all the reasons above, and will explore more on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right order helps to avoid confusion, moreover I feel, there is no liking of user needed here, this is to get some job done for user, and rules are always good to keep the coding/processing sane.
More over it will help user identifying if the pattern is already defined, I feel that is more of a usability we need to provide user over any pattern.
Good, we need Processor Generation too, that's where defined pattern would help us.
Small background on KVM test suite: I had a similar need on KVM tests and that resulted in almost 6 months refactoring cpu utils code on avocado but it is cleaner now, the actual change I wanted to make it is still in-review, there we have a Cartesian config which came handy and test implementation there would support such change, similar approach would be good conceptually, I believe yaml will help us.
Good, pls do, this might ease lot of things we discuss already.
My suggestion would be to park this PR for any rework, and explore on yaml way of doing....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure