Skip to content
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

Try fix smoke tests (#5889 -> v2) #5891

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

andrewlock
Copy link
Member

Summary of changes

  • Install v1 docker-compose in the hosted runners used for Windows smoke tests
  • Cleanup the docker networks in the smoke tests

Reason for change

Microsoft
recently stopped shipping the v1 of docker compose. That broke all our Windows smoke tests. Unfortunately, for various other reasons, we couldn't just convert to the v2 format, due to how we're reusing various bits and pieces.

Additionally, we started getting this on our linux smoke tests:

Creating network "ddtrace_20240812_56_default" with the default driver
could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network

This is basically because we're creating networks, and never cleaning them up, and for efficiency reasons we're not destroying the smoke test VMs after each run.

Implementation details

  • Install Docker-compose v1 in the Windows VMs. A bit hacky, but the quickest solution right now
  • Clean up the docker network after running the snapshot tests

Test coverage

I did some manual tests to make sure this all works as expected. Also killed and restored the smoke tests machines which solved the docker network problem temporarily.

Other details

This is obviously still all kinda horrible. I'd love to replace all this yaml with just testcontainers. One day.... stares wistfully into the distance

Backport of #5889

## Summary of changes

- Install v1 docker-compose in the hosted runners used for Windows smoke
tests
- Cleanup the docker networks in the smoke tests

## Reason for change

Microsoft
[recently](https://learn.microsoft.com/en-us/azure/devops/release-notes/2024/pipelines/sprint-240-update#dockercompose0-uses-docker-compose-v2-in-v1-compatibility-mode)
stopped shipping the v1 of docker compose. That broke all our Windows
smoke tests. Unfortunately, for various other reasons, we couldn't just
convert to the v2 format, due to how we're reusing various bits and
pieces.

Additionally, we started getting this on our linux smoke tests:

```
Creating network "ddtrace_20240812_56_default" with the default driver
could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network
```

This is basically because we're creating networks, and never cleaning
them up, and for efficiency reasons we're not destroying the smoke test
VMs after each run.

## Implementation details

- Install Docker-compose v1 in the Windows VMs. A bit hacky, but the
quickest solution right now
- Clean up the docker network after running the snapshot tests

## Test coverage

I did some manual tests to make sure this all works as expected. Also
killed and restored the smoke tests machines which solved the docker
network problem temporarily.

## Other details

This is obviously still all kinda horrible. I'd love to replace all this
yaml with just testcontainers. One day.... _stares wistfully into the
distance_
@andrewlock andrewlock added the area:builds project files, build scripts, pipelines, versioning, releases, packages label Aug 13, 2024
@andrewlock andrewlock requested a review from a team as a code owner August 13, 2024 17:37
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Aug 13, 2024

Datadog Report

Branch report: andrew/ci/try-fix-smoke-tets-v2
Commit report: 6dbcf21
Test service: dd-trace-dotnet

✅ 0 Failed, 344169 Passed, 1772 Skipped, 14h 25m 9.73s Total Time
⌛ 14 Performance Regressions

⌛ Performance Regressions vs Default Branch (14)

This report shows up to 5 performance regressions.

  • Profiler_cpu_walltime_old_stackwalk - scenarios 3.23s (+889.48ms, +38%) - Details
  • Profiler_cpu_walltime - scenarios 3.23s (+884.25ms, +38%) - Details
  • Profiler_walltime - scenarios 3.23s (+886.73ms, +38%) - Details
  • Profiler_cpu_walltime_timer_create - scenarios 3.24s (+897.18ms, +38%) - Details
  • Profiler_liveheap - scenarios 4.21s (+1.04s, +33%) - Details

@andrewlock
Copy link
Member Author

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5891) - mean (75ms)  : 65, 84
     .   : milestone, 75,
    master - mean (74ms)  : 61, 86
     .   : milestone, 74,

    section CallTarget+Inlining+NGEN
    This PR (5891) - mean (1,034ms)  : 1013, 1054
     .   : milestone, 1034,
    master - mean (1,072ms)  : 1047, 1097
     .   : milestone, 1072,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5891) - mean (111ms)  : 105, 117
     .   : milestone, 111,
    master - mean (111ms)  : 107, 114
     .   : milestone, 111,

    section CallTarget+Inlining+NGEN
    This PR (5891) - mean (719ms)  : 696, 743
     .   : milestone, 719,
    master - mean (756ms)  : 727, 785
     .   : milestone, 756,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5891) - mean (94ms)  : 89, 98
     .   : milestone, 94,
    master - mean (99ms)  : 76, 122
     .   : milestone, 99,

    section CallTarget+Inlining+NGEN
    This PR (5891) - mean (681ms)  : 658, 704
     .   : milestone, 681,
    master - mean (706ms)  : 691, 722
     .   : milestone, 706,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5891) - mean (194ms)  : 189, 198
     .   : milestone, 194,
    master - mean (193ms)  : 189, 196
     .   : milestone, 193,

    section CallTarget+Inlining+NGEN
    This PR (5891) - mean (1,135ms)  : 1107, 1164
     .   : milestone, 1135,
    master - mean (1,169ms)  : 1143, 1194
     .   : milestone, 1169,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5891) - mean (280ms)  : 272, 288
     .   : milestone, 280,
    master - mean (278ms)  : 274, 282
     .   : milestone, 278,

    section CallTarget+Inlining+NGEN
    This PR (5891) - mean (895ms)  : 867, 922
     .   : milestone, 895,
    master - mean (945ms)  : 891, 999
     .   : milestone, 945,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5891) - mean (267ms)  : 262, 273
     .   : milestone, 267,
    master - mean (268ms)  : 264, 273
     .   : milestone, 268,

    section CallTarget+Inlining+NGEN
    This PR (5891) - mean (878ms)  : 851, 906
     .   : milestone, 878,
    master - mean (906ms)  : 887, 924
     .   : milestone, 906,

Loading

Copy link
Contributor

@bouwkast bouwkast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- ${{ if eq(parameters.isLinux, true) }}:
- bash: |
sudo mkdir -p "$(dirname "${{ parameters.dockerComposePath }}")"
sudo curl -SL https://github.com/docker/compose/releases/download/1.29.2/docker-compose-linux-x86_64 -o ${{ parameters.dockerComposePath }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticing on this one that the release versions between linux (v1.29.2) differ from windows (v1.29.1)
Unsure if it matters, just pointing out.

mkdir -f -p $dir
# GitHub now requires TLS1.2. In PowerShell, run the following
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-windows-x86_64.exe" -OutFile "${{ parameters.dockerComposePath }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nit pick, but the file name is install-docker-compose-v1.yml, but these steps seem to only download the installer.

Copy link
Member

@lucaspimentel lucaspimentel Aug 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wait, it's just a stand-alone .exe? never mind, then!

@andrewlock andrewlock merged commit f417ef1 into release/2.x Aug 13, 2024
58 of 62 checks passed
@andrewlock andrewlock deleted the andrew/ci/try-fix-smoke-tets-v2 branch August 13, 2024 21:01
@github-actions github-actions bot added this to the vNext-v2 milestone Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:builds project files, build scripts, pipelines, versioning, releases, packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants