Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update cargo-deny-action@v2 #439

Merged
merged 5 commits into from
Mar 4, 2025
Merged

Conversation

chungquantin
Copy link
Collaborator

@chungquantin chungquantin commented Mar 4, 2025

There was an issue with the CI cargo-deny tackled in the PR: EmbarkStudios/cargo-deny-action#91

Hence, we need to update our cargo-deny-action to v2 to sync with the update referenced from restatedev/restate@b16d7da

By updating to V2, unmaintained = "warn" is removed completely and all unmaintained crates now emit errors. As mentioned here

Hence, reported three dependency vulnerabilities due to unmaintained crates.

@chungquantin chungquantin self-assigned this Mar 4, 2025
Copy link

codecov bot commented Mar 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.46%. Comparing base (68ec6d5) to head (9d82d84).
Report is 3 commits behind head on main.

@@            Coverage Diff             @@
##             main     #439      +/-   ##
==========================================
+ Coverage   75.34%   75.46%   +0.11%     
==========================================
  Files          64       64              
  Lines       13973    14108     +135     
  Branches    13973    14108     +135     
==========================================
+ Hits        10528    10646     +118     
- Misses       2098     2100       +2     
- Partials     1347     1362      +15     
Files with missing lines Coverage Δ
crates/pop-parachains/src/relay.rs 83.51% <ø> (ø)

... and 4 files with indirect coverage changes

@chungquantin chungquantin requested a review from AlexD10S March 4, 2025 10:01
@chungquantin chungquantin added the ready-for-final-review The PR is ready for final review label Mar 4, 2025
@AlexD10S
Copy link
Collaborator

AlexD10S commented Mar 4, 2025

The docker issue seems related to the deny, looking at the fix there https://github.com/EmbarkStudios/cargo-deny-action/pull/92/files and the rustup latest release: https://blog.rust-lang.org/2025/03/02/Rustup-1.28.0.html#whats-new-in-rustup-1280

rustup will no longer automatically install the active toolchain if it is not installed.
To ensure its installation, run rustup toolchain install with no arguments.
The following command installs the active toolchain both before and after this change:
rustup show active-toolchain || rustup toolchain install

It seems we have to include this line in the Dockerfile (Before RUN cargo build --release)

RUN rustup show active-toolchain || rustup toolchain install

You can the test docker builds locally:

docker build -t pop .  --platform linux/amd64

Copy link
Collaborator

@AlexD10S AlexD10S left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of unmaintained dependencies is a hassle, but according to the docs:

If you want to ignore a specific advisory, add it to the ignore field

The approach you took makes sense. Approved.
But it would be good to check which libraries depend on the ones with vulnerabilities and see if we can eliminate them by upgrading.

