Skip to content

Commit

Permalink
fix(CI): Fix cargo deny (#1106)
Browse files Browse the repository at this point in the history
* chore(dependencies): Update jsonrpsee and related dependencies

* replace todos

* update dependencies

* dprint

* feature

* update baselines and license

* Switch from ethers to alloy

* merge

* Fix mock provider and a bug in the ws impl

* update arrow/parquet

* fix tokio dependency msim compatability

* install crypto provider and other misc

* update pcg crate usage and use vendored openssl

* test fixes

* more fixes and clippy

* baselines and more clippy

* disable mysticeti simtests too

* fix test and fmt

* roll back gcp-bigquery-client version

* fix bug in mock provider and cleanup

* remove outdated doc comment

* replace B256 with TxHash

* simplify

* comment

* remove merge problem

* fix  graphql-rpc job

* Add prost to git allow

* clippy

* update dependencies

* revert commented line

* fix borked merge

* move rustfmt skip

* Reviews

* Add comment explaining TlsAcceptor

* remove axum macros feature usage

* review and update dependencies

* remove yaml_rust RUSTSEC ignore

* reviews

* cleanup helper functions

* move import

---------

Co-authored-by: Thibault Martinez <[email protected]>
  • Loading branch information
DaughterOfMars and thibault-martinez authored Jul 26, 2024
1 parent 5d00979 commit 10b8c51
Show file tree
Hide file tree
Showing 117 changed files with 2,756 additions and 2,277 deletions.
9 changes: 4 additions & 5 deletions crates/iota-analytics-indexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = false

[dependencies]
anyhow.workspace = true
arrow = { version = "50.0.0" }
arrow.workspace = true
arrow-array.workspace = true
async-trait.workspace = true
axum.workspace = true
Expand All @@ -20,7 +20,7 @@ clap.workspace = true
csv.workspace = true
eyre.workspace = true
fastcrypto = { workspace = true, features = ["copy_key"] }
gcp-bigquery-client = "0.18.0"
gcp-bigquery-client = "0.20.0"
iota-analytics-indexer-derive.workspace = true
iota-config.workspace = true
iota-indexer.workspace = true
Expand All @@ -41,10 +41,9 @@ rocksdb.workspace = true
serde.workspace = true
serde_json.workspace = true
simulacrum.workspace = true
snowflake-api = { version = "0.6.0" }
snowflake-api = { version = "0.9.0" }
strum.workspace = true
strum_macros.workspace = true
tap = { version = "1.0.1", features = [] }
tap = "1.0.1"
telemetry-subscribers.workspace = true
tempfile.workspace = true
thiserror.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions crates/iota-analytics-indexer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use num_enum::{IntoPrimitive, TryFromPrimitive};
use object_store::path::Path;
use serde::{Deserialize, Serialize};
use snowflake_api::{QueryResult, SnowflakeApi};
use strum_macros::EnumIter;
use strum::EnumIter;
use tracing::info;

use crate::{
Expand Down Expand Up @@ -270,7 +270,7 @@ impl MaxCheckpointReader for NoOpCheckpointReader {
Eq,
PartialEq,
Parser,
strum_macros::Display,
strum::Display,
ValueEnum,
Serialize,
Deserialize,
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-analytics-indexer/src/tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use iota_analytics_indexer_derive::SerializeParquet;
use iota_types::dynamic_field::DynamicFieldType;
use serde::Serialize;
use strum_macros::Display;
use strum::Display;

use crate::{ParquetSchema, ParquetValue};

Expand Down
1 change: 1 addition & 0 deletions crates/iota-aws-orchestrator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ publish = false
[dependencies]
async-trait.workspace = true
aws-config.workspace = true
aws-runtime.workspace = true
aws-sdk-ec2.workspace = true
aws-smithy-http.workspace = true
aws-smithy-runtime-api.workspace = true
Expand Down
26 changes: 11 additions & 15 deletions crates/iota-aws-orchestrator/src/client/aws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{
fmt::{Debug, Display},
};

use aws_config::profile::profile_file::{ProfileFileKind, ProfileFiles};
use aws_runtime::env_config::file::{EnvConfigFileKind, EnvConfigFiles};
use aws_sdk_ec2::{
config::Region,
primitives::Blob,
Expand All @@ -16,7 +16,7 @@ use aws_sdk_ec2::{
TagSpecification, VolumeType,
},
};
use aws_smithy_http::result::SdkError;
use aws_smithy_runtime_api::client::result::SdkError;
use serde::Serialize;

use super::{Instance, ServerProviderClient};
Expand Down Expand Up @@ -56,9 +56,9 @@ impl AwsClient {

/// Make a new AWS client.
pub async fn new(settings: Settings) -> Self {
let profile_files = ProfileFiles::builder()
.with_file(ProfileFileKind::Credentials, &settings.token_file)
.with_contents(ProfileFileKind::Config, "[default]\noutput=json")
let profile_files = EnvConfigFiles::builder()
.with_file(EnvConfigFileKind::Credentials, &settings.token_file)
.with_contents(EnvConfigFileKind::Config, "[default]\noutput=json")
.build();

let mut clients = HashMap::new();
Expand Down Expand Up @@ -146,7 +146,7 @@ impl AwsClient {
// Parse the response to select the first returned image id.
response
.images()
.and_then(|images| images.first())
.first()
.ok_or_else(|| CloudProviderError::RequestError("Cannot find image id".into()))?
.image_id
.clone()
Expand Down Expand Up @@ -223,7 +223,7 @@ impl AwsClient {
let response = request.send().await?;

// Return true if the response contains references to NVMe drives.
if let Some(info) = response.instance_types().and_then(|x| x.first()) {
if let Some(info) = response.instance_types().first() {
if let Some(info) = info.instance_storage_info() {
if info.nvme_support() == Some(&EphemeralNvmeSupport::Required) {
return Ok(true);
Expand All @@ -247,13 +247,9 @@ impl ServerProviderClient for AwsClient {
let mut instances = Vec::new();
for (region, client) in &self.clients {
let request = client.describe_instances().filters(filter.clone());
if let Some(reservations) = request.send().await?.reservations() {
for reservation in reservations {
if let Some(aws_instances) = reservation.instances() {
for instance in aws_instances {
instances.push(self.make_instance(region.clone(), instance));
}
}
for reservation in request.send().await?.reservations() {
for instance in reservation.instances() {
instances.push(self.make_instance(region.clone(), instance));
}
}
}
Expand Down Expand Up @@ -355,7 +351,7 @@ impl ServerProviderClient for AwsClient {
let response = request.send().await?;
let instance = &response
.instances()
.and_then(|x| x.first())
.first()
.expect("AWS instances list should contain instances");

Ok(self.make_instance(region, instance))
Expand Down
1 change: 0 additions & 1 deletion crates/iota-benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ roaring.workspace = true
serde.workspace = true
serde_json.workspace = true
strum.workspace = true
strum_macros.workspace = true
telemetry-subscribers.workspace = true
tokio = { workspace = true, features = ["full"] }
tokio-util.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-benchmark/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use std::str::FromStr;

use clap::*;
use strum_macros::EnumString;
use strum::EnumString;

use crate::drivers::Interval;

Expand Down
5 changes: 2 additions & 3 deletions crates/iota-benchmark/src/workloads/adversarial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ use rand::{
Rng,
};
use regex::Regex;
use strum::{EnumCount, IntoEnumIterator};
use strum_macros::{EnumCount as EnumCountMacro, EnumIter};
use strum::{EnumCount, EnumIter, IntoEnumIterator};
use tracing::debug;

use super::{
Expand All @@ -45,7 +44,7 @@ const NUM_VECTORS: u64 = 1_000;

// TODO: Need to fix Large* workloads, which are currently failing due to
// InsufficientGas
#[derive(Debug, EnumCountMacro, EnumIter, Clone)]
#[derive(Debug, EnumCount, EnumIter, Clone)]
pub enum AdversarialPayloadType {
Random = 0,
LargeObjects,
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-core/src/authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4293,7 +4293,7 @@ impl AuthorityState {
desired_upgrades.sort();
desired_upgrades
.into_iter()
.group_by(|(packages, _authority)| packages.clone())
.chunk_by(|(packages, _authority)| packages.clone())
.into_iter()
.find_map(|(packages, group)| {
// should have been filtered out earlier.
Expand Down
8 changes: 5 additions & 3 deletions crates/iota-core/src/generate_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ use iota_types::{
},
utils::DEFAULT_ADDRESS_SEED,
};
use move_bytecode_utils::layout::YamlRegistry;
use move_core_types::language_storage::{StructTag, TypeTag};
use pretty_assertions::assert_str_eq;
use rand::{rngs::StdRng, SeedableRng};
use serde_reflection::{Registry, Result, Samples, Tracer, TracerConfig};
use serde_reflection::{Result, Samples, Tracer, TracerConfig};
use shared_crypto::intent::{Intent, IntentMessage, PersonalMessage};
use typed_store::TypedStoreError;
fn get_registry() -> Result<Registry> {

fn get_registry() -> Result<YamlRegistry> {
let config = TracerConfig::default()
.record_samples_for_structs(true)
.record_samples_for_newtype_structs(true);
Expand Down Expand Up @@ -176,7 +178,7 @@ fn get_registry() -> Result<Registry> {
tracer.trace_type::<CheckpointContents>(&samples)?;
tracer.trace_type::<CheckpointSummary>(&samples)?;

tracer.registry()
Ok(YamlRegistry(tracer.registry()?))
}

#[derive(Debug, Parser, Clone, Copy, ValueEnum)]
Expand Down
Loading

0 comments on commit 10b8c51

Please sign in to comment.