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(deps): update rust to v1.83.0 #2280

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use std::convert::{Into, TryFrom};
response_derives = "PartialEq, Eq, Debug, Serialize, Deserialize",
deprecated = "warn"
)]

/// This struct is used to generate the module containing `Variables` and
/// `ResponseData` structs.
/// Snake case of this name is the mod name. i.e. graph_introspect_query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ type Timestamp = String;
response_derives = "Eq, PartialEq, Debug, Serialize, Deserialize",
deprecated = "warn"
)]

pub struct ReadmePublishMutation;

pub async fn run(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use graphql_client::*;
response_derives = "Eq, PartialEq, Debug, Serialize, Deserialize",
deprecated = "warn"
)]

pub(crate) struct SubgraphIntrospectQuery;

pub async fn run(
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.82.0"
channel = "1.83.0"
components = [ "rustfmt", "clippy" ]
2 changes: 1 addition & 1 deletion src/composition/supergraph/config/resolve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ pub struct FullyResolvedSubgraphs {

impl FullyResolvedSubgraphs {
#[cfg(test)]
/// Used to create a new set of FullyResolvedSubgraphs for testing purposes
pub fn new(subgraphs: BTreeMap<String, String>) -> FullyResolvedSubgraphs {
FullyResolvedSubgraphs { subgraphs }
}
Expand Down Expand Up @@ -278,7 +279,6 @@ impl From<FullyResolvedSubgraphs> for SupergraphConfig {

#[cfg(test)]
mod tests {

use std::{
collections::{BTreeMap, HashSet},
str::FromStr,
Expand Down
4 changes: 2 additions & 2 deletions src/error/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ impl RoverError {
}

pub(crate) fn get_internal_data_json(&self) -> Value {
return match self.error.downcast_ref::<RoverClientError>() {
match self.error.downcast_ref::<RoverClientError>() {
Some(RoverClientError::CheckWorkflowFailure {
graph_ref: _,
check_response,
}) => check_response.get_json(),
Some(RoverClientError::LintFailures { lint_response }) => lint_response.get_json(),
_ => Value::Null,
};
}
}

pub(crate) fn get_internal_error_json(&self) -> Value {
Expand Down
6 changes: 3 additions & 3 deletions src/options/introspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ pub struct IntrospectOpts {
/// Headers to pass to the endpoint. Values must be key:value pairs.
/// If a value has a space in it, use quotes around the pair,
/// ex. -H "Auth:some key"

// The `value_name` here is for the help text and error messages, to print like
// --header <KEY:VALUE> rather than the plural field name --header <headers>
///
/// The `value_name` here is for the help text and error messages, to print like
/// --header <KEY:VALUE> rather than the plural field name --header <headers>
#[arg(value_name="KEY:VALUE", long="header", short='H', value_parser = parse_header)]
#[serde(skip_serializing)]
pub headers: Option<Vec<(String, String)>>,
Expand Down
8 changes: 4 additions & 4 deletions src/utils/supergraph_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ mod test_get_supergraph_config {
let supergraph_config_path = third_level_folder.path().join("supergraph.yaml");
fs::write(
supergraph_config_path.clone(),
&supergraph_config.into_bytes(),
supergraph_config.into_bytes(),
)
.expect("Could not write supergraph.yaml");

Expand Down Expand Up @@ -1185,7 +1185,7 @@ subgraphs:
routing_url: https://people.example.com
schema:
file: ./people.graphql"#,
latest_fed2_version.to_string()
latest_fed2_version
);
let tmp_home = TempDir::new().unwrap();
let mut config_path = Utf8PathBuf::try_from(tmp_home.path().to_path_buf()).unwrap();
Expand Down Expand Up @@ -1225,7 +1225,7 @@ subgraphs:
routing_url: https://people.example.com
schema:
file: ../../people.graphql"#,
latest_fed2_version.to_string()
latest_fed2_version
);
let tmp_home = TempDir::new().unwrap();
let tmp_dir = Utf8PathBuf::try_from(tmp_home.path().to_path_buf()).unwrap();
Expand Down Expand Up @@ -1279,7 +1279,7 @@ subgraphs:
routing_url: https://people.example.com
schema:
file: ../../people.graphql"#,
latest_fed2_version.to_string()
latest_fed2_version
);
let tmp_home = TempDir::new().unwrap();
let tmp_dir = Utf8PathBuf::try_from(tmp_home.path().to_path_buf()).unwrap();
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ fn run_rover_dev(run_subgraphs_retail_supergraph: &RetailSupergraph) -> String {
if let Ok(version) = env::var("APOLLO_ROVER_DEV_ROUTER_VERSION") {
cmd.env("APOLLO_ROVER_DEV_ROUTER_VERSION", version);
};
#[allow(clippy::zombie_processes)]
cmd.spawn().expect("Could not run rover dev command");
tokio::task::block_in_place(|| {
let handle = tokio::runtime::Handle::current();
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/graph/introspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ async fn e2e_test_rover_graph_introspect_watch(
.expect("Could not create output file");
// Create the Rover command to run the introspection in `--watch` mode
let mut cmd = Command::cargo_bin("rover").expect("Could not find necessary binary");

let mut child = cmd
.args([
"graph",
Expand Down Expand Up @@ -141,6 +142,7 @@ async fn e2e_test_rover_graph_introspect_watch(
info!("Killing rover process...");
// Kill the watch process to ensure the file doesn't change again now
child.kill().expect("Could not kill rover process");
child.wait().expect("Wait for rover process to finish");

info!("Extract new value from file...");
// Get the new result from the file
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::collections::HashMap;
use std::env;
use std::io::BufRead;
use std::io::BufReader;
use std::path::Path;
use std::path::PathBuf;
use std::process::ChildStderr;
use std::time::Duration;
Expand Down
6 changes: 6 additions & 0 deletions tests/e2e/subgraph/introspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ async fn e2e_test_rover_subgraph_introspect_watch(
.expect("Could not create output file");
// Create the Rover command to run the introspection in `--watch` mode
let mut cmd = Command::cargo_bin("rover").expect("Could not find necessary binary");
// TODO: We should return to this once Clippy have stabilised their linting on this issue:
// https://github.com/rust-lang/rust-clippy/pull/13760
#[allow(clippy::zombie_processes)]
let mut child = cmd
.args([
"subgraph",
Expand Down Expand Up @@ -158,6 +161,9 @@ async fn e2e_test_rover_subgraph_introspect_watch(
info!("Killing rover process...");
// Kill the watch process to ensure the file doesn't change again now
child.kill().expect("Could not kill rover process");
child
.wait()
.expect("Could not wait for rover process to finish");

info!("Extract new value from file...");
// Get the new result from the file
Expand Down