Skip to content

Commit cefc4c3

Browse files
authored
Release v1.3.2
1 parent a7e4fe6 commit cefc4c3

File tree

150 files changed

+1898
-1910
lines changed

Some content is hidden

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

150 files changed

+1898
-1910
lines changed

.github/template/fwe-build/action.yml

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,56 @@ runs:
2828
# prettier-ignore
2929
key: ${{ inputs.dist-name }}-${{ inputs.build-arch }}-${{ hashFiles('tools/install-deps-*.sh') }}
3030

31-
- name: install-deps
31+
- name: restore-cache-deps
32+
# Explicitly checking against true as the cache-hit output is a string value : "true", "false"
33+
# or "". According to GitHub documentation : https://github.com/marketplace/actions/cache#outputs,
34+
# it returns 'true' only on an exact primary key match, 'false' when using fallback restore-keys, and an
35+
# empty string when no cache exists at all. In the current workflow configuration, cache-hit output would
36+
# either return a "" when the cache is not available or a "true" if there is an exact key match.
37+
if: steps.cache-deps.outputs.cache-hit == 'true'
3238
shell: bash
3339
run: |
40+
echo "Cache found! Restoring cached dependencies..."
3441
IFS=":"
3542
CACHE_PATHS=${{ inputs.cache-paths }}
36-
if [ -d cache ]; then
37-
for P in ${CACHE_PATHS}; do
38-
sudo mkdir -p `dirname ${P}`
39-
sudo cp -r cache${P} ${P}
40-
done
41-
fi
42-
sudo ./tools/install-deps-${{ inputs.build-arch }}.sh ${{ inputs.extra-options }}
43-
if [ ! -d cache ]; then
44-
for P in ${CACHE_PATHS}; do
45-
mkdir -p cache`dirname ${P}`
46-
cp -r ${P} cache${P}
47-
done
43+
for P in ${CACHE_PATHS}; do
44+
sudo mkdir -p `dirname ${P}`
45+
sudo cp -r cache${P} ${P}
46+
done
47+
48+
- name: install-deps
49+
shell: bash
50+
run: |
51+
# Add --use-cache flag if cache hit
52+
EXTRA_OPTIONS="${{ inputs.extra-options }}"
53+
# Explicitly checking against true as the cache-hit output is a string value : "true", "false" or ""
54+
if [[ "${{ steps.cache-deps.outputs.cache-hit }}" == 'true' ]]; then
55+
echo "Using cached dependencies, adding --use-cache flag"
56+
EXTRA_OPTIONS="${EXTRA_OPTIONS} --use-cache"
57+
else
58+
echo "No cache hit, installing dependencies from scratch"
4859
fi
4960
61+
echo "Running installation with options: ${EXTRA_OPTIONS}"
62+
sudo ./tools/install-deps-${{ inputs.build-arch }}.sh ${EXTRA_OPTIONS}
63+
64+
- name: create-cache
65+
# Explicitly checking against "" as the cache-hit output is a string value : "true", "false"
66+
# or "". According to GitHub documentation : https://github.com/marketplace/actions/cache#outputs,
67+
# it returns 'true' only on an exact primary key match, 'false' when using fallback restore-keys, and an
68+
# empty string when no cache exists at all. In the current workflow configuration, cache-hit output would
69+
# either return a "" when the cache is not available or a "true" if there is an exact key match.
70+
if: steps.cache-deps.outputs.cache-hit != 'true'
71+
shell: bash
72+
run: |
73+
echo "Creating cache for future runs..."
74+
IFS=":"
75+
CACHE_PATHS=${{ inputs.cache-paths }}
76+
for P in ${CACHE_PATHS}; do
77+
sudo mkdir -p "$(dirname "cache${P}")"
78+
sudo cp -r "${P}" "cache${P}"
79+
done
80+
5081
- name: build
5182
shell: bash
5283
run: |

.github/workflows/ci.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
extra-options:
4141
"--with-someip-support --with-lks-support --with-greengrassv2-support
4242
--with-custom-function-examples --with-store-and-forward-support --with-uds-dtc-example
43-
--with-micropython-support"
43+
--with-micropython-support --prefix /usr/local/x86_64-linux-gnu"
4444
dist-name: "aws-iot-fleetwise-edge"
4545
cache-paths: /usr/local/x86_64-linux-gnu
4646
dist-files: build/aws-iot-fleetwise-edge:.
@@ -56,7 +56,7 @@ jobs:
5656
extra-options:
5757
"--with-greengrassv2-support --with-someip-support --with-lks-support
5858
--with-custom-function-examples --with-store-and-forward-support --with-uds-dtc-example
59-
--with-micropython-support"
59+
--with-micropython-support --native-prefix /usr/local/x86_64-linux-gnu"
6060
dist-name: "aws-iot-fleetwise-edge"
6161
cache-paths: /usr/local/aarch64-linux-gnu:/usr/local/x86_64-linux-gnu
6262
dist-files: build/aws-iot-fleetwise-edge:.
@@ -72,7 +72,8 @@ jobs:
7272
extra-options:
7373
"--with-greengrassv2-support --with-someip-support --with-lks-support
7474
--with-iwave-gps-support --with-custom-function-examples
75-
--with-store-and-forward-support --with-uds-dtc-example --with-micropython-support"
75+
--with-store-and-forward-support --with-uds-dtc-example --with-micropython-support
76+
--native-prefix /usr/local/x86_64-linux-gnu"
7677
dist-name: "aws-iot-fleetwise-edge"
7778
cache-paths: /usr/local/arm-linux-gnueabihf:/usr/local/x86_64-linux-gnu
7879
dist-files: build/aws-iot-fleetwise-edge:.
@@ -88,7 +89,7 @@ jobs:
8889
extra-options:
8990
"--with-greengrassv2-support --with-ros2-support --with-someip-support
9091
--with-lks-support --with-custom-function-examples --with-store-and-forward-support
91-
--with-uds-dtc-example --with-micropython-support"
92+
--with-uds-dtc-example --with-micropython-support --prefix /usr/local/x86_64-linux-gnu"
9293
dist-name: "aws-iot-fleetwise-edge-ros2"
9394
cache-paths: /usr/local/x86_64-linux-gnu:/opt/ros
9495
dist-files: build/iotfleetwise/aws-iot-fleetwise-edge:.
@@ -104,7 +105,8 @@ jobs:
104105
extra-options:
105106
"--with-greengrassv2-support --with-ros2-support --with-someip-support
106107
--with-lks-support --with-custom-function-examples --with-store-and-forward-support
107-
--with-uds-dtc-example --with-micropython-support"
108+
--with-uds-dtc-example --with-micropython-support --native-prefix
109+
/usr/local/x86_64-linux-gnu"
108110
dist-name: "aws-iot-fleetwise-edge-ros2"
109111
cache-paths: /usr/local/aarch64-linux-gnu:/usr/local/x86_64-linux-gnu:/opt/ros
110112
dist-files: build/iotfleetwise/aws-iot-fleetwise-edge:.
@@ -120,7 +122,8 @@ jobs:
120122
extra-options:
121123
"--with-greengrassv2-support --with-ros2-support --with-someip-support
122124
--with-lks-support --with-custom-function-examples --with-store-and-forward-support
123-
--with-uds-dtc-example --with-micropython-support"
125+
--with-uds-dtc-example --with-micropython-support --native-prefix
126+
/usr/local/x86_64-linux-gnu"
124127
dist-name: "aws-iot-fleetwise-edge-ros2"
125128
cache-paths: /usr/local/arm-linux-gnueabihf:/usr/local/x86_64-linux-gnu:/opt/ros
126129
dist-files: build/iotfleetwise/aws-iot-fleetwise-edge:.
@@ -133,7 +136,9 @@ jobs:
133136
with:
134137
build-arch: "cross-android"
135138
upload-arch: "android"
136-
extra-options: "--with-lks-support --with-custom-function-examples"
139+
extra-options:
140+
"--with-lks-support --with-custom-function-examples --native-prefix
141+
/usr/local/x86_64-linux-gnu"
137142
dist-name: "aws-iot-fleetwise-edge"
138143
cache-paths: /usr/local/x86_64-linux-android:/usr/local/aarch64-linux-android:/usr/local/armv7a-linux-androideabi:/usr/local/x86_64-linux-gnu
139144
dist-files:

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Change Log
22

3+
## v1.3.2 (2025-06-24)
4+
5+
Bug fixes:
6+
7+
- Fixed race conditions in `OBDOverCANModule`, `DataSenderIonWriter`,
8+
`CollectionInspectionWorkerThread` and `CANDataSource` found by coverity 2024.3.1.
9+
10+
Improvements:
11+
12+
- Refactored telemetry data serialization to ensure Store and Forward uses the same payload size
13+
optimizations as regular telemetry data.
14+
- Updated the default dependency installation prefix to `/usr/local`, enabling CMake to locate
15+
dependencies using its standard search paths without requiring explicit `CMAKE_PREFIX_PATH`
16+
argument.
17+
- Fixed various Coverity regressions.
18+
319
## v1.3.1 (2025-04-25)
420

521
Bug fixes:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
cmake_minimum_required(VERSION 3.10.2)
44

5-
project(iotfleetwise VERSION 1.3.1)
5+
project(iotfleetwise VERSION 1.3.2)
66

77
# FWE uses C++14 for compatibility reasons with Automotive middlewares (Adaptive AUTOSAR, ROS2)
88
# Note: When built with FWE_FEATURE_ROS2, colcon will override these settings

docs/dev-guide/store-and-forward-dev-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ Install the dependencies for FWE:
185185

186186
```bash
187187
cd ~/aws-iot-fleetwise-edge &&
188-
sudo -H ./tools/install-deps-native.sh --with-store-and-forward-support --prefix /usr/local &&
188+
sudo -H ./tools/install-deps-native.sh --with-store-and-forward-support &&
189189
sudo ldconfig
190190
```
191191

docs/dev-guide/vision-system-data/vision-system-data-demo.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@
363363
"outputs": [],
364364
"source": [
365365
"# cd ~/aws-iot-fleetwise-edge\n",
366-
"# sudo -H ./tools/install-deps-native.sh --with-ros2-support --prefix /usr/local\n",
366+
"# sudo -H ./tools/install-deps-native.sh --with-ros2-support\n",
367367
"# sudo ldconfig"
368368
]
369369
},

examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ launch an AWS EC2 Graviton (arm64) instance. Pricing for EC2 can be found,
6868

6969
```bash
7070
cd ~/aws-iot-fleetwise-edge \
71-
&& ./tools/install-deps-native.sh \
71+
&& sudo ./tools/install-deps-native.sh \
7272
--with-someip-support
7373
```
7474

examples/custom_function/CustomFunctionSin.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
32
// SPDX-License-Identifier: Apache-2.0
43

examples/custom_function/CustomFunctionSin.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
32
// SPDX-License-Identifier: Apache-2.0
43

