Skip to content

Switch to fortio for RateLimit testing#517

Merged
istio-merge-robot merged 5 commits intoistio:masterfrom
douglas-reid:move_to_fortio
Sep 2, 2017
Merged

Switch to fortio for RateLimit testing#517
istio-merge-robot merged 5 commits intoistio:masterfrom
douglas-reid:move_to_fortio

Conversation

@douglas-reid
Copy link
Copy Markdown
Contributor

@douglas-reid douglas-reid commented Jul 31, 2017

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

Use fortio instead of wrk in e2e tests

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm going to have a layer to make http+periodic be better integrated so you don't have to copy that code

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the layer etc is done as part of #519

@istio-testing
Copy link
Copy Markdown
Collaborator

Jenkins job istio/presubmit passed

ldemailly added a commit that referenced this pull request Aug 1, 2017
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not needed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let's switch this to #519 's :

res, err := HTTPRunner(&opts)
// then use res.RetCodes[http.StatusOK] and res.DurationHistogram.Count

ldemailly added a commit that referenced this pull request Aug 1, 2017
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)
ldemailly added a commit that referenced this pull request Aug 1, 2017
* 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
Copy link
Copy Markdown
Member

@ldemailly ldemailly left a comment

Choose a reason for hiding this comment

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

let's switch to fortio.HTTPRunner()

@istio istio deleted a comment from istio-testing Aug 2, 2017
ldemailly added a commit that referenced this pull request Aug 7, 2017
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!
@yutongz
Copy link
Copy Markdown
Contributor

yutongz commented Aug 22, 2017

Please add release note by either adding message with pr template or comment "/release-note XXX" or "/release-note-none"

@ldemailly
Copy link
Copy Markdown
Member

I updated the initial comment

@douglas-reid
Copy link
Copy Markdown
Contributor Author

updated to HTTPRunner. PTAL.

Copy link
Copy Markdown
Member

@ldemailly ldemailly left a comment

Choose a reason for hiding this comment

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

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 {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this is a bit mysterious to me - maybe a comment ?

@@ -323,53 +293,37 @@ func TestRateLimit(t *testing.T) {
}
}()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what is a "full request" ?

// Allow full processing of metrics, etc.
time.Sleep(1 * time.Minute)
// consider only successful full requests
perSvc := float64(succReqs) / 3
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

dividing by 3 because?

// allow some leeway for rejections
if got <= (want * .9) {
// establish some baseline (40% of expected counts)
want := math.Floor(perSvc * .4)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

40% of 1/3rd because?

@ldemailly
Copy link
Copy Markdown
Member

/lgtm
(though a couple more comments could help)

@istio-merge-robot
Copy link
Copy Markdown

[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.

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@istio-merge-robot
Copy link
Copy Markdown

/test all [submit-queue is verifying that this PR is safe to merge]

@istio-merge-robot
Copy link
Copy Markdown

Automatic merge from submit-queue

@istio-merge-robot istio-merge-robot merged commit 33cc5e5 into istio:master Sep 2, 2017
@istio-testing
Copy link
Copy Markdown
Collaborator

@douglas-reid: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/e2e-suite-rbac-no_auth.sh 2988c9e link /test e2e-suite-rbac-no_auth
prow/e2e-suite-rbac-auth.sh 2988c9e link /test e2e-suite-rbac-auth
prow/e2e-suite-no_rbac-no_auth.sh 2988c9e link /test e2e-suite-no_rbac-no_auth
prow/e2e-suite-no_rbac-auth.sh 2988c9e link /test e2e-suite-no_rbac-auth
Details

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. I understand the commands that are listed here.

mandarjog pushed a commit to mandarjog/istio that referenced this pull request Oct 30, 2017
* 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
rshriram pushed a commit that referenced this pull request Oct 30, 2017
* 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
rshriram pushed a commit that referenced this pull request Oct 30, 2017
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
rshriram pushed a commit that referenced this pull request Oct 30, 2017
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
mandarjog pushed a commit that referenced this pull request Oct 31, 2017
* 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
vbatts pushed a commit to vbatts/istio that referenced this pull request Oct 31, 2017
* 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
vbatts pushed a commit to vbatts/istio that referenced this pull request Oct 31, 2017
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
vbatts pushed a commit to vbatts/istio that referenced this pull request Oct 31, 2017
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
mandarjog pushed a commit that referenced this pull request Oct 31, 2017
mandarjog pushed a commit that referenced this pull request Nov 2, 2017
* 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
mandarjog pushed a commit that referenced this pull request Nov 2, 2017
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
mandarjog pushed a commit that referenced this pull request Nov 2, 2017
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
guptasu pushed a commit to guptasu/istio that referenced this pull request Jun 11, 2018
howardjohn pushed a commit to howardjohn/istio that referenced this pull request Jan 12, 2020
* Add reminder message if user fail with values schema

* Address comment
danehans pushed a commit to danehans/istio that referenced this pull request Nov 2, 2021
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
luksa pushed a commit to luksa/istio that referenced this pull request Sep 20, 2022
Co-authored-by: maistra-bot <null>
antonioberben pushed a commit to antonioberben/istio that referenced this pull request Jan 29, 2024
* 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>
vikaschoudhary16 pushed a commit to vikaschoudhary16/istio that referenced this pull request Aug 12, 2024
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.

6 participants