Skip to content

Commit

Permalink
Merge pull request #48 from joshuachp/chore/update
Browse files Browse the repository at this point in the history
chore(deps): update rust dependencies and protoc
  • Loading branch information
sorru94 authored Apr 19, 2024
2 parents 4114d4c + a43185e commit 2d28b47
Show file tree
Hide file tree
Showing 22 changed files with 418 additions and 405 deletions.
12 changes: 11 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,19 @@

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
- package-ecosystem: cargo
directory: "/rust"
schedule:
interval: weekly
ignore:
- dependency-name: "*"
# patch and minor updates don't matter for libraries
# remove this ignore rule if your package has binaries
update-types:
- "version-update:semver-patch"
- "version-update:semver-minor"
2 changes: 1 addition & 1 deletion .github/workflows/check-code-generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
- name: Check the Rust generated code
run: |
git --no-pager diff --no-index -- ./rust-dist/astarteplatform.msghub.rs ./rust/astarte-message-hub-proto/src/astarteplatform.msghub.rs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-code-generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:

env:
PB_REL: https://github.com/protocolbuffers/protobuf/releases
PB_VER: '24.4'
PB_VER: '26.1'

jobs:
python-build:
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
run: python3 ./protoc.py "./../grpc/grpc_python_plugin"
working-directory: ./python
- name: Upload artifact with generated code
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-dist
path: ./python/astarteplatform
2 changes: 1 addition & 1 deletion .github/workflows/rust-check-code-generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
strategy:
matrix:
msrv: [ 1.66.1 ]
msrv: [ 1.72.0 ]
name: ubuntu / ${{ matrix.msrv }}
steps:
- uses: actions/checkout@v4
Expand Down
43 changes: 20 additions & 23 deletions .github/workflows/rust-code-generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,28 @@ on:

env:
PB_REL: https://github.com/protocolbuffers/protobuf/releases
PB_VER: '24.4'
PB_VER: "26.1"

jobs:
rust_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install protoc
run: |
curl -LO $PB_REL/download/v$PB_VER/protoc-$PB_VER-linux-x86_64.zip
unzip protoc-$PB_VER-linux-x86_64.zip -d $HOME/.local
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.66.1
components: clippy
- name: Remove Rust old code
run: (! test -f ./astarte-message-hub-proto/src/astarteplatform.msghub.rs) || rm ./astarte-message-hub-proto/src/astarteplatform.msghub.rs
working-directory: ./rust/
- name: Generate Rust code with cargo build
run: cargo run -- --proto-directory ../../proto --out ../astarte-message-hub-proto/src/
working-directory: ./rust/rust-codegen
- name: Upload Rust code
uses: actions/upload-artifact@v3
with:
name: rust-dist
path: ./rust/astarte-message-hub-proto/src/astarteplatform.msghub.rs
- uses: actions/checkout@v4
- name: Install protoc
run: |
curl -LO $PB_REL/download/v$PB_VER/protoc-$PB_VER-linux-x86_64.zip
unzip protoc-$PB_VER-linux-x86_64.zip -d $HOME/.local
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Remove Rust old code
run: (! test -f ./astarte-message-hub-proto/src/astarteplatform.msghub.rs) || rm ./astarte-message-hub-proto/src/astarteplatform.msghub.rs
working-directory: ./rust/
- name: Generate Rust code with cargo build
run: cargo run -- --proto-directory ../../proto --out ../astarte-message-hub-proto/src/
working-directory: ./rust/rust-codegen
- name: Upload Rust code
uses: actions/upload-artifact@v4
with:
name: rust-dist
path: ./rust/astarte-message-hub-proto/src/astarteplatform.msghub.rs
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ target/

# Codegen output directory
output/

.pre-commit-config.yaml
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ 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).

## [Unreleased]

### Changed

- Bump Rust MSRV to 1.72.0.
- Update protoc to version 26.1

## [0.6.1] - 2023-12-21

### Changed
Expand Down
5 changes: 3 additions & 2 deletions python/astarteplatform/msghub/astarte_message_pb2.py

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

4 changes: 2 additions & 2 deletions python/astarteplatform/msghub/astarte_message_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Opti
DESCRIPTOR: _descriptor.FileDescriptor

