Skip to content

Conversation

@aryans1204
Copy link
Contributor

Summary

A small summary of the requirements (in one/two sentences).
This is a fix for allowing Loader to invoke both trace-func and vSwarm functions in the same run.

Implementation Notes ⚒️

The Invoker interface is moved to pkg common and the Invoker interface is removed from the driver config and instead moved to the common.Function. Similarly, the record.go file containing the ExecutionRecord is moved to common, to allow for the ExecutionRecord to be used in the Invoke interface call, which would not be possible otherwise since the metric package cant be imported in common due to cyclic dependency. Most other files are changed to reflect this change of package from metric to common. The trace_driver.go is changed to generate clients for each parsed function based on Execute or SayHello and the invokeFunction is changed to invoke the function specific client. No significant changes are made to the Invoker client, and no chnages are made to the deployment stages. For the trace parsing, under mapper_trace_parser.go the YAML file for trace-func is embedded if the chosen function is trace-func.

  • Briefly outline the overall technical solution. If necessary, identify talking points where the reviewer's attention should be drawn to.

External Dependencies 🍀

Breaking API Changes ⚠️

Simply specify none (N/A) if not applicable.


func (d *Driver) generateInvokers() {
for _, function := range d.Configuration.Functions {
trace_func := strings.Contains(function.Name, "trace-func")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't rely on function name here. In RPS mode, we have functions named differently even for the trace functions. BTW, we would need to think how to pass this mapping in that case as well.

@leokondrashov
Copy link
Contributor

@aryans1204 are there any updates on this?

@leokondrashov leokondrashov force-pushed the fix-invoker-client branch 2 times, most recently from 75411f3 to 9330bd6 Compare July 13, 2025 12:45
aryans1204 and others added 3 commits October 22, 2025 19:46
Minor fixes

Signed-off-by: Leonid Kondrashov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants