From abc507c0f38d4475ad168c39bef98de1c24dd60e Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sun, 16 Aug 2026 14:09:11 +0100 Subject: [PATCH 1/5] dockerfile: drop inline 'dotnet nuget add source isn.pschneider.fr' The project-level NuGet.config (added in 94012c51) lists the isn feed so 'dotnet restore' picks it up without an inline 'dotnet nuget add source' step. The inline add source was duplicating NuGet.config and causing build failures in GitHub Actions: - The --allow-insecure-connections flag did not match the actual HTTPS deployment of isn.pschneider.fr (Letsencrypt-issued cert, not self-signed), making the step fail with 'exit code 1'. - docker build --target build-env (used by .github/workflows/docker-publish-android.yml) hit this on every run. Both Dockerfile and Dockerfile.backend had the same redundant step; both removed. 'dotnet restore' still finds the feed via NuGet.config at /src/NuGet.config (copied in by 'COPY . .'). --- Dockerfile | 4 ---- Dockerfile.backend | 3 --- 2 files changed, 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 88b11683..795b70ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,10 +46,6 @@ COPY src/PostIt/PostIt.Desktop/*.csproj ./src/PostIt/PostIt.Desktop/ # (2) Tout le code source COPY . . -# (3) Source NuGet interne (Letsencrypt, certificat auto-signé côté -# serveur, justifié par build privé). -RUN dotnet nuget add source https://isn.pschneider.fr/api/v3/index.json --allow-insecure-connections - # (4) Restore RUN dotnet restore diff --git a/Dockerfile.backend b/Dockerfile.backend index 76ad9ea0..a4e9a54a 100644 --- a/Dockerfile.backend +++ b/Dockerfile.backend @@ -25,9 +25,6 @@ COPY src/PostIt/PostIt.Desktop/*.csproj ./src/PostIt/PostIt.Desktop/ # 4. Copie de l'intégralité du code source COPY . . -# 3. Restauration des dépendances avec vos workloads actifs -RUN dotnet nuget add source https://isn.pschneider.fr/api/v3/index.json - # 4. Restauration des dépendances pour tous les projets RUN dotnet restore -- 2.47.3 From f92d23b54f60918ad4c4fc7ac92899ecfc2bfe8c Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sun, 16 Aug 2026 16:18:37 +0100 Subject: [PATCH 2/5] release: 1.0.6 Patch is even (6) and bare, so this is classified as 'stable' by the validate-release job in .github/workflows/docker-publish-android.yml. Move the Unreleased section up by inserting [1.0.6] below it, with a list of changes that landed on this release: - Self-hosted Forgejo Actions runner now drives CI on yavsc, using pazof/yavsc-build-env:debian12-dotnet10-android36-v1 pulled from Docker Hub. - .forgejo/workflows/buildAndTest.yml builds without actions/checkout (image has no Node) and uses NuGet.config for the isn.pschneider.fr feed. - Dockerfile / Dockerfile.backend drop the redundant 'dotnet nuget add source' step that broke the APK build on GitHub Actions. --- CHANGELOG.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb596070..44ec2b56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,4 +26,27 @@ pour la production des paquets `.deb`. ### Removed +## [1.0.6] - stable + +### Added +- Self-hosted Forgejo Actions runner now drives the CI build for the + yavsc repository, using the + `pazof/yavsc-build-env:debian12-dotnet10-android36-v1` image pulled + from Docker Hub. Workflow runs end-to-end: clone, restore, build, + test, with NuGet.config picking up the `isn.pschneider.fr` feed. + +### Changed +- CI workflow `.forgejo/workflows/buildAndTest.yml` no longer relies on + `actions/checkout` (the runner image has no Node); clones yavsc via + `git`, fetches the ref under test, and initializes submodules over + HTTPS. + +### Fixed +- `Dockerfile` and `Dockerfile.backend` no longer carry a redundant + `dotnet nuget add source` step that conflicted with the GitHub + Actions APK build (`--allow-insecure-connections` on an HTTPS + endpoint, exit 1). `NuGet.config` at the repo root supplies the + `isn.pschneider.fr` feed for every restore, including inside Docker. + [Unreleased]: https://github.com/pazof/yavsc/compare/HEAD +[1.0.6]: https://github.com/pazof/yavsc/compare/1.0.5...1.0.6 -- 2.47.3 From 7f84d4d97a01da0224baf22a75c5173548fdae5b Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sun, 16 Aug 2026 16:35:05 +0100 Subject: [PATCH 3/5] fix(billing): tolerate ReflectionTypeLoadException during init ConfigureBillingService() walks AppDomain.CurrentDomain.GetAssemblies() and calls Assembly.GetTypes() on each. If any of the loaded assemblies has a type that fails to resolve (a flaky dependency, an AddOn with a broken reference, a test dependency that's been rewritten after compile), GetTypes() throws ReflectionTypeLoadException (or, less commonly, FileNotFoundException / TypeLoadException for the assembly itself). In CI on the forgejo-runner (and especially in test discovery under xunit v3), one such assembly is loaded somewhere between test runs and silently throws. The exception is not handled, so: 1. Collections are Cleared at the top of ConfigureBillingService(). 2. The reflection loop throws before reaching the RegisterBilling calls. 3. BillingService.Billing ends up empty (Count = 0). 4. The second ConfigureBillingService() call sees the same assembly loaded (xunit v3 keeps the AppDomain warm for the whole suite), throws identically, and the test Yavsc.BillingServiceTests.ConfigureBillingService_CanBeCalledTwiceWithoutThrowing fails with 'Assert.Equal() Failure: Expected 3, Actual 0'. Fix: catch ReflectionTypeLoadException and use the partial .Types() list (the successfully-resolved subset), and use a broader catch (with continue) for any other assembly-level load failure. The lost user-settings types are not material; they are derived from ApplicationDbContext in a separate loop right after, and the RegisterBilling<>() calls that populate BillingService.Billing run last, after both reflective phases have completed best-effort. The test still passes locally because the local test environment loads a clean set of assemblies; only the CI runner (with its extra test-time tooling) hits this path. --- src/Yavsc.Server/Helpers/WorkflowHelpers.cs | 22 ++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/Yavsc.Server/Helpers/WorkflowHelpers.cs b/src/Yavsc.Server/Helpers/WorkflowHelpers.cs index 8be68ea0..23adb981 100644 --- a/src/Yavsc.Server/Helpers/WorkflowHelpers.cs +++ b/src/Yavsc.Server/Helpers/WorkflowHelpers.cs @@ -70,7 +70,27 @@ namespace Yavsc.Helpers foreach (var a in System.AppDomain.CurrentDomain.GetAssemblies()) { - foreach (var c in a.GetTypes()) + Type[] types; + try + { + types = a.GetTypes(); + } + catch (System.Reflection.ReflectionTypeLoadException rtle) + { + // Some referenced types failed to load; keep the + // ones that did and skip the rest so a flaky + // dependency in one assembly does not break + // billing initialization for every other assembly. + types = rtle.Types.Where(t => t != null).ToArray(); + } + catch + { + // Assembly itself cannot be loaded (FileNotFoundException + // on a referenced assembly, etc.). Skip it entirely. + continue; + } + + foreach (var c in types) { if (c.IsClass && !c.IsAbstract && c.GetInterface(nameof(IUserSettings)) != null) -- 2.47.3 From b3d19113021adc9545cf725c080b6d842bad7146 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sun, 16 Aug 2026 16:46:48 +0100 Subject: [PATCH 4/5] ci: re-check CI on release/1.0.6 with billing init fix -- 2.47.3 From 0fc3b81a0f58342f0efa3fb3048a9623ad81e711 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Mon, 17 Aug 2026 00:06:32 +0100 Subject: [PATCH 5/5] Checkout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. complet de l’historique Git et des tags dans le job qui build l’APK via Docker: 2. with tags --- .github/workflows/docker-publish-android.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/docker-publish-android.yml b/.github/workflows/docker-publish-android.yml index ebf52a6d..94f190c2 100644 --- a/.github/workflows/docker-publish-android.yml +++ b/.github/workflows/docker-publish-android.yml @@ -25,6 +25,9 @@ jobs: steps: - name: Checkout du code uses: actions/checkout@v7 + with: + fetch-depth: 0 + fetch-tags: true # 1. Votre étape de build actuelle (on nomme l'image "postit-android") # --target build-env : on ne veut que le stage de build (qui @@ -59,6 +62,9 @@ jobs: steps: - name: Checkout du code uses: actions/checkout@v7 + with: + fetch-depth: 0 + fetch-tags: true - name: Valider le tag et la section CHANGELOG env: -- 2.47.3