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
Fixes #20603: Reports on method using iterator are wrong in the cli output #4334
Conversation
I think the name of the parameter in the "id" method should me more explicit, ie the name of the method parameters for real parameter, and for the "reporting" value some more explicite name (component, value, id), it would be more explicit when debugging. (but here a problem on name colision, if there is a paramter that is name "id" or "value" Also the name og the bundle could be different like "call__index" but it's ok. I think i'll merge this like this and we may do another pr (or not) |
|
||
val argsList = bundleArguments.zipWithIndex.map {case (_, id) => "arg_" + id} | ||
|
||
val bundleName = (call.id + "_" + bundleIncrement).replaceAll("-", "_") |
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.
this may be not unique. We ought to prefix it with the technique name probably
Most likely technique_name_generic_method_name_incr would be more suited
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.
what would make this not unique ? rudder_reporting ?
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.
call.id is the same over different techniques
so you end up with bundles with the same name, and so it cannot be interpreted
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 should not have them the same, they should be generated at each method call ? which is not generating a new id ?
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.
we were having problems of non execution due to call.id being reused when the technique was applied twice, and the problem was that the promiser was not unique
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.
but the technique file will be created once
PR updated with a new commit |
If found several issues, especially the use of the wrong bundle (effective bundle and not log_na_rudder in rudder_reporting.cf) so rudder_reporting was doing things and not just only make a na_report I fixed some of them in |
there is still an issue with log_na |
PR updated with a new commit |
27693ed
to
89f5804
Compare
OK, merging this PR |
https://issues.rudder.io/issues/20603
This PR changes the way ncf techniques are generated to support (at least partially) iterators.
The main idea is to create a bundle that will set the context and call the effective generic method. This is necessary so that any iterator within the arguments of the generic method are not iterated once for the reporting context, and then once for the generic method
One bundle is created by generic method, named by the promiser of the generic method plus an increment id.
The resulting code looks like
and the bundle doing the action being