Skip to content

Conversation

@jluebbe
Copy link
Member

@jluebbe jluebbe commented Nov 20, 2025

Since the switch to gRPC, we only check that we don't have a connection from the same peer, but not with the same name, which would break assumptions elsewhere in the code and confuse users.

Fix it by raising an exception in this case and shutting down both sides of the ExporterStream.

Fixes: #1774

@jluebbe jluebbe added the fix label Nov 20, 2025
@jluebbe jluebbe force-pushed the fix-name-conflict branch 2 times, most recently from 0a5c4e4 to 25873bd Compare November 20, 2025 10:07
@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.1%. Comparing base (70f6150) to head (ac6362a).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
labgrid/remote/coordinator.py 0.0% 18 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1775     +/-   ##
========================================
- Coverage    45.2%   45.1%   -0.1%     
========================================
  Files         172     172             
  Lines       13569   13587     +18     
========================================
  Hits         6136    6136             
- Misses       7433    7451     +18     
Flag Coverage Δ
3.10 45.1% <0.0%> (-0.1%) ⬇️
3.11 45.1% <0.0%> (-0.1%) ⬇️
3.12 45.1% <0.0%> (-0.1%) ⬇️
3.13 45.1% <0.0%> (-0.1%) ⬇️
3.14 45.1% <0.0%> (-0.1%) ⬇️
3.9 45.2% <0.0%> (-0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jluebbe
Copy link
Member Author

jluebbe commented Nov 20, 2025

This introduces quite some complexity, but I've not found a simpler way to handle the different ordering startup can fail. A better way to wait for asyncio events directly and a simpler way for bidirectional gRPC communication would be nice.

@threexc
Copy link
Contributor

threexc commented Nov 20, 2025

Should this be remote/coordinator: prohibit multiple exporters with the same name ?

Since the switch to gRPC, we only check that we don't have a connection
from the same peer, but not with the same name, which would break
assumptions elsewhere in the code and confuse users.

Fix it by raising an exception in this case and shutting down both
sides of the ExporterStream.

Fixes: labgrid-project#1774

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
@jluebbe jluebbe changed the title remote/coordinator: prohibit multiple coordinators with the same name remote/coordinator: prohibit multiple exporters with the same name Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not allow running two (or more) exporters under the same name.

4 participants