Skip to content

session.proto should be replaced with a dependency on ni.grpcdevice.v1.proto #2146

@bkeryan

Description

@bkeryan

Description of issue

The nimi-python packages contain duplicate protobuf codegen for session.proto. This only works when the duplicated codegen is exactly identical across all installed packages; if any package has a slightly different version of this codegen, users will get an error such as

ERROR: Exception calling application: Couldn't build proto file into descriptor pool: duplicate symbol 'nidevice_grpc.SessionInitializationBehavior'

The path forward is to add a dependency on https://pypi.org/project/ni.grpcdevice.v1.proto/ to the grpc extra. This will single-source the codegen for session.proto. See ni/ni-apis-python#75 for more details.

System report

N/A

Steps to reproduce issue

  1. Rebuild one package to use the latest version of https://github.com/ni/ni-apis/blob/main/ni/grpcdevice/v1/session.proto
  2. Install the rebuilt package along with one of the previously released packages.
  3. Create gRPC sessions using both of the packages. You will get an error when loading the gRPC stubs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions