Skip to content

Commit

Permalink
Merge branch 'master' into indirect_crl_sample_revoked_certs
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamdp authored Jan 13, 2025
2 parents 22548dd + d5e9829 commit 9c44844
Show file tree
Hide file tree
Showing 50 changed files with 1,368 additions and 596 deletions.
1 change: 0 additions & 1 deletion .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,6 @@ js
json
JTAG
Jupyter
judgement
jupyterlab
KA
kAdminister
Expand Down
18 changes: 11 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
> !!!!!!!!!! Please delete the instructions below and replace with PR description
> !!!!!!!!!! Please delete the instructions below and replace with PR
> description
>
> If you have an issue number, please use a syntax of
> `Fixes #12345` and a brief change description
> If you have an issue number, please use a syntax of `Fixes #12345` and a brief
> change description
>
> If you do not have an issue number, please have a good description of
> the problem and the fix. Help the reviewer understand what to expect.
> If you do not have an issue number, please have a good description of the
> problem and the fix. Help the reviewer understand what to expect.
>
> Add a `### Testing` section to your PR to describe how testing was done.
> See <https://github.com/project-chip/connectedhomeip/blob/master/CONTRIBUTING.md#pull-requests>
> Complete/append to the `### Testing` section below, to describe how testing
> was done. See
> <https://github.com/project-chip/connectedhomeip/blob/master/CONTRIBUTING.md#pull-requests>
>
> Make sure you delete these instructions (to prove you have read them).
>
> !!!!!!!!!! Instructions end
#### Testing
1 change: 0 additions & 1 deletion .github/workflows/cancel_workflows_for_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,4 @@ jobs:
--require "Lint Code Base" \
--require "ZAP" \
--require "Run misspell" \
--require "PR validity" \
--max-pr-age-minutes 20
13 changes: 10 additions & 3 deletions .github/workflows/pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,25 @@ jobs:
check_testing_header:
runs-on: ubuntu-latest
steps:

- name: Check for `### Testing` section in PR
id: check-testing
continue-on-error: true
run: |
python -c 'import sys; pr_summary = """${{ github.event.pull_request.body }}"""; sys.exit(0 if "### Testing" in pr_summary else 1)'
cat >/tmp/pr-summary.txt << "EndMarkerForPrSummary"
${{ github.event.pull_request.body }}
EndMarkerForPrSummary
python -c 'import sys; pr_summary = open("/tmp/pr-summary.txt", "rt").read(); sys.exit(0 if "### Testing" in pr_summary else 1)'
- name: Check for PR starting instructions
id: check-instructions
continue-on-error: true
run: |
python -c 'import sys; pr_summary = """${{ github.event.pull_request.body }}"""; sys.exit(1 if "Make sure you delete these instructions" in pr_summary else 0)'
cat >/tmp/pr-summary.txt << "EndMarkerForPrSummary"
${{ github.event.pull_request.body }}
EndMarkerForPrSummary
python -c 'import sys; pr_summary = open("/tmp/pr-summary.txt", "rt").read(); sys.exit(1 if "Make sure you delete these instructions" in pr_summary else 0)'
# NOTE: comments disabled for now as separate permissions are required
# failing CI step may be sufficient to start (although it contains less information about why it failed)
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,13 @@ to open the pull request for details or open additional issue in GitHub)
Ensure that there is sufficient detail in issue summaries to make the content of
the PR clear:

- a `TLDR` of the change content. This is a judgement call on details,
- a `TLDR` of the change content. This is a judgment call on details,
generally you should include a what was changed and why. The change is
trivial/short, this can be very short (i.e. "fixed typos" is perfectly
acceptable, however if changing 100-1000s of line, the areas of changes
should be explained)
- If a crash/error is fixed, explain the root cause and if the fix is not
obvious (again, judgement call), explain why the given approach was taken.
obvious (again, judgment call), explain why the given approach was taken.
- Help the reviewer out with any notable information (specific platform
issues, extra thoughts or requests for feedback or gotchas on tricky code,
followup work or PR dependencies)
Expand All @@ -230,7 +230,7 @@ out of convenience.
updated to cover functionality" or "existing tests already cover this" (make
sure they do. Integration tests often only cover happy paths).

Add any notes on not covered things. It is a judgement call on how much can
Add any notes on not covered things. It is a judgment call on how much can
be covered as 100% sounds great however not always possible.

