From 02c08de387c8a6ba423435f36030ca1dd72199c7 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Mon, 9 Jan 2023 23:18:23 +0800 Subject: [PATCH] [Ameba] update KVS API and use docker image 0.6.30 (#24322) * use docker image 0.6.30 * [Config] Update KVS API * restyle --- .devcontainer/devcontainer.json | 2 +- .github/workflows/bloat_check.yaml | 2 +- .github/workflows/build.yaml | 6 +-- .github/workflows/chef.yaml | 6 +-- .github/workflows/cirque.yaml | 4 +- .github/workflows/doxygen.yaml | 2 +- .github/workflows/examples-ameba.yaml | 2 +- .github/workflows/examples-bouffalolab.yaml | 2 +- .../workflows/examples-cc13x2x7_26x2x7.yaml | 2 +- .github/workflows/examples-efr32.yaml | 2 +- .github/workflows/examples-esp32.yaml | 4 +- .github/workflows/examples-infineon.yaml | 2 +- .github/workflows/examples-k32w.yaml | 2 +- .github/workflows/examples-linux-arm.yaml | 2 +- .github/workflows/examples-linux-imx.yaml | 2 +- .../workflows/examples-linux-standalone.yaml | 2 +- .github/workflows/examples-mbed.yaml | 2 +- .github/workflows/examples-mw320.yaml | 2 +- .github/workflows/examples-nrfconnect.yaml | 2 +- .github/workflows/examples-openiotsdk.yaml | 2 +- .github/workflows/examples-qpg.yaml | 2 +- .github/workflows/examples-telink.yaml | 2 +- .github/workflows/examples-tizen.yaml | 2 +- .github/workflows/full-android.yaml | 2 +- .github/workflows/fuzzing-build.yaml | 2 +- .github/workflows/qemu.yaml | 2 +- .github/workflows/release_artifacts.yaml | 4 +- .github/workflows/smoketest-android.yaml | 2 +- .github/workflows/tests.yaml | 6 +-- .github/workflows/unit_integration_test.yaml | 2 +- integrations/cloudbuild/build-all.yaml | 6 +-- integrations/cloudbuild/build-coverage.yaml | 4 +- integrations/cloudbuild/chef.yaml | 6 +-- integrations/cloudbuild/smoke-test.yaml | 14 ++--- src/platform/Ameba/AmebaConfig.cpp | 51 +++++++------------ src/platform/Ameba/AmebaConfig.h | 21 +------- .../Ameba/ConfigurationManagerImpl.cpp | 42 ++------------- 37 files changed, 76 insertions(+), 146 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5ddef22276ed10..aecc5372bcc41c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,7 +17,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "BUILD_VERSION": "0.6.27" + "BUILD_VERSION": "0.6.30" } }, "remoteUser": "vscode", diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index ba734f22758ca9..da6bc36782823f 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 steps: - uses: Wandalen/wretry.action@v1.0.36 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 00ab192750e13f..88c8d1f93b38b9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -138,7 +138,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -308,7 +308,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 volumes: - "/tmp/log_output:/tmp/test_logs" options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index eca0463b31931a..93320c07b4ec67 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -29,7 +29,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 options: --user root steps: @@ -57,7 +57,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.6.27 + image: connectedhomeip/chip-build-esp32:0.6.30 options: --user root steps: @@ -85,7 +85,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - # TODO: update this to connectedhomeip/chip-build-vscode:0.6.27 once we can compile with latest NRF + # TODO: update this to connectedhomeip/chip-build-vscode:0.6.30 once we can compile with latest NRF image: connectedhomeip/chip-build-nrf-platform:0.6.18 options: --user root diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index 58fc8091a224df..47aa37c7fbf43c 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -29,7 +29,7 @@ jobs: timeout-minutes: 90 env: - DOCKER_RUN_VERSION: 0.6.27 + DOCKER_RUN_VERSION: 0.6.30 GITHUB_CACHE_PATH: /tmp/cirque-cache/ runs-on: ubuntu-latest @@ -38,7 +38,7 @@ jobs: # need to run with privilege, which isn't supported by job.XXX.contaner # https://github.com/actions/container-action/issues/2 # container: - # image: connectedhomeip/chip-build-cirque:0.6.27 + # image: connectedhomeip/chip-build-cirque:0.6.30 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index 669efca5f6d4c7..a0d90fb6dd7bf8 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -82,7 +82,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build-doxygen:0.6.27 + image: connectedhomeip/chip-build-doxygen:0.6.30 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 3b568a270aa0ae..fe6ec75bc1d053 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ameba:0.6.27 + image: connectedhomeip/chip-build-ameba:0.6.30 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index 04331435bc6e14..450dda1c5e19e9 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-bouffalolab:0.6.27 + image: connectedhomeip/chip-build-bouffalolab:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc13x2x7_26x2x7.yaml b/.github/workflows/examples-cc13x2x7_26x2x7.yaml index 99baf383bbaf3f..4d25db0057f90a 100644 --- a/.github/workflows/examples-cc13x2x7_26x2x7.yaml +++ b/.github/workflows/examples-cc13x2x7_26x2x7.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ti:0.6.27 + image: connectedhomeip/chip-build-ti:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 90e0e397c82517..0e0f47a7190235 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-efr32:0.6.27 + image: connectedhomeip/chip-build-efr32:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 13a025fe229767..0dcf9ab1146b3f 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.6.27 + image: connectedhomeip/chip-build-esp32:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -140,7 +140,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.6.27 + image: connectedhomeip/chip-build-esp32:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index bb629fa999fcf2..337812324e99df 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-infineon:0.6.27 + image: connectedhomeip/chip-build-infineon:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index 53b1aa46701771..f061bd6a3790e3 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-k32w:0.6.27 + image: connectedhomeip/chip-build-k32w:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 159960bef927a4..070caf359cff5e 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-crosscompile:0.6.27 + image: connectedhomeip/chip-build-crosscompile:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index 42f426bfa959b0..40df5727eba7e4 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-imx:0.6.27 + image: connectedhomeip/chip-build-imx:0.6.30 steps: - uses: Wandalen/wretry.action@v1.0.36 diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 11c913cfee488c..5dc4b9e66f756f 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 91f9f6f82a2097..72d23e7deab915 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-mbed-os:0.6.27 + image: connectedhomeip/chip-build-mbed-os:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 7fc6238cc81034..8ca61ab37b4a96 100755 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 1fa32d751037e8..66785103769950 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-nrf-platform:0.6.27 + image: connectedhomeip/chip-build-nrf-platform:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index 7e043d58d98ee5..70ca00b83bcb2c 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-openiotsdk:0.6.27 + image: connectedhomeip/chip-build-openiotsdk:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 35bc2987a4d10a..b9d79b20c24d44 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 28d5c7faf03f4f..06c7a149b240fa 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-telink:0.6.27 + image: connectedhomeip/chip-build-telink:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 8f892c8c712f13..bf6ce9029e4e37 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -33,7 +33,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-tizen:0.6.27 + image: connectedhomeip/chip-build-tizen:0.6.30 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index 8f87a48a9e6043..ed8532ee765314 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.6.27 + image: connectedhomeip/chip-build-android:0.6.30 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index bfb1eac538a138..a6712c966022b5 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 965e69ae1f3576..3ad312ac5ea939 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32-qemu:0.6.27 + image: connectedhomeip/chip-build-esp32-qemu:0.6.30 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 5a6c13f85f8f14..b0fedd8c3a07eb 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-esp32:0.6.27 + image: connectedhomeip/chip-build-esp32:0.6.30 steps: - uses: Wandalen/wretry.action@v1.0.36 @@ -75,7 +75,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-efr32:0.6.27 + image: connectedhomeip/chip-build-efr32:0.6.30 steps: - uses: Wandalen/wretry.action@v1.0.36 name: Checkout diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index dc8ee425c28fca..749d90e9522863 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.6.27 + image: connectedhomeip/chip-build-android:0.6.30 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e492cba4c6b360..e5d5d28a7952d9 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -352,7 +352,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" @@ -426,7 +426,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index a6cb192b058a99..04e3ee8578a206 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index 863a7105c23290..378112e497ce95 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -6,7 +6,7 @@ steps: - "--init" - "--recursive" id: Submodules - - name: "connectedhomeip/chip-build-vscode:0.6.27" + - name: "connectedhomeip/chip-build-vscode:0.6.30" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -21,7 +21,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.6.27" + - name: "connectedhomeip/chip-build-vscode:0.6.30" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -76,7 +76,7 @@ steps: --target k32w-shell build --create-archives /workspace/artifacts/ - # TODO: update this to connectedhomeip/chip-build-vscode:0.6.27 once we can compile with latest NRF + # TODO: update this to connectedhomeip/chip-build-vscode:0.6.30 once we can compile with latest NRF - name: "connectedhomeip/chip-build-vscode:0.6.18" env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/integrations/cloudbuild/build-coverage.yaml b/integrations/cloudbuild/build-coverage.yaml index 8beb8b6d18f19c..53f5c88195d7d7 100644 --- a/integrations/cloudbuild/build-coverage.yaml +++ b/integrations/cloudbuild/build-coverage.yaml @@ -7,7 +7,7 @@ steps: - "--recursive" id: Submodules - - name: "connectedhomeip/chip-build:0.6.27" + - name: "connectedhomeip/chip-build:0.6.30" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -22,7 +22,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build:0.6.27" + - name: "connectedhomeip/chip-build:0.6.30" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index 494869a38e318e..fc614000279964 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.6.27" + - name: "connectedhomeip/chip-build-vscode:0.6.30" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 2700s - - name: "connectedhomeip/chip-build-vscode:0.6.27" + - name: "connectedhomeip/chip-build-vscode:0.6.30" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -26,7 +26,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.6.27" + - name: "connectedhomeip/chip-build-vscode:0.6.30" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index c2f34ea5f72cdc..a17fd6f35ade60 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.6.27" + - name: "connectedhomeip/chip-build-vscode:0.6.30" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" git submodule update --init --recursive id: Submodules - - name: "connectedhomeip/chip-build-vscode:0.6.27" + - name: "connectedhomeip/chip-build-vscode:0.6.30" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -22,7 +22,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.6.27" + - name: "connectedhomeip/chip-build-vscode:0.6.30" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -41,7 +41,7 @@ steps: - name: pwenv path: /pwenv - # TODO: update this to connectedhomeip/chip-build-vscode:0.6.27 once we can compile with latest NRF + # TODO: update this to connectedhomeip/chip-build-vscode:0.6.30 once we can compile with latest NRF - name: "connectedhomeip/chip-build-vscode:0.6.18" id: NRFConnect env: @@ -63,7 +63,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.6.27" + - name: "connectedhomeip/chip-build-vscode:0.6.30" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -85,7 +85,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.6.27" + - name: "connectedhomeip/chip-build-vscode:0.6.30" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -143,7 +143,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.6.27" + - name: "connectedhomeip/chip-build-vscode:0.6.30" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/src/platform/Ameba/AmebaConfig.cpp b/src/platform/Ameba/AmebaConfig.cpp index 398de03d637084..05579271240081 100644 --- a/src/platform/Ameba/AmebaConfig.cpp +++ b/src/platform/Ameba/AmebaConfig.cpp @@ -42,25 +42,9 @@ namespace Internal { // *** CAUTION ***: Changing the names or namespaces of these values will *break* existing devices. // NVS namespaces used to store device configuration information. -const char AmebaConfig::kConfigNamespace_ChipFactory[] = "chip-factory"; -const char AmebaConfig::kConfigNamespace_ChipConfig[] = "chip-config"; -const char AmebaConfig::kConfigNamespace_ChipCounters[] = "chip-counters"; -const char AmebaConfig::kConfigNamespace_ChipFabric1[] = "chip-fabric-1"; -const char AmebaConfig::kConfigNamespace_ChipFabric2[] = "chip-fabric-2"; -const char AmebaConfig::kConfigNamespace_ChipFabric3[] = "chip-fabric-3"; -const char AmebaConfig::kConfigNamespace_ChipFabric4[] = "chip-fabric-4"; -const char AmebaConfig::kConfigNamespace_ChipFabric5[] = "chip-fabric-5"; -const char AmebaConfig::kConfigNamespace_ChipACL[] = "chip-acl"; -const char AmebaConfig::kConfigNamespace_ChipGroupMessageCounters[] = "chip-groupmsgcounters"; -const char AmebaConfig::kConfigNamespace_ChipAttributes[] = "chip-attributes"; -const char AmebaConfig::kConfigNamespace_ChipBindingTable[] = "chip-bindingtable"; -const char AmebaConfig::kConfigNamespace_ChipOTA[] = "chip-ota"; -const char AmebaConfig::kConfigNamespace_ChipFailSafe[] = "chip-failsafe"; -const char AmebaConfig::kConfigNamespace_ChipSessionResumption[] = "chip-sessionresumption"; -const char AmebaConfig::kConfigNamespace_ChipDeviceInfoProvider[] = "chip-deviceinfoprovider"; -const char AmebaConfig::kConfigNamespace_ChipGroupDataProvider[] = "chip-groupdataprovider"; -const char AmebaConfig::kConfigNamespace_ChipOthers[] = "chip-others"; -const char AmebaConfig::kConfigNamespace_ChipOthers2[] = "chip-others2"; +const char AmebaConfig::kConfigNamespace_ChipFactory[] = "chip-factory"; +const char AmebaConfig::kConfigNamespace_ChipConfig[] = "chip-config"; +const char AmebaConfig::kConfigNamespace_ChipCounters[] = "chip-counters"; // Keys stored in the chip-factory namespace const AmebaConfig::Key AmebaConfig::kConfigKey_SerialNum = { kConfigNamespace_ChipFactory, "serial-num" }; @@ -333,40 +317,39 @@ bool AmebaConfig::ConfigValueExists(Key key) return checkExist(key.Namespace, key.Name); } -CHIP_ERROR AmebaConfig::EnsureNamespace(const char * ns) +CHIP_ERROR AmebaConfig::InitNamespace() { int32_t success = -1; - success = registerPref(ns); + success = registerPref(); if (success != 0) { - ChipLogError(DeviceLayer, "dct_register_module failed\n"); + ChipLogError(DeviceLayer, "DCT modules registration failed"); } - return CHIP_NO_ERROR; -} - -CHIP_ERROR AmebaConfig::EnsureNamespace2(const char * ns) -{ - int32_t success = -1; - - success = registerPref2(ns); + success = registerPref2(); if (success != 0) { - ChipLogError(DeviceLayer, "dct_register_module2 failed\n"); + ChipLogError(DeviceLayer, "DCT2 modules registration failed"); } return CHIP_NO_ERROR; } -CHIP_ERROR AmebaConfig::ClearNamespace(const char * ns) +CHIP_ERROR AmebaConfig::ClearNamespace() { int32_t success = -1; - success = clearPref(ns); + success = clearPref(); + if (success != 0) + { + ChipLogError(DeviceLayer, "DCT modules unregistration failed\n"); + } + + success = clearPref2(); if (success != 0) { - ChipLogError(DeviceLayer, "ClearNamespace failed\n"); + ChipLogError(DeviceLayer, "DCT2 modules unregistration failed\n"); } return CHIP_NO_ERROR; diff --git a/src/platform/Ameba/AmebaConfig.h b/src/platform/Ameba/AmebaConfig.h index 95fc03971808c8..71471a722decce 100755 --- a/src/platform/Ameba/AmebaConfig.h +++ b/src/platform/Ameba/AmebaConfig.h @@ -40,22 +40,6 @@ class AmebaConfig static const char kConfigNamespace_ChipFactory[]; static const char kConfigNamespace_ChipConfig[]; static const char kConfigNamespace_ChipCounters[]; - static const char kConfigNamespace_ChipFabric1[]; - static const char kConfigNamespace_ChipFabric2[]; - static const char kConfigNamespace_ChipFabric3[]; - static const char kConfigNamespace_ChipFabric4[]; - static const char kConfigNamespace_ChipFabric5[]; - static const char kConfigNamespace_ChipACL[]; - static const char kConfigNamespace_ChipGroupMessageCounters[]; - static const char kConfigNamespace_ChipAttributes[]; - static const char kConfigNamespace_ChipBindingTable[]; - static const char kConfigNamespace_ChipOTA[]; - static const char kConfigNamespace_ChipFailSafe[]; - static const char kConfigNamespace_ChipSessionResumption[]; - static const char kConfigNamespace_ChipDeviceInfoProvider[]; - static const char kConfigNamespace_ChipGroupDataProvider[]; - static const char kConfigNamespace_ChipOthers[]; - static const char kConfigNamespace_ChipOthers2[]; // Key definitions for well-known keys. static const Key kConfigKey_SerialNum; @@ -105,9 +89,8 @@ class AmebaConfig static CHIP_ERROR ClearConfigValue(Key key); static bool ConfigValueExists(Key key); - static CHIP_ERROR EnsureNamespace(const char * ns); - static CHIP_ERROR EnsureNamespace2(const char * ns); - static CHIP_ERROR ClearNamespace(const char * ns); + static CHIP_ERROR InitNamespace(void); + static CHIP_ERROR ClearNamespace(void); static void RunConfigUnitTest(void); }; diff --git a/src/platform/Ameba/ConfigurationManagerImpl.cpp b/src/platform/Ameba/ConfigurationManagerImpl.cpp index e64b097b86c253..a632cf585234c1 100644 --- a/src/platform/Ameba/ConfigurationManagerImpl.cpp +++ b/src/platform/Ameba/ConfigurationManagerImpl.cpp @@ -49,43 +49,7 @@ CHIP_ERROR ConfigurationManagerImpl::Init() uint32_t rebootCount; // Force initialization of NVS namespaces if they doesn't already exist. - err = AmebaConfig::EnsureNamespace(AmebaConfig::kConfigNamespace_ChipFactory); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace(AmebaConfig::kConfigNamespace_ChipConfig); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace(AmebaConfig::kConfigNamespace_ChipCounters); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace2(AmebaConfig::kConfigNamespace_ChipFabric1); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace2(AmebaConfig::kConfigNamespace_ChipFabric2); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace2(AmebaConfig::kConfigNamespace_ChipFabric3); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace2(AmebaConfig::kConfigNamespace_ChipFabric4); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace2(AmebaConfig::kConfigNamespace_ChipFabric5); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace(AmebaConfig::kConfigNamespace_ChipACL); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace(AmebaConfig::kConfigNamespace_ChipGroupMessageCounters); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace(AmebaConfig::kConfigNamespace_ChipAttributes); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace(AmebaConfig::kConfigNamespace_ChipBindingTable); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace(AmebaConfig::kConfigNamespace_ChipOTA); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace(AmebaConfig::kConfigNamespace_ChipFailSafe); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace(AmebaConfig::kConfigNamespace_ChipSessionResumption); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace(AmebaConfig::kConfigNamespace_ChipDeviceInfoProvider); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace(AmebaConfig::kConfigNamespace_ChipGroupDataProvider); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace(AmebaConfig::kConfigNamespace_ChipOthers); - SuccessOrExit(err); - err = AmebaConfig::EnsureNamespace2(AmebaConfig::kConfigNamespace_ChipOthers2); + err = AmebaConfig::InitNamespace(); SuccessOrExit(err); if (AmebaConfig::ConfigValueExists(AmebaConfig::kCounterKey_RebootCount)) @@ -273,10 +237,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) ChipLogProgress(DeviceLayer, "Performing factory reset"); // Erase all values in the chip-config NVS namespace. - err = AmebaConfig::ClearNamespace(AmebaConfig::kConfigNamespace_ChipConfig); + err = AmebaConfig::ClearNamespace(); if (err != CHIP_NO_ERROR) { - ChipLogError(DeviceLayer, "ClearNamespace(ChipConfig) failed: %s", chip::ErrorStr(err)); + ChipLogError(DeviceLayer, "ClearNamespace() failed: %s", chip::ErrorStr(err)); } // Restart the system.