Skip to content

Commit

Permalink
Merge pull request #106 from home-assistant-libs/bump-release-to-v1.4…
Browse files Browse the repository at this point in the history
…-branch

Bump release to v1.4 branch
  • Loading branch information
agners authored Nov 20, 2024
2 parents 3a29da9 + a7b44ae commit 5b9d916
Show file tree
Hide file tree
Showing 45 changed files with 148 additions and 12,308 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
updates:
- package-ecosystem: "gitsubmodule"
directory: "/"
allow:
ignore:
- dependency-name: "connectedhomeip"
schedule:
interval: "daily"
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ jobs:
matrix:
arch:
- name: x86_64
container: ghcr.io/project-chip/chip-build:1
container: ghcr.io/project-chip/chip-build:81
runner: ubuntu-22.04
- name: aarch64
container: docker.io/agners/aarch64-chip-build:1
container: docker.io/agners/aarch64-chip-build:81
runner: ARM64

runs-on: ${{ matrix.arch.runner }}
Expand All @@ -105,7 +105,7 @@ jobs:
- name: Extract Matter SDK from tar
working-directory: ./
run: |
apt update && apt install zstd
apt-get -qq update && apt-get -qq --yes install zstd
rm -rf connectedhomeip/
tar -xaf ./connectedhomeip.tar.zst --use-compress-program=zstdmt .
git config --global --add safe.directory "*"
Expand All @@ -117,9 +117,9 @@ jobs:
chip_project_config_include_dirs=[\"//..\"] \
chip_crypto=\"boringssl\"
enable_rtti=true \
enable_pylib=true \
chip_config_memory_debug_checks=false \
chip_config_memory_debug_dmalloc=false \
chip_exchange_node_id_logging=true \
chip_mdns=\"minimal\" \
chip_minmdns_default_policy=\"libnl\" \
chip_python_version=\"${{ needs.build_prepare.outputs.version }}\" \
Expand Down Expand Up @@ -214,7 +214,6 @@ jobs:
chip_project_config_include_dirs=[\"//..\"] \
chip_crypto=\"boringssl\"
enable_rtti=true \
enable_pylib=true \
chip_config_memory_debug_checks=false \
chip_config_memory_debug_dmalloc=false \
chip_mdns=\"minimal\" \
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/dependency-update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Update Matter SDK submodule

on:
schedule:
# Runs at 04:30 UTC every day
- cron: '30 04 * * *'
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
update-connectedhomeip-submodule:
runs-on: ubuntu-latest
name: Update Matter SDK submodule

steps:
# Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: false
# Required to push to git repo and trigger push CI run for the PR
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}

# Update submodule (not recursive)
- name: Update Submodule
id: update-submodule
run: |
git submodule update --init connectedhomeip/
short_hash_before=$(cd connectedhomeip && git rev-parse --short HEAD)
echo "short_hash_before=${short_hash_before}" >> $GITHUB_OUTPUT
git submodule update --remote connectedhomeip/
git add connectedhomeip/
if git diff-index --quiet HEAD; then
echo "empty=true" >> $GITHUB_OUTPUT
exit 0
fi
short_hash=$(cd connectedhomeip && git rev-parse --short HEAD)
echo "short_hash=${short_hash}" >> $GITHUB_OUTPUT
# Create Pull Request only if there were changes
- name: Create Pull Request
if: ${{ steps.update-submodule.outputs.empty != true }}
uses: peter-evans/create-pull-request@v6
with:
commit-message: Update Matter SDK to `${{ steps.update-submodule.outputs.short_hash }}`
title: Update Matter SDK to `${{ steps.update-submodule.outputs.short_hash }}`
body: >
Bumps [connectedhomeip](https://github.com/project-chip/connectedhomeip)
from `${{ steps.update-submodule.outputs.short_hash_before }}` to
`${{ steps.update-submodule.outputs.short_hash }}`.
See full diff at
https://github.com/project-chip/connectedhomeip/compare/${{ steps.update-submodule.outputs.short_hash_before }}...${{ steps.update-submodule.outputs.short_hash }}.
branch: update-connectedhomeip-submodule-to-latest-master

1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
url = https://github.com/project-chip/connectedhomeip.git
branch = master
fetchRecurseSubmodules = false
depth = 1
46 changes: 35 additions & 11 deletions 0001-Support-custom-platform-tag.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
From 44cc7593f34d07501c67f06e5f6d7fcf719aae71 Mon Sep 17 00:00:00 2001
From a3eb36ccb35c4fa8a4cf816a5acf665dcfbb0484 Mon Sep 17 00:00:00 2001
From: Stefan Agner <[email protected]>
Date: Tue, 22 Nov 2022 10:51:17 +0100
Subject: [PATCH] Support custom platform tag

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

diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn
index 5fc2212098..caa33c3a40 100644
--- a/src/controller/python/BUILD.gn
+++ b/src/controller/python/BUILD.gn
@@ -35,6 +35,15 @@ declare_args() {
diff --git a/build/chip/python_wheel.gni b/build/chip/python_wheel.gni
index ac00fe1404..597a49783d 100644
--- a/build/chip/python_wheel.gni
+++ b/build/chip/python_wheel.gni
@@ -18,10 +18,23 @@ import("//build_overrides/pigweed.gni")
import("$dir_pw_build/python.gni")
import("${chip_root}/src/system/system.gni")

+if (current_os == "mac") {
+ import("${chip_root}/build/config/mac/mac_sdk.gni")
+}
+
declare_args() {
chip_python_version = "0.0"
chip_python_package_prefix = "chip"
chip_python_supports_stack_locking = chip_system_config_locking != "none"
Expand All @@ -26,8 +35,23 @@ index 5fc2212098..caa33c3a40 100644
+ }
}

shared_library("ChipDeviceCtrl") {
@@ -344,16 +353,7 @@ chip_python_wheel_action("chip-core") {
template("chip_python_wheel_action") {
diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn
index 58d9cb1f7c..96db7d4dee 100644
--- a/src/controller/python/BUILD.gn
+++ b/src/controller/python/BUILD.gn
@@ -24,10 +24,6 @@ import("${chip_root}/src/platform/python.gni")
import("${chip_root}/src/system/system.gni")
import("${dir_pw_unit_test}/test.gni")

-if (current_os == "mac") {
- import("${build_root}/config/mac/mac_sdk.gni")
-}
-
config("controller_wno_deprecate") {
cflags = [ "-Wno-deprecated-declarations" ]
}
@@ -282,16 +278,7 @@ chip_python_wheel_action("chip-core") {
cpu_tag = current_cpu
}

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

--
2.45.2
2.47.0

6 changes: 3 additions & 3 deletions 0002-Use-data-as-platform-storage-location.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 703b75caecae8638ea0caeda0c9f4f4a2bdc1819 Mon Sep 17 00:00:00 2001
From 0ebf0f8cfea2d4b23b3fa78c681dc6ff6536d699 Mon Sep 17 00:00:00 2001
From: Stefan Agner <[email protected]>
Date: Fri, 27 May 2022 16:38:14 +0200
Subject: [PATCH] Use /data as platform storage location
Expand All @@ -8,7 +8,7 @@ Subject: [PATCH] Use /data as platform storage location
1 file changed, 6 insertions(+)

diff --git a/src/platform/Linux/BUILD.gn b/src/platform/Linux/BUILD.gn
index d73a2dcb0f..97c397994e 100644
index 35b5047c9f..4886bc3ebb 100644
--- a/src/platform/Linux/BUILD.gn
+++ b/src/platform/Linux/BUILD.gn
@@ -38,6 +38,12 @@ if (chip_mdns == "platform") {
Expand All @@ -25,5 +25,5 @@ index d73a2dcb0f..97c397994e 100644
"../DeviceSafeQueue.cpp",
"../DeviceSafeQueue.h",
--
2.45.2
2.47.0

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 749cd076e35127092efa8f680902bebf8967389d Mon Sep 17 00:00:00 2001
From 0f6dc07cb5c20d89b7e51342a32a73d58dd91b7d Mon Sep 17 00:00:00 2001
From: Stefan Agner <[email protected]>
Date: Thu, 23 May 2024 12:48:54 +0200
Subject: [PATCH] Add raw attribute callback
Expand All @@ -14,18 +14,18 @@ directly from the subscription transaction.
1 file changed, 38 insertions(+), 10 deletions(-)

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

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

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

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

Expand All @@ -72,15 +72,15 @@ index 9e46eed469..ce522bf452 100644
@property
def OnEventChangeCb(self) -> Callable[[EventReadResult, SubscriptionTransaction], None]:
return self._onEventChangeCb
@@ -785,14 +808,19 @@ class AsyncReadTransaction:

@@ -767,14 +790,19 @@ class AsyncReadTransaction:
def _handleReportEnd(self):
if (self._subscription_handler is not None):
for change in self._changedPathSet:
- try:
- attribute_path = TypedAttributePath(Path=change)
- except (KeyError, ValueError) as err:
- # path could not be resolved into a TypedAttributePath
- logging.getLogger(__name__).exception(err)
- LOGGER.exception(err)
- continue
- self._subscription_handler.OnAttributeChangeCb(
- attribute_path, self._subscription_handler)
Expand All @@ -89,7 +89,7 @@ index 9e46eed469..ce522bf452 100644
+ attribute_path = TypedAttributePath(Path=change)
+ except (KeyError, ValueError) as err:
+ # path could not be resolved into a TypedAttributePath
+ logging.getLogger(__name__).exception(err)
+ LOGGER.exception(err)
+ continue
+ self._subscription_handler.OnAttributeChangeCb(
+ attribute_path, self._subscription_handler)
Expand All @@ -101,5 +101,5 @@ index 9e46eed469..ce522bf452 100644
# Clear it out once we've notified of all changes in this transaction.
self._changedPathSet = set()
--
2.45.2
2.47.0

Loading

0 comments on commit 5b9d916

Please sign in to comment.