From fe7c2a448004e544543ffe1e0f22acda6da2532c Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Mon, 23 Sep 2024 08:18:51 +0700 Subject: [PATCH 01/30] update projects to target dotnet 9 --- backend/Directory.Build.props | 3 +++ backend/Dockerfile | 4 ++-- backend/FixFwData/FixFwData.csproj | 3 --- backend/LexBoxApi/LexBoxApi.csproj | 4 ---- backend/LexBoxApi/dev.Dockerfile | 4 ++-- backend/LexCore/LexCore.csproj | 4 ---- backend/LexData/LexData.csproj | 4 ---- backend/SyncReverseProxy/Dockerfile | 20 ------------------- .../SyncReverseProxy/SyncReverseProxy.csproj | 4 ---- backend/Testing/Testing.csproj | 4 ---- 10 files changed, 7 insertions(+), 47 deletions(-) delete mode 100644 backend/SyncReverseProxy/Dockerfile diff --git a/backend/Directory.Build.props b/backend/Directory.Build.props index e70320586..574e961ef 100644 --- a/backend/Directory.Build.props +++ b/backend/Directory.Build.props @@ -9,7 +9,10 @@ $(MSBuildProjectDirectory)/bin/container/ + dev + net9.0 false + enable enable Nullable diff --git a/backend/Dockerfile b/backend/Dockerfile index 4c4630a7f..3a43c094f 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,10 +1,10 @@ # syntax=docker/dockerfile:1 -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build COPY . . # WORKDIR /src diff --git a/backend/FixFwData/FixFwData.csproj b/backend/FixFwData/FixFwData.csproj index f8bc8031c..04fa56ee3 100644 --- a/backend/FixFwData/FixFwData.csproj +++ b/backend/FixFwData/FixFwData.csproj @@ -8,9 +8,6 @@ SIL International LexBoxApi Testing Copyright © 2023 SIL International - net8.0 - enable - enable diff --git a/backend/LexBoxApi/LexBoxApi.csproj b/backend/LexBoxApi/LexBoxApi.csproj index d7086c816..a508589fc 100644 --- a/backend/LexBoxApi/LexBoxApi.csproj +++ b/backend/LexBoxApi/LexBoxApi.csproj @@ -1,12 +1,8 @@ - net8.0 - enable - enable Linux true - dev 7392cddf-9b3b-441c-9316-203bb5c4a6bc 1 diff --git a/backend/LexBoxApi/dev.Dockerfile b/backend/LexBoxApi/dev.Dockerfile index a54f6395c..9520ed928 100644 --- a/backend/LexBoxApi/dev.Dockerfile +++ b/backend/LexBoxApi/dev.Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build EXPOSE 80 EXPOSE 443 RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ @@ -9,7 +9,7 @@ RUN mkdir -p /var/www && chown -R www-data:www-data /var/www USER www-data:www-data WORKDIR /src/backend # Copy the main source project files -COPY */*.csproj *.sln ./ +COPY */*.csproj *.sln Directory.Build.props ./ # move them into the proper sub folders, based on the name of the project RUN for file in $(ls *.csproj); do dir=${file%.*} mkdir -p ${file%.*}/ && mv $file ${file%.*}/; done; dotnet restore FixFwData/FixFwData.csproj; dotnet restore LexBoxApi/LexBoxApi.csproj diff --git a/backend/LexCore/LexCore.csproj b/backend/LexCore/LexCore.csproj index 276363f1a..923d08ac4 100644 --- a/backend/LexCore/LexCore.csproj +++ b/backend/LexCore/LexCore.csproj @@ -1,10 +1,6 @@ - net8.0 - enable - enable - dev diff --git a/backend/LexData/LexData.csproj b/backend/LexData/LexData.csproj index 748230c11..2c3da9a08 100644 --- a/backend/LexData/LexData.csproj +++ b/backend/LexData/LexData.csproj @@ -1,10 +1,6 @@ - net8.0 - enable - enable - dev diff --git a/backend/SyncReverseProxy/Dockerfile b/backend/SyncReverseProxy/Dockerfile deleted file mode 100644 index 8c431359b..000000000 --- a/backend/SyncReverseProxy/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base -WORKDIR /app -EXPOSE 80 -EXPOSE 443 - -FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build -WORKDIR /src -COPY ["SyncReverseProxy/SyncReverseProxy.csproj", "SyncReverseProxy/"] -RUN dotnet restore "SyncReverseProxy/SyncReverseProxy.csproj" -COPY . . -WORKDIR "/src/SyncReverseProxy" -RUN dotnet build "SyncReverseProxy.csproj" -c Release -o /app/build - -FROM build AS publish -RUN dotnet publish "SyncReverseProxy.csproj" -c Release -o /app/publish - -FROM base AS final -WORKDIR /app -COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "SyncReverseProxy.dll"] diff --git a/backend/SyncReverseProxy/SyncReverseProxy.csproj b/backend/SyncReverseProxy/SyncReverseProxy.csproj index ced418e92..2560fa72f 100644 --- a/backend/SyncReverseProxy/SyncReverseProxy.csproj +++ b/backend/SyncReverseProxy/SyncReverseProxy.csproj @@ -1,12 +1,8 @@ - net8.0 - enable - enable Linux LexSyncReverseProxy - dev diff --git a/backend/Testing/Testing.csproj b/backend/Testing/Testing.csproj index 556f03705..a930ab670 100644 --- a/backend/Testing/Testing.csproj +++ b/backend/Testing/Testing.csproj @@ -1,10 +1,6 @@ - net8.0 - enable - enable - false $(MSBuildProjectDirectory) From 40d9fde8bb224afecad11ccbbcef67c70493c49a Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Wed, 25 Sep 2024 09:49:57 +0700 Subject: [PATCH 02/30] upgrade FWLite projects --- .../FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj | 3 --- backend/FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj | 3 --- backend/FwLite/FwLiteDesktop/FwLiteDesktop.csproj | 2 +- .../FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj | 3 --- backend/FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj | 3 --- backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj | 3 --- backend/FwLite/LcmCrdt/LcmCrdt.csproj | 3 --- backend/FwLite/LocalWebApp/LocalWebApp.csproj | 3 --- backend/FwLite/MiniLcm/MiniLcm.csproj | 3 --- backend/LfClassicData/LfClassicData.csproj | 3 --- 10 files changed, 1 insertion(+), 28 deletions(-) diff --git a/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj b/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj index 5f06ced72..d2ff53757 100644 --- a/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj +++ b/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj @@ -1,9 +1,6 @@ - net8.0 - enable - enable false true diff --git a/backend/FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj b/backend/FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj index 606eb038f..31f8e4941 100644 --- a/backend/FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj +++ b/backend/FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj @@ -1,9 +1,6 @@  - net8.0 - enable - enable diff --git a/backend/FwLite/FwLiteDesktop/FwLiteDesktop.csproj b/backend/FwLite/FwLiteDesktop/FwLiteDesktop.csproj index fecb71fee..834b64f07 100644 --- a/backend/FwLite/FwLiteDesktop/FwLiteDesktop.csproj +++ b/backend/FwLite/FwLiteDesktop/FwLiteDesktop.csproj @@ -2,7 +2,7 @@ - net8.0-windows10.0.19041.0 + net9.0-windows10.0.19041.0 diff --git a/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj b/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj index e0aafb101..ad8064324 100644 --- a/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj +++ b/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj @@ -1,9 +1,6 @@ - net8.0 - enable - enable false true diff --git a/backend/FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj b/backend/FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj index f62ab2c9c..2bc2b720a 100644 --- a/backend/FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj +++ b/backend/FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj @@ -2,9 +2,6 @@ Exe - net8.0 - enable - enable true diff --git a/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj b/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj index d0b0c2ca5..859e420cc 100644 --- a/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj +++ b/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj @@ -1,9 +1,6 @@ - net8.0 - enable - enable false true diff --git a/backend/FwLite/LcmCrdt/LcmCrdt.csproj b/backend/FwLite/LcmCrdt/LcmCrdt.csproj index de3206339..f5d478868 100644 --- a/backend/FwLite/LcmCrdt/LcmCrdt.csproj +++ b/backend/FwLite/LcmCrdt/LcmCrdt.csproj @@ -1,9 +1,6 @@  - net8.0 - enable - enable diff --git a/backend/FwLite/LocalWebApp/LocalWebApp.csproj b/backend/FwLite/LocalWebApp/LocalWebApp.csproj index 6b9a7e5fe..01c455faa 100644 --- a/backend/FwLite/LocalWebApp/LocalWebApp.csproj +++ b/backend/FwLite/LocalWebApp/LocalWebApp.csproj @@ -1,9 +1,6 @@ - net8.0 - enable - enable Linux true false diff --git a/backend/FwLite/MiniLcm/MiniLcm.csproj b/backend/FwLite/MiniLcm/MiniLcm.csproj index 485635816..f644d7764 100644 --- a/backend/FwLite/MiniLcm/MiniLcm.csproj +++ b/backend/FwLite/MiniLcm/MiniLcm.csproj @@ -1,9 +1,6 @@  - net8.0 - enable - enable diff --git a/backend/LfClassicData/LfClassicData.csproj b/backend/LfClassicData/LfClassicData.csproj index cbe4974fa..f226226e0 100644 --- a/backend/LfClassicData/LfClassicData.csproj +++ b/backend/LfClassicData/LfClassicData.csproj @@ -1,9 +1,6 @@  - net8.0 - enable - enable From 593f4f98b4cb293731a986df3422bd1475bf05d9 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Wed, 25 Sep 2024 09:53:21 +0700 Subject: [PATCH 03/30] change workflows to use dotnet 9 --- .github/workflows/fw-lite.yaml | 8 ++++---- .github/workflows/integration-test.yaml | 2 +- .github/workflows/lexbox-api.yaml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/fw-lite.yaml b/.github/workflows/fw-lite.yaml index 65a875609..31b15e61d 100644 --- a/.github/workflows/fw-lite.yaml +++ b/.github/workflows/fw-lite.yaml @@ -30,7 +30,7 @@ jobs: submodules: true - uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '9.x' - uses: actions/setup-node@v4 with: node-version-file: './frontend/package.json' @@ -72,7 +72,7 @@ jobs: path: frontend/viewer/dist - uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '9.x' - name: Dotnet build working-directory: backend/FwLite/LocalWebApp @@ -109,7 +109,7 @@ jobs: path: frontend/viewer/dist - uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '9.x' - name: Dotnet build working-directory: backend/FwLite/LocalWebApp @@ -145,7 +145,7 @@ jobs: path: frontend/viewer/dist - uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '9.x' - name: Setup Maui run: dotnet workload install maui-windows diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index 977f687f2..b3cde96ba 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -88,7 +88,7 @@ jobs: env: DOTNET_INSTALL_DIR: ${{ inputs.runs-on == 'self-hosted' && '/opt/hostedtoolcache/dotnet' || '' }} #poor man's conditional with: - dotnet-version: '8.x' + dotnet-version: '9.x' - uses: MatteoH2O1999/setup-python@429b7dee8a48c31eb72ce0b420ea938ff51c2f11 # v3.2.1 id: python if: ${{ inputs.runs-on != 'windows-latest' && !env.act && inputs.hg-version == '3' }} diff --git a/.github/workflows/lexbox-api.yaml b/.github/workflows/lexbox-api.yaml index d87cfe0b3..8c2eac71c 100644 --- a/.github/workflows/lexbox-api.yaml +++ b/.github/workflows/lexbox-api.yaml @@ -49,7 +49,7 @@ jobs: submodules: true - uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '9.x' - name: Dotnet build run: dotnet build LexBoxOnly.slnf - name: Unit tests From f8dbc6c55622ba476b4e651c4007e1ab8710a38a Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Wed, 25 Sep 2024 15:30:25 +0700 Subject: [PATCH 04/30] add setup maui to build and test workflow for fw lite --- .github/workflows/fw-lite.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/fw-lite.yaml b/.github/workflows/fw-lite.yaml index 31b15e61d..08337982c 100644 --- a/.github/workflows/fw-lite.yaml +++ b/.github/workflows/fw-lite.yaml @@ -34,6 +34,8 @@ jobs: - uses: actions/setup-node@v4 with: node-version-file: './frontend/package.json' + - name: Setup Maui + run: dotnet workload install maui-windows - name: Dotnet build working-directory: backend/FwLite/FwLiteDesktop From 97cc436eeb082266adc45ba01110889dde6c4823 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Wed, 25 Sep 2024 16:00:40 +0700 Subject: [PATCH 05/30] add setup dotnet to integration-test-gha.yaml --- .github/workflows/integration-test-gha.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/integration-test-gha.yaml b/.github/workflows/integration-test-gha.yaml index 8161dcb22..ca606e02b 100644 --- a/.github/workflows/integration-test-gha.yaml +++ b/.github/workflows/integration-test-gha.yaml @@ -22,6 +22,9 @@ jobs: - uses: actions/checkout@v4 with: submodules: true + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.x' - name: Install Task uses: arduino/setup-task@v2 with: From c925d3ebb7d44e8667de52b39ee59def27369e0e Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Thu, 7 Nov 2024 11:27:43 +0700 Subject: [PATCH 06/30] fix tests project not building due to a target framework mismatch --- backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj b/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj index 370a55ee6..bc8b2a0f4 100644 --- a/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj +++ b/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj @@ -1,10 +1,6 @@ - net8.0 - enable - enable - false true From fe66a6e5fa2fc9208614071cd32c80d44ab360e8 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Thu, 7 Nov 2024 11:30:06 +0700 Subject: [PATCH 07/30] fix LcmDebugger.csproj --- backend/LfNext/LcmDebugger/LcmDebugger.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/backend/LfNext/LcmDebugger/LcmDebugger.csproj b/backend/LfNext/LcmDebugger/LcmDebugger.csproj index e47e15988..92e8860a6 100644 --- a/backend/LfNext/LcmDebugger/LcmDebugger.csproj +++ b/backend/LfNext/LcmDebugger/LcmDebugger.csproj @@ -2,9 +2,6 @@ Exe - net8.0 - enable - enable From ed2ccb4db4437c6145ab85a1faea9e2741456ad8 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Wed, 13 Nov 2024 10:18:11 +0700 Subject: [PATCH 08/30] upgrade packages to latest versions --- backend/FixFwData/FixFwData.csproj | 4 ++-- backend/FwHeadless/FwHeadless.csproj | 3 ++- .../Fixtures/MockFwProjectList.cs | 2 +- .../FwDataMiniLcmBridge.Tests.csproj | 8 ++++---- .../FwDataMiniLcmBridge/FieldWorksProjectList.cs | 8 +++++--- .../FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj | 12 ++++++------ backend/FwLite/FwLiteDesktop/FwLiteDesktop.csproj | 2 +- .../FwLiteProjectSync.Tests.csproj | 7 +++---- .../FwLiteProjectSync/FwLiteProjectSync.csproj | 4 ++-- ...taModelSnapshotTests.VerifyDbModel.verified.txt | 2 +- backend/FwLite/LcmCrdt/LcmCrdt.csproj | 3 ++- backend/FwLite/LocalWebApp/LocalWebApp.csproj | 10 +++++----- backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj | 2 +- backend/FwLite/MiniLcm/MiniLcm.csproj | 2 +- backend/LexBoxApi/LexBoxApi.csproj | 7 ++++--- backend/LexData/LexData.csproj | 14 ++++++-------- backend/LfClassicData/LfClassicData.csproj | 2 +- backend/SyncReverseProxy/SyncReverseProxy.csproj | 6 +++--- backend/Testing/Testing.csproj | 12 ++++++------ 19 files changed, 56 insertions(+), 54 deletions(-) diff --git a/backend/FixFwData/FixFwData.csproj b/backend/FixFwData/FixFwData.csproj index 0efaca730..4b99bb4c3 100644 --- a/backend/FixFwData/FixFwData.csproj +++ b/backend/FixFwData/FixFwData.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/backend/FwHeadless/FwHeadless.csproj b/backend/FwHeadless/FwHeadless.csproj index 335b1e00b..212efc32c 100644 --- a/backend/FwHeadless/FwHeadless.csproj +++ b/backend/FwHeadless/FwHeadless.csproj @@ -8,10 +8,11 @@ - + + diff --git a/backend/FwLite/FwDataMiniLcmBridge.Tests/Fixtures/MockFwProjectList.cs b/backend/FwLite/FwDataMiniLcmBridge.Tests/Fixtures/MockFwProjectList.cs index 43e3a65b8..6463670c1 100644 --- a/backend/FwLite/FwDataMiniLcmBridge.Tests/Fixtures/MockFwProjectList.cs +++ b/backend/FwLite/FwDataMiniLcmBridge.Tests/Fixtures/MockFwProjectList.cs @@ -7,7 +7,7 @@ public class MockFwProjectList(IOptions config, MockFwProjec { public override IEnumerable EnumerateProjects() { - return loader.Projects.Keys.Select(k => new FwDataProject(k, config.Value.ProjectsFolder)); + return loader.Projects.Keys.Select(k => new FwDataProject(k, _config.Value.ProjectsFolder)); } public override FwDataProject? GetProject(string name) diff --git a/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj b/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj index 2457c9a3e..f5df53b92 100644 --- a/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj +++ b/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj @@ -15,16 +15,16 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/backend/FwLite/FwDataMiniLcmBridge/FieldWorksProjectList.cs b/backend/FwLite/FwDataMiniLcmBridge/FieldWorksProjectList.cs index 47cb91b57..f77bf944c 100644 --- a/backend/FwLite/FwDataMiniLcmBridge/FieldWorksProjectList.cs +++ b/backend/FwLite/FwDataMiniLcmBridge/FieldWorksProjectList.cs @@ -6,15 +6,17 @@ namespace FwDataMiniLcmBridge; public class FieldWorksProjectList(IOptions config) { + protected readonly IOptions _config = config; + public virtual IEnumerable EnumerateProjects() { - if (!Directory.Exists(config.Value.ProjectsFolder)) Directory.CreateDirectory(config.Value.ProjectsFolder); - foreach (var directory in Directory.EnumerateDirectories(config.Value.ProjectsFolder)) + if (!Directory.Exists(_config.Value.ProjectsFolder)) Directory.CreateDirectory(_config.Value.ProjectsFolder); + foreach (var directory in Directory.EnumerateDirectories(_config.Value.ProjectsFolder)) { var projectName = Path.GetFileName(directory); if (string.IsNullOrEmpty(projectName)) continue; if (!File.Exists(Path.Combine(directory, projectName + ".fwdata"))) continue; - yield return new FwDataProject(projectName, config.Value.ProjectsFolder); + yield return new FwDataProject(projectName, _config.Value.ProjectsFolder); } } diff --git a/backend/FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj b/backend/FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj index 7fc9a65ef..c0e8d1aef 100644 --- a/backend/FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj +++ b/backend/FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj @@ -5,18 +5,18 @@ $(ApplicationDisplayVersion) - - - - - - + + + + + + diff --git a/backend/FwLite/FwLiteDesktop/FwLiteDesktop.csproj b/backend/FwLite/FwLiteDesktop/FwLiteDesktop.csproj index a27b7c0f7..71ce7fca5 100644 --- a/backend/FwLite/FwLiteDesktop/FwLiteDesktop.csproj +++ b/backend/FwLite/FwLiteDesktop/FwLiteDesktop.csproj @@ -80,7 +80,7 @@ - + diff --git a/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj b/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj index b3b50b59f..5bff1a476 100644 --- a/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj +++ b/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj @@ -1,7 +1,6 @@ - false true @@ -16,15 +15,15 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/backend/FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj b/backend/FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj index 3fed6d3a5..c6ffaa655 100644 --- a/backend/FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj +++ b/backend/FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/backend/FwLite/LcmCrdt.Tests/DataModelSnapshotTests.VerifyDbModel.verified.txt b/backend/FwLite/LcmCrdt.Tests/DataModelSnapshotTests.VerifyDbModel.verified.txt index a7b2cc8c5..75ded662f 100644 --- a/backend/FwLite/LcmCrdt.Tests/DataModelSnapshotTests.VerifyDbModel.verified.txt +++ b/backend/FwLite/LcmCrdt.Tests/DataModelSnapshotTests.VerifyDbModel.verified.txt @@ -328,4 +328,4 @@ Relational:ViewName: Relational:ViewSchema: Annotations: - ProductVersion: 8.0.4 \ No newline at end of file + ProductVersion: 9.0.0 \ No newline at end of file diff --git a/backend/FwLite/LcmCrdt/LcmCrdt.csproj b/backend/FwLite/LcmCrdt/LcmCrdt.csproj index bb404a132..51772de5b 100644 --- a/backend/FwLite/LcmCrdt/LcmCrdt.csproj +++ b/backend/FwLite/LcmCrdt/LcmCrdt.csproj @@ -13,8 +13,9 @@ + - + diff --git a/backend/FwLite/LocalWebApp/LocalWebApp.csproj b/backend/FwLite/LocalWebApp/LocalWebApp.csproj index c1054b2c6..ae0c73660 100644 --- a/backend/FwLite/LocalWebApp/LocalWebApp.csproj +++ b/backend/FwLite/LocalWebApp/LocalWebApp.csproj @@ -17,12 +17,12 @@ - - - + + + - - + + diff --git a/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj b/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj index bc8b2a0f4..d2c9697b2 100644 --- a/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj +++ b/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj @@ -8,7 +8,7 @@ - + all diff --git a/backend/FwLite/MiniLcm/MiniLcm.csproj b/backend/FwLite/MiniLcm/MiniLcm.csproj index 089b55fc4..4a12af813 100644 --- a/backend/FwLite/MiniLcm/MiniLcm.csproj +++ b/backend/FwLite/MiniLcm/MiniLcm.csproj @@ -6,7 +6,7 @@ - + diff --git a/backend/LexBoxApi/LexBoxApi.csproj b/backend/LexBoxApi/LexBoxApi.csproj index 8c1a27578..8b0d186e4 100644 --- a/backend/LexBoxApi/LexBoxApi.csproj +++ b/backend/LexBoxApi/LexBoxApi.csproj @@ -23,9 +23,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -49,6 +49,7 @@ + diff --git a/backend/LexData/LexData.csproj b/backend/LexData/LexData.csproj index 98bf70735..aba8153c5 100644 --- a/backend/LexData/LexData.csproj +++ b/backend/LexData/LexData.csproj @@ -6,17 +6,15 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - + + + + + diff --git a/backend/LfClassicData/LfClassicData.csproj b/backend/LfClassicData/LfClassicData.csproj index f226226e0..44aece8c6 100644 --- a/backend/LfClassicData/LfClassicData.csproj +++ b/backend/LfClassicData/LfClassicData.csproj @@ -6,7 +6,7 @@ - + diff --git a/backend/SyncReverseProxy/SyncReverseProxy.csproj b/backend/SyncReverseProxy/SyncReverseProxy.csproj index 1e6f6cc54..d697eabac 100644 --- a/backend/SyncReverseProxy/SyncReverseProxy.csproj +++ b/backend/SyncReverseProxy/SyncReverseProxy.csproj @@ -6,10 +6,10 @@ - - + + - + diff --git a/backend/Testing/Testing.csproj b/backend/Testing/Testing.csproj index b12de4503..7ea23331d 100644 --- a/backend/Testing/Testing.csproj +++ b/backend/Testing/Testing.csproj @@ -23,19 +23,19 @@ - - + + - - - + + + - + runtime; build; native; contentfiles; analyzers; buildtransitive all From 118769e851d498077efcac7c92b9effd86aff58b Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Wed, 13 Nov 2024 10:40:42 +0700 Subject: [PATCH 09/30] update harmony deps --- backend/harmony | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/harmony b/backend/harmony index 4200fa131..4fe848e80 160000 --- a/backend/harmony +++ b/backend/harmony @@ -1 +1 @@ -Subproject commit 4200fa131004ab509a16b6385d7b6cd0da459578 +Subproject commit 4fe848e80d9e5194c21184cd9c19208dd2d53e77 From 3687697ae6e08124d720b6071664c66f472b70fe Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Wed, 13 Nov 2024 10:41:02 +0700 Subject: [PATCH 10/30] update more versions --- .../FwDataMiniLcmBridge.Tests.csproj | 2 +- .../FwLiteProjectSync.Tests.csproj | 2 +- backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj | 4 ++-- backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj | 2 +- backend/LexBoxApi/LexBoxApi.csproj | 10 +++++----- backend/LfClassicData/LfClassicData.csproj | 2 +- backend/SyncReverseProxy/SyncReverseProxy.csproj | 10 +++++----- backend/Testing/Testing.csproj | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj b/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj index f5df53b92..b064033e3 100644 --- a/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj +++ b/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj @@ -16,7 +16,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj b/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj index 5bff1a476..012a0b6cf 100644 --- a/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj +++ b/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj @@ -14,7 +14,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj b/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj index 78ca01852..0e6ba4c24 100644 --- a/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj +++ b/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj @@ -12,10 +12,10 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + - + all diff --git a/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj b/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj index d2c9697b2..f05d0a8cf 100644 --- a/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj +++ b/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj @@ -7,7 +7,7 @@ - + diff --git a/backend/LexBoxApi/LexBoxApi.csproj b/backend/LexBoxApi/LexBoxApi.csproj index 8b0d186e4..b4234c503 100644 --- a/backend/LexBoxApi/LexBoxApi.csproj +++ b/backend/LexBoxApi/LexBoxApi.csproj @@ -29,15 +29,15 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + - - - + + + diff --git a/backend/LfClassicData/LfClassicData.csproj b/backend/LfClassicData/LfClassicData.csproj index 44aece8c6..2a35852ac 100644 --- a/backend/LfClassicData/LfClassicData.csproj +++ b/backend/LfClassicData/LfClassicData.csproj @@ -5,7 +5,7 @@ - + diff --git a/backend/SyncReverseProxy/SyncReverseProxy.csproj b/backend/SyncReverseProxy/SyncReverseProxy.csproj index d697eabac..fe72988bf 100644 --- a/backend/SyncReverseProxy/SyncReverseProxy.csproj +++ b/backend/SyncReverseProxy/SyncReverseProxy.csproj @@ -10,14 +10,14 @@ - + - - - + + + - + diff --git a/backend/Testing/Testing.csproj b/backend/Testing/Testing.csproj index 7ea23331d..7c7bf8953 100644 --- a/backend/Testing/Testing.csproj +++ b/backend/Testing/Testing.csproj @@ -12,7 +12,7 @@ - + @@ -29,7 +29,7 @@ - + From 31f380c7a0d0923f5e5dade6e22174aa165bb184 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Wed, 13 Nov 2024 10:52:25 +0700 Subject: [PATCH 11/30] update refit version on lcm crdt --- backend/FwLite/LcmCrdt/LcmCrdt.csproj | 4 ++-- backend/LexData/LexData.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/FwLite/LcmCrdt/LcmCrdt.csproj b/backend/FwLite/LcmCrdt/LcmCrdt.csproj index d50ee72ae..1d2ca791d 100644 --- a/backend/FwLite/LcmCrdt/LcmCrdt.csproj +++ b/backend/FwLite/LcmCrdt/LcmCrdt.csproj @@ -16,8 +16,8 @@ - - + + diff --git a/backend/LexData/LexData.csproj b/backend/LexData/LexData.csproj index aba8153c5..c4c0fd13e 100644 --- a/backend/LexData/LexData.csproj +++ b/backend/LexData/LexData.csproj @@ -16,7 +16,7 @@ - + From 360a2b57a66eb5086cc243b84b9fb5ff7c820462 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Wed, 13 Nov 2024 11:00:27 +0700 Subject: [PATCH 12/30] fix compile issue due to harmony api changes --- backend/FwLite/LcmCrdt/CrdtMiniLcmApi.cs | 16 ++++++++-------- .../FwLite/LocalWebApp/Routes/HistoryRoutes.cs | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/backend/FwLite/LcmCrdt/CrdtMiniLcmApi.cs b/backend/FwLite/LcmCrdt/CrdtMiniLcmApi.cs index c6491705f..18dbeabf1 100644 --- a/backend/FwLite/LcmCrdt/CrdtMiniLcmApi.cs +++ b/backend/FwLite/LcmCrdt/CrdtMiniLcmApi.cs @@ -18,14 +18,14 @@ public class CrdtMiniLcmApi(DataModel dataModel, CurrentProjectService projectSe private Guid ClientId { get; } = projectService.ProjectData.ClientId; public ProjectData ProjectData => projectService.ProjectData; - private IQueryable Entries => dataModel.GetLatestObjects(); - private IQueryable ComplexFormComponents => dataModel.GetLatestObjects(); - private IQueryable ComplexFormTypes => dataModel.GetLatestObjects(); - private IQueryable Senses => dataModel.GetLatestObjects(); - private IQueryable ExampleSentences => dataModel.GetLatestObjects(); - private IQueryable WritingSystems => dataModel.GetLatestObjects(); - private IQueryable SemanticDomains => dataModel.GetLatestObjects(); - private IQueryable PartsOfSpeech => dataModel.GetLatestObjects(); + private IQueryable Entries => dataModel.QueryLatest(); + private IQueryable ComplexFormComponents => dataModel.QueryLatest(); + private IQueryable ComplexFormTypes => dataModel.QueryLatest(); + private IQueryable Senses => dataModel.QueryLatest(); + private IQueryable ExampleSentences => dataModel.QueryLatest(); + private IQueryable WritingSystems => dataModel.QueryLatest(); + private IQueryable SemanticDomains => dataModel.QueryLatest(); + private IQueryable PartsOfSpeech => dataModel.QueryLatest(); public async Task GetWritingSystems() { diff --git a/backend/FwLite/LocalWebApp/Routes/HistoryRoutes.cs b/backend/FwLite/LocalWebApp/Routes/HistoryRoutes.cs index f1fdacd23..354d0e9ff 100644 --- a/backend/FwLite/LocalWebApp/Routes/HistoryRoutes.cs +++ b/backend/FwLite/LocalWebApp/Routes/HistoryRoutes.cs @@ -7,6 +7,7 @@ using LinqToDB.EntityFrameworkCore; using LocalWebApp.Hubs; using Microsoft.OpenApi.Models; +using MiniLcm.Models; namespace LocalWebApp.Routes; @@ -32,7 +33,7 @@ public static IEndpointConventionBuilder MapHistoryRoutes(this WebApplication ap { //todo requires the timestamp to be exact, otherwise the change made on that timestamp will not be included //consider using a commitId and looking up the timestamp, but then we should be exact to the commit which we aren't right now. - return await dataModel.GetEntitySnapshotAtTime(new DateTimeOffset(timestamp), entityId); + return await dataModel.GetAtTime(new DateTimeOffset(timestamp), entityId); }); group.MapGet("/{entityId}", (Guid entityId, ICrdtDbContext dbcontext) => From faeae108bcc04ef1b7426b3f60e581f7c1aa60e3 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Wed, 13 Nov 2024 11:36:30 +0700 Subject: [PATCH 13/30] upgrade npgsql version to preview --- backend/LexData/LexData.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/LexData/LexData.csproj b/backend/LexData/LexData.csproj index c4c0fd13e..60dfbdcf6 100644 --- a/backend/LexData/LexData.csproj +++ b/backend/LexData/LexData.csproj @@ -14,7 +14,7 @@ - + From 5f0bfef8dbb01be887b064865f02ea9afacc0804 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Tue, 19 Nov 2024 10:32:07 +0700 Subject: [PATCH 14/30] upgrade npgsql, linq2db efcore --- backend/FwLite/LcmCrdt/LcmCrdt.csproj | 2 +- backend/LexBoxApi/LexBoxApi.csproj | 2 +- backend/LexData/LexData.csproj | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/FwLite/LcmCrdt/LcmCrdt.csproj b/backend/FwLite/LcmCrdt/LcmCrdt.csproj index 1d2ca791d..985d055c6 100644 --- a/backend/FwLite/LcmCrdt/LcmCrdt.csproj +++ b/backend/FwLite/LcmCrdt/LcmCrdt.csproj @@ -11,7 +11,7 @@ - + diff --git a/backend/LexBoxApi/LexBoxApi.csproj b/backend/LexBoxApi/LexBoxApi.csproj index b4234c503..e73660242 100644 --- a/backend/LexBoxApi/LexBoxApi.csproj +++ b/backend/LexBoxApi/LexBoxApi.csproj @@ -31,7 +31,7 @@ - + diff --git a/backend/LexData/LexData.csproj b/backend/LexData/LexData.csproj index 60dfbdcf6..093563c8c 100644 --- a/backend/LexData/LexData.csproj +++ b/backend/LexData/LexData.csproj @@ -13,8 +13,8 @@ - - + + From 53c78051015cd41583ba62796f6df650ef3ec599 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Tue, 19 Nov 2024 10:38:28 +0700 Subject: [PATCH 15/30] update FixFwData.csproj details --- backend/FixFwData/FixFwData.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/FixFwData/FixFwData.csproj b/backend/FixFwData/FixFwData.csproj index 4b99bb4c3..e96561fca 100644 --- a/backend/FixFwData/FixFwData.csproj +++ b/backend/FixFwData/FixFwData.csproj @@ -4,10 +4,10 @@ WinExe FixFwData FixFwData - SIL International - SIL International + SIL Global + SIL Global LexBoxApi Testing - Copyright © 2023 SIL International + Copyright © 2024 SIL Global From edaad2b96d1a1d140428c71aee5c8b270927f891 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Tue, 19 Nov 2024 10:46:13 +0700 Subject: [PATCH 16/30] update harmony to latest deps --- backend/harmony | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/harmony b/backend/harmony index 4fe848e80..7d0a3efe5 160000 --- a/backend/harmony +++ b/backend/harmony @@ -1 +1 @@ -Subproject commit 4fe848e80d9e5194c21184cd9c19208dd2d53e77 +Subproject commit 7d0a3efe5f99a7c92de37309a1a2e3abe4171cf4 From c304eb1dbf1fa1fdc6038063ac2faa27a400d3d4 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Tue, 19 Nov 2024 10:53:21 +0700 Subject: [PATCH 17/30] fix warning 'Multiple test adapters with the same uri 'executor://xunit/VsTestRunner2/netcoreapp' were found. Ignoring adapter 'Xunit.Runner.VisualStudio.VsTestRunner'. Please uninstall the conflicting adapter(s) to avoid this warning.' --- .../FwDataMiniLcmBridge.Tests.csproj | 4 ---- .../FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj | 4 ---- backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj | 4 ---- backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj | 1 - backend/Testing/Testing.csproj | 4 ---- 5 files changed, 17 deletions(-) diff --git a/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj b/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj index b064033e3..f3b6afd00 100644 --- a/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj +++ b/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj @@ -20,10 +20,6 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj b/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj index 012a0b6cf..81eb8ba9a 100644 --- a/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj +++ b/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj @@ -19,10 +19,6 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj b/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj index 0e6ba4c24..c1d805de9 100644 --- a/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj +++ b/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj @@ -17,10 +17,6 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj b/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj index 3f7711841..76e837914 100644 --- a/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj +++ b/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj @@ -10,7 +10,6 @@ - all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/Testing/Testing.csproj b/backend/Testing/Testing.csproj index 7c7bf8953..709aeab8e 100644 --- a/backend/Testing/Testing.csproj +++ b/backend/Testing/Testing.csproj @@ -36,10 +36,6 @@ - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - runtime; build; native; contentfiles; analyzers; buildtransitive all From d7fbb919250379a4662d4807d2b57deb19fe1f18 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Tue, 19 Nov 2024 10:56:03 +0700 Subject: [PATCH 18/30] fix issue where test crashes and doesn't cleanup --- backend/FwLite/LcmCrdt.Tests/OpenProjectTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/FwLite/LcmCrdt.Tests/OpenProjectTests.cs b/backend/FwLite/LcmCrdt.Tests/OpenProjectTests.cs index cdaa72ab0..702431f66 100644 --- a/backend/FwLite/LcmCrdt.Tests/OpenProjectTests.cs +++ b/backend/FwLite/LcmCrdt.Tests/OpenProjectTests.cs @@ -10,6 +10,7 @@ public class OpenProjectTests public async Task OpeningAProjectWorks() { var sqliteConnectionString = "OpeningAProjectWorks.sqlite"; + if (File.Exists(sqliteConnectionString)) File.Delete(sqliteConnectionString); var builder = Host.CreateEmptyApplicationBuilder(null); builder.Services.AddLcmCrdtClient(); using var host = builder.Build(); From 6d851ebc5c279b15dea67073787e02d1eb4a1cbc Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Tue, 19 Nov 2024 14:05:45 +0700 Subject: [PATCH 19/30] update dotnet-ef tool name --- .config/dotnet-tools.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 6b7095305..4f487990c 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,10 +3,11 @@ "isRoot": true, "tools": { "dotnet-ef": { - "version": "8.0.10", + "version": "9.0.0", "commands": [ "dotnet-ef" - ] + ], + "rollForward": false } } -} +} \ No newline at end of file From ae29a4ff1532feda7656f024028bf5038d7186fa Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Tue, 19 Nov 2024 14:14:32 +0700 Subject: [PATCH 20/30] upgrade EntityFrameworkCore.Projectables --- backend/LexCore/LexCore.csproj | 2 +- backend/LexData/LexData.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/LexCore/LexCore.csproj b/backend/LexCore/LexCore.csproj index 923d08ac4..db0930955 100644 --- a/backend/LexCore/LexCore.csproj +++ b/backend/LexCore/LexCore.csproj @@ -4,7 +4,7 @@ - + diff --git a/backend/LexData/LexData.csproj b/backend/LexData/LexData.csproj index 093563c8c..4b7d7080f 100644 --- a/backend/LexData/LexData.csproj +++ b/backend/LexData/LexData.csproj @@ -4,7 +4,7 @@ - + all From dc17b7307825fa478fbc4cfd5642eb9f3752d258 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Tue, 19 Nov 2024 14:23:51 +0700 Subject: [PATCH 21/30] add xunit.runner.visualstudio nuget package, removing it prevents dotnet test from finding any tests --- .../FwDataMiniLcmBridge.Tests.csproj | 4 ++++ .../FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj | 4 ++++ backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj | 4 ++++ backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj | 4 ++++ backend/Testing/Testing.csproj | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj b/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj index f3b6afd00..3ec451900 100644 --- a/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj +++ b/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj @@ -20,6 +20,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj b/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj index 81eb8ba9a..32e57446e 100644 --- a/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj +++ b/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj @@ -19,6 +19,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj b/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj index c1d805de9..740f40f31 100644 --- a/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj +++ b/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj @@ -17,6 +17,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj b/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj index 76e837914..ecb6c92fe 100644 --- a/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj +++ b/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj @@ -10,6 +10,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/Testing/Testing.csproj b/backend/Testing/Testing.csproj index 709aeab8e..cda474609 100644 --- a/backend/Testing/Testing.csproj +++ b/backend/Testing/Testing.csproj @@ -36,6 +36,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + runtime; build; native; contentfiles; analyzers; buildtransitive all From b7f7f70d84b901109f20f616b11a4abc5b53b590 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Thu, 21 Nov 2024 09:05:16 +0700 Subject: [PATCH 22/30] disable warning about pending model changes which is currently bugged --- backend/LexData/DataKernel.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/LexData/DataKernel.cs b/backend/LexData/DataKernel.cs index e12fc003c..be749afc7 100644 --- a/backend/LexData/DataKernel.cs +++ b/backend/LexData/DataKernel.cs @@ -1,5 +1,6 @@ using LexData.Configuration; using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Diagnostics; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; @@ -18,6 +19,8 @@ public static void AddLexData(this IServiceCollection services, options.EnableDetailedErrors(); options.UseNpgsql(serviceProvider.GetRequiredService>().Value.LexBoxConnectionString); options.UseProjectables(); + //todo remove this once this bug is fixed: https://github.com/dotnet/efcore/issues/35110 + options.ConfigureWarnings(builder => builder.Ignore(RelationalEventId.PendingModelChangesWarning)); if (useOpenIddict) options.UseOpenIddict(); #if DEBUG options.EnableSensitiveDataLogging(); From 1a95a58724d764827e37fb7271d8e64942d3329c Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Thu, 21 Nov 2024 09:35:28 +0700 Subject: [PATCH 23/30] fix issue with recursive error when getting snapshots --- backend/FwLite/LcmCrdt/LcmCrdtDbContext.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/FwLite/LcmCrdt/LcmCrdtDbContext.cs b/backend/FwLite/LcmCrdt/LcmCrdtDbContext.cs index 525d1d8e6..3a303f643 100644 --- a/backend/FwLite/LcmCrdt/LcmCrdtDbContext.cs +++ b/backend/FwLite/LcmCrdt/LcmCrdtDbContext.cs @@ -10,7 +10,6 @@ namespace LcmCrdt; public class LcmCrdtDbContext(DbContextOptions dbContextOptions, IOptions options): DbContext(dbContextOptions), ICrdtDbContext { public DbSet ProjectData => Set(); - public IQueryable Snapshots => ((ICrdtDbContext)this).Snapshots; protected override void OnModelCreating(ModelBuilder modelBuilder) { From 1445993d22d80a76f564ec345be7b36d926383c4 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Wed, 27 Nov 2024 14:22:28 +0700 Subject: [PATCH 24/30] correct nuget versions in lcm bridge --- .../FwDataMiniLcmBridge.Tests.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj b/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj index 5a714a699..c7f4be0c0 100644 --- a/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj +++ b/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj @@ -17,14 +17,14 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + From 87a75410c314e36bc3679cb73328601d10e134b9 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Wed, 27 Nov 2024 15:37:10 +0700 Subject: [PATCH 25/30] fix build by including harmony/Directory.Packages.props and some other missing files in docker builds --- backend/FwHeadless/FwHeadless.csproj | 3 --- backend/FwHeadless/dev.Dockerfile | 4 ++-- backend/LexBoxApi/LexBoxApi.csproj | 1 + backend/LexBoxApi/dev.Dockerfile | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/backend/FwHeadless/FwHeadless.csproj b/backend/FwHeadless/FwHeadless.csproj index 9f11a6cc4..a106c1fa5 100644 --- a/backend/FwHeadless/FwHeadless.csproj +++ b/backend/FwHeadless/FwHeadless.csproj @@ -1,9 +1,6 @@ - net9.0 - enable - enable $(MSBuildProjectDirectory) diff --git a/backend/FwHeadless/dev.Dockerfile b/backend/FwHeadless/dev.Dockerfile index db60a422c..38a83bf9d 100644 --- a/backend/FwHeadless/dev.Dockerfile +++ b/backend/FwHeadless/dev.Dockerfile @@ -11,13 +11,13 @@ WORKDIR /src/backend # Uncomment line below if second COPY fails # RUN mkdir -p FwLite && chown www-data:www-data FwLite # Copy the main source project files -COPY --chown=www-data:www-data *.sln FwHeadless/FwHeadless.csproj FixFwData/FixFwData.csproj LexCore/LexCore.csproj LexData/LexData.csproj ./ +COPY --chown=www-data:www-data *.sln FwHeadless/FwHeadless.csproj FixFwData/FixFwData.csproj LexCore/LexCore.csproj LexData/LexData.csproj Directory.Build.props ./ # move them into the proper sub folders, based on the name of the project RUN for file in $(ls *.csproj); do dir=${file%.*}; mkdir -p ${dir}/ && mv -v $file ${dir}/; done # Do the same for csproj files in slightly different hierarchies COPY --chown=www-data:www-data harmony/src/*/*.csproj ./ RUN for file in $(ls *.csproj); do dir=${file%.*}; mkdir -p harmony/src/${dir}/ && mv -v $file harmony/src/${dir}/; done -COPY --chown=www-data:www-data harmony/src/Directory.Build.props ./harmony/src/ +COPY --chown=www-data:www-data harmony/src/Directory.Build.props harmony/Directory.Packages.props ./harmony/src/ COPY --chown=www-data:www-data FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj FwLite/LcmCrdt/LcmCrdt.csproj FwLite/MiniLcm/MiniLcm.csproj FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj ./ RUN for file in $(ls *.csproj); do dir=${file%.*}; mkdir -p FwLite/${dir}/ && mv -v $file FwLite/${dir}/; done diff --git a/backend/LexBoxApi/LexBoxApi.csproj b/backend/LexBoxApi/LexBoxApi.csproj index 3f21798bc..6872e5e61 100644 --- a/backend/LexBoxApi/LexBoxApi.csproj +++ b/backend/LexBoxApi/LexBoxApi.csproj @@ -25,6 +25,7 @@ + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/LexBoxApi/dev.Dockerfile b/backend/LexBoxApi/dev.Dockerfile index e27c54bd4..77d9b6d5d 100644 --- a/backend/LexBoxApi/dev.Dockerfile +++ b/backend/LexBoxApi/dev.Dockerfile @@ -15,7 +15,7 @@ RUN for file in $(ls *.csproj); do dir=${file%.*}; mkdir -p ${dir}/ && mv -v $fi # Do the same for csproj files in slightly different hierarchies COPY harmony/src/*/*.csproj ./ RUN for file in $(ls *.csproj); do dir=${file%.*}; mkdir -p harmony/src/${dir}/ && mv -v $file harmony/src/${dir}/; done -COPY harmony/src/Directory.Build.props ./harmony/src/ +COPY harmony/src/Directory.Build.props harmony/Directory.Packages.props ./harmony/src/ COPY FwLite/*/*.csproj ./ RUN for file in $(ls *.csproj); do dir=${file%.*}; mkdir -p FwLite/${dir}/ && mv -v $file FwLite/${dir}/; done From ef1fe12454aff3701339dc781d13d157e0f18f9e Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Wed, 27 Nov 2024 16:21:27 +0700 Subject: [PATCH 26/30] revert to EF 8 --- backend/LexBoxApi/LexBoxApi.csproj | 6 +++--- backend/LexData/DataKernel.cs | 3 ++- backend/LexData/LexData.csproj | 10 +++++----- backend/harmony | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/backend/LexBoxApi/LexBoxApi.csproj b/backend/LexBoxApi/LexBoxApi.csproj index 6872e5e61..638ba148e 100644 --- a/backend/LexBoxApi/LexBoxApi.csproj +++ b/backend/LexBoxApi/LexBoxApi.csproj @@ -25,15 +25,15 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/backend/LexData/DataKernel.cs b/backend/LexData/DataKernel.cs index be749afc7..25dc734ca 100644 --- a/backend/LexData/DataKernel.cs +++ b/backend/LexData/DataKernel.cs @@ -20,7 +20,8 @@ public static void AddLexData(this IServiceCollection services, options.UseNpgsql(serviceProvider.GetRequiredService>().Value.LexBoxConnectionString); options.UseProjectables(); //todo remove this once this bug is fixed: https://github.com/dotnet/efcore/issues/35110 - options.ConfigureWarnings(builder => builder.Ignore(RelationalEventId.PendingModelChangesWarning)); + //we ended up not upgrading to EF Core 9, so this was disabled for now, may or may not be needed in the future + // options.ConfigureWarnings(builder => builder.Ignore(RelationalEventId.PendingModelChangesWarning)); if (useOpenIddict) options.UseOpenIddict(); #if DEBUG options.EnableSensitiveDataLogging(); diff --git a/backend/LexData/LexData.csproj b/backend/LexData/LexData.csproj index 4b7d7080f..65ede2fc7 100644 --- a/backend/LexData/LexData.csproj +++ b/backend/LexData/LexData.csproj @@ -4,17 +4,17 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - + + diff --git a/backend/harmony b/backend/harmony index 7d0a3efe5..c13987d13 160000 --- a/backend/harmony +++ b/backend/harmony @@ -1 +1 @@ -Subproject commit 7d0a3efe5f99a7c92de37309a1a2e3abe4171cf4 +Subproject commit c13987d13f7fa4c37e0ebdd28b04e42a31df7e4c From ed9789c981298d4bc3e6be69cc4458278572391c Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Wed, 27 Nov 2024 16:43:31 +0700 Subject: [PATCH 27/30] also change LcmCrdt ef core version --- backend/FwLite/LcmCrdt/LcmCrdt.csproj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/FwLite/LcmCrdt/LcmCrdt.csproj b/backend/FwLite/LcmCrdt/LcmCrdt.csproj index 985d055c6..ce06a235f 100644 --- a/backend/FwLite/LcmCrdt/LcmCrdt.csproj +++ b/backend/FwLite/LcmCrdt/LcmCrdt.csproj @@ -11,9 +11,8 @@ - + - From 01aa8259dfea61539fd6ad6d5d79b5e096010cee Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Wed, 27 Nov 2024 16:54:59 +0700 Subject: [PATCH 28/30] verification test for lcmCrdt db model --- .../DataModelSnapshotTests.VerifyDbModel.verified.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/FwLite/LcmCrdt.Tests/DataModelSnapshotTests.VerifyDbModel.verified.txt b/backend/FwLite/LcmCrdt.Tests/DataModelSnapshotTests.VerifyDbModel.verified.txt index 75ded662f..61d37f6c9 100644 --- a/backend/FwLite/LcmCrdt.Tests/DataModelSnapshotTests.VerifyDbModel.verified.txt +++ b/backend/FwLite/LcmCrdt.Tests/DataModelSnapshotTests.VerifyDbModel.verified.txt @@ -328,4 +328,4 @@ Relational:ViewName: Relational:ViewSchema: Annotations: - ProductVersion: 9.0.0 \ No newline at end of file + ProductVersion: 8.0.11 \ No newline at end of file From 3001c3f0fad4b35efe0e47acb82b59c65e0c3a73 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Thu, 28 Nov 2024 14:30:17 +0700 Subject: [PATCH 29/30] fix test failure caused by openProject expecting the grid view to be active --- frontend/tests/pages/userDashboardPage.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/tests/pages/userDashboardPage.ts b/frontend/tests/pages/userDashboardPage.ts index e5d284699..a99fa0d66 100644 --- a/frontend/tests/pages/userDashboardPage.ts +++ b/frontend/tests/pages/userDashboardPage.ts @@ -9,12 +9,17 @@ export class UserDashboardPage extends AuthenticatedBasePage { } async openProject(projectName: string, projectCode: string): Promise { + await this.selectGridView(); const projectHeader = this.page.getByRole('heading', {name: projectName}); const projectCard = this.page.locator('.card', {has: projectHeader}); await projectCard.click(); return new ProjectPage(this.page, projectName, projectCode).waitFor(); } + async selectGridView(): Promise { + await this.page.click('.i-mdi-grid'); + } + async clickCreateProject(): Promise { await this.page.getByRole('link', {name: /(Create|Request) Project/, exact: true}).click(); return new CreateProjectPage(this.page).waitFor(); From 082476eecbf27bf37b9aad1a84349c7ead18aa56 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Thu, 28 Nov 2024 14:31:46 +0700 Subject: [PATCH 30/30] define `--prod-ui-build` in tilt to make running playwright tests more reliable as the vite server doesn't work well with playwright tests --- Taskfile.yml | 7 ++++++- Tiltfile | 29 +++++++++++++++++++---------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 0306ea674..ec5513e7e 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -68,7 +68,12 @@ tasks: cmds: - tilt up - # dev + prod-ui-up: + interactive: true + desc: 'Starts the cluster using the production build of UI, good for automated testing' + cmds: + - tilt up -- --prod-ui-build + # dev infra-up: desc: 'Starts infrastructure for our ui and api, does not forward ports for api, if you want port forwarding use k8s:infra-forward' cmds: diff --git a/Tiltfile b/Tiltfile index 061bdb63d..224a00bcf 100644 --- a/Tiltfile +++ b/Tiltfile @@ -4,8 +4,10 @@ version_settings(constraint='>=0.33.20') secret_settings(disable_scrub=True) config.define_bool("lexbox-api-local") +config.define_bool("prod-ui-build") cfg = config.parse() forward_lexbox = not cfg.get("lexbox-api-local", False) +prod_ui_build = cfg.get("prod-ui-build", False) docker_build( 'local-dev-init', @@ -33,16 +35,23 @@ docker_build( sync('backend', '/src/backend') ] ) - -docker_build( - 'ghcr.io/sillsdev/lexbox-ui', - context='frontend', - dockerfile='./frontend/dev.Dockerfile', - only=['.'], - live_update=[ - sync('frontend', '/app'), - ] -) +if prod_ui_build: + docker_build( + 'ghcr.io/sillsdev/lexbox-ui', + context='frontend', + dockerfile='./frontend/Dockerfile', + only=['.'] + ) +else: + docker_build( + 'ghcr.io/sillsdev/lexbox-ui', + context='frontend', + dockerfile='./frontend/dev.Dockerfile', + only=['.'], + live_update=[ + sync('frontend', '/app'), + ] + ) docker_build( 'ghcr.io/sillsdev/lexbox-hgweb',