ni / ni/measurement-plugin-python

`grpc_servicer` should use `*args` to pass positional parameters

Open
#335 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

tech debt
Dominant language
Python
Stars
21
Forks
20
Avg merge
1d 16h
Merged PRs (30d)
3

Description

Tech Debt

The MeasurementService.configuration_parameter decorator describes positional parameters in order, but grpc_servicer uses inspect.signature to look up the parameter names so that it can use **kwargs to pass them:

https://github.com/ni/measurementlink-python/blob/main/ni_measurementlink_service/_internal/grpc_servicer.py#L98
https://github.com/ni/measurementlink-python/blob/main/ni_measurementlink_service/_internal/grpc_servicer.py#L245

Passing positional parameters with *args would be simpler and have slightly lower overhead.

AB#2457623

AB#3037070

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in ni_measurementlink_service/_internal/grpc_servicer.py at the referenced lines, and read how MeasurementService.configuration_parameter describes positional parameters and how grpc_servicer currently maps them by name. Replace that positional-parameter path with *args while preserving the decorator’s ordering and existing service behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, python
Domain
backend-api-design
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.