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

feat: upgrade logging level of serialization errors to actual errors #723

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

chriswk
Copy link
Member

@chriswk chriswk commented Feb 10, 2025

We had an incident over the weekend where our sandbox instances weren't being updated due to the features response not being parsed, but since it was logged at warn we did not get any notices about this in Slack. This PR upgrades the logging level of parse errors for SSE to error so that our error alerting can trigger and we can know that our upstream is returning invalid data.

@chriswk chriswk self-assigned this Feb 10, 2025
Copy link

github-actions bot commented Feb 10, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

@chriswk chriswk enabled auto-merge (squash) February 10, 2025 08:59
@@ -347,7 +349,7 @@ impl FeatureRefresher {

match serde_json::from_str(&event.data) {
Ok(features) => { refresher.handle_client_features_updated(&token, features, None).await; }
Err(e) => { warn!("Could not parse features response to internal representation: {e:?}");
Err(e) => { tracing::error!("Could not parse features response to internal representation: {e:?}");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this is the relevant change, shouldn't we use the same match serde_json::from_str in line 424 and 425 when reading deltas?

Copy link
Contributor

@gastonfournier gastonfournier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG! Just noticed a potential improvement that can be dealt with in another PR

@chriswk chriswk merged commit 7cc085d into main Feb 10, 2025
17 checks passed
@chriswk chriswk deleted the feat/serializationFailureIsAnError branch February 10, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants