mobile: fix setRuntimeGuard Swift API#26013
Merged
jpsim merged 2 commits intoenvoyproxy:mainfrom Mar 9, 2023
jpsim:jp-fix-swift-set-runtime-guard
Merged
mobile: fix setRuntimeGuard Swift API#26013jpsim merged 2 commits intoenvoyproxy:mainfrom jpsim:jp-fix-swift-set-runtime-guard
setRuntimeGuard Swift API#26013jpsim merged 2 commits intoenvoyproxy:mainfrom
jpsim:jp-fix-swift-set-runtime-guard
Conversation
This was never fully hooked up to the C++ builder in `-[EnvoyConfiguration applyToCXXBuilder]`. Signed-off-by: JP Simard <[email protected]>
Augustyniak
reviewed
Mar 9, 2023
| builder.enableBrotliDecompression(self.enableBrotliDecompression); | ||
|
|
||
| for (NSString *key in self.runtimeGuards) { | ||
| BOOL value = [[self.runtimeGuards objectForKey:key] isEqualToString:@"true"]; |
Contributor
There was a problem hiding this comment.
should we apply false's too? For cases when default is equal to true and we want to override with false
Contributor
Author
There was a problem hiding this comment.
This applies true and false equally, as verified by the tests.
If you call .setRuntimeGuard("abc", false) from Swift then that gets mapped to an NSDictionary of @{@"abc", @"false"}, which means that [[self.runtimeGuards objectForKey:@"abc"] isEqualToString:@"true"]; produces a result of NO, which passes to the C++ builder as builder.setRuntimeGuard("abc", false).
Co-authored-by: Rafał Augustyniak <[email protected]> Signed-off-by: JP Simard <[email protected]>
Augustyniak
approved these changes
Mar 9, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was never fully hooked up to the C++ builder in
-[EnvoyConfiguration applyToCXXBuilder].Signed-off-by: JP Simard [email protected]
Commit Message:
Additional Description:
Risk Level: Low
Testing: Yes
Docs Changes: None
Release Notes: None
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]