@AlexD10S AlexD10S merged commit 1c0c9f4 into main Mar 4, 2025
20 checks passed
@AlexD10S AlexD10S deleted the chungquantin/chore-deny_action_v2 branch March 4, 2025 21:06
chungquantin added a commit that referenced this pull request Mar 5, 2025
* feat: update parachain templates (#297)

* feat: include new parachain template and remove old one for Parity

* fix: tests

* fix: order in test

* fix: export PATH

* chore: bump zombienet-sdk version

* fix: remove parity evm

* fix: missing changes

* fix: parse collator and parachain-template-node without path for spawn

* chore: remove set PATH

* refactor: functionality and test

* refactor: prefix for external templates

* fix: deprecate old command for generating parity contracts template

* test: update configure_works test to test new functionality

* test: fix unit tests templates

* fix: show deprecation message and fixes

* docs: improve comments

* refactor: nitpicks in parachain description

* fix: logic for substrate-contracts-node without path in config file

* feat: support v3.0.0 of OpenZeppelin templates

* docs: improve template docs and comments

* test: improve comments for clarity

* fix: support different profiles when path is not specified

* refactor: code improvements

* refactor: improve import

* fix: remove onboard.rs empty file (#433)

* chore: update cargo-deny-action@v2 (#439)

* chore: update cargo-deny-action@v2

* chore: revert cargo.lock and add more ignore

* fix: docker missing toolchain

* chore: revert relay.rs changes

* chore: remove vulnerabilities by upgrade zombienet

* feat: `pop bench pallet` logic implementation (#407)

* feat: add bench subcommand

* feat: integrates frame-benchmarking-cli

* refactor: PalletCmd run with spec

* feat: set RUST_LOG=info for benchmarking display

* feat: add CLI messages and tests

* feat: add benchmark runtime wasm test

* chore: fix comment

* fix: operator cannot be applied to type

* chore: display error and refactor test file

* chore: rename `bench` file

* chore: clippy warning

* refactor: parachain feature in bench command

* feat: add bench subcommand

* feat: integrates frame-benchmarking-cli

* refactor: PalletCmd run with spec

* feat: add CLI messages and tests

* feat: add benchmark runtime wasm test

* chore: fix comment

* fix: operator cannot be applied to type

* chore: display error and refactor test file

* chore: rename `bench` file

* chore: clippy warning

* refactor: parachain feature in bench command

* chore: revert mod.rs

* feat: add bench subcommand

* chore: revert mod.rs

* feat: add bench subcommand

* feat: integrates frame-benchmarking-cli

* refactor: PalletCmd run with spec

* feat: set RUST_LOG=info for benchmarking display

* feat: add CLI messages and tests

* feat: add benchmark runtime wasm test

* chore: fix comment

* fix: operator cannot be applied to type

* chore: display error and refactor test file

* chore: rename `bench` file

* chore: clippy warning

* refactor: parachain feature in bench command

* feat: add bench subcommand

* feat: integrates frame-benchmarking-cli

* refactor: PalletCmd run with spec

* feat: add CLI messages and tests

* feat: add benchmark runtime wasm test

* chore: fix comment

* fix: operator cannot be applied to type

* chore: display error and refactor test file

* chore: rename `bench` file

* chore: clippy warning

* refactor: parachain feature in bench command

* chore: revert mod.rs

* feat: add bench subcommand

* chore: revert mod.rs

* chore: revert changes

* feat: benchmark existing runtime binary and select policy, presets (#411)

* feat: add bench subcommand

* feat: integrates frame-benchmarking-cli

* refactor: PalletCmd run with spec

* feat: set RUST_LOG=info for benchmarking display

* feat: add CLI messages and tests

* feat: add benchmark runtime wasm test

* chore: fix comment

* fix: operator cannot be applied to type

* chore: display error and refactor test file

* feat: auto detect wasm blob and build runtime

* feat: build runtime wasm blob

* refactor: build binary path method

* fix: runtime path test

* refactor: feature gating for benchmarking feature

* chore: remove unused argument

* fix: comment

* chore: rename `bench` file

* chore: rename `bench` file

* feat: auto detect wasm blob and build runtime

* feat: build runtime wasm blob

* refactor: build binary path method

* feat: list and select runtimes

* chore: remove unused code

* feat: auto detect wasm blob and build runtime

* feat: build runtime wasm blob

* refactor: build binary path method

* chore: removed duplicate code

* chore: remove spinner

* chore: clippy warning

* chore: clippy warning

* refactor: parachain feature in bench command

* chore: reorder imports

* feat: select genesis builder

* refactor: test helpers

* chore: remove output display

* chore: update parse genesis builder comment

* fix: locate runtime and help command

* chore: clippy warning

* chore: display error message on binary check

* fix: comment

* feat: add genesis preset check (#422)

* feat: add genesis preset check

* feat: update_genesis_preset

* refactor: constant name & add tests for preset

* refactor: get_runtime_path

* refactor: code order

* refactor: test files

* chore: clippy warning

* refactor: list presets instead of manual input

* feat: default to `none` if no presets found

* refactor: build project test instead of runtime

* refactor: separate pallet logic from entry file (#421)

* feat: add bench subcommand

* feat: integrates frame-benchmarking-cli

* refactor: PalletCmd run with spec

* feat: set RUST_LOG=info for benchmarking display

* feat: add CLI messages and tests

* feat: add benchmark runtime wasm test

* chore: fix comment

* fix: operator cannot be applied to type

* chore: display error and refactor test file

* feat: auto detect wasm blob and build runtime

* feat: build runtime wasm blob

* refactor: build binary path method

* fix: runtime path test

* refactor: feature gating for benchmarking feature

* chore: remove unused argument

* fix: comment

* chore: rename `bench` file

* chore: rename `bench` file

* feat: auto detect wasm blob and build runtime

* feat: build runtime wasm blob

* refactor: build binary path method

* feat: list and select runtimes

* chore: remove unused code

* feat: auto detect wasm blob and build runtime

* feat: build runtime wasm blob

* refactor: build binary path method

* chore: removed duplicate code

* chore: remove spinner

* chore: clippy warning

* chore: clippy warning

* refactor: parachain feature in bench command

* chore: reorder imports

* feat: add bench subcommand

* feat: integrates frame-benchmarking-cli

* refactor: PalletCmd run with spec

* feat: set RUST_LOG=info for benchmarking display

* feat: add CLI messages and tests

* feat: add benchmark runtime wasm test

* chore: fix comment

* fix: operator cannot be applied to type

* chore: display error and refactor test file

* chore: rename `bench` file

* chore: clippy warning

* refactor: parachain feature in bench command

* feat: add bench subcommand

* feat: integrates frame-benchmarking-cli

* refactor: PalletCmd run with spec

* feat: add CLI messages and tests

* feat: add benchmark runtime wasm test

* chore: fix comment

* fix: operator cannot be applied to type

* chore: display error and refactor test file

* chore: rename `bench` file

* chore: clippy warning

* refactor: parachain feature in bench command

* chore: revert mod.rs

* feat: select genesis builder

* refactor: test helpers

* chore: remove output display

* chore: update parse genesis builder comment

* fix: locate runtime and help command

* chore: clippy warning

* chore: display error message on binary check

* fix: comment

* feat: add genesis preset check (#422)

* feat: add genesis preset check

* feat: update_genesis_preset

* refactor: constant name & add tests for preset

* refactor: get_runtime_path

* refactor: code order

* refactor: test files

* chore: clippy warning

* refactor: list presets instead of manual input

* feat: default to `none` if no presets found

* refactor: build project test instead of runtime

* chore: rebase

* chore: reformat

* chore: reformat

* chore: rebase

* chore: rebase

* chore: update cargo.lock

* feat: add the filter mode to cli

* chore: rebase

* chore: revert cargo.lock and add more ignore

* chore: update cargo-deny-action@v2

* chore: revert relay.rs changes

* chore: remove vulnerabilities by upgrade zombienet

* chore: rebase

* chore: clippy warning

* chore: revert not relevant changes

---------

Co-authored-by: Alex Bean <alexfraga10@gmail.com>
chungquantin added a commit that referenced this pull request Mar 5, 2025
* chore: update cargo-deny-action@v2

* chore: revert cargo.lock and add more ignore

* fix: docker missing toolchain

* chore: revert relay.rs changes

* chore: remove vulnerabilities by upgrade zombienet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-final-review The PR is ready for final review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants