Skip to content

Commit fc84dc0

Browse files
Merge branch 'master' into sync-places-fix
2 parents 588258a + 6d8febb commit fc84dc0

File tree

2 files changed

+58
-32
lines changed

2 files changed

+58
-32
lines changed

CHANGES.rst

Lines changed: 51 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
1-
Release 25.0 (Unreleased)
2-
-------------------------
3-
As announced
4-
`before <https://github.com/labgrid-project/labgrid/discussions/1467#discussioncomment-10314852>`_,
5-
this is the first release using `gRPC <https://grpc.io/>`_ instead of crossbar/autobahn for
6-
communication between client/exporter and coordinator.
7-
8-
Crossbar/autobahn are unfortunately not very well maintained anymore. The
9-
crossbar component was moved to its own virtualenv to cope with the high number
10-
of dependencies leading to conflicts. Support for Python 3.13 is still not
11-
available in a crossbar release on PyPI.
12-
13-
That's why labgrid moves to gRPC with this release. gRPC is a well maintained
14-
RPC framework with a lot of users. As a side effect, the message transfer is
15-
more performant and the import times are shorter.
16-
17-
This is a **breaking change**. Version 25.0 exporters / coordinators / clients can
18-
not communicate with Version 24.0 and earlier exporters / coordinators / clients.
1+
Release 25.0 (Released May 7, 2025)
2+
-----------------------------------
3+
As announced `before
4+
<https://github.com/labgrid-project/labgrid/discussions/1467#discussioncomment-10314852>`_,
5+
this is the first release using `gRPC <https://grpc.io/>`_ instead of
6+
crossbar/autobahn for communication between client/exporter and coordinator.
7+
8+
Crossbar/autobahn are unfortunately not very well maintained anymore.
9+
In labgrid, the crossbar component was moved to its own virtualenv to cope with
10+
the high number of conflicts caused by outdated dependencies.
11+
Also, Python 3.13 is not supported in an official crossbar release.
12+
13+
That's why labgrid moves to gRPC with this release.
14+
gRPC is a well maintained RPC framework with a lot of users.
15+
As a side effect, the message transfer is more performant and the import times
16+
are shorter.
17+
18+
This is a **breaking change**.
19+
Version 25.0 exporters / coordinators / clients can not communicate with
20+
Version 24.0 and earlier exporters / coordinators / clients.
1921
All exporters, coordinators and clients in a deployment have to be updated at
20-
the same time. See the "Breaking changes in 25.0" section below for more information.
22+
the same time.
23+
See the "Breaking changes in 25.0" section below for more information.
2124

2225
New Features in 25.0
2326
~~~~~~~~~~~~~~~~~~~~
@@ -33,7 +36,7 @@ New Features in 25.0
3336
statistics.
3437
- Add support for LogiLink UA0379 / Microdia cameras to the ``USBVideoDriver``.
3538
- Add more backends to the ``NetworkPowerDriver``:
36-
39+
3740
- Gude 87-1210-18
3841
- Digital Loggers PDUs via the REST API
3942
- Ubiquity mFi mPower power strips
@@ -45,6 +48,13 @@ New Features in 25.0
4548
- Make the ``QEMUDriver`` configuration more flexible and improve startup error
4649
reporting.
4750
- Support labgrid-client power via GPIOs.
51+
- The Getting Started chapter in the docs was improved.
52+
- The systemd service for the labgrid-exporter is now configured with
53+
``Restart=always``.
54+
- Support listing only unused/released places with ``labgrid-client places``.
55+
- Replace deprecated SmartStrip class with IotStrip in the tplink power
56+
backend.
57+
- Add a ``erase()`` method to the ``AndroidFastbootDriver``.
4858

