Skip to content

Bump supported Npgsql version#1609

Closed
gregkalapos wants to merge 3 commits intoelastic:mainfrom
gregkalapos:BumpbNpgsqlSupportedVersion
Closed

Bump supported Npgsql version#1609
gregkalapos wants to merge 3 commits intoelastic:mainfrom
gregkalapos:BumpbNpgsqlSupportedVersion

Conversation

@gregkalapos
Copy link
Copy Markdown
Contributor

@gregkalapos gregkalapos commented Jan 19, 2022

Solves #1602

Add Npgsql v6 tests and bump supported version to 6.x.

@gregkalapos gregkalapos self-assigned this Jan 19, 2022
@ghost
Copy link
Copy Markdown

ghost commented Jan 19, 2022

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-01-25T13:20:27.942+0000

  • Duration: 95 min 55 sec

  • Commit: 120b0ce

Test stats 🧪

Test Results
Failed 4
Passed 20029
Skipped 135
Total 20168

Test errors 4

Expand to view the tests failures

Initializing / Parallel / Windows .NET Framework / Test / CgroupMetricsProviderTests.Elastic.Apm.Tests.Metrics.CgroupMetricsProviderTests.TestUnlimitedCgroup1 – Elastic.Apm.Tests.Metrics.CgroupMetricsProviderTests
    Expand to view the error details

     System.ArgumentNullException : Value cannot be null.
    Parameter name: source 
    

    Expand to view the stacktrace

     System.ArgumentNullException : Value cannot be null.
    Parameter name: source
    Stack Trace:
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       at Elastic.Apm.Tests.Metrics.CgroupMetricsProviderTests.TestUnlimitedCgroup1() in C:\Users\jenkins\workspace\net_apm-agent-dotnet-mbp_PR-1609\apm-agent-dotnet\test\Elastic.Apm.Tests\Metrics\CgroupMetricsProviderTests.cs:line 89 
    

Initializing / Parallel / Linux / Profiler Tests / NpgSqlCommandTests.Elastic.Apm.Profiler.Managed.Tests.AdoNet.NpgSqlCommandTests.CaptureAutoInstrumentedSpansWithNpgsql6(targetFramework: "netcoreapp3.1") – Elastic.Apm.Profiler.Managed.Tests.AdoNet.NpgSqlCommandTests
    Expand to view the error details

     Expected apmServer.ReceivedData.Spans to contain 179 item(s), but found 32. 
    

    Expand to view the stacktrace

     Expected apmServer.ReceivedData.Spans to contain 179 item(s), but found 32.
    Stack Trace:
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
       at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
       at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
       at FluentAssertions.Collections.SelfReferencingCollectionAssertions`2.HaveCount(Int32 expected, String because, Object[] becauseArgs)
       at Elastic.Apm.Profiler.Managed.Tests.AdoNet.NpgSqlCommandTests.Common(String targetFramework, String sampleName) in /var/lib/jenkins/workspace/net_apm-agent-dotnet-mbp_PR-1609/apm-agent-dotnet/test/Elastic.Apm.Profiler.Managed.Tests/AdoNet/NpgSqlCommandTests.cs:line 69
       at Elastic.Apm.Profiler.Managed.Tests.AdoNet.NpgSqlCommandTests.CaptureAutoInstrumentedSpansWithNpgsql6(String targetFramework) in /var/lib/jenkins/workspace/net_apm-agent-dotnet-mbp_PR-1609/apm-agent-dotnet/test/Elastic.Apm.Profiler.Managed.Tests/AdoNet/NpgSqlCommandTests.cs:line 42
    --- End of stack trace from previous location ---
    Standard Output:
        Run commands (a519c466ee124dacae3434b55e45a290)
        NpgsqlCommand
        synchronous
        asynchronous
        asynchronous with cancellation
        DbCommand
        synchronous
        asynchronous
        asynchronous with cancellation
        IDbCommand
        synchronous
        IDbCommandGenericConstraint<NpgsqlCommand>
        synchronous
        DbCommand-NetStandard
        synchronous
        asynchronous
        asynchronous with cancellation
        IDbCommand-NetStandard
        synchronous
        IDbCommandGenericConstraint<NpgsqlCommand>-NetStandard
        synchronous
        DbCommand
        synchronous
        asynchronous
        asynchronous with cancellation
        IDbCommand
        synchronous
        DbCommand-NetStandard
        synchronous
        asynchronous
        asynchronous with cancellation
        IDbCommand-NetStandard
        synchronous
        Finished sending commands 
    

Initializing / Parallel / Linux / Profiler Tests / NpgSqlCommandTests.Elastic.Apm.Profiler.Managed.Tests.AdoNet.NpgSqlCommandTests.CaptureAutoInstrumentedSpansWithNpgsql6(targetFramework: "net5.0") – Elastic.Apm.Profiler.Managed.Tests.AdoNet.NpgSqlCommandTests
    Expand to view the error details

     Expected apmServer.ReceivedData.Spans to contain 179 item(s), but found 32. 
    

    Expand to view the stacktrace

     Expected apmServer.ReceivedData.Spans to contain 179 item(s), but found 32.
    Stack Trace:
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
       at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
       at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
       at FluentAssertions.Collections.SelfReferencingCollectionAssertions`2.HaveCount(Int32 expected, String because, Object[] becauseArgs)
       at Elastic.Apm.Profiler.Managed.Tests.AdoNet.NpgSqlCommandTests.Common(String targetFramework, String sampleName) in /var/lib/jenkins/workspace/net_apm-agent-dotnet-mbp_PR-1609/apm-agent-dotnet/test/Elastic.Apm.Profiler.Managed.Tests/AdoNet/NpgSqlCommandTests.cs:line 69
       at Elastic.Apm.Profiler.Managed.Tests.AdoNet.NpgSqlCommandTests.CaptureAutoInstrumentedSpansWithNpgsql6(String targetFramework) in /var/lib/jenkins/workspace/net_apm-agent-dotnet-mbp_PR-1609/apm-agent-dotnet/test/Elastic.Apm.Profiler.Managed.Tests/AdoNet/NpgSqlCommandTests.cs:line 42
    --- End of stack trace from previous location ---
    Standard Output:
        Run commands (6e73e26acb7549ee98410c7bef471051)
        NpgsqlCommand
        synchronous
        asynchronous
        asynchronous with cancellation
        DbCommand
        synchronous
        asynchronous
        asynchronous with cancellation
        IDbCommand
        synchronous
        IDbCommandGenericConstraint<NpgsqlCommand>
        synchronous
        DbCommand-NetStandard
        synchronous
        asynchronous
        asynchronous with cancellation
        IDbCommand-NetStandard
        synchronous
        IDbCommandGenericConstraint<NpgsqlCommand>-NetStandard
        synchronous
        DbCommand
        synchronous
        asynchronous
        asynchronous with cancellation
        IDbCommand
        synchronous
        DbCommand-NetStandard
        synchronous
        asynchronous
        asynchronous with cancellation
        IDbCommand-NetStandard
        synchronous
        Finished sending commands 
    

