Skip to content

Commit

Permalink
Upgrade tonic and prost (project-akri#593)
Browse files Browse the repository at this point in the history
* Use upstream version of h2

Go back to upstream h2 version as the go-grpc bug is long solved

Signed-off-by: Nicolas Belouin <[email protected]>

* webhook: Upgrade actix

Upgrade actix, actix-web and actix-rt to latest,
This solves the following audit issues:
 - RUSTSEC-2020-0016
 - RUSTSEC-2020-0056
 - RUSTSEC-2021-0124
 - RUSTSEC-2023-0034

Signed-off-by: Nicolas Belouin <[email protected]>

* Update all dependencies

Opcua crate patch update required because of
[opcua#294](locka99/opcua#294)

h2 patch needed because of the bad/missing Authority header, using
upstream PR branch for this
[h2#612](hyperium/h2#612)

Signed-off-by: Nicolas Belouin <[email protected]>

* Upgrade to 2021 edition

This is needed to be able to upgrade prost dependency

Signed-off-by: Nicolas Belouin <[email protected]>

* Update to rust 1.73.0

Signed-off-by: Nicolas Belouin <[email protected]>

* Fix clippy errors/warning with new rust version and edition

Signed-off-by: Nicolas Belouin <[email protected]>

* Update tonic and prost

Signed-off-by: Nicolas Belouin <[email protected]>

* Change uri used for patched h2

Signed-off-by: Nicolas Belouin <[email protected]>

* Update patch version

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Remove patch for opcua as upstream made release

Signed-off-by: Nicolas Belouin <[email protected]>

* Also upgrade mockall

Signed-off-by: Nicolas Belouin <[email protected]>

---------

Signed-off-by: Nicolas Belouin <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
diconico07 and github-actions[bot] authored Jan 23, 2024
1 parent a0a173c commit 58e2371
Show file tree
Hide file tree
Showing 30 changed files with 2,127 additions and 2,159 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ jobs:
toolchain: 1.73.0
components: clippy, rustfmt
- name: Install Linux requirements
# TODO: When ubuntu-latest gets updated to >= 23.04 replace the wget+unzip with just protobuf-compiler in apt
run: |
apt_dependencies="git curl libssl-dev pkg-config libudev-dev libv4l-dev"
echo "Run apt update and apt install the following dependencies: $apt_dependencies"
sudo apt update
sudo apt install -y $apt_dependencies
echo "Download and install recent enough protobuf compiler"
wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip && sudo unzip protoc-24.3-linux-x86_64.zip bin/protoc -d /usr
- name: Check rust format
run: cargo fmt --all -- --check
- name: Check clippy
Expand All @@ -49,10 +52,6 @@ jobs:
run: cargo clippy --all-targets --all-features -- -D warnings -A clippy::derive_partial_eq_without_eq
- name: Run check
run: cargo check
- name: Check for H2 patch not being applied
run: |
cargo check >& h2-check.txt
cat h2-check.txt | grep "h2" | grep "was not used in the crate graph" | wc -l | grep 0
- name: Run tests
run: cargo test
- name: Run tests --ignored
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-tarpaulin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:
persist-credentials: false

- name: Create tarpaulin instance
run: docker create --network host --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin:0.25.1 bash -c "echo 'sleep 600m; echo bye' > /tmp/keep_alive.sh; chmod 777 /tmp/keep_alive.sh; /tmp/keep_alive.sh" > container_id.txt
run: docker create --network host --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin:0.27.1 bash -c "echo 'sleep 600m; echo bye' > /tmp/keep_alive.sh; chmod 777 /tmp/keep_alive.sh; /tmp/keep_alive.sh" > container_id.txt
- name: Start tarpaulin instance
run: docker start $(cat container_id.txt)
- name: Install linux requirement in tarpaulin instance
run: docker exec $(cat container_id.txt) sh -c "echo Run apt update and apt install the following dependencies - git curl libssl-dev pkg-config libudev-dev libv4l-dev ; apt update ; apt install -y git curl libssl-dev pkg-config libudev-dev libv4l-dev"
run: docker exec $(cat container_id.txt) sh -c "echo Run apt update and apt install the following dependencies - git curl libssl-dev pkg-config libudev-dev libv4l-dev protobuf-compiler ; apt update ; apt install -y git curl libssl-dev pkg-config libudev-dev libv4l-dev protobuf-compiler"
- name: Install desired rust version
run: docker exec $(cat container_id.txt) sh -c "rustup install $CARGO_VERSION"
- name: Tell cargo to use desired rust version
Expand Down
Loading

0 comments on commit 58e2371

Please sign in to comment.