4959
Bug fixes in 25.0
5060
~~~~~~~~~~~~~~~~~
@@ -57,24 +67,39 @@ Bug fixes in 25.0
5767
- Add new stlink USB IDs for the ``USBDebugger`` resource.
5868
- Fix code coverage reporting and submit test results to codecov.
5969
- Fix waiting for ``NetworkService`` created by the ``DockerDaemon``.
70+
- Fix error handling for missing interfaces in the ``NetworkInterfaceDriver``'s
71+
agent.
72+
- Fix ``pip install`` for archives auto-generated by GitHub.
6073

6174
Breaking changes in 25.0
6275
~~~~~~~~~~~~~~~~~~~~~~~~
6376
Maintaining support for both crossbar/autobahn as well as gRPC in labgrid would
64-
be a lot of effort due to the different architectures of those frameworks.
65-
Therefore, a hard migration to gRPC is deemed the lesser issue.
77+
be a lot of effort due to their different architectures.
78+
Therefore, hard migration to gRPC is required.
79+
80+
Previously, the coordinator was running as a component started by the crossbar.
81+
Now, it is a standalone service which exposes a gRPC API directly.
6682

67-
Due to the migration, 25.0 includes the following breaking changes:
83+
Due to the gRPC migration, 25.0 includes the following breaking changes:
6884

69-
- The labgrid environment config option ``crossbar_url`` was renamed to
70-
``coordinator_address``. The environment variable ``LG_CROSSBAR`` was renamed
71-
to ``LG_COORDINATOR``.
85+
- The labgrid environment config option ``crossbar_url`` was replaced by
86+
``coordinator_address``.
87+
The environment variable ``LG_CROSSBAR`` was replaced by ``LG_COORDINATOR``.
7288
- The labgrid environment config option ``crossbar_realm`` is now obsolete as
7389
well as the environment variable ``LG_CROSSBAR_REALM``.
7490
- The coordinator is available as ``labgrid-coordinator`` (instead of
7591
``crossbar start``). No additional configuration file is required.
7692
- The systemd services in ``contrib/systemd/`` were updated.
7793

94+
To update your deployment to 25.0, you'll need to:
95+
96+
- Update the coordinator, all clients and all exporters to the new release.
97+
- Start ``labgrid-coordinator`` directly (instead of via the crossbar
98+
configuration file).
99+
If needed, you can set the listening address using the ``--listen`` option.
100+
- Update any existing client and exporter configuration by replacing the
101+
crossbar URL with the coordinator address.
102+
78103
Other breaking changes include:
79104

80105
- Support for Python 3.8 was dropped.

labgrid/target.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,16 @@ def interact(self, msg):
4141
else:
4242
input(msg)
4343

44-
def update_resources(self, resources=None):
44+
def update_resources(self):
4545
"""
46-
Iterate over all relevant resources and deactivate any active but
47-
unavailable resources.
46+
Iterate over this target's resources, deactivate any active but
47+
unavailable resources and also deactivate any drivers using them.
48+
This ensures a consistent binding states for this target.
4849
"""
4950
if (monotonic() - self.last_update) < 0.1:
5051
return
5152
self.last_update = monotonic()
52-
for resource in self.resources if resources is None else resources:
53+
for resource in self.resources:
5354
resource.poll()
5455
if not resource.avail and resource.state is BindingState.active:
5556
deactivated = self.deactivate(resource)
@@ -71,7 +72,7 @@ def await_resources(self, resources, timeout=None, avail=True):
7172
timeout (float): optional timeout
7273
avail (bool): optionally wait until the resources are unavailable with avail=False
7374
"""
74-
self.update_resources(resources)
75+
self.update_resources()
7576

7677
waiting = set(r for r in resources if r.avail != avail)
7778
static = set(r for r in waiting if r.get_managed_parent() is None)
@@ -102,7 +103,7 @@ def await_resources(self, resources, timeout=None, avail=True):
102103
filter=waiting
103104
)
104105

105-
self.update_resources(resources)
106+
self.update_resources()
106107

107108
def get_resource(self, cls, *, name=None, wait_avail=True):
108109
"""

0 commit comments

Comments
 (0)