-
Notifications
You must be signed in to change notification settings - Fork 28
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
Use a deep copy when storing raw node data #124
Conversation
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.
Hi, seems well.
I've also met this issue, but though that issue is on my side with regerated data from python decorators.
yep, seems like adjust()
causes it. BTW, would not be better to fix adjust method if it somehow modify something what it should not modify? e.g. there can be found another issue with method use parameter and reference and potential future problem. and also reason why I've added lines for adjust to test https://github.com/psss/fmf/blob/master/tests/unit/test_modify.py#L82 :-) to prove that it does not modify adjust rule.
It could be fixed on the |
/packit test |
I believe it would be better to allow repetitive |
my feeling is that it should be keep. I can imagine that in pipeline some additional step may change adjust output, e.g. some artificial example :-) I can have centOS and will use RH tool for converting centos to RHEL, and then adjust have to match that it is not centos but rhel (e.g. in And as Lukas mentioned. We need the up to date data, not changed, TMT adjust objects stores the data as well so that removing inside FMF is unnecessary and maybe much more dangerous. |
Makes sense. Let's allow repeated |
@psss @lukaszachy maybe as quick fix we can also use this patch and create new one (or issue) for your mentioned solution in adjust. Because it will be then also feature not just bugfix. |
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've added test, @psss please review.
Thanks, @lukaszachy. The test looks good. Added changes needed to keep the original adjust rules intact, including a simple test. |
/packit test |
Hm, so integration fails on f34 as tmt changed |
Yeap, another motivation to find an elegant solution for teemtee/tmt/issues/585 as soon as possible. |
When the `adjust()` method is used it can modify data referenced from the raw data dictionaries. Make a deep copy to ensure the original data are preserved. Add test for modify after adjust. Co-authored-by: Lukáš Zachar <lzachar@redhat.com>
When the
adjust()
method is used it can modify data referencedfrom the raw data dictionaries. Make a deep copy to ensure the
original data are preserved.