You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by "atharvalade (via GitHub)" <gi...@apache.org> on 2026/03/10 18:05:54 UTC

[PR] feat(bdd): support -race option for Go BDD tests (#2863) [iggy]

atharvalade opened a new pull request, #2914:
URL: https://github.com/apache/iggy/pull/2914

   ## Which issue does this PR close?
   
   Closes #2863
   
   ## Rationale
   
   Enable data race detection for the Go SDK in BDD tests via `-race` flag.
   
   ## What changed?
   
   Go BDD tests only ran in standard mode with no race detection. The script, Docker Compose service, and Dockerfile now propagate a `GO_TEST_EXTRA_FLAGS` env var so `./scripts/run-bdd-tests.sh go -race` runs `go test -v -race -cpu 1,4 ./...` inside the container. The CI matrix adds a parallel `bdd-go-race` job alongside the existing `bdd-go`.
   
   ## Local Execution
   
   - Passed
   - Pre-commit hooks ran


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bdd): support -race option for Go BDD tests [iggy]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #2914:
URL: https://github.com/apache/iggy/pull/2914#issuecomment-4033485007

   ## [Codecov](https://app.codecov.io/gh/apache/iggy/pull/2914?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 67.58%. Comparing base ([`654d94c`](https://app.codecov.io/gh/apache/iggy/commit/654d94cfe45a98132f337706c5ea368f6c1066fd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`5cec83d`](https://app.codecov.io/gh/apache/iggy/commit/5cec83d093bfa85a1b0066821429f7da3f2f9ff0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 36 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #2914      +/-   ##
   ============================================
   - Coverage     67.93%   67.58%   -0.36%     
     Complexity      739      739              
   ============================================
     Files          1049      958      -91     
     Lines         84376    78566    -5810     
     Branches      60954    60780     -174     
   ============================================
   - Hits          57324    53095    -4229     
   + Misses        24693    23008    -1685     
   - Partials       2359     2463     +104     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/iggy/pull/2914/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Ξ” | |
   |---|---|---|
   | [go](https://app.codecov.io/gh/apache/iggy/pull/2914/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.37% <ΓΈ> (+30.03%)` | :arrow_up: |
   | [node](https://app.codecov.io/gh/apache/iggy/pull/2914/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `87.29% <ΓΈ> (-5.12%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   [see 159 files with indirect coverage changes](https://app.codecov.io/gh/apache/iggy/pull/2914/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bdd): support -race option for Go BDD tests [iggy]

Posted by "chengxilo (via GitHub)" <gi...@apache.org>.
chengxilo commented on code in PR #2914:
URL: https://github.com/apache/iggy/pull/2914#discussion_r2914719897


##########
scripts/run-bdd-tests.sh:
##########


Review Comment:
   ```suggestion
       run_suite go-bdd     "🐹"   "Running Go BDD tests"     || exit $?
       GO_TEST_EXTRA_FLAGS="-race"
       run_suite go-bdd     "🐹"   "Running Go BDD tests (${GO_TEST_EXTRA_FLAGS})"
   ```
   
   I think both normal test and race test should be executed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bdd): support -race option for Go BDD tests [iggy]

Posted by "atharvalade (via GitHub)" <gi...@apache.org>.
atharvalade commented on PR #2914:
URL: https://github.com/apache/iggy/pull/2914#issuecomment-4036595216

   That's a much cleaner approach, agreed. Treating go-race as its own SDK choice removes the argument parsing complexity from both the script and the workflow. @chengxilo 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bdd): support -race option for Go BDD tests [iggy]

Posted by "chengxilo (via GitHub)" <gi...@apache.org>.
chengxilo commented on code in PR #2914:
URL: https://github.com/apache/iggy/pull/2914#discussion_r2914652682


##########
scripts/run-bdd-tests.sh:
##########


Review Comment:
   ```suggestion
       run_suite go-bdd     "🐹"   "Running Go BDD tests"     || exit $?
       GO_TEST_EXTRA_FLAGS="-race"
       run_suite go-bdd     "🐹"   "Running Go BDD tests -race"     || exit $?
   ```
   
   Just a minor issue, I think we should run both -race and normal test when `./scripts/run-bdd-tests.sh all`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bdd): support -race option for Go BDD tests [iggy]

Posted by "chengxilo (via GitHub)" <gi...@apache.org>.
chengxilo commented on code in PR #2914:
URL: https://github.com/apache/iggy/pull/2914#discussion_r2914719897


