From 54e095b5ddab35a4f69f63d472d006f7262ba573 Mon Sep 17 00:00:00 2001 From: "internalautomation[bot]" <85681268+internalautomation[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 14:56:02 -0500 Subject: [PATCH 1/4] Updates for .NET 8 --- .github/workflows/ci.yml | 12 ++++++++---- .github/workflows/release.yml | 14 +++++++++----- ...rviceBus.Storage.MongoDB.AcceptanceTests.csproj | 10 +++++----- ...Bus.Storage.MongoDB.NoTx.AcceptanceTests.csproj | 10 +++++----- .../NServiceBus.Storage.MongoDB.Tests.csproj | 10 +++++----- ...oDB.TransactionalSession.AcceptanceTests.csproj | 10 +++++----- ...orage.MongoDB.TransactionalSession.Tests.csproj | 8 ++++---- 7 files changed, 41 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d24f88d..d32d6863 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,9 @@ on: workflow_dispatch: env: DOTNET_NOLOGO: true +defaults: + run: + shell: pwsh jobs: build: name: ${{ matrix.name }} @@ -22,20 +25,21 @@ jobs: fail-fast: false steps: - name: Checkout - uses: actions/checkout@v3.2.0 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 - name: Setup .NET SDK - uses: actions/setup-dotnet@v3.0.3 + uses: actions/setup-dotnet@v4.0.0 with: dotnet-version: | + 8.0.x 7.0.x 6.0.x - name: Build run: dotnet build src --configuration Release - name: Upload packages if: matrix.name == 'Windows' - uses: actions/upload-artifact@v3.1.1 + uses: actions/upload-artifact@v4.3.1 with: name: NuGet packages path: nugets/ @@ -47,4 +51,4 @@ jobs: mongodb-port: 27018 mongodb-replica-set: tr0 - name: Run tests - uses: Particular/run-tests-action@v1.4.0 + uses: Particular/run-tests-action@v1.7.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 19b9d2a2..b40de5c3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,18 +6,21 @@ on: - '[0-9]+.[0-9]+.[0-9]+-*' env: DOTNET_NOLOGO: true +defaults: + run: + shell: pwsh jobs: release: runs-on: ubuntu-20.04 steps: - name: Checkout - uses: actions/checkout@v3.2.0 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 - name: Setup .NET SDK - uses: actions/setup-dotnet@v3.0.3 + uses: actions/setup-dotnet@v4.0.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Build run: dotnet build src --configuration Release - name: Sign NuGet packages @@ -28,12 +31,13 @@ jobs: client-secret: ${{ secrets.AZURE_KEY_VAULT_CLIENT_SECRET }} certificate-name: ${{ secrets.AZURE_KEY_VAULT_CERTIFICATE_NAME }} - name: Publish artifacts - uses: actions/upload-artifact@v3.1.1 + uses: actions/upload-artifact@v4.3.1 with: name: nugets path: nugets/* retention-days: 1 - name: Deploy - uses: Particular/push-octopus-package-action@v1.0.0 + # Does not follow standard practice of targeting explicit versions because configuration is tightly coupled to Octopus Deploy configuration + uses: Particular/push-octopus-package-action@main with: octopus-deploy-api-key: ${{ secrets.OCTOPUS_DEPLOY_API_KEY }} diff --git a/src/NServiceBus.Storage.MongoDB.AcceptanceTests/NServiceBus.Storage.MongoDB.AcceptanceTests.csproj b/src/NServiceBus.Storage.MongoDB.AcceptanceTests/NServiceBus.Storage.MongoDB.AcceptanceTests.csproj index a49b920b..ccef15de 100644 --- a/src/NServiceBus.Storage.MongoDB.AcceptanceTests/NServiceBus.Storage.MongoDB.AcceptanceTests.csproj +++ b/src/NServiceBus.Storage.MongoDB.AcceptanceTests/NServiceBus.Storage.MongoDB.AcceptanceTests.csproj @@ -1,7 +1,7 @@  - net462;net6.0;net7.0 + net481;net6.0;net7.0;net8.0 true $(NoWarn);SYSLIB0021 @@ -11,11 +11,11 @@ - - + + - - + + diff --git a/src/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests.csproj b/src/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests.csproj index a49b920b..ccef15de 100644 --- a/src/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests.csproj +++ b/src/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests.csproj @@ -1,7 +1,7 @@  - net462;net6.0;net7.0 + net481;net6.0;net7.0;net8.0 true $(NoWarn);SYSLIB0021 @@ -11,11 +11,11 @@ - - + + - - + + diff --git a/src/NServiceBus.Storage.MongoDB.Tests/NServiceBus.Storage.MongoDB.Tests.csproj b/src/NServiceBus.Storage.MongoDB.Tests/NServiceBus.Storage.MongoDB.Tests.csproj index d67ef135..eac70876 100644 --- a/src/NServiceBus.Storage.MongoDB.Tests/NServiceBus.Storage.MongoDB.Tests.csproj +++ b/src/NServiceBus.Storage.MongoDB.Tests/NServiceBus.Storage.MongoDB.Tests.csproj @@ -1,7 +1,7 @@  - net462;net6.0;net7.0 + net481;net6.0;net7.0;net8.0 true @@ -10,12 +10,12 @@ - - + + - - + + diff --git a/src/NServiceBus.Storage.MongoDB.TransactionalSession.AcceptanceTests/NServiceBus.Storage.MongoDB.TransactionalSession.AcceptanceTests.csproj b/src/NServiceBus.Storage.MongoDB.TransactionalSession.AcceptanceTests/NServiceBus.Storage.MongoDB.TransactionalSession.AcceptanceTests.csproj index e8c55c43..32920ae0 100644 --- a/src/NServiceBus.Storage.MongoDB.TransactionalSession.AcceptanceTests/NServiceBus.Storage.MongoDB.TransactionalSession.AcceptanceTests.csproj +++ b/src/NServiceBus.Storage.MongoDB.TransactionalSession.AcceptanceTests/NServiceBus.Storage.MongoDB.TransactionalSession.AcceptanceTests.csproj @@ -1,19 +1,19 @@  - net462;net6.0;net7.0 + net481;net6.0;net7.0;net8.0 10.0 NServiceBus.TransactionalSession.AcceptanceTests - - + + - - + + diff --git a/src/NServiceBus.Storage.MongoDB.TransactionalSession.Tests/NServiceBus.Storage.MongoDB.TransactionalSession.Tests.csproj b/src/NServiceBus.Storage.MongoDB.TransactionalSession.Tests/NServiceBus.Storage.MongoDB.TransactionalSession.Tests.csproj index 737186a6..2ff98f94 100644 --- a/src/NServiceBus.Storage.MongoDB.TransactionalSession.Tests/NServiceBus.Storage.MongoDB.TransactionalSession.Tests.csproj +++ b/src/NServiceBus.Storage.MongoDB.TransactionalSession.Tests/NServiceBus.Storage.MongoDB.TransactionalSession.Tests.csproj @@ -1,14 +1,14 @@  - net462;net6.0;net7.0 + net481;net6.0;net7.0;net8.0 10.0 - - - + + + From 66624fad3cbb5ba640f24286f369201532de79bb Mon Sep 17 00:00:00 2001 From: David Boike Date: Wed, 13 Mar 2024 10:35:39 -0500 Subject: [PATCH 2/4] Flag for binary formatter --- .../NServiceBus.Storage.MongoDB.AcceptanceTests.csproj | 1 + .../NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests.csproj | 1 + 2 files changed, 2 insertions(+) diff --git a/src/NServiceBus.Storage.MongoDB.AcceptanceTests/NServiceBus.Storage.MongoDB.AcceptanceTests.csproj b/src/NServiceBus.Storage.MongoDB.AcceptanceTests/NServiceBus.Storage.MongoDB.AcceptanceTests.csproj index ccef15de..edaa62fa 100644 --- a/src/NServiceBus.Storage.MongoDB.AcceptanceTests/NServiceBus.Storage.MongoDB.AcceptanceTests.csproj +++ b/src/NServiceBus.Storage.MongoDB.AcceptanceTests/NServiceBus.Storage.MongoDB.AcceptanceTests.csproj @@ -4,6 +4,7 @@ net481;net6.0;net7.0;net8.0 true $(NoWarn);SYSLIB0021 + true diff --git a/src/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests.csproj b/src/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests.csproj index ccef15de..edaa62fa 100644 --- a/src/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests.csproj +++ b/src/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests/NServiceBus.Storage.MongoDB.NoTx.AcceptanceTests.csproj @@ -4,6 +4,7 @@ net481;net6.0;net7.0;net8.0 true $(NoWarn);SYSLIB0021 + true From 5032649afa3cf13b8a5a3ec878fae2be4652d0f4 Mon Sep 17 00:00:00 2001 From: David Boike Date: Thu, 14 Mar 2024 10:37:06 -0500 Subject: [PATCH 3/4] Bump mongo setup action & 1 suppression --- .github/workflows/ci.yml | 2 +- src/NServiceBus.Storage.MongoDB.Tests/.editorconfig | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d32d6863..bb523d6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: path: nugets/ retention-days: 7 - name: Setup MongoDB Server - uses: Particular/setup-mongodb-action@v1.3.0 + uses: Particular/setup-mongodb-action@v1.4.0 with: connection-string-name: NServiceBusStorageMongoDB_ConnectionString mongodb-port: 27018 diff --git a/src/NServiceBus.Storage.MongoDB.Tests/.editorconfig b/src/NServiceBus.Storage.MongoDB.Tests/.editorconfig index f0c602e0..fe663059 100644 --- a/src/NServiceBus.Storage.MongoDB.Tests/.editorconfig +++ b/src/NServiceBus.Storage.MongoDB.Tests/.editorconfig @@ -21,3 +21,6 @@ dotnet_diagnostic.NSB0004.severity = none dotnet_diagnostic.NSB0006.severity = none dotnet_diagnostic.NSB0009.severity = none dotnet_diagnostic.NSB0012.severity = none + +# IDE0028: Simplify collection initialization +dotnet_diagnostic.IDE0028.severity = suggestion From 0de288672b5cef886a0b1f029e815ffb7d6b1186 Mon Sep 17 00:00:00 2001 From: David Boike Date: Thu, 14 Mar 2024 10:44:19 -0500 Subject: [PATCH 4/4] MongoDB.Driver CVE https://github.com/advisories/GHSA-7j9m-j397-g4wx cannot be updated to 2.19.0 without breaking change to target framework --- .../NServiceBus.Storage.MongoDB.csproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/NServiceBus.Storage.MongoDB/NServiceBus.Storage.MongoDB.csproj b/src/NServiceBus.Storage.MongoDB/NServiceBus.Storage.MongoDB.csproj index 1e9c6771..d70fe81a 100644 --- a/src/NServiceBus.Storage.MongoDB/NServiceBus.Storage.MongoDB.csproj +++ b/src/NServiceBus.Storage.MongoDB/NServiceBus.Storage.MongoDB.csproj @@ -2,6 +2,8 @@ net452;netstandard2.0 + + NU1903