Skip to content

(fix) internal/civisibility: Fix test visibility on Go 1.24 - v2#3180

Merged
tonyredondo merged 1 commit into
v2-devfrom
tony/civisibility-fix-go-1.24-v2
Feb 13, 2025
Merged

(fix) internal/civisibility: Fix test visibility on Go 1.24 - v2#3180
tonyredondo merged 1 commit into
v2-devfrom
tony/civisibility-fix-go-1.24-v2

Conversation

@tonyredondo

Copy link
Copy Markdown
Member

What does this PR do?

This PR fixes Test Visibility on Go 1.24

V1: (fix) internal/civisibility: Fix test visibility on Go 1.24

Motivation

Test visibility instrumentation depends on some internal Go fields. Go 1.24 came with some changes on those internals, this PR fixes that.

  • This PR also fixes an existing bug we had by casting a sync.Mutex to sync.RWMutex

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.
  • For internal contributors, a matching PR should be created to the v2-dev branch and reviewed by @DataDog/apm-go.

Unsure? Have a question? Request a review!

@tonyredondo tonyredondo self-assigned this Feb 13, 2025
@tonyredondo
tonyredondo marked this pull request as ready for review February 13, 2025 11:26
@tonyredondo
tonyredondo requested review from a team as code owners February 13, 2025 11:26
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Feb 13, 2025

Copy link
Copy Markdown

Datadog Report

Branch report: tony/civisibility-fix-go-1.24-v2
Commit report: 4132464
Test service: dd-trace-go

❌ 7 Failed (0 Known Flaky), 2697 Passed, 67 Skipped, 1m 31.36s Total Time

❌ Failed Tests (7)

This report shows up to 5 failed tests.

  • TestNewClient - github.com/DataDog/dd-trace-go/contrib/valkey-io/valkey-go/v2 - Details

    Expand for error
     Failed
     
     === RUN   TestNewClient
     --- FAIL: TestNewClient (0.09s)
    
  • TestNewClient/Test_HMGET_command_with_cache - github.com/DataDog/dd-trace-go/contrib/valkey-io/valkey-go/v2 - Details

    Expand for error
     Failed
     
     === RUN   TestNewClient/Test_HMGET_command_with_cache
         valkey_test.go:137: 
             	Error Trace:	/home/runner/work/dd-trace-go/dd-trace-go/contrib/valkey-io/valkey-go/valkey_test.go:137
             	            				/home/runner/work/dd-trace-go/dd-trace-go/contrib/valkey-io/valkey-go/valkey_test.go:280
             	Error:      	Not equal: 
             	            	expected: bool(false)
             	            	actual  : string("false")
             	Test:       	TestNewClient/Test_HMGET_command_with_cache
     ...
    
  • TestNewClient/Test_multi_command_should_be_limited_to_5 - github.com/DataDog/dd-trace-go/contrib/valkey-io/valkey-go/v2 - Details

    Expand for error
     Failed
     
     === RUN   TestNewClient/Test_multi_command_should_be_limited_to_5
         --- FAIL: TestNewClient/Test_multi_command_should_be_limited_to_5 (0.02s)
     panic: interface conversion: interface is nil, not error [recovered]
     	panic: interface conversion: interface is nil, not error
     
     goroutine 119 [running]:
     testing.tRunner.func1.2({0x1953440, 0xc0005cda40})
     	/opt/hostedtoolcache/go/1.22.12/x64/src/testing/testing.go:1631 +0x3f7
     ...
    
  • TestNewClient/Test_SET_command_without_raw_command - github.com/DataDog/dd-trace-go/contrib/valkey-io/valkey-go/v2 - Details

    Expand for error
     Failed
     
     === RUN   TestNewClient/Test_SET_command_without_raw_command
         valkey_test.go:89: 
             	Error Trace:	/home/runner/work/dd-trace-go/dd-trace-go/contrib/valkey-io/valkey-go/valkey_test.go:89
             	            				/home/runner/work/dd-trace-go/dd-trace-go/contrib/valkey-io/valkey-go/valkey_test.go:280
             	Error:      	Not equal: 
             	            	expected: bool(false)
             	            	actual  : string("false")
             	Test:       	TestNewClient/Test_SET_command_without_raw_command
     ...
    
  • TestNewClient/Test_SET_command_with_raw_command - github.com/DataDog/dd-trace-go/contrib/valkey-io/valkey-go/v2 - Details

    Expand for error
     Failed
     
     === RUN   TestNewClient/Test_SET_command_with_raw_command
         valkey_test.go:69: 
             	Error Trace:	/home/runner/work/dd-trace-go/dd-trace-go/contrib/valkey-io/valkey-go/valkey_test.go:69
             	            				/home/runner/work/dd-trace-go/dd-trace-go/contrib/valkey-io/valkey-go/valkey_test.go:280
             	Error:      	Not equal: 
             	            	expected: bool(false)
             	            	actual  : string("false")
             	Test:       	TestNewClient/Test_SET_command_with_raw_command
     ...
    

@tonyredondo
tonyredondo merged commit fd12b92 into v2-dev Feb 13, 2025
@tonyredondo
tonyredondo deleted the tony/civisibility-fix-go-1.24-v2 branch February 13, 2025 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants