Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit f73c6d0
Author: Bodong Yang <[email protected]>
Date:   Mon Apr 22 00:16:45 2024 +0900

    fix(v3.7.x): not merging available_ecu_ids from child ECUs status resp again (#290)

    This PR fixes an unexpected implementation details which prevents the available_ecu_ids for actually behaving as expected.

    This is caused by:
    * ota_client_stub module merges the available_ecu_ids from sub ECU's status response.
    * ecu_info parsing logic has an implicit implementation detail for backward compatibility, which when available_ecu_ids is not defined in the ecu_info.yaml, add this ECU id into this field.

    The above effectively disabling the functionality of available_ecu_ids, unless the corresponding ECU contacts that don't need OTA also being commented out in ecu_info.yaml.

    With this PR, now the available_ecu_ids field should work as expected, and the behavior aligns with the documentation, which only available_ecu_ids from the main ECU is respected.
  • Loading branch information
Bodong-Yang committed Apr 21, 2024
1 parent 8120f5c commit 154b461
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions otaclient/app/ota_client_stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,6 @@ async def update_from_child_ecu(self, status_resp: wrapper.StatusResponse):
"""Update the ECU status storage with child ECU's status report(StatusResponse)."""
async with self._writer_lock:
self.storage_last_updated_timestamp = cur_timestamp = int(time.time())
_subecu_available_ecu_ids = _OrderedSet(status_resp.available_ecu_ids)
# discover further child ECUs from directly connected sub ECUs.
self._tracked_active_ecus.update(_subecu_available_ecu_ids)
# merge available_ecu_ids from child ECUs resp to include further child ECUs
self._available_ecu_ids.update(_subecu_available_ecu_ids)

# NOTE: use v2 if v2 is available, but explicitly support v1 format
# for backward-compatible with old otaclient
Expand Down

0 comments on commit 154b461

Please sign in to comment.