coverage: Improve test coverage#24355
Conversation
Signed-off-by: tyxia <tyxia@google.com>
Signed-off-by: tyxia <tyxia@google.com>
|
/assign @alyssawilk |
|
Can you adjust the coverage threshold value for the filter, now the untested code was removed? /wait-any |
|
not just the filter but overall coverage and close off that bug, if this is sufficient |
|
/wait |
Signed-off-by: tyxia <tyxia@google.com>
|
CC @envoyproxy/coverage-shephards: FYI only for changes made to |
|
It seems like this leaves us teetering on the edge of 96.1. Why does source/extensions/filters/http/rate_limit_quota have such an incredibly low coverage limit? Looking at coverage output, it seems like it would be pretty trivial to write a unit test for XRateLimitHeaderUtils::convertRateLimitUnit and RateLimitFilterConfig::createRouteSpecificFilterConfigTyped in order to get the coverage for this directory up to normal. https://storage.googleapis.com/envoy-pr/9cb3b98/coverage/source/extensions/filters/http/ratelimit/ratelimit_headers.cc.gcov.html |
Signed-off-by: tyxia <tyxia@google.com>
Signed-off-by: tyxia <tyxia@google.com>
rate_limit_qutoa is a WIP that only partially implemented/merged due to large amount of code it requires and the spirit of small CLs. But these already merged code is needed so that I can continue the development as Github doesn't really support chained CLs. Since it is unfinished work, it has some boilerplate code required by compilation and for my future PRs but not tested. The links you mentioned are for For the WIP, I feel it might be more worthy to continue the next phase development so that the code will be covered in next PRs. |
Oh, sheesh. Yes, you're right. Is the correct coverage for this PR is here? That seems to show 86.2% not 90%. Is that what you expect? In any case, can you update test/per_file_coverage.sh to the correct currently value (either 86.2% or 90% or whatever it is)?
If we have a directory that is below the limit, we can easily lower the threshold for that directory in test/per_file_coverage.sh, as we've done. But the problem with that is that this counts against the global project coverage limits. So by keeping rate_limit_quota below the limit, we're making it more likely that some other PR might cause us to drop down below the global limit. This causes pain for the entire project. Can we remove the untested methods from the tree until we're ready to use them (in follow up PRs)? |
Signed-off-by: tyxia <tyxia@google.com>
Signed-off-by: tyxia <tyxia@google.com>
Signed-off-by: tyxia <tyxia@google.com>
|
Hi @RyanTheOptimist, I updated the code to increase test coverage, PTAL. Thanks! |
Signed-off-by: tyxia <tyxia@google.com>
RyanTheOptimist
left a comment
There was a problem hiding this comment.
Great! Thanks for doing this.
Signed-off-by: tyxia <tyxia@google.com>
Signed-off-by: tyxia <tyxia@google.com>
|
/retest |
|
Retrying Azure Pipelines: |
Signed-off-by: tyxia <tyxia@google.com>
|
The failed coverage is caused by |
Signed-off-by: tyxia <tyxia@google.com>
|
I figured that in order to unblock the presubmit test faster, I probably should have a separate PR to fix posix test coverage rather than include it in this PR which has many other things already. So I send out #24463 |
|
/assign @yanavlasov Sorry I didn't remove the request, I just click a |
|
Hm. Even though #24463 has landed, this PR still includes a change to source/common/common/posix. Is that expected? |
Signed-off-by: tyxia <tyxia@google.com>
|
Unfortunately I'm not quite sure the coverage results worked: |
|
for ref the permissions were changed in 614d03a |
|
thankfully all good, coverage runs restored cleanly :-) |
…-tools * origin/main: (59 commits) Make IsOkAndHolds matcher work with submatchers (#24498) ios: fix platform key value store (#24532) make ClusterInfo::traffic_stats_ a unique_ptr, so that later we can lazy-init it later. (#24406) quic: splitting into client and server (#24513) fixing coverage (#24529) ci: Add `examplesOnly` condition (#24465) ci: sonatype_nexus_upload.py: remove unused format argument (#24471) deps: Bump `build_bazel_rules_apple` -> 1.1.3 (#24527) deps: Bump `com_github_nghttp2_nghttp2` -> 1.51.0 (#24525) deps: Bump `rules_license` -> 0.0.4 (#24523) build(deps): bump sphinxcontrib-httpdomain from 1.8.0 to 1.8.1 in /mobile/docs (#24126) build(deps): bump github/codeql-action from 2.1.35 to 2.1.36 (#24473) build(deps): bump openpolicyagent/opa from 0.47.2-istio to 0.47.3-istio in /examples/ext_authz (#24514) build(deps): bump node from `80844b6` to `2770c78` in /examples/ext_authz/auth/http-service (#24515) build(deps): bump abseil-cpp to latest version (#24386) xDS: add xDS config tracker extension point (#23485) kafka: add shared consumer manager (#24494) coverage: Improve test coverage (#24355) deps: Bump `rules_python` -> 0.16.1 (#24344) ci: revert disable running the Objective-C integration app (#24478)" (#24496) ... Signed-off-by: JP Simard <jp@jpsim.com>
Remove the boilerplate code that was added as TODO for future PRs and was not tested.
Also, restore the overall coverage back to 96.1%
This is a part of effort to address #24353
Signed-off-by: tyxia tyxia@google.com