##########
scripts/run-bdd-tests.sh:
##########


Review Comment:
   ```suggestion
       run_suite go-bdd     "🐹"   "Running Go BDD tests"     || exit $?
       GO_TEST_EXTRA_FLAGS="-race"
       run_suite go-bdd     "🐹"   "Running Go BDD tests (${GO_TEST_EXTRA_FLAGS})"
   ```
   
   I think both normal test and race test should be executed. Or probably we need to support something like `./scripts/run-bdd-tests.go all -race` if other languages also need to detect data race in bdd test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bdd): support -race option for Go BDD tests [iggy]

Posted by "atharvalade (via GitHub)" <gi...@apache.org>.
atharvalade commented on PR #2914:
URL: https://github.com/apache/iggy/pull/2914#issuecomment-4034083351

   actions have done their wonderful job! I'll re-run CI after this is fixed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bdd): support -race option for Go BDD tests [iggy]

Posted by "chengxilo (via GitHub)" <gi...@apache.org>.
chengxilo commented on code in PR #2914:
URL: https://github.com/apache/iggy/pull/2914#discussion_r2914652682


##########
scripts/run-bdd-tests.sh:
##########


Review Comment:
   ```suggestion
       run_suite go-bdd     "🐹"   "Running Go BDD tests"     || exit $?
       GO_TEST_EXTRA_FLAGS="-race"
       run_suite go-bdd     "🐹"   "Running Go BDD tests -race"     || exit $?
   ```
   
   Just a minor issue, I think we should run both -race and normal test when `./scripts/run-bdd-tests.sh all`.
   
   I think my approach is weird tho)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bdd): support -race option for Go BDD tests (#2863) [iggy]

Posted by "atharvalade (via GitHub)" <gi...@apache.org>.
atharvalade commented on PR #2914:
URL: https://github.com/apache/iggy/pull/2914#issuecomment-4033440183

   @chengxilo check this out when you get a moment.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bdd): support -race option for Go BDD tests [iggy]

Posted by "chengxilo (via GitHub)" <gi...@apache.org>.
chengxilo commented on PR #2914:
URL: https://github.com/apache/iggy/pull/2914#issuecomment-4034978177

   #2863 might be a bit misleading, it's my fault since at that moment I thought it is doable. However, after reading your code. Instead of introducing an option like -race, I think maybe we could add another $SDK choice such as `go-race` instead of a `-race` flag.
   
   Discard `-race` option would simplify the implementation and make the script easier to read. And not every SDK needs data race detection (to be honest I think only go and C/C++ will need this). 
   
   The structure could look something like this:
   ```bash
   case "$SDK" in
     rust)    run_suite rust-bdd   "πŸ¦€"   "Running Rust BDD tests"   ;;
     python)  run_suite python-bdd "🐍"   "Running Python BDD tests" ;;
     go)      run_suite go-bdd     "🐹"   "Running Go BDD tests"     ;;
     go-race) run_suite go-bdd     "🐹⚑"  "Running Go BDD tests with data race detector" ;;
     node)    run_suite node-bdd   "πŸ’πŸš€" "Running Node BDD tests"   ;;
     csharp)  run_suite csharp-bdd "πŸ”·"   "Running C# BDD tests"     ;;
     java)    run_suite java-bdd   "β˜•"   "Running Java BDD tests"   ;;
     all)
       run_suite rust-bdd   "πŸ¦€"   "Running Rust BDD tests"   || exit $?
       run_suite python-bdd "🐍"   "Running Python BDD tests" || exit $?
       run_suite go-bdd     "🐹"   "Running Go BDD tests"     || exit $?
       run_suite go-bdd     "🐹⚑"  "Running Go BDD tests with data race detector"  || exit $?
       run_suite node-bdd   "πŸ’πŸš€" "Running Node BDD tests"   || exit $?
       run_suite csharp-bdd "πŸ”·"   "Running C# BDD tests"     || exit $?
       run_suite java-bdd   "β˜•"   "Running Java BDD tests"   || exit $?
       ;;
     clean)
       cleanup; exit 0 ;;
     *)
       log "❌ Unknown SDK: ${SDK}"
       log "πŸ“– Usage: $0 [rust|python|go|node|csharp|java|all|clean] [-race] [feature_file]"
       exit 2 ;;
   esac
   ```
   
   What do you think?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bdd): support -race option for Go BDD tests [iggy]

Posted by "chengxilo (via GitHub)" <gi...@apache.org>.
chengxilo commented on code in PR #2914:
URL: https://github.com/apache/iggy/pull/2914#discussion_r2914652682


