Skip to content

Commit d1b6b03

Browse files
authored
Graham/fh 991 feature flapping (#1643)
* Update detsys-ids-client to 0.6 * Fixups for dsidsc 0.6
1 parent 44e9257 commit d1b6b03

File tree

6 files changed

+51
-69
lines changed

6 files changed

+51
-69
lines changed

Cargo.lock

Lines changed: 35 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async-trait = { version = "0.1.57", default-features = false }
2323
bytes = { version = "1.2.1", default-features = false, features = ["std", "serde"] }
2424
clap = { version = "4", features = ["std", "color", "usage", "help", "error-context", "suggestions", "derive", "env"], optional = true }
2525
color-eyre = { version = "0.6.2", default-features = false, features = [ "track-caller", "issue-url", "tracing-error", "capture-spantrace", "color-spantrace" ], optional = true }
26-
detsys-ids-client = { version = "0.5", optional = true }
26+
detsys-ids-client = { version = "0.6", optional = true }
2727
eyre = { version = "0.6.8", default-features = false, features = [ "track-caller" ], optional = true }
2828
glob = { version = "0.3.0", default-features = false }
2929
nix = { version = "0.29.0", default-features = false, features = ["user", "fs", "process", "term"] }

src/diagnostics.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ impl DiagnosticData {
145145
}
146146
let (ids_client, ids_worker) = builder.build_or_default().await;
147147

148+
ids_client
149+
.wait_for_checkin(Some(std::time::Duration::from_millis(500)))
150+
.await
151+
.ok();
152+
148153
Ok((Self { ids_client }, ids_worker))
149154
}
150155

@@ -197,7 +202,9 @@ impl ErrorDiagnostic for DiagnosticError {
197202
}
198203

199204
impl crate::feedback::Feedback for DiagnosticData {
200-
async fn get_feature_ptr_payload<T: serde::de::DeserializeOwned + Send + std::fmt::Debug>(
205+
async fn get_feature_ptr_payload<
206+
T: serde::ser::Serialize + serde::de::DeserializeOwned + Send + std::fmt::Debug,
207+
>(
201208
&self,
202209
name: impl Into<String> + std::fmt::Debug + Send,
203210
) -> Option<T> {

src/feedback/client.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ pub enum Client {
99
}
1010

1111
impl Feedback for Client {
12-
async fn get_feature_ptr_payload<T: serde::de::DeserializeOwned + Send + std::fmt::Debug>(
12+
async fn get_feature_ptr_payload<
13+
T: serde::ser::Serialize + serde::de::DeserializeOwned + Send + std::fmt::Debug,
14+
>(
1315
&self,
1416
name: impl Into<String> + core::marker::Send + std::fmt::Debug,
1517
) -> Option<T> {

src/feedback/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ pub trait Feedback: Clone + Send + Sync {
77
planner: &crate::planner::BuiltinPlanner,
88
) -> impl std::future::Future<Output = Result<(), crate::planner::PlannerError>> + Send;
99

10-
fn get_feature_ptr_payload<T: serde::de::DeserializeOwned + Send + std::fmt::Debug>(
10+
fn get_feature_ptr_payload<
11+
T: serde::ser::Serialize + serde::de::DeserializeOwned + Send + std::fmt::Debug,
12+
>(
1113
&self,
1214
name: impl Into<String> + Send + std::fmt::Debug,
1315
) -> impl std::future::Future<Output = Option<T>> + Send;

src/profile/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,5 @@ pub async fn get_profile_backend_type(profile: &std::path::Path) -> Option<Backe
102102
}
103103

104104
// If neither of those exist, it can be managed by either, so express no preference.
105-
return None;
105+
None
106106
}

0 commit comments

Comments
 (0)