-
Notifications
You must be signed in to change notification settings - Fork 6
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(varlogtest): validate log stream descriptor to create it #593
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Sep 25, 2023
Merged
ijsong
force-pushed
the
varlogtest_create_new_instance
branch
from
September 25, 2023 14:38
2b31e74
to
e1216ab
Compare
ijsong
force-pushed
the
varlogtest_add_logstream
branch
from
September 25, 2023 14:38
ddaf338
to
2867ea4
Compare
ijsong
force-pushed
the
varlogtest_create_new_instance
branch
from
September 26, 2023 11:59
e1216ab
to
2c98f7f
Compare
This PR adds a validator to the AddLogStream API in the varlogtest. Especially the validator checks the replicas requested. For example, if they have duplicate storage nodes, their length is less than the replication factor, or they have unknown storage nodes. Although the real varlogadm server's AddLogStream API is tested, the same thing in the varlogtest package has not been tested, surprisingly. To fix it, all the implementations in the `internal/admin` and `pkg/varlogtest` have to use the same test suite. However, it will lead to a quite big refactoring. Therefore, this PR fixes the bug and adds some unit tests in the varlogtest package. Later we will revisit it to resolve #592.
ijsong
force-pushed
the
varlogtest_add_logstream
branch
from
September 26, 2023 12:57
2867ea4
to
73d6a91
Compare
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## varlogtest_create_new_instance #593 +/- ##
==================================================================
- Coverage 61.19% 61.14% -0.05%
==================================================================
Files 144 144
Lines 19182 19217 +35
==================================================================
+ Hits 11739 11751 +12
- Misses 6858 6881 +23
Partials 585 585
☔ View full report in Codecov by Sentry. |
This was referenced Sep 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
This PR adds a validator to the AddLogStream API in the varlogtest.
Especially the validator checks the replicas requested. For example, if they
have duplicate storage nodes, their length is less than the replication factor,
or they have unknown storage nodes.
Although the real varlogadm server's AddLogStream API is tested, the same thing
in the varlogtest package has not been tested, surprisingly. To fix it, all the
implementations in the
internal/admin
andpkg/varlogtest
have to use thesame test suite. However, it will lead to a quite big refactoring. Therefore,
this PR fixes the bug and adds some unit tests in the varlogtest package.
Later we will revisit it to resolve #592.