##########
scripts/run-bdd-tests.sh:
##########


Review Comment:
   ```suggestion
       run_suite go-bdd     "🐹"   "Running Go BDD tests"     || exit $?
       GO_TEST_EXTRA_FLAGS="-race"
       run_suite go-bdd     "🐹"   "Running Go BDD tests -race"     || exit $?
   ```
   
   Just a minor issue, I think we should run both -race and normal test when `./scripts/run-bdd-tests.sh all`.
   
   I think my approach is weird tho)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bdd): support -race option for Go BDD tests [iggy]

Posted by "atharvalade (via GitHub)" <gi...@apache.org>.
atharvalade commented on code in PR #2914:
URL: https://github.com/apache/iggy/pull/2914#discussion_r2916028509


##########
scripts/run-bdd-tests.sh:
##########


Review Comment:
   will be resolved with the new refactor 



##########
scripts/run-bdd-tests.sh:
##########
@@ -50,7 +60,11 @@ run_suite(){
 case "$SDK" in
   rust)   run_suite rust-bdd   "πŸ¦€"   "Running Rust BDD tests"   ;;
   python) run_suite python-bdd "🐍"   "Running Python BDD tests" ;;
-  go)     run_suite go-bdd     "🐹"   "Running Go BDD tests"     ;;
+  go)
+    _go_label="Running Go BDD tests"
+    [[ -n "$GO_TEST_EXTRA_FLAGS" ]] && _go_label="Running Go BDD tests (${GO_TEST_EXTRA_FLAGS})"
+    run_suite go-bdd "🐹" "$_go_label"
+    ;;

Review Comment:
   will be resolved with the new refactor 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bdd): support -race option for Go BDD tests [iggy]

Posted by "mmodzelewski (via GitHub)" <gi...@apache.org>.
mmodzelewski merged PR #2914:
URL: https://github.com/apache/iggy/pull/2914


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bdd): support -race option for Go BDD tests [iggy]

Posted by "chengxilo (via GitHub)" <gi...@apache.org>.
chengxilo commented on code in PR #2914:
URL: https://github.com/apache/iggy/pull/2914#discussion_r2914865991


##########
scripts/run-bdd-tests.sh:
##########
@@ -50,7 +60,11 @@ run_suite(){
 case "$SDK" in
   rust)   run_suite rust-bdd   "πŸ¦€"   "Running Rust BDD tests"   ;;
   python) run_suite python-bdd "🐍"   "Running Python BDD tests" ;;
-  go)     run_suite go-bdd     "🐹"   "Running Go BDD tests"     ;;
+  go)
+    _go_label="Running Go BDD tests"
+    [[ -n "$GO_TEST_EXTRA_FLAGS" ]] && _go_label="Running Go BDD tests (${GO_TEST_EXTRA_FLAGS})"
+    run_suite go-bdd "🐹" "$_go_label"
+    ;;

Review Comment:
   ```suggestion
     go)     run_suite go-bdd     "🐹"   "Running Go BDD tests${GO_TEST_EXTRA_FLAGS:+ (${GO_TEST_EXTRA_FLAGS})}" ;;
   ```
   
   This looks more elegant πŸ˜‹ But just personal preference.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bdd): support -race option for Go BDD tests [iggy]

Posted by "chengxilo (via GitHub)" <gi...@apache.org>.
chengxilo commented on code in PR #2914:
URL: https://github.com/apache/iggy/pull/2914#discussion_r2914865991


##########
scripts/run-bdd-tests.sh:
##########
@@ -50,7 +60,11 @@ run_suite(){
 case "$SDK" in
   rust)   run_suite rust-bdd   "πŸ¦€"   "Running Rust BDD tests"   ;;
   python) run_suite python-bdd "🐍"   "Running Python BDD tests" ;;
-  go)     run_suite go-bdd     "🐹"   "Running Go BDD tests"     ;;
+  go)
+    _go_label="Running Go BDD tests"
+    [[ -n "$GO_TEST_EXTRA_FLAGS" ]] && _go_label="Running Go BDD tests (${GO_TEST_EXTRA_FLAGS})"
+    run_suite go-bdd "🐹" "$_go_label"
+    ;;

Review Comment:
   ```suggestion
     go)     run_suite go-bdd     "🐹"   "Running Go BDD tests${GO_TEST_EXTRA_FLAGS:+ (${GO_TEST_EXTRA_FLAGS})}" ;;
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org