Skip to content

Propagate client identity to exporter#1939

Open
asher-pem-arm wants to merge 4 commits into
labgrid-project:masterfrom
ARM-software:propagate-client-identity-to-exporter
Open

Propagate client identity to exporter#1939
asher-pem-arm wants to merge 4 commits into
labgrid-project:masterfrom
ARM-software:propagate-client-identity-to-exporter

Conversation

@asher-pem-arm

@asher-pem-arm asher-pem-arm commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

Checklist

  • Documentation for the feature
  • Tests for the feature
  • The arguments and description in doc/configuration.rst have been updated
  • Add a section on how to use the feature to doc/usage.rst
  • Add a section on how to use the feature to doc/development.rst
  • PR has been tested
  • Man pages have been regenerated

Description

Exporters currently receive only the logical place name when acquiring or leasing a resource. They cannot identify which client initiated the operation in exporter-local logs. This improves per-resource diagnostics and traceability on distributed exporter hosts. The identity is used only for logging; authorization and resource ownership semantics are unchanged.

This PR:

  • Adds client identity fields to acquire and lease protobuf requests.
  • Forwards the existing hostname/username identity from the coordinator.
  • Logs successful acquisitions and leases at the exporter.

Builds on:
#1884

asher-pem-arm and others added 4 commits July 16, 2026 13:03
Place acquisition is currently indefinite, which can lead to stale
locks when users stop interacting with a place without releasing it.

Add a lease-based locking mode that allows places to be acquired for a
limited time and expire automatically unless extended. Leases are tied
to the lifetime of a reservation.

This prevents stale locks and reduces the need for manual cleanup.

Signed-off-by: Asher Pemberton <asher.pemberton@arm.com>
Reviewed-by: Asher Pemberton <asher.pemberton@arm.com> # gatekeeper
Co-authored-by: Idan Saadon <idan.saadon@arm.com>
Send a dedicated lease-start request to exporters when a place is leased, including the coordinator default lease duration.
This keeps lease acquisition separate from normal acquire requests.

Signed-off-by: Asher Pemberton <asher.pemberton@arm.com>
Reviewed-by: Asher Pemberton <asher.pemberton@arm.com> # gatekeeper
Co-authored-by: Idan Saadon <idan.saadon@arm.com>
…ires/leases

Signed-off-by: Asher Pemberton <asher.pemberton@arm.com>
Reviewed-by: Asher Pemberton <asher.pemberton@arm.com> # gatekeeper
Co-authored-by: Luke Beardsmore <luke.beardsmore2@arm.com>
…ntity

Signed-off-by: Asher Pemberton <asher.pemberton@arm.com>
Reviewed-by: Asher Pemberton <asher.pemberton@arm.com> # gatekeeper
Co-authored-by: Luke Beardsmore <luke.beardsmore2@arm.com>
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 56.05307% with 265 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.4%. Comparing base (063d1bd) to head (5e101e9).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...abgrid/remote/generated/labgrid_coordinator_pb2.py 1.4% 134 Missing ⚠️
labgrid/remote/coordinator.py 74.2% 68 Missing ⚠️
labgrid/remote/client.py 61.1% 42 Missing ⚠️
labgrid/remote/exporter.py 78.9% 12 Missing ⚠️
...d/remote/generated/labgrid_coordinator_pb2_grpc.py 57.1% 9 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1939     +/-   ##
========================================
+ Coverage    61.0%   61.4%   +0.4%     
========================================
  Files         182     182             
  Lines       14881   15324    +443     
========================================
+ Hits         9082    9423    +341     
- Misses       5799    5901    +102     
Flag Coverage Δ
3.10 61.4% <56.0%> (+0.4%) ⬆️
3.11 61.4% <56.0%> (+0.4%) ⬆️
3.12 61.4% <56.0%> (+0.4%) ⬆️
3.13 61.4% <56.0%> (+0.4%) ⬆️
3.14 61.3% <56.0%> (+0.3%) ⬆️

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

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

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.

1 participant