-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix: add meta to support new format #622
Conversation
Dependency ReviewThe following issues were found:
License Issuesserver/Cargo.toml
Denied Licenses: GPL-1.0, GPL-2.0, GPL-3.0, LGPL-2.1, LGPL-3.0, AGPL-3.0 OpenSSF ScorecardScorecard details
Scanned Files
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems okay, I think this should work after Yggdrasil gets an update to Unleash Types
Got the build working, but I suspect it should not be None always, but it should pass this value forward from Unleash. |
server/src/feature_cache.rs
Outdated
@@ -99,6 +99,7 @@ fn update_client_features( | |||
s | |||
}), | |||
query: old.query.clone().or(update.query.clone()), | |||
meta: None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be old.meta.clone()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, probably update.meta.clone().or(old.meta.clone())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
server/src/filters.rs
Outdated
@@ -48,6 +48,7 @@ pub(crate) fn filter_client_features( | |||
segments: feature_cache.segments.clone(), | |||
query: feature_cache.query.clone(), | |||
version: feature_cache.version, | |||
meta: None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be feature_cache.meta.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
@@ -90,6 +90,7 @@ pub enum TokenType { | |||
} | |||
|
|||
#[derive(Clone, Debug)] | |||
#[allow(clippy::large_enum_variant)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got error
error: large size difference between variants
--> server/src/types.rs:93:1
|
93 | / pub enum ClientFeaturesResponse {
94 | | NoUpdate(EntityTag),
| | ------------------- the second-largest variant contains at least 32 bytes
95 | | Updated(ClientFeatures, Option<EntityTag>),
| | ------------------------------------------ the largest variant contains at least 256 bytes
96 | | }
| |_^ the entire enum is at least 256 bytes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Giving you a 👍 again. So far, I don't think we use meta too much. Mateusz just confirmed that the node sdk also ignores it for now.
Trying to get tip of main working, but some tests are failing.
I suspect it is related to the new meta field, I added it to all obvious places, but I think its more complex.