-
Notifications
You must be signed in to change notification settings - Fork 263
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
Traffic split auto redirection should only consider the active revisions #1617
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vyasgun: 0 warnings.
In response to this:
Description
Changes
- Automatic redirection of traffic should only take the active revisions into consideration
- Modified unit test according to the change
gvyas-mac:client gvyas$ ./kn revision list -s cloudevents-player NAME SERVICE TRAFFIC TAGS GENERATION AGE CONDITIONS READY REASON cloudevents-player-00005 cloudevents-player 100% 5 76m 3 OK / 4 True cloudevents-player-00004 cloudevents-player 4 84m 3 OK / 4 True cloudevents-player-00003 cloudevents-player 3 85m 3 OK / 4 True cloudevents-player-00002 cloudevents-player 2 27d 3 OK / 4 True cloudevents-player-00001 cloudevents-player 1 27d 3 OK / 4 True
gvyas-mac:client gvyas$ ./kn service update cloudevents-player --env ABC=xyz --traffic 70 Updating Service 'cloudevents-player' in namespace 'default': 0.065s The Route is still working to reflect the latest desired specification. 0.110s ... 3.198s Traffic is not yet migrated to the latest revision. 3.262s Ingress has not yet been reconciled. 3.309s Waiting for load balancer to be ready 3.458s Ready to serve. Service 'cloudevents-player' updated to latest revision 'cloudevents-player-00006' is available at URL: http://cloudevents-player.default.10.111.180.117.sslip.io gvyas-mac:client gvyas$ ./kn revision list -s cloudevents-player NAME SERVICE TRAFFIC TAGS GENERATION AGE CONDITIONS READY REASON cloudevents-player-00006 cloudevents-player 70% 6 6s 4 OK / 4 True cloudevents-player-00005 cloudevents-player 30% 5 77m 3 OK / 4 True cloudevents-player-00004 cloudevents-player 4 86m 3 OK / 4 True cloudevents-player-00003 cloudevents-player 3 86m 3 OK / 4 True cloudevents-player-00002 cloudevents-player 2 27d 3 OK / 4 True cloudevents-player-00001 cloudevents-player 1 27d 3 OK / 4 True
Reference
Fixes #1609
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Codecov Report
@@ Coverage Diff @@
## main #1617 +/- ##
==========================================
+ Coverage 79.80% 79.98% +0.17%
==========================================
Files 163 171 +8
Lines 8824 9098 +274
==========================================
+ Hits 7042 7277 +235
- Misses 1089 1109 +20
- Partials 693 712 +19
Continue to review full report at Codecov.
|
/retest |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dsimansk, vyasgun The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me (just one minor cosmetic comment)
// number of existing revisions | ||
var existingRevisionCount = len(revisions) | ||
// number of existing targets | ||
var existingRevisionCount = len(targets) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to rename the variable to targetsCount
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll change it
Also, tested it locally, and works as expected. Thanks @vyasgun ! |
Taking a look at the failing tests |
/lgtm |
Description
Changes
Reference
Fixes #1609