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

Support weights 0 and 100 in traffic splitting #4655

Merged
merged 3 commits into from
Nov 20, 2023

Conversation

haywoodsh
Copy link
Contributor

@haywoodsh haywoodsh commented Nov 15, 2023

Proposed changes

Allow split traffic's weight value in virtual server to be 0% or 100%.

This change is proposed because "0%" is not currently a valid syntax in split_clients. When the value is set to 0%, it will not be included in the generated config, but the effect will be the same as if it were. A value of 100% enables full traffic routing to a particular upstream.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@github-actions github-actions bot added documentation Pull requests/issues for documentation enhancement Pull requests for new features/feature enhancements labels Nov 15, 2023
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7fcee3d) 51.93% compared to head (5bdd2b7) 51.92%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4655      +/-   ##
==========================================
- Coverage   51.93%   51.92%   -0.01%     
==========================================
  Files          59       59              
  Lines       16972    16973       +1     
==========================================
- Hits         8814     8813       -1     
- Misses       7861     7862       +1     
- Partials      297      298       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@haywoodsh haywoodsh linked an issue Nov 15, 2023 that may be closed by this pull request
@haywoodsh haywoodsh marked this pull request as ready for review November 15, 2023 15:00
@haywoodsh haywoodsh requested review from a team as code owners November 15, 2023 15:00
Copy link
Contributor

@jjngx jjngx left a comment

Choose a reason for hiding this comment

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

🚀
@haywoodsh could you add description to the Proposed Changes section?

Signed-off-by: Haywood Shannon <5781935+haywoodsh@users.noreply.github.com>
Signed-off-by: Haywood Shannon <5781935+haywoodsh@users.noreply.github.com>
@haywoodsh haywoodsh force-pushed the feat/support-traffic-splitting-with-weights-0-100 branch from 2c669e8 to 227ddfb Compare November 17, 2023 16:28
@shaun-nx shaun-nx self-requested a review November 20, 2023 10:33
@haywoodsh haywoodsh merged commit 17adae0 into main Nov 20, 2023
36 checks passed
@haywoodsh haywoodsh deleted the feat/support-traffic-splitting-with-weights-0-100 branch November 20, 2023 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Pull requests/issues for documentation enhancement Pull requests for new features/feature enhancements
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Support weights of 0 - 100
3 participants