Skip to content

Commit

Permalink
Bump gcp-queryclient version to prepare for some PRs that don't build…
Browse files Browse the repository at this point in the history
… due to mism… (#20905)

## Description 

Have some soon to land PRs that have some conflicts with deps of
gcp-bigqueryclient, so it seems that just bumping to v0.20.0 works, but
v0.25.0 (latest one) does not work, so kept like this for now.

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:

---------

Co-authored-by: Brandon Williams <[email protected]>
  • Loading branch information
stefan-mysten and bmwill authored Jan 23, 2025
1 parent 1357d61 commit 3618428
Show file tree
Hide file tree
Showing 14 changed files with 483 additions and 364 deletions.
710 changes: 411 additions & 299 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ moka = { version = "0.12", default-features = false, features = [
"atomic64",
] }
more-asserts = "0.3.1"
msim = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "2a170f4cd81c5cd10f5e4a5e810068f3045f41b6", package = "msim" }
msim-macros = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "2a170f4cd81c5cd10f5e4a5e810068f3045f41b6", package = "msim-macros" }
msim = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "e06fc6fa9aeb978ffc621f8b27c06a404042279f", package = "msim" }
msim-macros = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "e06fc6fa9aeb978ffc621f8b27c06a404042279f", package = "msim-macros" }
multiaddr = "0.17.0"
nexlint = { git = "https://github.com/nextest-rs/nexlint.git", rev = "7ce56bd591242a57660ed05f14ca2483c37d895b" }
nexlint-lints = { git = "https://github.com/nextest-rs/nexlint.git", rev = "7ce56bd591242a57660ed05f14ca2483c37d895b" }
Expand Down Expand Up @@ -457,7 +457,7 @@ scopeguard = "1.1"
serde = { version = "1.0.144", features = ["derive", "rc"] }
serde-env = "0.2.0"
serde-name = "0.2.1"
serde-reflection = "0.3.6"
serde-reflection = "0.5"
serde_json = { version = "1.0.95", features = ["preserve_order"] }
serde_repr = "0.1"
serde_test = "1.0.147"
Expand Down Expand Up @@ -487,7 +487,7 @@ tempfile = "3.3.0"
test-fuzz = "3.0.4"
thiserror = "1.0.40"
tiny-bip39 = "1.0.0"
tokio = "1.36.0"
tokio = "1.43.0"
tokio-retry = "0.3"
tokio-rustls = { version = "0.26", default-features = false, features = [
"tls12",
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-analytics-indexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ sui-json-rpc-types.workspace = true
sui-package-resolver.workspace = true
simulacrum.workspace = true
arrow.workspace = true
gcp-bigquery-client = "0.18.0"
gcp-bigquery-client = "0.25.0"
snowflake-api.workspace = true
tap.workspace = true

Expand Down
8 changes: 5 additions & 3 deletions crates/sui-analytics-indexer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ use crate::tables::{
use crate::writers::csv_writer::CSVWriter;
use crate::writers::parquet_writer::ParquetWriter;
use crate::writers::AnalyticsWriter;
use gcp_bigquery_client::model::query_response::ResultSet;

pub mod analytics_metrics;
pub mod analytics_processor;
Expand Down Expand Up @@ -252,13 +253,14 @@ impl BQMaxCheckpointReader {
#[async_trait::async_trait]
impl MaxCheckpointReader for BQMaxCheckpointReader {
async fn max_checkpoint(&self) -> Result<i64> {
let mut result = self
let result = self
.client
.job()
.query(&self.project_id, QueryRequest::new(&self.query))
.await?;
if result.next_row() {
let max_checkpoint = result.get_i64(0)?.ok_or(anyhow!("No rows returned"))?;
let mut result_set = ResultSet::new_from_query_response(result);
if result_set.next_row() {
let max_checkpoint = result_set.get_i64(0)?.ok_or(anyhow!("No rows returned"))?;
Ok(max_checkpoint)
} else {
Ok(-1)
Expand Down
11 changes: 9 additions & 2 deletions crates/sui-core/src/generate_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ use sui_types::execution_status::{
TypeArgumentError,
};
use sui_types::full_checkpoint_content::{CheckpointData, CheckpointTransaction};
use sui_types::messages_checkpoint::CertifiedCheckpointSummary;
use sui_types::messages_checkpoint::{CertifiedCheckpointSummary, CheckpointCommitment};
use sui_types::messages_consensus::ConsensusDeterminedVersionAssignments;
use sui_types::messages_grpc::ObjectInfoRequestKind;
use sui_types::move_package::TypeOrigin;
use sui_types::object::Object;
use sui_types::transaction::{SenderSignedData, TransactionData};
use sui_types::transaction::{GenesisObject, SenderSignedData, TransactionData};
use sui_types::type_input::{StructInput, TypeInput};
use sui_types::{
base_types::MoveObjectType_,
Expand Down Expand Up @@ -280,6 +280,13 @@ fn get_registry() -> Result<Registry> {

tracer.trace_type::<CheckpointData>(&samples).unwrap();

tracer.trace_type::<TransactionData>(&samples).unwrap();
tracer.trace_type::<GenesisObject>(&samples).unwrap();
tracer.trace_type::<CheckpointCommitment>(&samples).unwrap();
tracer
.trace_type::<sui_types::object::Authenticator>(&samples)
.unwrap();

tracer.registry()
}

Expand Down
40 changes: 20 additions & 20 deletions crates/sui-core/tests/staged/sui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1120,29 +1120,29 @@ TypeInput:
0:
bool: UNIT
1:
u8: UNIT
U8: UNIT
2:
u64: UNIT
U64: UNIT
3:
u128: UNIT
U128: UNIT
4:
address: UNIT
Address: UNIT
5:
signer: UNIT
Signer: UNIT
6:
vector:
Vector:
NEWTYPE:
TYPENAME: TypeInput
7:
struct:
Struct:
NEWTYPE:
TYPENAME: StructInput
8:
u16: UNIT
U16: UNIT
9:
u32: UNIT
U32: UNIT
10:
u256: UNIT
U256: UNIT
TypeOrigin:
STRUCT:
- module_name: STR
Expand All @@ -1152,31 +1152,31 @@ TypeOrigin:
TypeTag:
ENUM:
0:
bool: UNIT
Bool: UNIT
1:
u8: UNIT
U8: UNIT
2:
u64: UNIT
U64: UNIT
3:
u128: UNIT
U128: UNIT
4:
address: UNIT
Address: UNIT
5:
signer: UNIT
Signer: UNIT
6:
vector:
Vector:
NEWTYPE:
TYPENAME: TypeTag
7:
struct:
NEWTYPE:
TYPENAME: StructTag
8:
u16: UNIT
U16: UNIT
9:
u32: UNIT
U32: UNIT
10:
u256: UNIT
U256: UNIT
TypedStoreError:
ENUM:
0:
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-graphql-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"

[dependencies]
anyhow.workspace = true
async-graphql = {workspace = true, features = ["dataloader", "apollo_tracing", "tracing", "opentelemetry"] }
async-graphql = {workspace = true, features = ["dataloader", "apollo_tracing", "tracing"] }
async-graphql-axum.workspace = true
async-graphql-value.workspace = true
async-trait.workspace = true
Expand Down
4 changes: 3 additions & 1 deletion crates/sui-json-rpc/src/coin_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,9 @@ mod tests {
let error_object = response.unwrap_err();
let expected = expect!["-32000"];
expected.assert_eq(&error_object.code().to_string());
let expected = expect!["task 1 panicked"];
let expected = expect![[
r#"task 1 panicked with message "MockKeyValueStore::multi_get(?, ?): No matching expectation found""#
]];
expected.assert_eq(error_object.message());
}

Expand Down
2 changes: 1 addition & 1 deletion crates/sui-mvr-graphql-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"

[dependencies]
anyhow.workspace = true
async-graphql = {workspace = true, features = ["dataloader", "apollo_tracing", "tracing", "opentelemetry"] }
async-graphql = {workspace = true, features = ["dataloader", "apollo_tracing", "tracing"] }
async-graphql-axum.workspace = true
async-graphql-value.workspace = true
async-trait.workspace = true
Expand Down
10 changes: 5 additions & 5 deletions crates/telemetry-subscribers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ prometheus.workspace = true
tracing.workspace = true
tracing-appender.workspace = true
tracing-subscriber.workspace = true
opentelemetry = { version = "0.25.0" }
opentelemetry_sdk = { version = "0.25.0", features = ["rt-tokio"] }
opentelemetry-otlp = { version = "0.25.0", features = ["grpc-tonic"] }
tracing-opentelemetry = { version = "0.26.0" }
opentelemetry-proto = { version = "0.25" }
opentelemetry = { version = "0.27.1" }
opentelemetry_sdk = { version = "0.27.1", features = ["rt-tokio"] }
opentelemetry-otlp = { version = "0.27.0", features = ["grpc-tonic"] }
tracing-opentelemetry = { version = "0.28.0" }
opentelemetry-proto = { version = "0.27" }
tokio = { workspace = true, features = ["full"] }
futures.workspace = true
clap.workspace = true
Expand Down
40 changes: 18 additions & 22 deletions crates/telemetry-subscribers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,13 +381,11 @@ impl TelemetryConfig {

if config.enable_otlp_tracing {
let trace_file = env::var("TRACE_FILE").ok();

let config = opentelemetry_sdk::trace::Config::default()
.with_resource(Resource::new(vec![opentelemetry::KeyValue::new(
"service.name",
service_name.clone(),
)]))
.with_sampler(Sampler::ParentBased(Box::new(sampler.clone())));
let resource = Resource::new(vec![opentelemetry::KeyValue::new(
"service.name",
service_name.clone(),
)]);
let sampler = Sampler::ParentBased(Box::new(sampler.clone()));

// We can either do file output or OTLP, but not both. tracing-opentelemetry
// only supports a single tracer at a time.
Expand All @@ -398,7 +396,8 @@ impl TelemetryConfig {
let processor = BatchSpanProcessor::builder(exporter, runtime::Tokio).build();

let p = TracerProvider::builder()
.with_config(config)
.with_resource(resource)
.with_sampler(sampler)
.with_span_processor(processor)
.build();

Expand All @@ -409,20 +408,17 @@ impl TelemetryConfig {
} else {
let endpoint = env::var("OTLP_ENDPOINT")
.unwrap_or_else(|_| "http://localhost:4317".to_string());

let p = opentelemetry_otlp::new_pipeline()
.tracing()
.with_exporter(
opentelemetry_otlp::new_exporter()
.tonic()
.with_endpoint(endpoint),
)
.with_trace_config(config)
.install_batch(runtime::Tokio)
.expect("Could not create async Tracer");

let tracer = p.tracer(service_name);

let otlp_exporter = opentelemetry_otlp::SpanExporter::builder()
.with_tonic()
.with_endpoint(endpoint)
.build()
.unwrap();
let tracer_provider = opentelemetry_sdk::trace::TracerProvider::builder()
.with_resource(resource)
.with_sampler(sampler)
.with_batch_exporter(otlp_exporter, runtime::Tokio)
.build();
let tracer = tracer_provider.tracer(service_name);
tracing_opentelemetry::layer().with_tracer(tracer)
};

Expand Down
2 changes: 1 addition & 1 deletion external-crates/move/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ regex = "1.5.5"
ripemd160 = "0.9.1"
serde = { version = "1.0.124", features = ["derive"] }
serde-name = "0.1.1"
serde-reflection = "0.3.2"
serde-reflection = "0.5"
serde_bytes = "0.11.5"
serde_json = "1.0.64"
serde_yaml = "0.8.26"
Expand Down
4 changes: 2 additions & 2 deletions scripts/simtest/cargo-simtest
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ if [ -n "$LOCAL_MSIM_PATH" ]; then
else
cargo_patch_args=(
--config 'patch.crates-io.tokio.git = "https://github.com/MystenLabs/mysten-sim.git"'
--config 'patch.crates-io.tokio.rev = "2a170f4cd81c5cd10f5e4a5e810068f3045f41b6"'
--config 'patch.crates-io.tokio.rev = "e06fc6fa9aeb978ffc621f8b27c06a404042279f"'
--config 'patch.crates-io.futures-timer.git = "https://github.com/MystenLabs/mysten-sim.git"'
--config 'patch.crates-io.futures-timer.rev = "2a170f4cd81c5cd10f5e4a5e810068f3045f41b6"'
--config 'patch.crates-io.futures-timer.rev = "e06fc6fa9aeb978ffc621f8b27c06a404042279f"'
)
fi

Expand Down
4 changes: 2 additions & 2 deletions scripts/simtest/config-patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ index c0829bc1b6..4007f97d66 100644
include_dir = "0.7.3"

[patch.crates-io]
+tokio = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "2a170f4cd81c5cd10f5e4a5e810068f3045f41b6" }
+futures-timer = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "2a170f4cd81c5cd10f5e4a5e810068f3045f41b6" }
+tokio = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "e06fc6fa9aeb978ffc621f8b27c06a404042279f" }
+futures-timer = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "e06fc6fa9aeb978ffc621f8b27c06a404042279f" }

0 comments on commit 3618428

Please sign in to comment.