examples/network_agnostic_actuator_commands/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ cd ~/aws-iot-fleetwise-edge/examples/network_agnostic_actuator_commands \
135135
{
136136
"executionId": "<COMMAND_EXECUTION_ID>",
137137
"commandArn": "arn:aws:iot:us-east-1:<ACCOUNT_ID>:command/activateAC",
138-
"targetArn": "arn:aws:iot:us-east-1:<ACCOUNT_ID>:thing/fwe-example-network-agnostic-actuator-commands
138+
"targetArn": "arn:aws:iot:us-east-1:<ACCOUNT_ID>:thing/fwe-example-network-agnostic-actuator-commands",
139139
"status": "SUCCEEDED",
140140
"statusReason": {
141141
"reasonCode": "4660",

include/aws/iotfleetwise/ActuatorCommandManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class ActuatorCommandManager
6868

6969
void onChangeOfCustomSignalDecoderFormatMap(
7070
const SyncID &currentDecoderManifestID,
71-
const SignalIDToCustomSignalDecoderFormatMapPtr &customSignalDecoderFormatMap );
71+
std::shared_ptr<const SignalIDToCustomSignalDecoderFormatMap> customSignalDecoderFormatMap );
7272

7373
/**
7474
* @brief callback to be invoked to receive command request

include/aws/iotfleetwise/AwsGreengrassCoreIpcClientWrapper.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class SubscribeToIoTCoreOperationWrapper
2525
Activate( const Greengrass::SubscribeToIoTCoreRequest &request,
2626
OnMessageFlushCallback onMessageFlushCallback = nullptr ) noexcept
2727
{
28-
return mOperation->Activate( request, onMessageFlushCallback );
28+
return mOperation->Activate( request, std::move( onMessageFlushCallback ) );
2929
}
3030

3131
virtual std::future<Greengrass::SubscribeToIoTCoreResult>
@@ -37,7 +37,7 @@ class SubscribeToIoTCoreOperationWrapper
3737
virtual std::future<RpcError>
3838
Close( OnMessageFlushCallback onMessageFlushCallback = nullptr ) noexcept
3939
{
40-
return mOperation->Close( onMessageFlushCallback );
40+
return mOperation->Close( std::move( onMessageFlushCallback ) );
4141
}
4242

4343
private:
@@ -56,7 +56,7 @@ class PublishToIoTCoreOperationWrapper
5656
Activate( const Greengrass::PublishToIoTCoreRequest &request,
5757
OnMessageFlushCallback onMessageFlushCallback = nullptr ) noexcept
5858
{
59-
return mOperation->Activate( request, onMessageFlushCallback );
59+
return mOperation->Activate( request, std::move( onMessageFlushCallback ) );
6060
}
6161

6262
virtual std::future<Greengrass::PublishToIoTCoreResult>
@@ -68,7 +68,7 @@ class PublishToIoTCoreOperationWrapper
6868
virtual std::future<RpcError>
6969
Close( OnMessageFlushCallback onMessageFlushCallback = nullptr ) noexcept
7070
{
71-
return mOperation->Close( onMessageFlushCallback );
71+
return mOperation->Close( std::move( onMessageFlushCallback ) );
7272
}
7373

7474
private:
@@ -126,7 +126,7 @@ class AwsGreengrassCoreIpcClientWrapper
126126
NewSubscribeToIoTCore( std::shared_ptr<Greengrass::SubscribeToIoTCoreStreamHandler> streamHandler ) noexcept
127127
{
128128
return std::make_shared<SubscribeToIoTCoreOperationWrapper>(
129-
mGreengrassClient->NewSubscribeToIoTCore( streamHandler ) );
129+
mGreengrassClient->NewSubscribeToIoTCore( std::move( streamHandler ) ) );
130130
}
131131

132132
virtual std::shared_ptr<Greengrass::ResumeComponentOperation>
@@ -145,7 +145,7 @@ class AwsGreengrassCoreIpcClientWrapper
145145
NewSubscribeToConfigurationUpdate(
146146
std::shared_ptr<Greengrass::SubscribeToConfigurationUpdateStreamHandler> streamHandler ) noexcept
147147
{
148-
return mGreengrassClient->NewSubscribeToConfigurationUpdate( streamHandler );
148+
return mGreengrassClient->NewSubscribeToConfigurationUpdate( std::move( streamHandler ) );
149149
}
150150

151151
virtual std::shared_ptr<Greengrass::DeleteThingShadowOperation>
@@ -170,7 +170,7 @@ class AwsGreengrassCoreIpcClientWrapper
170170
NewSubscribeToValidateConfigurationUpdates(
171171
std::shared_ptr<Greengrass::SubscribeToValidateConfigurationUpdatesStreamHandler> streamHandler ) noexcept
172172
{
173-
return mGreengrassClient->NewSubscribeToValidateConfigurationUpdates( streamHandler );
173+
return mGreengrassClient->NewSubscribeToValidateConfigurationUpdates( std::move( streamHandler ) );
174174
}
175175
virtual std::shared_ptr<Greengrass::GetConfigurationOperation>
176176
NewGetConfiguration() noexcept
@@ -180,7 +180,7 @@ class AwsGreengrassCoreIpcClientWrapper
180180
virtual std::shared_ptr<Greengrass::SubscribeToTopicOperation>
181181
NewSubscribeToTopic( std::shared_ptr<Greengrass::SubscribeToTopicStreamHandler> streamHandler ) noexcept
182182
{
183-
return mGreengrassClient->NewSubscribeToTopic( streamHandler );
183+
return mGreengrassClient->NewSubscribeToTopic( std::move( streamHandler ) );
184184
}
185185

186186
virtual std::shared_ptr<Greengrass::GetComponentDetailsOperation>
@@ -205,7 +205,7 @@ class AwsGreengrassCoreIpcClientWrapper
205205
NewSubscribeToCertificateUpdates(
206206
std::shared_ptr<Greengrass::SubscribeToCertificateUpdatesStreamHandler> streamHandler ) noexcept
207207
{
208-
return mGreengrassClient->NewSubscribeToCertificateUpdates( streamHandler );
208+
return mGreengrassClient->NewSubscribeToCertificateUpdates( std::move( streamHandler ) );
209209
}
210210

211211
virtual std::shared_ptr<Greengrass::VerifyClientDeviceIdentityOperation>
@@ -302,7 +302,7 @@ class AwsGreengrassCoreIpcClientWrapper
302302
NewSubscribeToComponentUpdates(
303303
std::shared_ptr<Greengrass::SubscribeToComponentUpdatesStreamHandler> streamHandler ) noexcept
304304
{
305-
return mGreengrassClient->NewSubscribeToComponentUpdates( streamHandler );
305+
return mGreengrassClient->NewSubscribeToComponentUpdates( std::move( streamHandler ) );
306306
}
307307

308308
virtual std::shared_ptr<Greengrass::ListLocalDeploymentsOperation>

include/aws/iotfleetwise/AwsGreengrassV2Receiver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class SubscribeStreamHandler : public Aws::Greengrass::SubscribeToIoTCoreStreamH
3535
virtual ~SubscribeStreamHandler() = default;
3636

3737
private:
38-
// coverity[autosar_cpp14_a0_1_3_violation] false positive - function overrides sdk's virtual function.
38+
// coverity[autosar_cpp14_a0_1_3_violation:FALSE] function overrides sdk's virtual function.
3939
void OnStreamEvent( Aws::Greengrass::IoTCoreMessage *response ) override;
4040

4141
SubscribeCallback mCallback;

include/aws/iotfleetwise/AwsIotConnectivityModule.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,15 @@ class TopicTree
110110
return;
111111
}
112112

113-
currentNode->mReceiver = receiver;
113+
currentNode->mReceiver = std::move( receiver );
114114
}
115115

116116
std::shared_ptr<AwsIotReceiver>
117117
find( const std::string &topic )
118118
{
119119
size_t start = 0;
120120
size_t foundPos = topic.find( '/', start );
121+
// coverity[autosar_cpp14_a0_1_1_violation:FALSE] variable is used later
121122
TopicNode *currentNode = nullptr;
122123
auto *currentChildren = &mChildren;
123124
while ( true )
@@ -167,7 +168,9 @@ class TopicTree
167168
class AwsIotConnectivityModule : public IConnectivityModule
168169
{
169170
public:
171+
// coverity[autosar_cpp14_a0_1_1_violation:FALSE] variable is used in the cpp file
170172
constexpr static uint32_t RETRY_FIRST_CONNECTION_START_BACKOFF_MS = 1000; // start retry after one second
173+
// coverity[autosar_cpp14_a0_1_1_violation:FALSE] variable is used in the cpp file
171174
constexpr static uint32_t RETRY_FIRST_CONNECTION_MAX_BACKOFF_MS = 256000; // retry at least every 256 seconds
172175

173176
/**

include/aws/iotfleetwise/CANDataSource.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ stringToCanTimestampType( std::string const &timestampType, CanTimestampType &ou
6464
class CANDataSource
6565
{
6666
public:
67+
// coverity[autosar_cpp14_a0_1_1_violation:FALSE] variable is used in the cpp file
6768
static constexpr int PARALLEL_RECEIVED_FRAMES_FROM_KERNEL = 10;
69+
// coverity[autosar_cpp14_a0_1_1_violation:FALSE] variable is used in the cpp file
6870
static constexpr int DEFAULT_THREAD_IDLE_TIME_MS = 1000;
6971

7072
/**

include/aws/iotfleetwise/CANInterfaceIDTranslator.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CANInterfaceIDTranslator
2828
CANChannelNumericID
2929
getChannelNumericID( const InterfaceID &iid ) const
3030
{
31-
for ( auto l : mLookup )
31+
for ( const auto &l : mLookup )
3232
{
3333
if ( l.second == iid )
3434
{
@@ -39,9 +39,13 @@ class CANInterfaceIDTranslator
3939
};
4040

4141
InterfaceID
42+
// coverity[autosar_cpp14_m3_2_2_violation:FALSE] not defined anywhere else
43+
// coverity[misra_cpp_2008_rule_3_2_2_violation:FALSE] not defined anywhere else
44+
// coverity[cert_dcl60_cpp_violation:FALSE] not defined anywhere else
45+
// coverity[ODR_VIOLATION:FALSE] not defined anywhere else
4246
getInterfaceID( CANChannelNumericID cid ) const
4347
{
44-
for ( auto l : mLookup )
48+
for ( const auto &l : mLookup )
4549
{
4650
if ( l.first == cid )
4751
{

include/aws/iotfleetwise/CacheAndPersist.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
#include <streambuf>
1010
#include <string>
1111

12-
// max buffer to be allocated for a read buffer
13-
// this matches the Max Send Size on the AWS IoT channel
14-
constexpr size_t MAX_DATA_RD_SIZE = 131072;
15-
1612
// file size assigned for an invalid data type
1713
constexpr size_t INVALID_FILE_SIZE = (size_t)-1;
1814

0 commit comments

Comments
 (0)