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

add traffic_policy, remap policy->traffic_policy #147

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

TheConcierge
Copy link
Contributor

@TheConcierge TheConcierge commented Jul 26, 2024

Why

Currently, we are in the process of erasing strict policy types from our SDKs. This changes makes sure policy is sent to the backend as a traffic_policy string as opposed to a strictly formatted policy struct.

How

The traffic policy field already exists and functions in the underlying rust SDK. So all we have to do is plumb the new field through to Rust. Additionally, instances of Policy are remapped to traffic policy.

Validation

Current unit tests continue to run.
An additional unit test was added using the new TrafficPolicy field.

Additional Changes

Rust LSP

To make development easier, I added the rust SDK to our nix flake.

Adding mio to the udeps ignore list

cargo udeps keeps claiming that it is unused. However, if I remove it, everything implodes.
I keep seeing stuff about udeps having false positives so i just decided to ignore it. We have done a similar thing in the Python API.

@TheConcierge TheConcierge marked this pull request as ready for review July 26, 2024 18:42
Copy link

@nikolay-ngrok nikolay-ngrok left a comment

Choose a reason for hiding this comment

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

👍

@TheConcierge TheConcierge force-pushed the ngrok/ryan/traffic-polilcy branch from a0acd30 to 8741ac6 Compare July 30, 2024 17:31
@TheConcierge TheConcierge merged commit cd0d368 into main Jul 30, 2024
31 checks passed
@TheConcierge TheConcierge deleted the ngrok/ryan/traffic-polilcy branch July 30, 2024 17:37
@TheConcierge TheConcierge restored the ngrok/ryan/traffic-polilcy branch July 30, 2024 17:38
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