-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix(test): The new test case PagebufferReader5 introduced an error. #1936
Conversation
@@ -4,7 +4,7 @@ on: | |||
branches: | |||
- main | |||
- 'release/v*' | |||
pull_request_target: | |||
pull_request: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @billprovince I made this fix to your PR.
There are 2 issues with our CI here:
pull_request_target
is what is causing this issue, and this was added per recommendation from coveralls to support coveragecache
cleanup was also done on GitHub Actions (as we suspected an issue there).
cc: @adityasadalage and @joshua-goldstein ... lets do a check on these items tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skrdgraph Thanks for catching this and diagnosing the problem... I suggest we merge the CI fix in #1944 first, and then we can merge Bill's PR (and hopefully CI will run as expected on here)
In #1936 we observed that because we are using `pull_request_target` without a specific reference, we are not in fact checking out the PR branch. This PR splits the workflow into two, one only to run badger CI tests, and the other to run tests & report coverage results (using pr_target with the appropriate commit). This has the benefit that any issues with coverage are isolated to one workflow, which we could disable later if problems arise. This does create duplication of compute (all tests run x2) but we are using github hosted runners so we do not pay for this cost. This also aligns with our dgraph repo workflow setup.
4cbeef1
to
17f28a7
Compare
Problem
Fixes DGRAPHCORE-199
The intended fix for the CI issue for randomly getting EOF failures in PagebufferReader2 test introduced the test case FixPagebufferReader5 -- intended to avoid regressions. However, it did something that is not expected by the PageBuffer struct: it created a new PageBufferReader based on an empty PageBuffer. It seems that this is not allowed.
Solution
Fix the test case for PagebufferReader5 by no longer attempting to create a new PageBufferReader based on an empty PageBuffer.
Note
The CI build will still fail to allow this to pass because it will continue to use the prior version of the tests without the fix. However, locally tested, I get this result:
~/gitspace/github.com/dgraph-io/badger/y$ go test -run PagebufferReader5
PASS
ok github.com/dgraph-io/badger/v4/y 0.335s