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

fix(server): Update fields in LimitedProjectConfig [INGEST-1303] #1252

Merged
merged 2 commits into from
Apr 29, 2022

Conversation

jan-auer
Copy link
Member

Adds the recently added session_metrics field to
LimitedProjectConfig, which allows this field to be exposed to
untrusted Relays. In addition to that, this PR adds serde's
skip_serializing_if directive to skip empty fields in the reduced
project config format.

@jan-auer jan-auer self-assigned this Apr 29, 2022
@jan-auer jan-auer requested a review from a team April 29, 2022 19:18
@@ -142,9 +142,15 @@ pub struct LimitedProjectConfig {
pub allowed_domains: Vec<String>,
pub trusted_relays: Vec<PublicKey>,
pub pii_config: Option<PiiConfig>,
#[serde(skip_serializing_if = "DataScrubbingConfig::is_disabled")]
Copy link
Member

Choose a reason for hiding this comment

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

there is a remote derive for ProjectConfig on this struct. Are you sure those things are needed here?

Copy link
Member

Choose a reason for hiding this comment

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

nevermind, I think this makes sense after re-reading how remote works

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure, but it looks to me like an oversight. I will definitely add more tests at a later point.

@jan-auer jan-auer merged commit 551cf08 into master Apr 29, 2022
@jan-auer jan-auer deleted the fix/limited-project-config branch April 29, 2022 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants