-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Control lightweight storage integration tests via build tags #3346
Control lightweight storage integration tests via build tags #3346
Conversation
7af3a5c
to
df4cccc
Compare
Hello all, this is my first time around :) I'm a Jaeger user and a fan of the product. Being part somehow of the project is something that will make me very proud. Two days ago I also discovered the hacktoberfest initiative and was very happy to find Jaeger issues there. I hope we make it on time to make this PR ready before time is up for hacktoberfest but if it will not be possible, no problem at all :) I wish you a pleasant day/evening |
examples/memstore-plugin/main.go
Outdated
@@ -11,6 +11,8 @@ | |||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
// See the License for the specific language governing permissions and | |||
// limitations under the License. | |||
//go:build grpc_plugin_storage_integration | |||
// +build grpc_plugin_storage_integration |
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.
why does this need to be conditional? this only builds the binary when requested
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.
It indeed does not need to be conditional. If you prefer I can remove it. It was only a way to 'link' the execution of the grpc_test.go
. I understand also that this file has no need to be compiled in other scopes, is this right? Anyhow for me there is no problem if you prefer to eliminate the compilation tags for this file.
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.
I would remove the tag. Someone needs to explicitly invoke the build of this module, so having an extra protection via tag just adds more friction.
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.
done
* introduction of build tags [grpc_plugin_storage_integration, badger_storage_integration] for better control over badgerstore_test.go and grpc_test.go which being fairly light-weight can be run along with the main make target `test` Signed-off-by: rbroggi <[email protected]>
Signed-off-by: rbroggi <[email protected]>
029ffcf
to
c63d9ae
Compare
Codecov Report
@@ Coverage Diff @@
## master #3346 +/- ##
==========================================
- Coverage 96.48% 96.46% -0.02%
==========================================
Files 259 259
Lines 15166 15166
==========================================
- Hits 14633 14630 -3
- Misses 450 452 +2
- Partials 83 84 +1
Continue to review full report at Codecov.
|
@@ -1,20 +0,0 @@ | |||
name: CIT Memory And Badger |
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.
why are you removing this workflow?
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.
I thought to remove it because the only thing it did was to run make mem-and-badger-storage-integration-test
and now the whole suite included in make mem-and-badger-storage-integration-test
is actually run along with the target test
. Makes sense? I thought it was redundant, but I might have misunderstood.
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.
makes sense.
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.
Actually, one reason why I wanted to have build tags was so that memory/badger storage tests would not need to run when we run ES/Cassandra tests. But they still seem to run per https://github.com/jaegertracing/jaeger/runs/4048978413?check_suite_focus=true
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.
I agree they should not run. Let me check
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.
I simply did not use a build-tag for those tests.
Please let me know if you prefer to have a unique tag for all the 3 tests (grpc/badge/memory) instead of one for each
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.
Is Nothing has been touched in the scope of those tests... |
Signed-off-by: rbroggi <[email protected]>
230e931
to
95675b3
Compare
I'm surprised about the outcome 🤔 Do you think we were doubly counting anything on the coverage? |
I doubt it, coverage is reported with the identity of lines of code, so codecov will merge them, not double count. |
After checking better the report here is what I found: The gap in coverability comes massively from We can access the exclusion of those files in a different PR. I think I understood the source of the issue: The new tags were not used in the |
Signed-off-by: rbroggi <[email protected]>
…ation,memory_storage_integration` should be present in `cover` profile and in `test` profile. Signed-off-by: rbroggi <[email protected]>
Signed-off-by: rbroggi <[email protected]>
Unit tests fail on gRPC plugin integration tests. I would not necessarily consider it a "cheap" storage since it requires building the plugin binary first, so not a good candidate for quick My recommendation is to only keep memory test as "cheap" (and therefore not use the tag "cheap*" but explicitly |
single tag for grpc+ badger? or prefer to keep 2 distinct ? |
* including memory-integration-storage as a cheap integration test to run along with `make test` * adapt the name of the ci workflow Signed-off-by: rbroggi <[email protected]>
…torage_integration Signed-off-by: rbroggi <[email protected]>
…ion-test` Signed-off-by: rbroggi <[email protected]>
Signed-off-by: rbroggi <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
grpc_storage_integration
,badger_storage_integration
, andmemory_storage_integration
for better control over badgerstore_test.go and grpc_test.goWhich problem is this PR solving?
Short description of the changes