-
Notifications
You must be signed in to change notification settings - Fork 718
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
[Bug]: conditional_mark
only considers the longest match in the yaml file even when skipping.
#14698
Comments
Hi, @arista-nwolfe , this behavior is intentional and follows the longest matching rule. Our approach is as follows:
|
I agree that this was a bug that was fixed. The problem is all the rules in the |
No, this is not a bug. |
The intent of #11968 was not to introduce bugs. However, there is now a negative interaction between the change and the existing behavior of conditional rules. On one hand a bug was fixed, but on the other hand it broke existing behavior that was built on top buggy code. To make progress, we need to also update |
Hi, @arista-nwolfe, @kenneth-arista, sorry for the inconvenience. There was an incorrect behavior in finding the matching entries, deviating from our intended logic before. And in #11968, Arista fixed this issue, which align with our original expectations. However, this bugfix will cause some inconsistency behavior with previous logic(unexpected because of the bug). To keep consistency, I raised PR #14912 and it will be cherry picked into all branches so the behaviour will be align with previous. And also, we have the new logic of conditional mark #14395, #14515, we will also cherry pick these two PRs into all branches. After all PRs being cherry picked, the behavior will align with our expectations and previous. |
Sorry @yutongzhang-microsoft I didn't see this in time, I left a comment in the submitted review: #14395 (comment) |
Issue Description
As part of #11968 there was a fix in the function
find_longest_matches
to now correctly find only the longest matching entry intests_mark_conditions.yaml
.However, this bugfix now exposes the issue that multiple length'd
skip
conditions only result in the longestskip
occurring and causing tests to be run on undesired SKUs.Results you see
E.G. looking specifically at
generic_config_updater/test_ecn_config_update.py::test_ecn_config_updates
This test has 2 matching entries in
tests_mark_conditions.yaml
:But now because of the fix we'll only use the latter rule because it's longer.
Meaning we no longer
skip
this test on T2 devices even though none of the tests in thisgeneric_config_updater
folder should run on T2.In order to support this with the new "longest match wins" approach we'd need to replicate the
't2' in topo_name
on everygeneric_config_updater
rule.Results you expected to see
generic_config_updater/test_ecn_config_update.py::test_ecn_config_updates
should be skipped on T2 topologies.Is it platform specific
generic
Relevant log output
No response
Output of
show version
No response
Attach files (if any)
No response
The text was updated successfully, but these errors were encountered: