Skip to content

Commit

Permalink
Release v1.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
hefroy committed Aug 2, 2023
1 parent 07e567c commit 0ee8f7b
Show file tree
Hide file tree
Showing 181 changed files with 19,759 additions and 6,894 deletions.
2 changes: 1 addition & 1 deletion .github/template/fwe-build/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

name: Build AWS IoT FleetWise Edge
name: Build FWE

inputs:
build-arch:
Expand Down
35 changes: 31 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ jobs:
upload-arch: "android"
cache-paths: /usr/local/aarch64-linux-android:/usr/local/armv7a-linux-androideabi:/usr/local/x86_64-linux-gnu
dist-files:
build/x86_64/src/executionmanagement/libaws-iot-fleetwise-edge.so:x86_64
build/armeabi-v7a/src/executionmanagement/libaws-iot-fleetwise-edge.so:armeabi-v7a
build/arm64-v8a/src/executionmanagement/libaws-iot-fleetwise-edge.so:arm64-v8a
- name: build-app
run: |
mkdir -p tools/android-app/app/src/main/jniLibs
cp -r build/dist/arm64-v8a build/dist/armeabi-v7a tools/android-app/app/src/main/jniLibs
cp -r build/dist/x86_64 build/dist/arm64-v8a build/dist/armeabi-v7a tools/android-app/app/src/main/jniLibs
cp THIRD-PARTY-LICENSES tools/android-app/app/src/main/assets
if [ "${GITHUB_REPOSITORY}" == "aws/aws-iot-fleetwise-edge" ]; then
curl -o tools/android-app/app/src/main/res/mipmap-xhdpi/ic_launcher.webp \
Expand All @@ -87,12 +88,12 @@ jobs:
unset ANDROID_SDK_ROOT
ANDROID_HOME=/usr/local/android_sdk ./gradlew assembleRelease
- uses: aws-actions/configure-aws-credentials@v2
if: github.repository == 'aws/aws-iot-fleetwise-edge' && github.ref_type == 'tag'
if: github.repository == 'aws/aws-iot-fleetwise-edge' && github.event_name == 'push'
with:
role-to-assume: ${{ secrets.ANDROID_SIGNING_ROLE }}
aws-region: us-east-1
- name: sign-app
if: github.repository == 'aws/aws-iot-fleetwise-edge' && github.ref_type == 'tag'
if: github.repository == 'aws/aws-iot-fleetwise-edge' && github.event_name == 'push'
run: |
source tools/install-deps-versions.sh
SIGNING_INFO=`aws secretsmanager get-secret-value --region us-east-1 --secret-id AndroidAppKeyStore | jq -r .SecretString`
Expand All @@ -109,7 +110,7 @@ jobs:
app/build/outputs/apk/release/app-release-unsigned-aligned.apk
shred -u ~/android-signing.jks
- name: upload-artifacts
if: github.repository == 'aws/aws-iot-fleetwise-edge' && github.ref_type == 'tag'
if: github.repository == 'aws/aws-iot-fleetwise-edge' && github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: build-android-app
Expand Down Expand Up @@ -164,3 +165,29 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/arm/v7
cache-from: type=gha
cache-to: type=gha,mode=max

copy-cfn-templates:
runs-on: ubuntu-20.04
if:
github.repository == 'aws/aws-iot-fleetwise-edge' && (github.ref_type == 'tag' ||
(github.event_name == 'push' && github.ref == 'refs/heads/main'))
steps:
- uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.CFN_TEMPLATES_COPY_ROLE }}
aws-region: us-east-1
- name: copy-to-s3
run: |
SRC_PATH="tools/cfn-templates/"
if [ "${GITHUB_REF_TYPE}" == "tag" ]; then
RELEASE_VERSION="${GITHUB_REF/refs\/tags\//}"
DEST_URL="s3://aws-iot-fleetwise/${RELEASE_VERSION}/cfn-templates/"
aws s3 cp --recursive --acl "authenticated-read" --exclude README.md ${SRC_PATH} ${DEST_URL}
fi
if [ "${GITHUB_EVENT_NAME}" == "push" ] && [ "${GITHUB_REF}" == "refs/heads/main" ]; then
LATEST_URL="s3://aws-iot-fleetwise/latest/"
aws s3 rm --recursive ${LATEST_URL}
DEST_URL="${LATEST_URL}cfn-templates/"
aws s3 cp --recursive --acl "authenticated-read" --exclude README.md ${SRC_PATH} ${DEST_URL}
fi
17 changes: 15 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: check-case-conflict
- id: check-json
- id: check-yaml
exclude: cfn-templates|public-ecr
exclude: cfn-templates
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
Expand Down Expand Up @@ -88,7 +88,20 @@ repos:
interfaces/protobuf/schemas/edgeConfiguration/staticConfiguration.json --document-file
"$x"; done' --
language: python
files: "configuration/static-config.json"
files: "configuration/static-config.json|tools/android-app/app/src/main/assets/config-0.json"
types: [json]
additional_dependencies: ["json-spec==0.10.1"]
verbose: true
- id: validate-persistency-metadata
name: validate-persistency-metadata
# pre-commit intentionally pass all files as args to the command.
# Since the json command only takes one file at once we need some shell script to split the args.
entry:
bash -c 'for x in "$@"; do echo "Validating file $x"; json validate --schema-file
interfaces/persistency/schemas/persistencyMetadataFormat.json --document-file "$x"; done'
--
language: python
files: "interfaces/persistency/examples/persistencyMetadataFormat.json"
types: [json]
additional_dependencies: ["json-spec==0.10.1"]
verbose: true
57 changes: 42 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Change Log

