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(config): Processing is only for managed mode #3146

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

olksdr
Copy link
Contributor

@olksdr olksdr commented Feb 20, 2024

Proxy mode should not allow processing to be enabled.

fix: #3048

#skip-changelog

@olksdr olksdr self-assigned this Feb 20, 2024
@olksdr olksdr requested a review from a team as a code owner February 20, 2024 12:40
@@ -9,6 +9,13 @@ pub fn check_config(config: &Config) -> Result<()> {
);
}

if config.relay_mode() == RelayMode::Proxy && config.processing_enabled() {
anyhow::bail!(
"Processing mode cannot be enabled while in the proxy mode. \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"Processing mode cannot be enabled while in the proxy mode. \
"Processing mode cannot be enabled while in proxy mode. \

if config.relay_mode() == RelayMode::Proxy && config.processing_enabled() {
anyhow::bail!(
"Processing mode cannot be enabled while in the proxy mode. \
Please disable processing or switch to managed mode."
Copy link
Member

Choose a reason for hiding this comment

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

This might incentivize users to enable processing in managed mode, so I would not even mention it here. Side note: Should Processing be a separate mode, i.e. variant of RelayMode, instead of a boolean flag?

Suggested change
Please disable processing or switch to managed mode."
"

@olksdr olksdr merged commit 1c4281d into master Feb 20, 2024
20 checks passed
@olksdr olksdr deleted the fix/proxy-without-processing branch February 20, 2024 13:43
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.

Forbid combination of proxy mode and processing in config
4 participants