class AstarteMessage(_message.Message):
__slots__ = ["interface_name", "path", "astarte_data", "astarte_unset", "timestamp"]
__slots__ = ("interface_name", "path", "astarte_data", "astarte_unset", "timestamp")
INTERFACE_NAME_FIELD_NUMBER: _ClassVar[int]
PATH_FIELD_NUMBER: _ClassVar[int]
ASTARTE_DATA_FIELD_NUMBER: _ClassVar[int]
Expand All @@ -21,5 +21,5 @@ class AstarteMessage(_message.Message):
def __init__(self, interface_name: _Optional[str] = ..., path: _Optional[str] = ..., astarte_data: _Optional[_Union[_astarte_type_pb2.AstarteDataType, _Mapping]] = ..., astarte_unset: _Optional[_Union[AstarteUnset, _Mapping]] = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...

class AstarteUnset(_message.Message):
__slots__ = []
__slots__ = ()
def __init__(self) -> None: ...
7 changes: 4 additions & 3 deletions python/astarteplatform/msghub/astarte_type_pb2.py

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

22 changes: 11 additions & 11 deletions python/astarteplatform/msghub/astarte_type_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,51 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map
DESCRIPTOR: _descriptor.FileDescriptor

class AstarteDoubleArray(_message.Message):
__slots__ = ["values"]
__slots__ = ("values",)
VALUES_FIELD_NUMBER: _ClassVar[int]
values: _containers.RepeatedScalarFieldContainer[float]
def __init__(self, values: _Optional[_Iterable[float]] = ...) -> None: ...

class AstarteIntegerArray(_message.Message):
__slots__ = ["values"]
__slots__ = ("values",)
VALUES_FIELD_NUMBER: _ClassVar[int]
values: _containers.RepeatedScalarFieldContainer[int]
def __init__(self, values: _Optional[_Iterable[int]] = ...) -> None: ...

class AstarteBooleanArray(_message.Message):
__slots__ = ["values"]
__slots__ = ("values",)
VALUES_FIELD_NUMBER: _ClassVar[int]
values: _containers.RepeatedScalarFieldContainer[bool]
def __init__(self, values: _Optional[_Iterable[bool]] = ...) -> None: ...

class AstarteLongIntegerArray(_message.Message):
__slots__ = ["values"]
__slots__ = ("values",)
VALUES_FIELD_NUMBER: _ClassVar[int]
values: _containers.RepeatedScalarFieldContainer[int]
def __init__(self, values: _Optional[_Iterable[int]] = ...) -> None: ...

class AstarteStringArray(_message.Message):
__slots__ = ["values"]
__slots__ = ("values",)
VALUES_FIELD_NUMBER: _ClassVar[int]
values: _containers.RepeatedScalarFieldContainer[str]
def __init__(self, values: _Optional[_Iterable[str]] = ...) -> None: ...

class AstarteBinaryBlobArray(_message.Message):
__slots__ = ["values"]
__slots__ = ("values",)
VALUES_FIELD_NUMBER: _ClassVar[int]
values: _containers.RepeatedScalarFieldContainer[bytes]
def __init__(self, values: _Optional[_Iterable[bytes]] = ...) -> None: ...

class AstarteDateTimeArray(_message.Message):
__slots__ = ["values"]
__slots__ = ("values",)
VALUES_FIELD_NUMBER: _ClassVar[int]
values: _containers.RepeatedCompositeFieldContainer[_timestamp_pb2.Timestamp]
def __init__(self, values: _Optional[_Iterable[_Union[_timestamp_pb2.Timestamp, _Mapping]]] = ...) -> None: ...

class AstarteDataTypeObject(_message.Message):
__slots__ = ["object_data"]
__slots__ = ("object_data",)
class ObjectDataEntry(_message.Message):
__slots__ = ["key", "value"]
__slots__ = ("key", "value")
KEY_FIELD_NUMBER: _ClassVar[int]
VALUE_FIELD_NUMBER: _ClassVar[int]
key: str
Expand All @@ -62,7 +62,7 @@ class AstarteDataTypeObject(_message.Message):
def __init__(self, object_data: _Optional[_Mapping[str, AstarteDataTypeIndividual]] = ...) -> None: ...

class AstarteDataTypeIndividual(_message.Message):
__slots__ = ["astarte_double", "astarte_integer", "astarte_boolean", "astarte_long_integer", "astarte_string", "astarte_binary_blob", "astarte_date_time", "astarte_double_array", "astarte_integer_array", "astarte_boolean_array", "astarte_long_integer_array", "astarte_string_array", "astarte_binary_blob_array", "astarte_date_time_array"]
__slots__ = ("astarte_double", "astarte_integer", "astarte_boolean", "astarte_long_integer", "astarte_string", "astarte_binary_blob", "astarte_date_time", "astarte_double_array", "astarte_integer_array", "astarte_boolean_array", "astarte_long_integer_array", "astarte_string_array", "astarte_binary_blob_array", "astarte_date_time_array")
ASTARTE_DOUBLE_FIELD_NUMBER: _ClassVar[int]
ASTARTE_INTEGER_FIELD_NUMBER: _ClassVar[int]
ASTARTE_BOOLEAN_FIELD_NUMBER: _ClassVar[int]
Expand Down Expand Up @@ -94,7 +94,7 @@ class AstarteDataTypeIndividual(_message.Message):
def __init__(self, astarte_double: _Optional[float] = ..., astarte_integer: _Optional[int] = ..., astarte_boolean: bool = ..., astarte_long_integer: _Optional[int] = ..., astarte_string: _Optional[str] = ..., astarte_binary_blob: _Optional[bytes] = ..., astarte_date_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., astarte_double_array: _Optional[_Union[AstarteDoubleArray, _Mapping]] = ..., astarte_integer_array: _Optional[_Union[AstarteIntegerArray, _Mapping]] = ..., astarte_boolean_array: _Optional[_Union[AstarteBooleanArray, _Mapping]] = ..., astarte_long_integer_array: _Optional[_Union[AstarteLongIntegerArray, _Mapping]] = ..., astarte_string_array: _Optional[_Union[AstarteStringArray, _Mapping]] = ..., astarte_binary_blob_array: _Optional[_Union[AstarteBinaryBlobArray, _Mapping]] = ..., astarte_date_time_array: _Optional[_Union[AstarteDateTimeArray, _Mapping]] = ...) -> None: ...

class AstarteDataType(_message.Message):
__slots__ = ["astarte_individual", "astarte_object"]
__slots__ = ("astarte_individual", "astarte_object")
ASTARTE_INDIVIDUAL_FIELD_NUMBER: _ClassVar[int]
ASTARTE_OBJECT_FIELD_NUMBER: _ClassVar[int]
astarte_individual: AstarteDataTypeIndividual
Expand Down
5 changes: 3 additions & 2 deletions python/astarteplatform/msghub/config_pb2.py

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

2 changes: 1 addition & 1 deletion python/astarteplatform/msghub/config_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ from typing import ClassVar as _ClassVar, Optional as _Optional
DESCRIPTOR: _descriptor.FileDescriptor

class ConfigMessage(_message.Message):
__slots__ = ["realm", "device_id", "credentials_secret", "pairing_url", "pairing_token", "grpc_socket_port"]
__slots__ = ("realm", "device_id", "credentials_secret", "pairing_url", "pairing_token", "grpc_socket_port")
REALM_FIELD_NUMBER: _ClassVar[int]
DEVICE_ID_FIELD_NUMBER: _ClassVar[int]
CREDENTIALS_SECRET_FIELD_NUMBER: _ClassVar[int]
Expand Down
5 changes: 3 additions & 2 deletions python/astarteplatform/msghub/message_hub_service_pb2.py

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

5 changes: 3 additions & 2 deletions python/astarteplatform/msghub/node_pb2.py

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

2 changes: 1 addition & 1 deletion python/astarteplatform/msghub/node_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Optional as _Op
DESCRIPTOR: _descriptor.FileDescriptor

class Node(_message.Message):
__slots__ = ["uuid", "interface_jsons"]
__slots__ = ("uuid", "interface_jsons")
UUID_FIELD_NUMBER: _ClassVar[int]
INTERFACE_JSONS_FIELD_NUMBER: _ClassVar[int]
uuid: str
Expand Down
Loading

0 comments on commit 2d28b47

Please sign in to comment.