Initializing / Parallel / Linux / Profiler Tests / NpgSqlCommandTests.Elastic.Apm.Profiler.Managed.Tests.AdoNet.NpgSqlCommandTests.CaptureAutoInstrumentedSpansWithNpgsql6(targetFramework: "net461") – Elastic.Apm.Profiler.Managed.Tests.AdoNet.NpgSqlCommandTests
    Expand to view the error details

     Expected apmServer.ReceivedData.Transactions to contain 2 item(s), but found 0. 
    

    Expand to view the stacktrace

     Expected apmServer.ReceivedData.Transactions to contain 2 item(s), but found 0.
    Stack Trace:
       at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
       at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
       at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
       at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
       at FluentAssertions.Collections.SelfReferencingCollectionAssertions`2.HaveCount(Int32 expected, String because, Object[] becauseArgs)
       at Elastic.Apm.Profiler.Managed.Tests.AdoNet.NpgSqlCommandTests.Common(String targetFramework, String sampleName) in /var/lib/jenkins/workspace/net_apm-agent-dotnet-mbp_PR-1609/apm-agent-dotnet/test/Elastic.Apm.Profiler.Managed.Tests/AdoNet/NpgSqlCommandTests.cs:line 68
       at Elastic.Apm.Profiler.Managed.Tests.AdoNet.NpgSqlCommandTests.CaptureAutoInstrumentedSpansWithNpgsql6(String targetFramework) in /var/lib/jenkins/workspace/net_apm-agent-dotnet-mbp_PR-1609/apm-agent-dotnet/test/Elastic.Apm.Profiler.Managed.Tests/AdoNet/NpgSqlCommandTests.cs:line 42
    --- End of stack trace from previous location ---
    Standard Output:
        ProcNet.ObservableProcessException: Exception while starting observable process: /var/lib/jenkins/workspace/net_apm-agent-dotnet-mbp_PR-1609/apm-agent-dotnet/sample/Npgsql6Sample/bin/Publish/net461/Npgsql6Sample.exe
        ---> System.ComponentModel.Win32Exception (13): Permission denied
        at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
        at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
        at ProcNet.ObservableProcessBase`1.StartProcess(IObserver`1 observer)
        --- End of inner exception stack trace --- 
    

Steps errors 5

Expand to view the steps failures

Test & coverage
  • Took 10 min 23 sec . View more details here
  • Description: .ci/linux/test-profiler.sh
Archive the artifacts
  • Took 0 min 0 sec . View more details here
  • Description: [2022-01-25T14:54:48.378Z] Archiving artifacts withAzureCredentials: error hudson.AbortException: s
Test & coverage
  • Took 9 min 43 sec . View more details here
  • Description: .ci/windows/testnet461.bat
Archive the artifacts
  • Took 0 min 0 sec . View more details here
  • Description: [2022-01-25T13:59:51.215Z] Archiving artifacts script returned exit code 1
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: withAzureCredentials: error hudson.AbortException: script returned exit code 1

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run benchmark tests : Run the benchmark test.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@gregkalapos gregkalapos mentioned this pull request Jan 19, 2022
@russcam
Copy link
Copy Markdown
Contributor

russcam commented Jan 20, 2022

Support for npgsql 6 can be achieved with:

Parameterizing the MsBuild properties for instrumented assembly version dependencies and passing them when publishing sample applications removes the need to create shared projects and shared project items, which will add maintenance overhead, and will only get more awkward to maintain as newer versions of instrumented assemblies are released.

@russcam
Copy link
Copy Markdown
Contributor

russcam commented Jan 20, 2022

I've opened #1611, which follows the steps above (#1609 (comment))

@gregkalapos gregkalapos deleted the BumpbNpgsqlSupportedVersion branch January 26, 2022 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants