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

Ab testing redone #9119

Merged
merged 1 commit into from
Jun 30, 2016
Merged

Ab testing redone #9119

merged 1 commit into from
Jun 30, 2016

Conversation

rajatchopra
Copy link
Contributor

@rajatchopra rajatchopra commented Jun 1, 2016

Re-implementing A/B testing work with weights as an API field. Ref: #9070

@rajatchopra rajatchopra mentioned this pull request Jun 1, 2016
@@ -45,7 +45,10 @@ func (s routeStrategy) PrepareForCreate(obj runtime.Object) {
route.Status = api.RouteStatus{}
// Limit to kind/name
// TODO: convert to LocalObjectReference
route.Spec.To = kapi.ObjectReference{Kind: route.Spec.To.Kind, Name: route.Spec.To.Name}
route.Spec.To = api.RouteTargetReference{Kind: route.Spec.To.Kind, Name: route.Spec.To.Name, Weight: 1}
Copy link
Contributor

Choose a reason for hiding this comment

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

This block is no longer necessary - you can remove it and the block below because we no longer have fields to strip.

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 2, 2016
mode http
option redispatch
option forwardfor
{{ with $balanceAlgo := index $cfg.Annotations "haproxy.balance" }}

Choose a reason for hiding this comment

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

Namespace the annotation just like other existing k8s/openshift annotations, router.openshift.io/haproxy.balance?

@rajatchopra
Copy link
Contributor Author

rajatchopra commented Jun 2, 2016

All comments taken care of. Testcases still need to be added. Review please. DO NOT MERGE YET - some cosmetics still to go in.
Thanks.

@smarterclayton
Copy link
Contributor

Will look, thanks

@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 3, 2016
@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 4, 2016
@rajatchopra rajatchopra force-pushed the AB branch 2 times, most recently from 45dc612 to 2adf06a Compare June 6, 2016 18:18
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 6, 2016
@rajatchopra rajatchopra force-pushed the AB branch 6 times, most recently from c32436e to 2155506 Compare June 6, 2016 23:58
@rajatchopra
Copy link
Contributor Author

@smarterclayton Any inputs here. Working on the cli in a separate PR.

@smarterclayton
Copy link
Contributor

Cli for viewing or changing? If latter a quick proposal write up would be
best.

On Jun 8, 2016, at 5:39 PM, Rajat Chopra [email protected] wrote:

@smarterclayton https://github.com/smarterclayton Any inputs here.
Working on the cli in a separate PR.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#9119 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ABG_py0CSRVCf3pjNtwUGrSxfJ9d8ytEks5qJzaYgaJpZM4Ir8cY
.

@rajatchopra rajatchopra force-pushed the AB branch 4 times, most recently from 5003f24 to 234c89c Compare June 23, 2016 22:43
@knobunc
Copy link
Contributor

knobunc commented Jun 24, 2016

[test]

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 25, 2016
@jorgemoralespou
Copy link

@rajatchopra @smarterclayton @knobunc Looking at the PR looks like weights would be first class citizen of Routing for AB testing. I just wonder how this will scale for next requests to support AB testing based on HTTP headers and cookies?
I understand that our routing will not support AB testing logic based on L7 but these 2 will come and be pretty ovbious should be supported by default routing and not additional router implementation. Also if weights are API, so should be others.

@smarterclayton
Copy link
Contributor

We should definitely discuss those use cases.

On Sat, Jun 25, 2016 at 11:17 AM, Jorge Morales Pou <
[email protected]> wrote:

@rajatchopra https://github.com/rajatchopra @smarterclayton
https://github.com/smarterclayton @knobunc https://github.com/knobunc
Looking at the PR looks like weights would be first class citizen of
Routing for AB testing. I just wonder how this will scale for next requests
to support AB testing based on HTTP headers and cookies?
I understand that our routing will not support AB testing logic based on
L7 but these 2 will come and be pretty ovbious should be supported by
default routing and not additional router implementation. Also if weights
are API, so should be others.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#9119 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABG_p9Wgx4PnvQ7MEwl8Gie99Z01plUYks5qPUaagaJpZM4Ir8cY
.

}

if len(route.Spec.AlternateBackends) > 3 {
result = append(result, field.Required(specPath.Child("to"), "cannot specify more than 3 additional services"))
Copy link
Contributor

Choose a reason for hiding this comment

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

this is wrong, it should be specPath.Child("alternateBackends")

@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 27, 2016
@rajatchopra
Copy link
Contributor Author

redo aborted [test]
@jorgemoralespou Annotations are exposed through the router template now. Any reasonable demands on changing the router behaviour should be possible through that. The current weight as an API field is the most straightforward way of specifying multiple backends/services. The template can be changed to ignore these fields and choose anything specified in the 'route' annotations.
Any specific use-case that you have should definitely be discussed.

@smarterclayton The fixes suggested by you have been put in. The tests flake randomly still but they are unrelated. If you could mark this PR for merge if everything else is okay. Thanks.

@smarterclayton
Copy link
Contributor

[test] so failures are unrelated to router changes?

@rajatchopra
Copy link
Contributor Author

[test]

@rajatchopra
Copy link
Contributor Author

rajatchopra commented Jun 28, 2016

[test]
Again. Previous test aborted on this flake

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 5a19e50

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/5546/)

@smarterclayton
Copy link
Contributor

LGTM [merge]

@rajatchopra
Copy link
Contributor Author

Unrelated failures. Retry [merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Jun 29, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/5586/) (Image: devenv-rhel7_4488)

@rajatchopra
Copy link
Contributor Author

[merge] once more

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 5a19e50

@openshift-bot openshift-bot merged commit 4b195a7 into openshift:master Jun 30, 2016
return false
}

func matchString(pattern, s string) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

In #9671 changing matchString to matchPattern in order to change default behavior to anchor on the beginning and end of the line. To avoid confusion with regexp.MatchString() the name was changed

@jorgemoralespou
Copy link

@rajatchopra @smarterclayton @knobunc Where would be the best place to discuss those other use cases we have left that makes a better ab testing?

@smarterclayton
Copy link
Contributor

Issue probably in github that lays out what we want to achieve and the use
cases - we'll summarize that into a card as necessary, but issues are the
broadest contributor place.

On Wed, Jul 20, 2016 at 5:16 AM, Jorge Morales Pou <[email protected]

wrote:

@rajatchopra https://github.com/rajatchopra @smarterclayton
https://github.com/smarterclayton @knobunc https://github.com/knobunc
Where would be the best place to discuss those other use cases we have left
that makes a better ab testing?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#9119 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABG_p-ba63bNWQwI2e7WDU5dEs9KEXXeks5qXedVgaJpZM4Ir8cY
.

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.

8 participants