-
Notifications
You must be signed in to change notification settings - Fork 187
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
CFE-4244: Add the function name to the result cache key #5317
Conversation
440caa0
to
8db5f62
Compare
781663b
to
4fbabae
Compare
The acceptance test fails on Windows:
Maybe a difference in the way dns resolution is implemented. I will try to find a safer test case. |
8ad317d
to
690a0c5
Compare
Tried a third attempt to create an acceptance test. Let me know what you think @amousset
|
9fb4837
to
57dcd13
Compare
@amousset, let me know if you agree with the changes I made :) |
Looks good 👍 |
The function cache only used the args values, which in some cases could lead to mixing results from different functions with the same arguments. Ticket: CFE-4244 Changelog: Cashed policy function results now take into account number of arguments and function name. Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> Co-authored-by: Alexis Mousset <alexis.mousset@rudder.io>
57dcd13
to
29e60a9
Compare
Squashed the commits. Please ACK if you agree with the results @amousset :) |
yes 👍 |
@cf-bottom can you run this through Jenkins please? |
Alright, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/9818/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-9818/ |
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.
Thanks! Let's wait for CI to approve
Two reasons for this: 1. CONTRIBUTING.md says to do this at the top 2. the `ctx` argument was actually used before the assert Ticket: None Changelog: None Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
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.
ACK
Thanks for your contribution @amousset 🚀 |
The function cache only used the args values as key, which in some cases could lead to mixing results from different functions with the same arguments.
Related to #5313.