Skip to content

Commit

Permalink
Merge pull request #371 from joshuachp/forward/v0.8.3
Browse files Browse the repository at this point in the history
chore(forward): port release v0.8.3 to master
  • Loading branch information
harlem88 authored Aug 22, 2024
2 parents d107fd3 + 741150e commit f032ae2
Show file tree
Hide file tree
Showing 10 changed files with 178 additions and 33 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ permissions:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
dco:
uses: ./.github/workflows/dco.yaml
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This file is part of Astarte.
#
# Copyright 2024 SECO Mind Srl
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

name: coverage
defaults:
run:
shell: bash
on:
workflow_run:
workflows: ["ci"]
types: [completed]
permissions:
contents: read
actions: read
jobs:
upload:
runs-on: ubuntu-latest
# Run only if originated from a PR
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha }}
# Checkout codecov.yaml config from master
- uses: actions/checkout@v4
with:
path: master
sparse-checkout: |
.github/codecov.yaml
sparse-checkout-cone-mode: false
- name: Download coverage artifact
uses: actions/download-artifact@v4
with:
name: coverage
github-token: ${{ github.token }}
run-id: ${{ github.event.workflow_run.id }}
- name: Get PR number
run: |
echo "PR_NUMBER=$(cat ./pr_number)" >> "$GITHUB_ENV"
- name: Upload to codecov.io
uses: codecov/codecov-action@v4
with:
codecov_yml_path: master/.github/codecov.yaml
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: true
override_branch: ${{ github.event.workflow_run.head_branch }}
override_commit: ${{ github.event.workflow_run.head_sha }}
override_pr: ${{ env.PR_NUMBER }}
17 changes: 17 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,25 @@ jobs:
run: cargo generate-lockfile
- name: Run cargo-tarpaulin with xml output
run: cargo tarpaulin --engine llvm --locked --all-features --ignore-tests --lib --out xml -- --test-threads 1
# Upload the coverage if we are not a PR from a fork, see ".github/workflows/coverage.yaml"
- name: Upload to codecov.io
if: ${{ github.event_name == 'push' }}
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: true
# Save data to use in workflow_run
- name: Save PR number
if: ${{ github.event_name == 'pull_request' }}
env:
PR_NUMBER: ${{ github.event.number }}
run: |
echo "$PR_NUMBER" > ./pr_number
- name: Upload coverage artifact
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v4
with:
name: coverage
path: |
pr_number
cobertura.xml
83 changes: 61 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.3] - 2024-08-22

### Changed

- Derive `Clone` for the MQTT `Credential` enum
[#369](https://github.com/astarte-platform/astarte-device-sdk-rust/pull/369)

## [Unreleased]
### Added
Expand All @@ -18,25 +26,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.6.6] - 2024-05-27

## [0.5.4] - 2024-05-22

### Fixed
- Purge property deletes only the server property [#342](https://github.com/astarte-platform/astarte-device-sdk-rust/pull/342)

- Purge property deletes only the server property
[#342](https://github.com/astarte-platform/astarte-device-sdk-rust/pull/342)

## [0.8.1] - 2024-05-03

### Fixed
- Correct the interfaces iterator logic to send the correct device
introspection [#334](https://github.com/astarte-platform/astarte-device-sdk-rust/pull/334)

- Correct the interfaces iterator logic to send the correct device introspection
[#334](https://github.com/astarte-platform/astarte-device-sdk-rust/pull/334)

## [0.8.0] - 2024-04-29

### Added

- Introduce Node ID into gRPC metadata.
- Add one or more interfaces at once with `extend_interfaces`
[#293](https://github.com/astarte-platform/astarte-device-sdk-rust/pull/293)
- Add a method `unset` to unset a property
[#296](https://github.com/astarte-platform/astarte-device-sdk-rust/pull/296)
- Return values for the `DynamicIntrospection` to check if/which interface
where added/removed [#326](https://github.com/astarte-platform/astarte-device-sdk-rust/pull/326)
- Return values for the `DynamicIntrospection` to check if/which interface where added/removed
[#326](https://github.com/astarte-platform/astarte-device-sdk-rust/pull/326)

### Changed

- Rename the enum `Aggregation` into `Value`
[#296](https://github.com/astarte-platform/astarte-device-sdk-rust/pull/296)
- Move the `AstarteType::Unset` to the `Value::Unset` for the astarte event
Expand All @@ -47,50 +63,60 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.7.3] - 2024-04-09

## [0.6.5] - 2024-04-08

### Fixed
- Delete all interface's properties, using the correct mapping, when an
interface is removed

- Delete all interface's properties, using the correct mapping, when an interface is removed
[#313](https://github.com/astarte-platform/astarte-device-sdk-rust/pull/313)

## [0.7.2] - 2024-03-21

### Fixed

- Handle Unset from gRPC correctly

## [0.6.4] - 2024-03-20

## [0.5.3] - 2024-03-20

### Added

- Add semver-check for release

### Fixed

- Property reliability as Unique

## [0.7.1] - 2024-02-16

## Changed

- `MqttConfig` now receives `Into<String>` instead of `&str`
- Bump MSRV to 1.72.0.

## [0.6.3] - 2024-02-13

## [0.5.2] - 2024-01-30

### Added
- Expose the MQTT connection timeout option.

- Expose the MQTT connection timeout option.

## [0.7.0] - 2024-01-22

### Added

- Handle MQTT connection errors by trying to reconnect.
- Make the reconnection attempt wait with an exponential back-off.
- Trait `PropAccess` to access the stored properties from the
`AstarteDeviceSdk`.
- Trait `PropAccess` to access the stored properties from the `AstarteDeviceSdk`.
- Trait `FromEvent` to convert a generic object aggregate into a Rust struct.
- Implementation of the connection over GRPC to the message hub.

### Changed

- Return a channel for the events when creating a device SDK.
- Make handle event loop block to handle the events.
- Create a shareable struct (`Arc`) of the `AstarteDeviceSdk` to not clone the
device id and realm.
- Create a shareable struct (`Arc`) of the `AstarteDeviceSdk` to not clone the device id and realm.
- Make the `DynError` trait bound shareable across threads.
- Added ownership field to the `StoredProp` struct.
- The `PropertyStore::store_prop` now receives the `StoredProp` struct.
Expand All @@ -99,33 +125,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Pass `AsRef<Path>` for paths instead of `&str`.

## [0.6.2] - 2023-10-19

### Fixed

- Allow escaped character in the `Interface` description and documentation.

## [0.6.1] - 2023-10-02

### Added
- Check if an interface exists and the type is the same of the value
passed/received when sending or receiving data from Astarte.

- Check if an interface exists and the type is the same of the value passed/received when sending or
receiving data from Astarte.

### Fixed

- Unset of property send empty buffer instead of document with null value.
- Deserialize mixed integer BSON arrays from Astarte to the type specified in
the interface (longinteger and integer)
- Deserialize mixed integer BSON arrays from Astarte to the type specified in the interface
(longinteger and integer)

### Deprecated
- Added a warning to the `AstarteDeviceSdk::get_property` method to use the
`PropAccess` trait instead

- Added a warning to the `AstarteDeviceSdk::get_property` method to use the `PropAccess` trait
instead

## [0.6.0] - 2023-07-05

### Added

- Support for different case conventions on `AstarteAggregate` derive macro
([#126](https://github.com/astarte-platform/astarte-device-sdk-rust/issues/126)).
- Add support to store properties in volatile memory using `MemoryStore` if no
database is provided.
- Add support to store properties in volatile memory using `MemoryStore` if no database is provided.
- Make `AstarteDeviceSdk` generic over the storage type.
- Provide type aliases for `AstarteDeviceSdk` with `MemoryStore` and `SqliteStore`.

### Changed

- Expose `pairing::PairingError` to public visibility.
- Bump `MSRV` to 1.66.1.
- The `AstartDeviceSdk` now requires an owned `AstarteOptions` instance.
Expand All @@ -135,12 +169,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added a new `AstarteType` for a generic `EmptyArray`.

### Fixed

- Solve a panic when deserializing an empty BSON array.

## [0.5.1] - 2023-02-06

### Fixed

- Lock version of flate2 to support rust v1.59.

## [0.5.0] - 2023-02-01

### Added

- Initial Astarte Device SDK release.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ members = [
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[workspace.package]
version = "0.8.2"
version = "0.8.3"
edition = "2021"
homepage = "https://astarte.cloud/"
license = "Apache-2.0"
Expand Down Expand Up @@ -105,8 +105,8 @@ interface-doc = []
interface-strict = []

[workspace.dependencies]
astarte-device-sdk = { path = "./", version = "=0.8.2" }
astarte-device-sdk-derive = { version = "=0.8.2", path = "./astarte-device-sdk-derive" }
astarte-device-sdk = { path = "./", version = "=0.8.3" }
astarte-device-sdk-derive = { version = "=0.8.3", path = "./astarte-device-sdk-derive" }
astarte-message-hub-proto = { git = "https://github.com/astarte-platform/astarte-message-hub-proto", rev = "08ff0df376995d56b6c9d823ccf884afaeb7bdc7" }
async-trait = "0.1.50"
base64 = "0.22.0"
Expand Down
13 changes: 11 additions & 2 deletions astarte-device-sdk-derive/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.3] - 2024-08-22

## [0.8.2] - 2024-05-29

Expand All @@ -27,17 +30,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.5.3] - 2024-03-20

## [0.7.1] - 2024-02-16

- Bump MSRV to 1.72.0.

## [0.6.3] - 2024-02-13

## [0.5.2] - 2024-01-30

## [0.7.0] - 2024-01-22

### Added

- Macro to implement the `FromEvent` trait on a generic struct.

### Changed

- Update the `AstarteAggregate` derive macro to syn `2`, see
[#236](https://github.com/astarte-platform/astarte-device-sdk-rust/pull/236).

Expand All @@ -50,5 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.5.1] - 2023-02-06

## [0.5.0] - 2023-02-01

### Added

- Initial Astarte Device SDK Derive release
Loading

0 comments on commit f032ae2

Please sign in to comment.