-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
FileReadToEndNotReadable keeps failing #25641
Conversation
Hi @noah8713, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
Note, this fix just makes the test a duplicate of the test above it (with a misleading name and some unrelated actions suggesting there's some coverage that there is not). |
@ravenblackx can you advise on the best way forward (following up on #25614 (comment)) if coverage is dropping then i guess that means another test is required for the uncovered lines also a bit confused - if it is duplicating above test then i would assume that removing the test should have no affect on coverage |
nm, i see - currently the test gives some coverage lines, when "fixed" it becomes a dupe of above and loses that coverage i guess the question is what is needed to properly cover those lines |
/backport |
Yeah, I think this is a situation where those lines can't be covered and have the test not break in environments where the file permissions don't behave the desirable way (can't mock it out because the test is explicitly of the non-mock filesystem code). I'm not aware of a more reliable way to cause a 'read' operation to fail, after an 'open' operation succeeded. It's possible the test could be conditional (check that the permissions preclude reading the file after they've been changed, and if they don't, just log that the test was skipped and don't do the EXPECT), which would provide the coverage in the coverage environment where the test works, and then 'skip' in the environment where the test doesn't work. A reasonable alternative would be to just delete the problem test, annotate that branch as not reasonable to cover, and explicitly reduce the coverage for that file. |
@ravenblackx @phlax thanks. What is the final suggestion? Can we do incremental patch with alternatives post merging this? Please advice. |
It looks like this won't merge as-is because it fails coverage, so you'd have to update the coverage file anyway if you're making this change. My suggestion would be, if we're going for a quick fix for now and maybe iterating later:
|
Thanks @ravenblackx : So coverage failure is due to minimal changes as per logs
So for my knowledge why do we need to touch coverage for minimal changes? Follow up on your suggestions if I understand correctly: |
my understanding re point 1 is yep, that is correct point 2 is to add an entry for |
CC @envoyproxy/coverage-shephards: FYI only for changes made to |
Thanks a bunch @phlax and @ravenblackx for suggestions. Addressed comments. PTAL |
ff9db5f
to
f3abd95
Compare
@ravenblackx @phlax as per suggestions commenting the code was more work as format checks kept failing. :)
Anyways adjusted as requested to comment out with original working state and issue link so someone else might not just re change it to failing state . PTAL as most of the checks passed. |
The current failure is due to bash
no formatting other failures @ravenblackx @phlax PTAL |
ill hold the 1.25 release ( #25828 ) till this has landed so we can backport it - cc @RyanTheOptimist |
Fixes: envoyproxy#25614 Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com>
Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com>
* FileReadToEndNotReadable keeps failing on release/v1.25 Fixes: envoyproxy#25614 Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com> * Address comments and rebase to main to resolve conflicts Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com> --------- Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com> (cherry picked from commit 57be318) Signed-off-by: Hamzah Qudsi <hqudsi@datawire.io>
* FileReadToEndNotReadable keeps failing on release/v1.25 Fixes: envoyproxy#25614 Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com> * Address comments and rebase to main to resolve conflicts Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com> --------- Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com> Signed-off-by: Hamzah Qudsi <hqudsi@datawire.io> (cherry picked from commit 57be318) (cherry picked from commit 2f1bf08)
* FileReadToEndNotReadable keeps failing on release/v1.25 Fixes: envoyproxy#25614 Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com> * Address comments and rebase to main to resolve conflicts Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com> --------- Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com> Signed-off-by: Hamzah Qudsi <hqudsi@datawire.io> (cherry picked from commit 57be318) (cherry picked from commit 2f1bf08) (cherry picked from commit 8332c0d)
backporting this to 1.25 now - apologies i missed doing it before |
* FileReadToEndNotReadable keeps failing on release/v1.25 Fixes: envoyproxy#25614 Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com> * Address comments and rebase to main to resolve conflicts Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com> --------- Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com> Signed-off-by: Aliasgar Ginwala <aliasgar.ginwala87@gmail.com> Signed-off-by: Ryan Northey <ryan@synca.io>
* FileReadToEndNotReadable keeps failing on release/v1.25 Fixes: #25614 Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com> * Address comments and rebase to main to resolve conflicts Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com> --------- Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com> Signed-off-by: Aliasgar Ginwala <aliasgar.ginwala87@gmail.com> Signed-off-by: Ryan Northey <ryan@synca.io>
Fixes:
#25614
Signed-off-by: Aliasgar Ginwala aginwala@ebay.com