From 04a37560ffcfe19854941b189748b656756f1102 Mon Sep 17 00:00:00 2001 From: John Lambert Date: Wed, 8 Jul 2026 18:12:58 -0400 Subject: [PATCH] Consolidate dependabot bumps and fix RealDataTestsBase collisions Combines 5 open dependabot PRs into one branch so they build and test together instead of as 5 separate merges: #997, #984, #982, #981, #980. Included bumps: - Microsoft.Build.Utilities.Core 18.6.3 -> 18.7.1 (+5 others) (#997) - nuget-minor group (10 updates): System.Drawing.Common, System.Reflection.Metadata, System.Resources.Extensions, System.Security.Permissions -> 9.0.17/10.0.9; SilLcm/SilLibPalaso version refresh in Build/SilVersions.props (#984) - actions/checkout 6 -> 7 across all workflow files (#982) - actions/cache 5 -> 6 in copilot-setup-steps.yml (#981) - actions-minor group: 2 SHA-pinned action bumps in CI.yml and base-installer-cd.yml (#980) Also pulls in #979's fix for RealDataTestsBase resolving its scratch project directory via a per-machine shared path, which collided across git worktrees and was needed to get a clean local test run. Holds Microsoft.Extensions.DependencyModel at 9.0.16 instead of the 9.0.17 that #984 proposed: Directory.Packages.props has a long-standing comment warning that bumping this package breaks ICU initialization in the .NET Framework test host, and the full local test suite reproduced that exact failure (TypeInitializationException on Icu.NativeMethods, FileLoadException loading Microsoft.Extensions.DependencyModel) until this one package was reverted. Every other package in that group is kept at its bumped version. Verified with build.ps1 -BuildTests (0 errors/warnings) and test.ps1 using the same TestFilter as CI.yml (4298 tests, only 12 failures, all pre-existing local RenderBaselineTests/RenderBenchmark pixel-diff mismatches unrelated to this change). --- .github/workflows/CI.yml | 4 +-- .github/workflows/CommitMessage.yml | 2 +- .github/workflows/base-installer-cd.yml | 12 ++++---- .github/workflows/check-whitespace.yml | 2 +- .github/workflows/copilot-setup-steps.yml | 6 ++-- .github/workflows/link-check.yml | 2 +- .github/workflows/openspec-validate.yml | 2 +- .github/workflows/patch-installer-cd.yml | 12 ++++---- Build/Src/Directory.Packages.props | 2 +- Directory.Packages.props | 28 +++++++++++-------- .../RootSiteTests/RealDataTestsBase.cs | 21 ++++++++++++-- 11 files changed, 56 insertions(+), 37 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5d156c7443..24eee39967 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -21,7 +21,7 @@ jobs: runs-on: windows-2022 steps: - name: Checkout Files - uses: actions/checkout@v6 + uses: actions/checkout@v7 id: checkout - name: Build with tests @@ -144,7 +144,7 @@ jobs: path: test-results - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@c950f6fb443cb5af20a377fd0dfaa78838901040 + uses: EnricoMi/publish-unit-test-result-action@d0a4676d0e0b938bc201470d88276b7c74c712b3 with: files: 'test-results/**/*.trx' check_name: NUnit Tests diff --git a/.github/workflows/CommitMessage.yml b/.github/workflows/CommitMessage.yml index 00b003d9f6..c82fc7aa96 100644 --- a/.github/workflows/CommitMessage.yml +++ b/.github/workflows/CommitMessage.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 0 - name: Install dependencies diff --git a/.github/workflows/base-installer-cd.yml b/.github/workflows/base-installer-cd.yml index ee5f58e566..99f88e46bd 100644 --- a/.github/workflows/base-installer-cd.yml +++ b/.github/workflows/base-installer-cd.yml @@ -62,14 +62,14 @@ jobs: echo "FW_BUILD_NUMBER=$combined" >> $env:GITHUB_ENV - name: Checkout Files - uses: actions/checkout@v6 + uses: actions/checkout@v7 id: checkout with: ref: ${{ github.event.inputs.fw_ref || github.ref }} fetch-depth: 0 - name: Checkout Helps - uses: actions/checkout@v6 + uses: actions/checkout@v7 id: helps-checkout with: repository: 'sillsdev/FwHelps' @@ -78,7 +78,7 @@ jobs: path: 'DistFiles/Helps' - name: Checkout PatchableInstaller - uses: actions/checkout@v6 + uses: actions/checkout@v7 id: installer-checkout with: repository: 'sillsdev/genericinstaller' @@ -87,7 +87,7 @@ jobs: path: 'PatchableInstaller' - name: Checkout Localizations - uses: actions/checkout@v6 + uses: actions/checkout@v7 id: loc-checkout with: repository: 'sillsdev/FwLocalizations' @@ -95,7 +95,7 @@ jobs: fetch-depth: 0 path: 'Localizations' - name: Checkout liblcm - uses: actions/checkout@v6 + uses: actions/checkout@v7 id: liblcm-checkout with: repository: 'sillsdev/liblcm' @@ -284,7 +284,7 @@ jobs: - name: Tag, Create Release, and Upload artifacts if: ${{ inputs.make_release == 'true' }} - uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda + uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b with: target_commitish: ${{ github.event.inputs.fw_ref || github.ref }} tag_name: build-${{ env.FW_BUILD_NUMBER }} diff --git a/.github/workflows/check-whitespace.yml b/.github/workflows/check-whitespace.yml index 6bdf2382f6..d420a76db6 100644 --- a/.github/workflows/check-whitespace.yml +++ b/.github/workflows/check-whitespace.yml @@ -13,7 +13,7 @@ jobs: check-whitespace: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: fetch-depth: 0 diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 48717e5ec7..23699aa85f 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -87,13 +87,13 @@ jobs: steps: - name: Checkout repo - uses: actions/checkout@v6 + uses: actions/checkout@v7 # ================================================================ # CACHING - speeds up repeat runs significantly # ================================================================ - name: Cache NuGet packages - uses: actions/cache@v5 + uses: actions/cache@v6 with: path: packages key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj', '**/packages.config', '**/Directory.Packages.props', 'nuget.config') }} @@ -101,7 +101,7 @@ jobs: nuget-${{ runner.os }}- - name: Cache Serena language servers - uses: actions/cache@v5 + uses: actions/cache@v6 with: path: | ~/.cache/serena diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 88c73c9981..24fe0db73f 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Link check with lychee (non-blocking) uses: lycheeverse/lychee-action@v2.8.0 with: diff --git a/.github/workflows/openspec-validate.yml b/.github/workflows/openspec-validate.yml index 68bcf485d5..3fb92fb38e 100644 --- a/.github/workflows/openspec-validate.yml +++ b/.github/workflows/openspec-validate.yml @@ -10,7 +10,7 @@ jobs: validate-refs: runs-on: windows-2022 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Validate OpenSpec cross-references shell: pwsh run: | diff --git a/.github/workflows/patch-installer-cd.yml b/.github/workflows/patch-installer-cd.yml index 0a50e7d58c..61e8f78aa9 100644 --- a/.github/workflows/patch-installer-cd.yml +++ b/.github/workflows/patch-installer-cd.yml @@ -1,4 +1,4 @@ -name: Patch Installer +name: Patch Installer # Builds the FieldWorks Patch Installer on the specified `base_release` # If `make_release` is true, uploads installers to https://flex-updates.s3.amazonaws.com/?prefix=jobs/FieldWorks-Win-all-Release-Patch. @@ -77,14 +77,14 @@ jobs: echo "BuildVersionSegment=$combined" >> $env:GITHUB_ENV - name: Checkout Files - uses: actions/checkout@v6 + uses: actions/checkout@v7 id: checkout with: ref: ${{ github.event.inputs.fw_ref || github.ref }} fetch-depth: 0 - name: Checkout Helps - uses: actions/checkout@v6 + uses: actions/checkout@v7 id: helps-checkout with: repository: 'sillsdev/FwHelps' @@ -93,7 +93,7 @@ jobs: path: 'DistFiles/Helps' - name: Checkout PatchableInstaller - uses: actions/checkout@v6 + uses: actions/checkout@v7 id: installer-checkout with: repository: 'sillsdev/genericinstaller' @@ -102,7 +102,7 @@ jobs: path: 'PatchableInstaller' - name: Checkout Localizations - uses: actions/checkout@v6 + uses: actions/checkout@v7 id: loc-checkout with: repository: 'sillsdev/FwLocalizations' @@ -110,7 +110,7 @@ jobs: fetch-depth: 0 path: 'Localizations' - name: Checkout liblcm - uses: actions/checkout@v6 + uses: actions/checkout@v7 id: liblcm-checkout with: repository: 'sillsdev/liblcm' diff --git a/Build/Src/Directory.Packages.props b/Build/Src/Directory.Packages.props index efcc111784..f45369d24f 100644 --- a/Build/Src/Directory.Packages.props +++ b/Build/Src/Directory.Packages.props @@ -17,7 +17,7 @@ - + diff --git a/Directory.Packages.props b/Directory.Packages.props index 0f8810af03..78d6664038 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -24,27 +24,31 @@ --> + System.Resources.Extensions, and System.Security.Permissions move to 9.0.17. + Microsoft.Extensions.DependencyModel intentionally stays at 9.0.16 because + 9.0.17 breaks ICU initialization in the .NET Framework test host. --> - - + but ParatextData 9.5.x requires >= 9.0.9. Pin to 9.0.17. --> + + - - + + - + System.Security.AccessControl needs >= 6.0.0. Pin to 9.0.17. --> + diff --git a/Src/Common/RootSite/RootSiteTests/RealDataTestsBase.cs b/Src/Common/RootSite/RootSiteTests/RealDataTestsBase.cs index 8475864706..f5717a0f42 100644 --- a/Src/Common/RootSite/RootSiteTests/RealDataTestsBase.cs +++ b/Src/Common/RootSite/RootSiteTests/RealDataTestsBase.cs @@ -1,5 +1,7 @@ using System; using System.IO; +using System.Security.Cryptography; +using System.Text; using System.Threading; using NUnit.Framework; using SIL.FieldWorks.Common.FwUtils; @@ -20,11 +22,22 @@ namespace SIL.FieldWorks.Common.RootSites.RootSiteTests [TestFixture] public abstract class RealDataTestsBase { - private const string ReusableProjectName = "integration_test_data"; - private const string ProjectMutexName = - @"Local\FieldWorks.RealDataTests.integration_test_data"; + // The project name must be unique per worktree, so that multiple worktrees of the same repo + // can run tests in parallel without colliding on the same project directory. + private static readonly string ReusableProjectName = "integration_test_data_" + WorktreeSuffix(); + private static readonly string ProjectMutexName = + @"Local\FieldWorks.RealDataTests." + ReusableProjectName; private const string TestProjectSentinelFileName = ".fieldworks-real-data-test-project"; + private static string WorktreeSuffix() + { + using (var sha = SHA1.Create()) + { + var hash = sha.ComputeHash(Encoding.UTF8.GetBytes(FwDirectoryFinder.SourceDirectory)); + return BitConverter.ToString(hash, 0, 4).Replace("-", string.Empty).ToLowerInvariant(); + } + } + protected FwNewLangProjectModel m_model; protected LcmCache Cache; protected string m_dbName; @@ -138,6 +151,8 @@ public virtual void TestTearDown() protected string DbDirectory(string name) { + // CreateNewLangProj always creates here and can't be redirected; collision avoidance + // across worktrees comes from ReusableProjectName's worktree-hash suffix instead. return Path.Combine(FwDirectoryFinder.ProjectsDirectory, name); }