- Manual testing
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
*
* Copyright (c) 2024 Project CHIP Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include <app/clusters/software-diagnostics-server/SoftwareDiagnosticsTestEventTriggerHandler.h>
#include <app/clusters/software-diagnostics-server/software-diagnostics-server.h>
#include <platform/CHIPDeviceLayer.h>
#include <platform/DiagnosticDataProvider.h>

using namespace chip;
using namespace chip::app;
using namespace chip::DeviceLayer;

namespace {

void SetTestEventTrigger_SoftwareFaultOccurred()
{
Clusters::SoftwareDiagnostics::Events::SoftwareFault::Type softwareFault;
char threadName[kMaxThreadNameLength + 1];

softwareFault.id = static_cast<uint64_t>(getpid());
Platform::CopyString(threadName, std::to_string(softwareFault.id).c_str());

softwareFault.name.SetValue(CharSpan::fromCharString(threadName));

std::time_t result = std::time(nullptr);
// Using size of 50 as it is double the expected 25 characters "Www Mmm dd hh:mm:ss yyyy\n".
char timeChar[50];
if (std::strftime(timeChar, sizeof(timeChar), "%c", std::localtime(&result)))
{
softwareFault.faultRecording.SetValue(ByteSpan(Uint8::from_const_char(timeChar), strlen(timeChar)));
}

Clusters::SoftwareDiagnosticsServer::Instance().OnSoftwareFaultDetect(softwareFault);
}

} // namespace

bool HandleSoftwareDiagnosticsTestEventTrigger(uint64_t eventTrigger)
{
SoftwareDiagnosticsTrigger trigger = static_cast<SoftwareDiagnosticsTrigger>(eventTrigger);

switch (trigger)
{
case SoftwareDiagnosticsTrigger::kSoftwareFault:
ChipLogProgress(Support, "[Software-Diagnostics-Test-Event] => Software Fault occurred");
SetTestEventTrigger_SoftwareFaultOccurred();
break;
default:

return false;
}

return true;
}
1 change: 1 addition & 0 deletions examples/all-clusters-app/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ source_set("chip-all-clusters-common") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/rvc-operational-state-delegate-impl.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/software-diagnostics-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp",
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/linux/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ matter_log_json_payload_hex = true
chip_enable_smoke_co_trigger = true
chip_enable_boolean_state_configuration_trigger = true
chip_enable_water_heater_management_trigger = true
chip_enable_software_diagnostics_trigger = true
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ constexpr uint16_t MAX_POWER_ADJUSTMENTS = 5;

chip::app::Clusters::DeviceEnergyManagement::Structs::SlotStruct::Type sSlots[MAX_SLOTS];
chip::app::Clusters::DeviceEnergyManagement::Structs::ForecastStruct::Type sForecastStruct;
chip::app::DataModel::Nullable<chip::app::Clusters::DeviceEnergyManagement::Structs::ForecastStruct::Type> sForecast;

chip::app::Clusters::DeviceEnergyManagement::Structs::PowerAdjustStruct::Type sPowerAdjustments[MAX_POWER_ADJUSTMENTS];
chip::app::Clusters::DeviceEnergyManagement::Structs::PowerAdjustCapabilityStruct::Type sPowerAdjustCapabilityStruct;
Expand Down
2 changes: 1 addition & 1 deletion examples/java-matter-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ system or not. In order to install the Java Runtime Environment on your system,
run the following command as root:

```
sudo apt install default-jre Install Java default JRE
sudo apt install default-jre
```

After installing the JRE, let us check if we have the Java Development Kit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,7 @@ provisional cluster ThreadNetworkDirectory = 1107 {
}

endpoint 0 {
device type ma_rootdevice = 22, version 1;
device type ma_rootdevice = 22, version 3;


server cluster Descriptor {
Expand Down Expand Up @@ -1615,7 +1615,7 @@ endpoint 0 {
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 3;
ram attribute clusterRevision default = 4;
}

server cluster GeneralCommissioning {
Expand All @@ -1628,7 +1628,7 @@ endpoint 0 {
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
ram attribute clusterRevision default = 2;

handle command ArmFailSafe;
handle command ArmFailSafeResponse;
Expand Down Expand Up @@ -1699,7 +1699,7 @@ endpoint 0 {
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 2;
ram attribute clusterRevision default = 3;
}

server cluster WiFiNetworkDiagnostics {
Expand Down
Loading

0 comments on commit 9c44844

Please sign in to comment.