Skip to content

Commit 5b9d916

Browse files
authored
Merge pull request #106 from home-assistant-libs/bump-release-to-v1.4-branch
Bump release to v1.4 branch
2 parents 3a29da9 + a7b44ae commit 5b9d916

File tree

45 files changed

+148
-12308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+148
-12308
lines changed

.github/dependabot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
updates:
33
- package-ecosystem: "gitsubmodule"
44
directory: "/"
5-
allow:
5+
ignore:
66
- dependency-name: "connectedhomeip"
77
schedule:
88
interval: "daily"

.github/workflows/build.yaml

+4-5
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ jobs:
7676
matrix:
7777
arch:
7878
- name: x86_64
79-
container: ghcr.io/project-chip/chip-build:1
79+
container: ghcr.io/project-chip/chip-build:81
8080
runner: ubuntu-22.04
8181
- name: aarch64
82-
container: docker.io/agners/aarch64-chip-build:1
82+
container: docker.io/agners/aarch64-chip-build:81
8383
runner: ARM64
8484

8585
runs-on: ${{ matrix.arch.runner }}
@@ -105,7 +105,7 @@ jobs:
105105
- name: Extract Matter SDK from tar
106106
working-directory: ./
107107
run: |
108-
apt update && apt install zstd
108+
apt-get -qq update && apt-get -qq --yes install zstd
109109
rm -rf connectedhomeip/
110110
tar -xaf ./connectedhomeip.tar.zst --use-compress-program=zstdmt .
111111
git config --global --add safe.directory "*"
@@ -117,9 +117,9 @@ jobs:
117117
chip_project_config_include_dirs=[\"//..\"] \
118118
chip_crypto=\"boringssl\"
119119
enable_rtti=true \
120-
enable_pylib=true \
121120
chip_config_memory_debug_checks=false \
122121
chip_config_memory_debug_dmalloc=false \
122+
chip_exchange_node_id_logging=true \
123123
chip_mdns=\"minimal\" \
124124
chip_minmdns_default_policy=\"libnl\" \
125125
chip_python_version=\"${{ needs.build_prepare.outputs.version }}\" \
@@ -214,7 +214,6 @@ jobs:
214214
chip_project_config_include_dirs=[\"//..\"] \
215215
chip_crypto=\"boringssl\"
216216
enable_rtti=true \
217-
enable_pylib=true \
218217
chip_config_memory_debug_checks=false \
219218
chip_config_memory_debug_dmalloc=false \
220219
chip_mdns=\"minimal\" \
+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Update Matter SDK submodule
2+
3+
on:
4+
schedule:
5+
# Runs at 04:30 UTC every day
6+
- cron: '30 04 * * *'
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
update-connectedhomeip-submodule:
15+
runs-on: ubuntu-latest
16+
name: Update Matter SDK submodule
17+
18+
steps:
19+
# Checkout the repository
20+
- name: Checkout Repository
21+
uses: actions/checkout@v4
22+
with:
23+
submodules: false
24+
# Required to push to git repo and trigger push CI run for the PR
25+
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
26+
27+
# Update submodule (not recursive)
28+
- name: Update Submodule
29+
id: update-submodule
30+
run: |
31+
git submodule update --init connectedhomeip/
32+
short_hash_before=$(cd connectedhomeip && git rev-parse --short HEAD)
33+
echo "short_hash_before=${short_hash_before}" >> $GITHUB_OUTPUT
34+
git submodule update --remote connectedhomeip/
35+
git add connectedhomeip/
36+
if git diff-index --quiet HEAD; then
37+
echo "empty=true" >> $GITHUB_OUTPUT
38+
exit 0
39+
fi
40+
short_hash=$(cd connectedhomeip && git rev-parse --short HEAD)
41+
echo "short_hash=${short_hash}" >> $GITHUB_OUTPUT
42+
43+
# Create Pull Request only if there were changes
44+
- name: Create Pull Request
45+
if: ${{ steps.update-submodule.outputs.empty != true }}
46+
uses: peter-evans/create-pull-request@v6
47+
with:
48+
commit-message: Update Matter SDK to `${{ steps.update-submodule.outputs.short_hash }}`
49+
title: Update Matter SDK to `${{ steps.update-submodule.outputs.short_hash }}`
50+
body: >
51+
Bumps [connectedhomeip](https://github.com/project-chip/connectedhomeip)
52+
from `${{ steps.update-submodule.outputs.short_hash_before }}` to
53+
`${{ steps.update-submodule.outputs.short_hash }}`.
54+
55+
56+
See full diff at
57+
https://github.com/project-chip/connectedhomeip/compare/${{ steps.update-submodule.outputs.short_hash_before }}...${{ steps.update-submodule.outputs.short_hash }}.
58+
branch: update-connectedhomeip-submodule-to-latest-master
59+

.gitmodules

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
url = https://github.com/project-chip/connectedhomeip.git
44
branch = master
55
fetchRecurseSubmodules = false
6+
depth = 1

0001-Support-custom-platform-tag.patch

+35-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1-
From 44cc7593f34d07501c67f06e5f6d7fcf719aae71 Mon Sep 17 00:00:00 2001
1+
From a3eb36ccb35c4fa8a4cf816a5acf665dcfbb0484 Mon Sep 17 00:00:00 2001
22
From: Stefan Agner <stefan@agner.ch>
33
Date: Tue, 22 Nov 2022 10:51:17 +0100
44
Subject: [PATCH] Support custom platform tag
55

66
---
7-
src/controller/python/BUILD.gn | 20 ++++++++++----------
8-
1 file changed, 10 insertions(+), 10 deletions(-)
7+
build/chip/python_wheel.gni | 13 +++++++++++++
8+
src/controller/python/BUILD.gn | 15 +--------------
9+
2 files changed, 14 insertions(+), 14 deletions(-)
910

10-
diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn
11-
index 5fc2212098..caa33c3a40 100644
12-
--- a/src/controller/python/BUILD.gn
13-
+++ b/src/controller/python/BUILD.gn
14-
@@ -35,6 +35,15 @@ declare_args() {
11+
diff --git a/build/chip/python_wheel.gni b/build/chip/python_wheel.gni
12+
index ac00fe1404..597a49783d 100644
13+
--- a/build/chip/python_wheel.gni
14+
+++ b/build/chip/python_wheel.gni
15+
@@ -18,10 +18,23 @@ import("//build_overrides/pigweed.gni")
16+
import("$dir_pw_build/python.gni")
17+
import("${chip_root}/src/system/system.gni")
18+
19+
+if (current_os == "mac") {
20+
+ import("${chip_root}/build/config/mac/mac_sdk.gni")
21+
+}
22+
+
23+
declare_args() {
1524
chip_python_version = "0.0"
1625
chip_python_package_prefix = "chip"
1726
chip_python_supports_stack_locking = chip_system_config_locking != "none"
@@ -26,8 +35,23 @@ index 5fc2212098..caa33c3a40 100644
2635
+ }
2736
}
2837

29-
shared_library("ChipDeviceCtrl") {
30-
@@ -344,16 +353,7 @@ chip_python_wheel_action("chip-core") {
38+
template("chip_python_wheel_action") {
39+
diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn
40+
index 58d9cb1f7c..96db7d4dee 100644
41+
--- a/src/controller/python/BUILD.gn
42+
+++ b/src/controller/python/BUILD.gn
43+
@@ -24,10 +24,6 @@ import("${chip_root}/src/platform/python.gni")
44+
import("${chip_root}/src/system/system.gni")
45+
import("${dir_pw_unit_test}/test.gni")
46+
47+
-if (current_os == "mac") {
48+
- import("${build_root}/config/mac/mac_sdk.gni")
49+
-}
50+
-
51+
config("controller_wno_deprecate") {
52+
cflags = [ "-Wno-deprecated-declarations" ]
53+
}
54+
@@ -282,16 +278,7 @@ chip_python_wheel_action("chip-core") {
3155
cpu_tag = current_cpu
3256
}
3357

@@ -46,5 +70,5 @@ index 5fc2212098..caa33c3a40 100644
4670
tags = "cp37-abi3-" + py_platform_tag
4771

4872
--
49-
2.45.2
73+
2.47.0
5074

0002-Use-data-as-platform-storage-location.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 703b75caecae8638ea0caeda0c9f4f4a2bdc1819 Mon Sep 17 00:00:00 2001
1+
From 0ebf0f8cfea2d4b23b3fa78c681dc6ff6536d699 Mon Sep 17 00:00:00 2001
22
From: Stefan Agner <stefan@agner.ch>
33
Date: Fri, 27 May 2022 16:38:14 +0200
44
Subject: [PATCH] Use /data as platform storage location
@@ -8,7 +8,7 @@ Subject: [PATCH] Use /data as platform storage location
88
1 file changed, 6 insertions(+)
99

1010
diff --git a/src/platform/Linux/BUILD.gn b/src/platform/Linux/BUILD.gn
11-
index d73a2dcb0f..97c397994e 100644
11+
index 35b5047c9f..4886bc3ebb 100644
1212
--- a/src/platform/Linux/BUILD.gn
1313
+++ b/src/platform/Linux/BUILD.gn
1414
@@ -38,6 +38,12 @@ if (chip_mdns == "platform") {
@@ -25,5 +25,5 @@ index d73a2dcb0f..97c397994e 100644
2525
"../DeviceSafeQueue.cpp",
2626
"../DeviceSafeQueue.h",
2727
--
28-
2.45.2
28+
2.47.0
2929

0006-Add-raw-attribute-callback.patch 0003-Add-raw-attribute-callback.patch

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 749cd076e35127092efa8f680902bebf8967389d Mon Sep 17 00:00:00 2001
1+
From 0f6dc07cb5c20d89b7e51342a32a73d58dd91b7d Mon Sep 17 00:00:00 2001
22
From: Stefan Agner <stefan@agner.ch>
33
Date: Thu, 23 May 2024 12:48:54 +0200
44
Subject: [PATCH] Add raw attribute callback
@@ -14,18 +14,18 @@ directly from the subscription transaction.
1414
1 file changed, 38 insertions(+), 10 deletions(-)
1515

1616
diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py
17-
index 9e46eed469..ce522bf452 100644
17+
index 4d5bc1d17a..cb7bdb0bc4 100644
1818
--- a/src/controller/python/chip/clusters/Attribute.py
1919
+++ b/src/controller/python/chip/clusters/Attribute.py
20-
@@ -466,6 +466,7 @@ class SubscriptionTransaction:
21-
def __init__(self, transaction: AsyncReadTransaction, subscriptionId, devCtrl):
22-
self._onResubscriptionAttemptedCb = DefaultResubscriptionAttemptedCallback
23-
self._onAttributeChangeCb = DefaultAttributeChangeCallback
24-
+ self._onRawAttributeChangeCb = None
25-
self._onEventChangeCb = DefaultEventChangeCallback
26-
self._onErrorCb = DefaultErrorCallback
20+
@@ -429,6 +429,7 @@ class SubscriptionTransaction:
21+
self._onResubscriptionAttemptedCb: Callable[[SubscriptionTransaction,
22+
int, int], None] = DefaultResubscriptionAttemptedCallback
23+
self._onAttributeChangeCb: Callable[[TypedAttributePath, SubscriptionTransaction], None] = DefaultAttributeChangeCallback
24+
+ self._onRawAttributeChangeCb: Optional[Callable[[AttributePath, SubscriptionTransaction]]] = None
25+
self._onEventChangeCb: Callable[[EventReadResult, SubscriptionTransaction], None] = DefaultEventChangeCallback
26+
self._onErrorCb: Callable[[int, SubscriptionTransaction], None] = DefaultErrorCallback
2727
self._readTransaction = transaction
28-
@@ -491,6 +492,18 @@ class SubscriptionTransaction:
28+
@@ -454,6 +455,18 @@ class SubscriptionTransaction:
2929
else:
3030
return data[path.Path.EndpointId][path.ClusterType][path.AttributeType]
3131

@@ -44,7 +44,7 @@ index 9e46eed469..ce522bf452 100644
4444
def GetEvents(self):
4545
return self._readTransaction.GetAllEventValues()
4646

47-
@@ -564,8 +577,14 @@ class SubscriptionTransaction:
47+
@@ -534,8 +547,14 @@ class SubscriptionTransaction:
4848
Sets the callback function for the attribute value change event,
4949
accepts a Callable accepts an attribute path and the cached data.
5050
'''
@@ -61,7 +61,7 @@ index 9e46eed469..ce522bf452 100644
6161

6262
def SetEventUpdateCallback(self, callback: Callable[[EventReadResult, SubscriptionTransaction], None]):
6363
if callback is not None:
64-
@@ -583,6 +602,10 @@ class SubscriptionTransaction:
64+
@@ -553,6 +572,10 @@ class SubscriptionTransaction:
6565
def OnAttributeChangeCb(self) -> Callable[[TypedAttributePath, SubscriptionTransaction], None]:
6666
return self._onAttributeChangeCb
6767

@@ -72,15 +72,15 @@ index 9e46eed469..ce522bf452 100644
7272
@property
7373
def OnEventChangeCb(self) -> Callable[[EventReadResult, SubscriptionTransaction], None]:
7474
return self._onEventChangeCb
75-
@@ -785,14 +808,19 @@ class AsyncReadTransaction:
76-
75+
@@ -767,14 +790,19 @@ class AsyncReadTransaction:
76+
def _handleReportEnd(self):
7777
if (self._subscription_handler is not None):
7878
for change in self._changedPathSet:
7979
- try:
8080
- attribute_path = TypedAttributePath(Path=change)
8181
- except (KeyError, ValueError) as err:
8282
- # path could not be resolved into a TypedAttributePath
83-
- logging.getLogger(__name__).exception(err)
83+
- LOGGER.exception(err)
8484
- continue
8585
- self._subscription_handler.OnAttributeChangeCb(
8686
- attribute_path, self._subscription_handler)
@@ -89,7 +89,7 @@ index 9e46eed469..ce522bf452 100644
8989
+ attribute_path = TypedAttributePath(Path=change)
9090
+ except (KeyError, ValueError) as err:
9191
+ # path could not be resolved into a TypedAttributePath
92-
+ logging.getLogger(__name__).exception(err)
92+
+ LOGGER.exception(err)
9393
+ continue
9494
+ self._subscription_handler.OnAttributeChangeCb(
9595
+ attribute_path, self._subscription_handler)
@@ -101,5 +101,5 @@ index 9e46eed469..ce522bf452 100644
101101
# Clear it out once we've notified of all changes in this transaction.
102102
self._changedPathSet = set()
103103
--
104-
2.45.2
104+
2.47.0
105105

0 commit comments

Comments
 (0)