Skip to content
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

Merged
merged 6 commits into from
May 8, 2023

Conversation

billprovince
Copy link
Contributor

@billprovince billprovince commented May 4, 2023

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

@@ -4,7 +4,7 @@ on:
branches:
- main
- 'release/v*'
pull_request_target:
pull_request:
Copy link
Contributor

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 coverage
  • cache 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.

Copy link
Contributor

@joshua-goldstein joshua-goldstein May 5, 2023

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)

joshua-goldstein added a commit that referenced this pull request May 8, 2023
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.
@joshua-goldstein joshua-goldstein self-requested a review May 8, 2023 21:51
@joshua-goldstein joshua-goldstein merged commit 599ccc6 into main May 8, 2023
@joshua-goldstein joshua-goldstein deleted the FixPagebufferReader5 branch May 8, 2023 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants