Skip to content

Commit 90eb7c5

Browse files
Bug 2002305 - Fix record parsing in Nimbus (#7105)
Because we are no longer making HTTP requests to the Remote Settings endpoint and are instead using the RemoteSettingsService in the SDK, we are getting different data back -- we get the actual records themselves instead of the HTTP payload that contains some metadata. This was refactored incorrectly in a2b2981 and broke experiment fetching.
1 parent 4bbc24e commit 90eb7c5

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

components/nimbus/src/stateful/client/http_client.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ impl SettingsClient for Arc<RemoteSettingsClient> {
3131
let records = self.get_records(true).ok_or(RemoteSettingsError::Other {
3232
reason: "Unable to fetch experiment records".to_owned(),
3333
})?;
34-
let data_vec: Vec<_> = records
35-
.into_iter()
36-
.map(|r| r.fields.get("data").cloned())
37-
.collect();
38-
let wrapped_data = json!({ "data": data_vec });
34+
let wrapped_data = json!({ "data": records });
3935
let resp = serde_json::to_string(&wrapped_data).map_err(|e| {
4036
NimbusError::JSONError(
4137
"SettingsClient::fetch_experiments resp = serde_json::to_string".to_owned(),

0 commit comments

Comments
 (0)