Switch to fortio for RateLimit testing#517
Switch to fortio for RateLimit testing#517istio-merge-robot merged 5 commits intoistio:masterfrom douglas-reid:move_to_fortio
Conversation
tests/e2e/tests/mixer/mixer_test.go
Outdated
There was a problem hiding this comment.
any chance to use a context or per thread/goroutine for that instead of atomic ?
like https://github.com/istio/istio/blob/master/devel/fortio/cmd/fortio/main.go#L48
(maybe I should add stuff to make it easier to reuse and aggregate without copy pasting)
There was a problem hiding this comment.
I'm going to have a layer to make http+periodic be better integrated so you don't have to copy that code
|
Jenkins job istio/presubmit passed |
tests/e2e/tests/mixer/mixer_test.go
Outdated
tests/e2e/tests/mixer/mixer_test.go
Outdated
There was a problem hiding this comment.
let's switch this to #519 's :
res, err := HTTPRunner(&opts)
// then use res.RetCodes[http.StatusOK] and res.DurationHistogram.Count
* make http runner available as library Moved a lot of the code from fortio main to the library so #517 can be better/easier (This is same as #519 with attempt at preserving history and without the grpc wip) * Added test, moved echosrv code to lib, ... Added test, moved echosrv code to lib, created DynamicHTTP for test, renames per @douglas-reid code review comments * Better initialization syntax * Add a negative testing
ldemailly
left a comment
There was a problem hiding this comment.
let's switch to fortio.HTTPRunner()
fortio now supports grpc testing as well fixes #451 docker images are created for fortio, grpcping, echosrv * Simple grpc cli/server Gazelle doesn’t seem to generate build rule for proto * Added payload flag * User fortio logger, temp check in of .pb. file * Renamed to grpcping * Allow grpc_cli ls to work * ping and clock skew calculations * Add histograms to grpcping * Make http runner accessible/reusable as library So #517 can be better/easier * Return actual QPS and indicate default runner options aren't needed for programatic calls Also auto set the testing function for http by default * Comment on the provenance of the code * Adding gprc std health svc check (through -health) * Grpc runner as library * Fortio now has a -grpc flag to exercise grpc servers (that have health services) For #451 * Minor fixes/updates * Added comment per code review * Opsa spell check * Fix Dockerfile Builds 3 binaries which is kind of big Todo: consider 1 binary * Move grpc in separate package to keep echosrv binary small Move grpc in separate package to keep echosrv binary small and dependencies smaller when not using grpc (so echosrv which doesn’t use grpc stays 4mb instead of becoming 6mb) (Seemingly a side effect of go’s init() that not using still pulls it in) Individual images fortio.fortio fortio.echosrv fortio.grpcping as well as a combo images having all 3 * Adding images push * Adding missing GIT_SHA * Typo galore * Debug docker version * Got push failure, trying authorize + reduce the verbosity of http * Code review comments Thx doug!
|
Please add release note by either adding message with pr template or comment "/release-note XXX" or "/release-note-none" |
|
I updated the initial comment |
|
updated to HTTPRunner. PTAL. |
ldemailly
left a comment
There was a problem hiding this comment.
I'm not sure I fully understand the (original) test but lgtm otherwise - seem simpler now
| } | ||
|
|
||
| func promDump(client v1.API, metric string) string { | ||
| if value, err := client.Query(context.Background(), fmt.Sprintf("%s{}", metric), time.Now()); err == nil { |
There was a problem hiding this comment.
this is a bit mysterious to me - maybe a comment ?
| @@ -323,53 +293,37 @@ func TestRateLimit(t *testing.T) { | |||
| } | |||
| }() | |||
|
|
|||
There was a problem hiding this comment.
might be worth commenting what's in rateLimitRule / what we expect to happen here
|
|
||
| // Allow full processing of metrics, etc. | ||
| time.Sleep(1 * time.Minute) | ||
| // consider only successful full requests |
| // Allow full processing of metrics, etc. | ||
| time.Sleep(1 * time.Minute) | ||
| // consider only successful full requests | ||
| perSvc := float64(succReqs) / 3 |
| // allow some leeway for rejections | ||
| if got <= (want * .9) { | ||
| // establish some baseline (40% of expected counts) | ||
| want := math.Floor(perSvc * .4) |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ldemailly The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
|
/test all [submit-queue is verifying that this PR is safe to merge] |
|
Automatic merge from submit-queue |
|
@douglas-reid: The following tests failed, say
DetailsInstructions 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. I understand the commands that are listed here. |
* Introduce attributes aspect kind to the mixer. This PR adds a new aspect kind (and associated manager and config) to the istio mixer. The new aspect kind is meant to be used exclusively in the preprocess phase of mixer request handling. It takes a set of inputs (attributes mapped via expression into "labels") and produces a set of generated attributes. To configure the new aspect kind, the operator will specify the labels mapping and attribute descriptors for the generated attributes. Any key-value pairs produced by implementing adapters that are not included in the list of generated attribute descriptors will be dropped on the floor at the moment. NOTE: the new aspect kind is named 'attributes' to match the existing style of the aspect kind names. That is, we don't call the access logging aspect kind 'access-logs-generator', nor do we call the metrics reporting aspect kind 'metrics-reporter'. To match, we call the attribute generation aspect kind simply 'attributes'. However, this could be slightly confusing in the implementing code (too many things called Attributes), so the manager and aspect interface are in terms of AttributesGenerator. Former-commit-id: 06f431a82805d5949c916be18acfb3d2df5ef961
* make http runner available as library Moved a lot of the code from fortio main to the library so #517 can be better/easier (This is same as #519 with attempt at preserving history and without the grpc wip) * Added test, moved echosrv code to lib, ... Added test, moved echosrv code to lib, created DynamicHTTP for test, renames per @douglas-reid code review comments * Better initialization syntax * Add a negative testing Former-commit-id: 7b83910
fortio now supports grpc testing as well fixes #451 docker images are created for fortio, grpcping, echosrv * Simple grpc cli/server Gazelle doesn’t seem to generate build rule for proto * Added payload flag * User fortio logger, temp check in of .pb. file * Renamed to grpcping * Allow grpc_cli ls to work * ping and clock skew calculations * Add histograms to grpcping * Make http runner accessible/reusable as library So #517 can be better/easier * Return actual QPS and indicate default runner options aren't needed for programatic calls Also auto set the testing function for http by default * Comment on the provenance of the code * Adding gprc std health svc check (through -health) * Grpc runner as library * Fortio now has a -grpc flag to exercise grpc servers (that have health services) For #451 * Minor fixes/updates * Added comment per code review * Opsa spell check * Fix Dockerfile Builds 3 binaries which is kind of big Todo: consider 1 binary * Move grpc in separate package to keep echosrv binary small Move grpc in separate package to keep echosrv binary small and dependencies smaller when not using grpc (so echosrv which doesn’t use grpc stays 4mb instead of becoming 6mb) (Seemingly a side effect of go’s init() that not using still pulls it in) Individual images fortio.fortio fortio.echosrv fortio.grpcping as well as a combo images having all 3 * Adding images push * Adding missing GIT_SHA * Typo galore * Debug docker version * Got push failure, trying authorize + reduce the verbosity of http * Code review comments Thx doug! Former-commit-id: 13ced35
Automatic merge from submit-queue Switch to fortio for RateLimit testing Running with WRK seems to cause issues in local runs, related to amount of traffic generated. It also is yet another dep for the framework to establish. This PR removes these concerns (hopefully) and reduces wait times inside of `TestRateLimit`, also reducing the amount of time running the load test down from `2m` to `30s`. Fixes: #494 ```release-note Use fortio instead of wrk in e2e tests ``` Former-commit-id: 33cc5e5
* Introduce attributes aspect kind to the mixer. This PR adds a new aspect kind (and associated manager and config) to the istio mixer. The new aspect kind is meant to be used exclusively in the preprocess phase of mixer request handling. It takes a set of inputs (attributes mapped via expression into "labels") and produces a set of generated attributes. To configure the new aspect kind, the operator will specify the labels mapping and attribute descriptors for the generated attributes. Any key-value pairs produced by implementing adapters that are not included in the list of generated attribute descriptors will be dropped on the floor at the moment. NOTE: the new aspect kind is named 'attributes' to match the existing style of the aspect kind names. That is, we don't call the access logging aspect kind 'access-logs-generator', nor do we call the metrics reporting aspect kind 'metrics-reporter'. To match, we call the attribute generation aspect kind simply 'attributes'. However, this could be slightly confusing in the implementing code (too many things called Attributes), so the manager and aspect interface are in terms of AttributesGenerator. Former-commit-id: 3fe979ad9918014644ff082f2e9c6d880036ae69
* make http runner available as library Moved a lot of the code from fortio main to the library so istio#517 can be better/easier (This is same as istio#519 with attempt at preserving history and without the grpc wip) * Added test, moved echosrv code to lib, ... Added test, moved echosrv code to lib, created DynamicHTTP for test, renames per @douglas-reid code review comments * Better initialization syntax * Add a negative testing Former-commit-id: 7b83910
fortio now supports grpc testing as well fixes istio#451 docker images are created for fortio, grpcping, echosrv * Simple grpc cli/server Gazelle doesn’t seem to generate build rule for proto * Added payload flag * User fortio logger, temp check in of .pb. file * Renamed to grpcping * Allow grpc_cli ls to work * ping and clock skew calculations * Add histograms to grpcping * Make http runner accessible/reusable as library So istio#517 can be better/easier * Return actual QPS and indicate default runner options aren't needed for programatic calls Also auto set the testing function for http by default * Comment on the provenance of the code * Adding gprc std health svc check (through -health) * Grpc runner as library * Fortio now has a -grpc flag to exercise grpc servers (that have health services) For istio#451 * Minor fixes/updates * Added comment per code review * Opsa spell check * Fix Dockerfile Builds 3 binaries which is kind of big Todo: consider 1 binary * Move grpc in separate package to keep echosrv binary small Move grpc in separate package to keep echosrv binary small and dependencies smaller when not using grpc (so echosrv which doesn’t use grpc stays 4mb instead of becoming 6mb) (Seemingly a side effect of go’s init() that not using still pulls it in) Individual images fortio.fortio fortio.echosrv fortio.grpcping as well as a combo images having all 3 * Adding images push * Adding missing GIT_SHA * Typo galore * Debug docker version * Got push failure, trying authorize + reduce the verbosity of http * Code review comments Thx doug! Former-commit-id: 13ced35
Automatic merge from submit-queue Switch to fortio for RateLimit testing Running with WRK seems to cause issues in local runs, related to amount of traffic generated. It also is yet another dep for the framework to establish. This PR removes these concerns (hopefully) and reduces wait times inside of `TestRateLimit`, also reducing the amount of time running the load test down from `2m` to `30s`. Fixes: istio#494 ```release-note Use fortio instead of wrk in e2e tests ``` Former-commit-id: 33cc5e5
* make http runner available as library Moved a lot of the code from fortio main to the library so #517 can be better/easier (This is same as #519 with attempt at preserving history and without the grpc wip) * Added test, moved echosrv code to lib, ... Added test, moved echosrv code to lib, created DynamicHTTP for test, renames per @douglas-reid code review comments * Better initialization syntax * Add a negative testing Former-commit-id: 7b83910
fortio now supports grpc testing as well fixes #451 docker images are created for fortio, grpcping, echosrv * Simple grpc cli/server Gazelle doesn’t seem to generate build rule for proto * Added payload flag * User fortio logger, temp check in of .pb. file * Renamed to grpcping * Allow grpc_cli ls to work * ping and clock skew calculations * Add histograms to grpcping * Make http runner accessible/reusable as library So #517 can be better/easier * Return actual QPS and indicate default runner options aren't needed for programatic calls Also auto set the testing function for http by default * Comment on the provenance of the code * Adding gprc std health svc check (through -health) * Grpc runner as library * Fortio now has a -grpc flag to exercise grpc servers (that have health services) For #451 * Minor fixes/updates * Added comment per code review * Opsa spell check * Fix Dockerfile Builds 3 binaries which is kind of big Todo: consider 1 binary * Move grpc in separate package to keep echosrv binary small Move grpc in separate package to keep echosrv binary small and dependencies smaller when not using grpc (so echosrv which doesn’t use grpc stays 4mb instead of becoming 6mb) (Seemingly a side effect of go’s init() that not using still pulls it in) Individual images fortio.fortio fortio.echosrv fortio.grpcping as well as a combo images having all 3 * Adding images push * Adding missing GIT_SHA * Typo galore * Debug docker version * Got push failure, trying authorize + reduce the verbosity of http * Code review comments Thx doug! Former-commit-id: 13ced35
Automatic merge from submit-queue Switch to fortio for RateLimit testing Running with WRK seems to cause issues in local runs, related to amount of traffic generated. It also is yet another dep for the framework to establish. This PR removes these concerns (hopefully) and reduces wait times inside of `TestRateLimit`, also reducing the amount of time running the load test down from `2m` to `30s`. Fixes: #494 ```release-note Use fortio instead of wrk in e2e tests ``` Former-commit-id: 33cc5e5
* Add reminder message if user fail with values schema * Address comment
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Co-authored-by: maistra-bot <null>
* bump jaeger version to latest Signed-off-by: Pierre Tessier <pierre@pierretessier.com> * bump jaeger-operator version to latest Signed-off-by: Pierre Tessier <pierre@pierretessier.com> --------- Signed-off-by: Pierre Tessier <pierre@pierretessier.com>
Update go to 1.22.4
Running with WRK seems to cause issues in local runs, related to amount of traffic generated. It also is yet another dep for the framework to establish.
This PR removes these concerns (hopefully) and reduces wait times inside of
TestRateLimit, also reducing the amount of time running the load test down from2mto30s.Fixes: #494