## v1.0.7 (2023-08-01)

Features:

- Add Android Automotive (AAOS) support.
- Add experimental Greengrass V2 support

Bug fixes:

- Fix always saving data to disk when offline, even when configured not to in the campaign.
- Fix possible NullPointerException in Android app.

Improvements:

- Refactor persistent file handling, which now saves files under a subfolder called
`FWE_Persistency` in the directory configured in the config file by `persistencyPath`. Now a
separate file is saved for each payload file to be uploaded. An extra file `PayloadMetadata.json`
is created containing metadata for these files, the schema for which can be found
[here](./interfaces/persistency/schemas/persistencyMetadataFormat.json).
- Reduce Android app `minSdk` to 21 (Android 5.0).
- Update AWS C++ SDK to v1.11.111.

Deprecation:

- Remove the experimental camera feature (`-DFWE_FEATURE_CAMERA`). This is unsupported and it was
not being maintained.

## v1.0.6 (2023-06-12)

Features:
Expand All @@ -10,7 +37,7 @@ Improvements:

- Change from `arn` to `sync_id` for campaign_arn and document_arns, the `sync_id` being the ARN
followed by the timestamp of the last update. The change is backwards compatible with older
versions of the edge agent.
versions of FWE.
- Ubuntu package mirror from system used, rather than `ports.ubuntu.com`.
- Add root CA and inline credentials support to static config file.
- Add extra metrics for AWS SDK heap usage, used signal buffer, MQTT messages sent out.
Expand All @@ -33,7 +60,7 @@ Improvements:
- Add documentation on [how to use edge specific metrics](docs/metrics.md).
- Change from `arn` to `sync_id` for all decoder manifest Protobuf fields, the `sync_id` being the
ARN followed by the timestamp of the last update. The change is backwards compatible with older
versions of the edge agent.
versions of FWE.
- Improve MISRA C++ 2008, and AUTOSAR C++ compliance.
- Updated CloudFormation templates to use
[IMDSv2](https://aws.amazon.com/blogs/security/defense-in-depth-open-firewalls-reverse-proxies-ssrf-vulnerabilities-ec2-instance-metadata-service/).
Expand Down Expand Up @@ -84,9 +111,9 @@ Improvements:

- Logs now show time in ISO 8601 format and UTC.
- Added optional config `logColor` for controlling ANSI colors in the logs. Valid values: `Auto`,
`Yes`, `No`. Default value is `Auto`, which will make the agent try to detect whether stdout can
`Yes`, `No`. Default value is `Auto`, which will make FWE try to detect whether stdout can
interpret the ANSI color escape sequences.
- A containerized version of the edge agent is available from AWS ECR Public Gallery:
- A containerized version of FWE is available from AWS ECR Public Gallery:
https://gallery.ecr.aws/aws-iot-fleetwise-edge/aws-iot-fleetwise-edge.
- Improve CERT-CPP compliance.
- Improve quick start guide and demo script.
Expand All @@ -101,8 +128,8 @@ Bugfixes:
- Use `std::condition_variable::wait_until` instead of `wait_for` to avoid the
[bug](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41861) when `wait_for` uses system time.
- Fix extended id not working with cloud.
- Handle `SIGTERM` signal. Now when stopping the agent with `systemctl` or `kill` without additional
args, it should gracefully shutdown.
- Handle `SIGTERM` signal. Now when stopping FWE with `systemctl` or `kill` without additional args,
it should gracefully shutdown.
- Fix bug in canigen.py when signal offset is greater than zero.

Improvements:
Expand Down Expand Up @@ -160,12 +187,12 @@ Bugfixes:

Improvements:

- Remove the html version of developer guide.
- Remove source code in S3 bucket. The S3 bucket will only be used to host quick demo cloud
formation.
- Remove convertToPeculiarFloat function from DataCollectionProtoWriter.
- Set default checkin period to 2-min in static-config.json. The quick demo will still use 5 second
as checkin period.
- Remove the HTML version of developer guide.
- Remove source code in S3 bucket. The S3 bucket will only be used to host quick demo
CloudFormation.
- Remove `convertToPeculiarFloat` function from `DataCollectionProtoWriter`.
- Set default checkin period to 2-min in `static-config.json`. The quick demo will still use 5
second as checkin period.
- Update FleetWise CLI Model to GA release version.
- Update Customer Demo to remove service-linked role creation for FleetWise Account Registration.

Expand Down Expand Up @@ -229,7 +256,7 @@ Bugfixes/Improvements:
- Unit tests added to release, including clang-format and clang-tidy tests.
- Source code now available on GitHub: https://github.com/aws/aws-iot-fleetwise-edge
- GitHub CI job added that runs subset of unit tests that do not require SocketCAN.
- Edge agent source code:
- FWE source code:
- No changes.
- Edge agent developer guide and associated scripts:
- Cloud demo script `demo.sh`:
Expand All @@ -249,7 +276,7 @@ Features:

Bugfixes/Improvements:

- Edge agent source code:
- FWE source code:
- Fixed bug in `PayloadManager.cpp` that caused corruption of the persisted data.
- Improved the documentation of the Protobuf schemas.
- Added retry with exponential back-off for making initial connection to AWS IoT Core.
Expand All @@ -267,7 +294,7 @@ Bugfixes/Improvements:
- CloudFormation templates `fwdemo.yml` and `fwdev.yml`:
- Kernel updated and SocketCAN modules installed from `linux-modules-extra-aws` to avoid modules
becoming unavailable after system upgrade of EC2 instance.
- Edge agent now compiled and run on the same EC2 instance, rather than using CodePipeline.
- FWE now compiled and run on the same EC2 instance, rather than using CodePipeline.

## v0.1.0 (2021-11-29)

Expand Down
25 changes: 13 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@

cmake_minimum_required(VERSION 3.10.2)

project(iotfleetwise VERSION 1.0.6)
project(iotfleetwise VERSION 1.0.7)

# AWS IoT FleetWise Edge uses C++14 for compatibility reasons with
# Automotive middlewares ( Adaptive AUTOSAR, ROS2)
# FWE uses C++14 for compatibility reasons with Automotive middlewares (Adaptive AUTOSAR, ROS2)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED True)

message(STATUS "Hello from the AWS IoT FleetWise build system!")
message(STATUS "Hello from the FWE build system!")

# Print out the compile commands which is useful for IDEs
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# All AWS IoT FleetWise build and configure options are prefaced with an FWE_ to set
# them apart from other build options.
# All build and configuration options are prefaced with FWE_
option(FWE_STATIC_LINK "Statically link external libs" OFF)
option(FWE_CODE_COVERAGE "Enables code coverage" OFF)
option(FWE_VALGRIND "Enable valgrind tests" OFF)
Expand All @@ -27,18 +25,25 @@ option(FWE_WERROR "Enable -Werror compiler flag" OFF)
option(FWE_SECURITY_COMPILE_FLAGS "Add security related compile options" OFF)
option(FWE_AWS_SDK_SHARED_LIBS "Use AWS SDK shared libs. Needs to be set to the same value of BUILD_SHARED_LIBS that the SDK was compiled with." OFF)
option(FWE_AWS_SDK_EXTRA_LIBS "Extra libs required to link with the AWS SDK. When FWE_STATIC_LINK is ON, setting this to ON will automatically find the standard libs. Can be a space-separated list of libs." ON)
option(FWE_FEATURE_CAMERA "Enable Camera Data Collection feature" OFF)
option(FWE_FEATURE_GREENGRASSV2 "Enable Greengrass connection module" OFF)
option(FWE_FEATURE_CUSTOM_DATA_SOURCE "Include the custom data source interface" OFF)
option(FWE_FEATURE_IWAVE_GPS "Include the IWave GPS example for a custom data source" OFF)
option(FWE_FEATURE_EXTERNAL_GPS "Include the external GPS example for a custom data source" OFF)
option(FWE_BUILD_EXECUTABLE "Build the FleetWise Edge executable" ON)
option(FWE_FEATURE_AAOS_VHAL "Include the Android Automotive VHAL example for a custom data source" OFF)
option(FWE_BUILD_EXECUTABLE "Build the executable" ON)
option(FWE_BUILD_ANDROID_SHARED_LIBRARY "Build the android shared library" OFF)
if(FWE_FEATURE_IWAVE_GPS)
add_compile_options("-DFWE_FEATURE_IWAVE_GPS")
endif()
if(FWE_FEATURE_EXTERNAL_GPS)
add_compile_options("-DFWE_FEATURE_EXTERNAL_GPS")
endif()
if(FWE_FEATURE_AAOS_VHAL)
add_compile_options("-DFWE_FEATURE_AAOS_VHAL")
endif()
if(FWE_FEATURE_GREENGRASSV2)
add_compile_options("-DFWE_FEATURE_GREENGRASSV2")
endif()

# Define the default build type
if(NOT CMAKE_BUILD_TYPE)
Expand All @@ -48,10 +53,6 @@ endif()
include(cmake/graphviz.cmake)
include(cmake/compiler_gcc.cmake)
include(cmake/protobufs.cmake)
if(FWE_FEATURE_CAMERA)
add_compile_options("-DFWE_FEATURE_CAMERA")
include(cmake/ddsidls.cmake)
endif()
include(cmake/snappy.cmake)
include(CTest)
include(cmake/unit_test.cmake)
Expand Down
Loading

0 comments on commit 0ee8f7b

Please sign in to comment.