From 01a5c6a0e880c1ae8481d77e2e648dc7c657db11 Mon Sep 17 00:00:00 2001 From: Bailey Date: Mon, 30 Dec 2024 07:06:40 -0600 Subject: [PATCH 01/21] [656] uplift to dotnet 9 --- .github/actions/publish-ui-dist/action.yaml | 2 +- .github/workflows/housekeeping.yml | 5 +- .github/workflows/pr-check.yml | 8 +-- .github/workflows/publish-latest.yaml | 6 +-- .github/workflows/publish-release.yaml | 6 +-- docker/Dockerfile.api | 4 +- docker/Dockerfile.console | 4 +- docker/Dockerfile.webui | 4 +- mkdocs/docs/contributing.md | 24 +-------- mkdocs/docs/migration/migrate-v4-v5.md | 36 +++++++++++++ mkdocs/docs/migration/migrations.md | 1 + src/Api.Contract/Api.Contract.csproj | 2 +- src/Api.Service/Api.Service.csproj | 2 +- src/Api/Api.csproj | 6 +-- src/ClientUI/App.xaml.cs | 5 +- src/ClientUI/ClientUI.csproj | 56 +++++++++++---------- src/ClientUI/MainPage.xaml.cs | 11 +++- src/ClientUI/MauiProgram.cs | 34 +++++++++---- src/ClientUI/Properties/launchSettings.json | 6 ++- src/Common/Common.csproj | 10 ++-- src/ConsoleClient/ConsoleClient.csproj | 10 ++-- src/Conversion/Conversion.csproj | 2 +- src/Garmin/Garmin.csproj | 2 +- src/Peloton/Peloton.csproj | 2 +- src/SharedUI/SharedUI.csproj | 7 ++- src/Sync/Sync.csproj | 4 +- src/UnitTests/UnitTests.csproj | 6 +-- src/WebUI/WebUI.csproj | 6 +-- 28 files changed, 156 insertions(+), 115 deletions(-) create mode 100644 mkdocs/docs/migration/migrate-v4-v5.md diff --git a/.github/actions/publish-ui-dist/action.yaml b/.github/actions/publish-ui-dist/action.yaml index 3c7a18656..27d00308b 100644 --- a/.github/actions/publish-ui-dist/action.yaml +++ b/.github/actions/publish-ui-dist/action.yaml @@ -36,7 +36,7 @@ runs: echo "RUNNER_TOOL_CACHE=$Env:RUNNER_TOOL_CACHE" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append shell: pwsh - # dotnet publish src/ClientUI/ClientUI.csproj -c Release -f net7.0-windows10.0.19041.0 -p:RuntimeIdentifierOverride=win10-x64 -p:PublishSingleFile=true -p:SelfContained=true + # dotnet publish src/ClientUI/ClientUI.csproj -c Release -f net9.0-windows10.0.19041.0 -p:RuntimeIdentifierOverride=win-x64 -p:PublishSingleFile=true -p:SelfContained=true - name: Publish ${{ inputs.os }} run: dotnet publish ${{ github.workspace }}/src/ClientUI/ClientUI.csproj -c Release -f ${{ inputs.framework }} -p:RuntimeIdentifierOverride=${{ inputs.os }} -p:PublishSingleFile=true -p:SelfContained=true shell: pwsh diff --git a/.github/workflows/housekeeping.yml b/.github/workflows/housekeeping.yml index 51770b408..a089990a5 100644 --- a/.github/workflows/housekeeping.yml +++ b/.github/workflows/housekeeping.yml @@ -2,7 +2,7 @@ name: Housekeeping Tasks on: workflow_dispatch: schedule: - - cron: 0 0 1 * * # monthly + - cron: 0 0 2 * * # bi-monthly jobs: @@ -19,9 +19,6 @@ jobs: title: "[Housekeeping] Dependency Bump" body: | ### Tasks - - - [ ] Pull in latest [Garmin SDK](https://forums.garmin.com/developer/fit-sdk/w/fit-sdk-wiki/92/fit-sdk-release-notes) - - [ ] See if any new features we can take advantage of - [ ] Bump all Dependencies to latest pinned: false env: diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 4318e42c2..317184856 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -3,7 +3,7 @@ name: PR Check on: workflow_dispatch: pull_request: - branches: [ master, v4-wip ] + branches: [ master, v5-wip ] jobs: @@ -53,9 +53,9 @@ jobs: needs: build-and-test strategy: matrix: - dotnet: [ '7.0.410' ] - framework: ['net7.0-windows10.0.19041.0'] - os: [ 'win10-x64' ] + dotnet: [ '9.0.101' ] + framework: ['net9.0-windows10.0.19041.0'] + os: [ 'win-x64' ] steps: diff --git a/.github/workflows/publish-latest.yaml b/.github/workflows/publish-latest.yaml index e49ca6298..4227f8419 100644 --- a/.github/workflows/publish-latest.yaml +++ b/.github/workflows/publish-latest.yaml @@ -44,9 +44,9 @@ jobs: runs-on: 'windows-latest' strategy: matrix: - dotnet: [ '7.0.410' ] - framework: ['net7.0-windows10.0.19041.0'] - os: [ 'win10-x64' ] + dotnet: [ '9.0.101' ] + framework: ['net9.0-windows10.0.19041.0'] + os: [ 'win-x64' ] steps: diff --git a/.github/workflows/publish-release.yaml b/.github/workflows/publish-release.yaml index 7d8d85d8a..08ae39fc3 100644 --- a/.github/workflows/publish-release.yaml +++ b/.github/workflows/publish-release.yaml @@ -52,9 +52,9 @@ jobs: artifact_name: ${{ steps.win-ui-create-artifact.outputs.artifact_name }} strategy: matrix: - dotnet: [ '7.0.410' ] - framework: ['net7.0-windows10.0.19041.0'] - os: [ 'win10-x64' ] + dotnet: [ '9.0.101' ] + framework: ['net9.0-windows10.0.19041.0'] + os: [ 'win-x64' ] steps: diff --git a/docker/Dockerfile.api b/docker/Dockerfile.api index 304e92b60..be6f1fa52 100644 --- a/docker/Dockerfile.api +++ b/docker/Dockerfile.api @@ -1,7 +1,7 @@ ################### # CREATE FINAL LAYER ################### -FROM mcr.microsoft.com/dotnet/aspnet:7.0 as final +FROM mcr.microsoft.com/dotnet/aspnet:9.0 as final RUN apt-get update \ && apt-get -y install bash tzdata \ @@ -19,7 +19,7 @@ RUN mkdir -m770 {output,data,working} ################### # BUILD LAYER ################### -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0 AS build COPY . /build WORKDIR /build diff --git a/docker/Dockerfile.console b/docker/Dockerfile.console index 4b3f6f22f..0db4f6a5d 100644 --- a/docker/Dockerfile.console +++ b/docker/Dockerfile.console @@ -1,7 +1,7 @@ ################### # CREATE FINAL LAYER ################### -FROM mcr.microsoft.com/dotnet/aspnet:7.0 as final +FROM mcr.microsoft.com/dotnet/aspnet:9.0 as final RUN apt-get update \ && apt-get -y install bash tzdata \ @@ -19,7 +19,7 @@ RUN mkdir -m770 {output,data,working} ################### # BUILD LAYER ################### -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0 AS build COPY . /build WORKDIR /build diff --git a/docker/Dockerfile.webui b/docker/Dockerfile.webui index 49b14474e..8450b5e58 100644 --- a/docker/Dockerfile.webui +++ b/docker/Dockerfile.webui @@ -1,7 +1,7 @@ ################### # CREATE FINAL LAYER ################### -FROM mcr.microsoft.com/dotnet/aspnet:7.0 as final +FROM mcr.microsoft.com/dotnet/aspnet:9.0 as final RUN apt-get update \ && apt-get -y install bash tzdata \ @@ -17,7 +17,7 @@ WORKDIR /app ################### # BUILD LAYER ################### -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0 AS build COPY . /build WORKDIR /build diff --git a/mkdocs/docs/contributing.md b/mkdocs/docs/contributing.md index e03dff521..bfc77b0eb 100644 --- a/mkdocs/docs/contributing.md +++ b/mkdocs/docs/contributing.md @@ -13,7 +13,7 @@ Ensure that your code: ## Development -1. Install [dotent 6.0 runtime](https://dotnet.microsoft.com/download/dotnet/6.0/runtime) +1. Install [dotent 9.0 runtime](https://dotnet.microsoft.com/download/dotnet/9.0/runtime) ``` > dotnet restore @@ -23,27 +23,7 @@ Ensure that your code: ## Package Windows exe ``` -> dotnet publish ./src/ConsoleClient/ConsoleClient.csproj --no-restore -c Release -r win10-x64 -o ./dist --version-suffix local -``` - -## Developing against garmin-upload python library - -1. Install [Python 3](https://www.python.org/downloads/) and pip -1. Set `"PythonAndGUploadInstalled": true` - -```bash -> cd peloton-to-garmin -> cd python -> pip install -r requirements.txt -``` - -### Compile python exe - -``` bash -> cd python -> pip install -r requirements.txt -> pip install pyinstaller -> pyinstaller -n upload --distpath ./ --console --clean --noconfirm upload.py +> dotnet publish ./src/ConsoleClient/ConsoleClient.csproj --no-restore -c Release -r win-x64 -o ./dist --version-suffix local ``` ## Contribute to the docs diff --git a/mkdocs/docs/migration/migrate-v4-v5.md b/mkdocs/docs/migration/migrate-v4-v5.md new file mode 100644 index 000000000..fc07cb655 --- /dev/null +++ b/mkdocs/docs/migration/migrate-v4-v5.md @@ -0,0 +1,36 @@ + +# Migrating from V4 to V5 + +Version 3 only includes one breaking change that some users will need to account for. Based on your install type you can find what changes need to be made below. + +## Windows Exe + +The P2G windows exe now provides a proper user interface. You can migrate to this new version simply by following the [install steps](../install/windows.md). You will need to re-configure P2G using the user interface as your settings will not migrate over. + +There is no risk installing v4 and trying it out. Your previous install will continue to work while you test out v4. When you're satisfied with v4 you can delete your previous version of P2G. + +## GitHub Action + +Follow the [updating instructions for GitHub Actions](../install/github-action.md#updating). A couple notable changes that will be pulled in: + +1. [Container Image tag](https://github.com/philosowaffle/peloton-to-garmin/blob/v4.0.0/.github/workflows/sync_peloton_to_garmin.yml#L23) has changed to `console-stable`, you may wish to edit this to be `console-v4` +1. The [configuration options](https://github.com/philosowaffle/peloton-to-garmin/blob/v4.0.0/.github/workflows/sync_peloton_to_garmin.yml#L40) have changed slightly with some fields being deprecated and removed +1. The [command to run p2g](https://github.com/philosowaffle/peloton-to-garmin/blob/v4.0.0/.github/workflows/sync_peloton_to_garmin.yml#L75) has changed to `/app/ConsoleClient`. + +## Docker Headless + +No specific migration steps are needed, however please take note of the [breaking changes](https://github.com/philosowaffle/peloton-to-garmin/releases/tag/v3.6.0) in case any of these impact your setup. + +## Docker WebUI + +No specific migration steps are needed, however please take note of the [breaking changes](https://github.com/philosowaffle/peloton-to-garmin/releases/tag/v3.6.0) in case any of these impact your setup. + +## Docker API + +No specific migration steps are needed, however please take note of the [breaking changes](https://github.com/philosowaffle/peloton-to-garmin/releases/tag/v3.6.0) in case any of these impact your setup. + +## Source + +1. Install the latest [dotnet 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/7.0) + +Please take note of the [breaking changes](https://github.com/philosowaffle/peloton-to-garmin/releases/tag/v5.0.0) in case any of these impact your setup. diff --git a/mkdocs/docs/migration/migrations.md b/mkdocs/docs/migration/migrations.md index c07985c00..a599830b1 100644 --- a/mkdocs/docs/migration/migrations.md +++ b/mkdocs/docs/migration/migrations.md @@ -6,3 +6,4 @@ P2G uses major release versions to designate when a breaking or non-backwards co 1. [Migrating from V1 to V2](migrate-v1-v2.md) 1. [Migrating from V2 to V3](migrate-v2-v3.md) 1. [Migrating from V3 to V4](migrate-v3-v4.md) +1. [Migrating from V3 to V4](migrate-v4-v5.md) diff --git a/src/Api.Contract/Api.Contract.csproj b/src/Api.Contract/Api.Contract.csproj index 42b6e2d5f..f612e9b6a 100644 --- a/src/Api.Contract/Api.Contract.csproj +++ b/src/Api.Contract/Api.Contract.csproj @@ -1,7 +1,7 @@  - net7.0 + net9.0 enable enable diff --git a/src/Api.Service/Api.Service.csproj b/src/Api.Service/Api.Service.csproj index 2ee7d3c42..a5a6d0694 100644 --- a/src/Api.Service/Api.Service.csproj +++ b/src/Api.Service/Api.Service.csproj @@ -1,7 +1,7 @@ - net7.0 + net9.0 enable enable diff --git a/src/Api/Api.csproj b/src/Api/Api.csproj index 33b270204..3059377cb 100644 --- a/src/Api/Api.csproj +++ b/src/Api/Api.csproj @@ -1,11 +1,11 @@  - net7.0 + net9.0 PelotonToGarmin.Api enable enable - win10-x64;osx-x64;linux-x64 + win-x64;osx-x64;linux-x64 https://github.com/philosowaffle/peloton-to-garmin https://github.com/philosowaffle/peloton-to-garmin Bailey Belvis @@ -26,7 +26,7 @@ - + diff --git a/src/ClientUI/App.xaml.cs b/src/ClientUI/App.xaml.cs index 15b9edee7..ce1ad4f00 100644 --- a/src/ClientUI/App.xaml.cs +++ b/src/ClientUI/App.xaml.cs @@ -5,8 +5,11 @@ public partial class App : Application public App() { InitializeComponent(); + } - MainPage = new MainPage(); + protected override Window CreateWindow(IActivationState? activationState) + { + return new Window(new MainPage()); } } } \ No newline at end of file diff --git a/src/ClientUI/ClientUI.csproj b/src/ClientUI/ClientUI.csproj index 51bafb057..b3767030c 100644 --- a/src/ClientUI/ClientUI.csproj +++ b/src/ClientUI/ClientUI.csproj @@ -1,41 +1,34 @@  - - $(TargetFrameworks);net7.0-windows10.0.19041.0 - - + 9.0.0 + $(TargetFrameworks);net9.0-windows10.0.19041.0 Exe ClientUI - true true enable false - None - true + None + false PelotonToGarmin - + P2G ClientUI + Philosowaffle + P2G ClientUI + com.philosowaffle.pelotontogarmin.clientui B01486E7-1F8D-4350-B68E-874A02A96694 - 1.0 - 1 + 5.0.0 + 5 - 14.2 - 14.0 - 24.0 10.0.19041.0 10.0.19041.0 - 6.5 - P2G ClientUI - Philosowaffle - P2G ClientUI - + @@ -65,20 +58,29 @@ - - + + + - - - + + + + - - Always - - + + + + + + + Always + + diff --git a/src/ClientUI/MainPage.xaml.cs b/src/ClientUI/MainPage.xaml.cs index 0e4274576..9183724aa 100644 --- a/src/ClientUI/MainPage.xaml.cs +++ b/src/ClientUI/MainPage.xaml.cs @@ -22,8 +22,15 @@ public MainPage() /////////////////////////////////////////////////////////// /// MIGRATIONS /////////////////////////////////////////////////////////// - var migrationService = serviceProvider.GetService(); - migrationService!.MigrateDeviceInfoFileToListAsync().GetAwaiter().GetResult(); + try + { + var migrationService = serviceProvider.GetService(); + migrationService!.MigrateDeviceInfoFileToListAsync().GetAwaiter().GetResult(); + } catch (Exception e) + { + Console.Out.WriteLine(e.ToString()); + throw; + } } } } \ No newline at end of file diff --git a/src/ClientUI/MauiProgram.cs b/src/ClientUI/MauiProgram.cs index deb9dac86..d9cecc947 100644 --- a/src/ClientUI/MauiProgram.cs +++ b/src/ClientUI/MauiProgram.cs @@ -64,6 +64,11 @@ public static MauiApp CreateMauiApp() #if DEBUG builder.Services.AddBlazorWebViewDeveloperTools(); builder.Logging.AddDebug(); + builder.Services.AddLogging(logging => + { + //logging.AddFilter("Microsoft.AspNetCore.Components.WebView", LogLevel.Trace); + logging.SetMinimumLevel(LogLevel.Trace); + }); #endif return builder.Build(); @@ -76,21 +81,28 @@ private static void InitObservabilityConfigFile(string sourceFileName, string de using BinaryWriter writer = new BinaryWriter(outputStream); using (BinaryReader reader = new BinaryReader(fs)) { - var bytesRead = 0; - - int bufferSize = 1024; - var buffer = new byte[bufferSize]; - using (fs) + try { - do + var bytesRead = 0; + + int bufferSize = 1024; + var buffer = new byte[bufferSize]; + using (fs) { - buffer = reader.ReadBytes(bufferSize); - bytesRead = buffer.Count(); - writer.Write(buffer); - } + do + { + buffer = reader.ReadBytes(bufferSize); + bytesRead = buffer.Count(); + writer.Write(buffer); + } - while (bytesRead > 0); + while (bytesRead > 0); + } + } + catch (Exception ex) + { + Console.Out.WriteLine(ex.ToString()); } } } diff --git a/src/ClientUI/Properties/launchSettings.json b/src/ClientUI/Properties/launchSettings.json index 4f857936f..187bcddb4 100644 --- a/src/ClientUI/Properties/launchSettings.json +++ b/src/ClientUI/Properties/launchSettings.json @@ -1,8 +1,12 @@ { "profiles": { - "Windows Machine": { + "Windows Machine - Unpackaged": { "commandName": "Project", "nativeDebugging": false + }, + "Windows Machine - Packaged": { + "commandName": "MsixPackage", + "nativeDebugging": false } } } \ No newline at end of file diff --git a/src/Common/Common.csproj b/src/Common/Common.csproj index a32173bbb..2d7ecb833 100644 --- a/src/Common/Common.csproj +++ b/src/Common/Common.csproj @@ -1,7 +1,7 @@  - net7.0 + net9.0 true $(NoWarn);1591 @@ -19,12 +19,12 @@ - + - - + + - + diff --git a/src/ConsoleClient/ConsoleClient.csproj b/src/ConsoleClient/ConsoleClient.csproj index 025ad9fbd..d54d22c68 100644 --- a/src/ConsoleClient/ConsoleClient.csproj +++ b/src/ConsoleClient/ConsoleClient.csproj @@ -2,10 +2,10 @@ Exe - net7.0 + net9.0 ConsoleClient ConsoleClient - win10-x64;osx-x64;linux-x64 + win-x64;osx-x64;linux-x64 https://github.com/philosowaffle/peloton-to-garmin https://github.com/philosowaffle/peloton-to-garmin Bailey Belvis @@ -32,10 +32,10 @@ - - + + - + diff --git a/src/Conversion/Conversion.csproj b/src/Conversion/Conversion.csproj index 247f685b8..be20fb7d8 100644 --- a/src/Conversion/Conversion.csproj +++ b/src/Conversion/Conversion.csproj @@ -1,7 +1,7 @@  - net7.0 + net9.0 true $(NoWarn);1591 diff --git a/src/Garmin/Garmin.csproj b/src/Garmin/Garmin.csproj index 3dafe7219..6b781f10a 100644 --- a/src/Garmin/Garmin.csproj +++ b/src/Garmin/Garmin.csproj @@ -1,7 +1,7 @@  - net7.0 + net9.0 true $(NoWarn);1591 diff --git a/src/Peloton/Peloton.csproj b/src/Peloton/Peloton.csproj index d75c831a1..13ed34b47 100644 --- a/src/Peloton/Peloton.csproj +++ b/src/Peloton/Peloton.csproj @@ -1,7 +1,7 @@  - net7.0 + net9.0 true $(NoWarn);1591 diff --git a/src/SharedUI/SharedUI.csproj b/src/SharedUI/SharedUI.csproj index 32d557090..24830338c 100644 --- a/src/SharedUI/SharedUI.csproj +++ b/src/SharedUI/SharedUI.csproj @@ -1,7 +1,7 @@  - net7.0 + net9.0 enable enable @@ -11,9 +11,8 @@ - - - + + diff --git a/src/Sync/Sync.csproj b/src/Sync/Sync.csproj index c0bd83459..3c460d304 100644 --- a/src/Sync/Sync.csproj +++ b/src/Sync/Sync.csproj @@ -1,14 +1,14 @@  - net7.0 + net9.0 enable true $(NoWarn);1591 - + diff --git a/src/UnitTests/UnitTests.csproj b/src/UnitTests/UnitTests.csproj index b382f2677..ca91745cd 100644 --- a/src/UnitTests/UnitTests.csproj +++ b/src/UnitTests/UnitTests.csproj @@ -1,17 +1,17 @@  - net7.0 + net9.0 false - + - + diff --git a/src/WebUI/WebUI.csproj b/src/WebUI/WebUI.csproj index 5886a2fa4..654fc9f1d 100644 --- a/src/WebUI/WebUI.csproj +++ b/src/WebUI/WebUI.csproj @@ -1,10 +1,10 @@  - net7.0 + net9.0 enable enable - win10-x64;osx-x64;linux-x64 + win-x64;osx-x64;linux-x64 https://github.com/philosowaffle/peloton-to-garmin https://github.com/philosowaffle/peloton-to-garmin Bailey Belvis @@ -26,7 +26,7 @@ - + From a978e7877b0660b00477e1ebfe8f6cd869222a06 Mon Sep 17 00:00:00 2001 From: Bailey Date: Mon, 30 Dec 2024 07:07:03 -0600 Subject: [PATCH 02/21] forgot some files --- .gitignore | 5 ++++- global.json | 2 +- vNextReleaseNotes.md | 20 ++++++++------------ 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index d9836aa41..e15b4100c 100644 --- a/.gitignore +++ b/.gitignore @@ -125,4 +125,7 @@ configuration.local.json /src/ClientUI/ClientUI.csproj.user # docs -/mkdocs/site \ No newline at end of file +/mkdocs/site +/src/Api/Api.csproj.user +/src/Api.Service/Api.Service.csproj.user +/PelotonToGarmin.slnLaunch.user diff --git a/global.json b/global.json index 796f298d4..f54920fda 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "7.0.410" + "version": "9.0.101" } } \ No newline at end of file diff --git a/vNextReleaseNotes.md b/vNextReleaseNotes.md index 970f4fde8..ac9f9413f 100644 --- a/vNextReleaseNotes.md +++ b/vNextReleaseNotes.md @@ -1,28 +1,24 @@ [![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/philosowaffle) Buy Me A Coffee donate button --- -## Fixes +## Features -- [#683] Initial fix for Garmin Upload error. Additionally introduces new settings for configuring Garmin Api. - -> [!CAUTION] -> **Windows App Users** -> When editing settings, you may encounter an issue where your mouse stops working within the P2G app. Keyboard navigation continues to work. If this happens, quit P2G and restart. I will be investigating how to get a proper fix for this on a future release. +- [#656] Uplift to .net 9 ## Docker Tags - Console - `console-stable` - `console-latest` - - `console-v4.3.1` - - `console-v4` + - `console-v5.0.0` + - `console-v0` - Api - `api-stable` - `api-latest` - - `api-v4.3.1` - - `api-v4` + - `api-v5.0.0` + - `api-v5` - WebUI - `webui-stable` - `webui-latest` - - `webui-v4.3.1` - - `webui-v4` + - `webui-v5.0.0` + - `webui-v5` From 01dcec984eafb81e7c020de160d46cf980265460 Mon Sep 17 00:00:00 2001 From: Bailey Date: Mon, 30 Dec 2024 07:44:24 -0600 Subject: [PATCH 03/21] fix maui --- src/ClientUI/ClientUI.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ClientUI/ClientUI.csproj b/src/ClientUI/ClientUI.csproj index b3767030c..4d2e73796 100644 --- a/src/ClientUI/ClientUI.csproj +++ b/src/ClientUI/ClientUI.csproj @@ -9,6 +9,7 @@ enable false + true None false From ce26691b73d12434742b7b41de05e29835a1ea9a Mon Sep 17 00:00:00 2001 From: Bailey Date: Mon, 30 Dec 2024 08:01:47 -0600 Subject: [PATCH 04/21] bump nuget versions to latest --- src/Api/Api.csproj | 2 +- src/ClientUI/ClientUI.csproj | 14 -------------- src/Common/Common.csproj | 6 +++--- src/ConsoleClient/ConsoleClient.csproj | 6 +++--- src/Conversion/Conversion.csproj | 2 +- src/SharedUI/SharedUI.csproj | 2 +- src/Sync/Sync.csproj | 2 +- src/UnitTests/UnitTests.csproj | 8 ++++---- 8 files changed, 14 insertions(+), 28 deletions(-) diff --git a/src/Api/Api.csproj b/src/Api/Api.csproj index 3059377cb..60c5c7d4e 100644 --- a/src/Api/Api.csproj +++ b/src/Api/Api.csproj @@ -26,7 +26,7 @@ - + diff --git a/src/ClientUI/ClientUI.csproj b/src/ClientUI/ClientUI.csproj index 4d2e73796..1874f2a51 100644 --- a/src/ClientUI/ClientUI.csproj +++ b/src/ClientUI/ClientUI.csproj @@ -11,7 +11,6 @@ true None - false @@ -32,10 +31,6 @@ 10.0.19041.0 - - @@ -66,18 +61,9 @@ - - - - - - - Always diff --git a/src/Common/Common.csproj b/src/Common/Common.csproj index 2d7ecb833..f94c8ccea 100644 --- a/src/Common/Common.csproj +++ b/src/Common/Common.csproj @@ -21,10 +21,10 @@ - - + + - + diff --git a/src/ConsoleClient/ConsoleClient.csproj b/src/ConsoleClient/ConsoleClient.csproj index d54d22c68..d97f8fba7 100644 --- a/src/ConsoleClient/ConsoleClient.csproj +++ b/src/ConsoleClient/ConsoleClient.csproj @@ -32,10 +32,10 @@ - - + + - + diff --git a/src/Conversion/Conversion.csproj b/src/Conversion/Conversion.csproj index be20fb7d8..97c60ad3b 100644 --- a/src/Conversion/Conversion.csproj +++ b/src/Conversion/Conversion.csproj @@ -7,7 +7,7 @@ - + diff --git a/src/SharedUI/SharedUI.csproj b/src/SharedUI/SharedUI.csproj index 24830338c..e5ec1eeb7 100644 --- a/src/SharedUI/SharedUI.csproj +++ b/src/SharedUI/SharedUI.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/Sync/Sync.csproj b/src/Sync/Sync.csproj index 3c460d304..6754ee40b 100644 --- a/src/Sync/Sync.csproj +++ b/src/Sync/Sync.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/UnitTests/UnitTests.csproj b/src/UnitTests/UnitTests.csproj index ca91745cd..3e2909e4d 100644 --- a/src/UnitTests/UnitTests.csproj +++ b/src/UnitTests/UnitTests.csproj @@ -7,12 +7,12 @@ - + - + - - + + From b9f54e749f26a5f8acac3c6fd72a5aafd85c5509 Mon Sep 17 00:00:00 2001 From: Bailey Date: Mon, 30 Dec 2024 08:26:20 -0600 Subject: [PATCH 05/21] update all nuget packagest to latest --- src/Api.Contract/SettingsContracts.cs | 2 +- src/ClientUI/ClientUI.csproj | 4 +- src/Common/Common.csproj | 10 +-- src/Common/Observe/Tracing.cs | 61 +++++-------- src/ConsoleClient/ConsoleClient.csproj | 2 +- src/SharedUI/Shared/AppSettingsForm.razor | 8 +- src/SharedUI/Shared/FormatSettingsForm.razor | 94 ++++++++++---------- src/SharedUI/Shared/GarminSettingsForm.razor | 2 + 8 files changed, 87 insertions(+), 96 deletions(-) diff --git a/src/Api.Contract/SettingsContracts.cs b/src/Api.Contract/SettingsContracts.cs index 64f613d07..a8f9ca0df 100644 --- a/src/Api.Contract/SettingsContracts.cs +++ b/src/Api.Contract/SettingsContracts.cs @@ -63,7 +63,7 @@ public class SettingsGarminPostRequest public bool TwoStepVerificationEnabled { get; set; } public bool Upload { get; set; } public FileFormat FormatToUpload { get; set; } - public GarminApiSettings Api { get; set; } + public GarminApiSettings Api { get; set; } = new GarminApiSettings(); } public class SettingsPelotonGetResponse diff --git a/src/ClientUI/ClientUI.csproj b/src/ClientUI/ClientUI.csproj index 1874f2a51..67a5ae482 100644 --- a/src/ClientUI/ClientUI.csproj +++ b/src/ClientUI/ClientUI.csproj @@ -60,8 +60,8 @@ - - + + diff --git a/src/Common/Common.csproj b/src/Common/Common.csproj index f94c8ccea..2ad769201 100644 --- a/src/Common/Common.csproj +++ b/src/Common/Common.csproj @@ -10,14 +10,14 @@ - - + + - - + + - + diff --git a/src/Common/Observe/Tracing.cs b/src/Common/Observe/Tracing.cs index 2feb66470..ba9cfe940 100644 --- a/src/Common/Observe/Tracing.cs +++ b/src/Common/Observe/Tracing.cs @@ -63,7 +63,7 @@ public static void EnableApiTracing(IServiceCollection services, Jaeger config) .AddAspNetCoreInstrumentation(c => { c.RecordException = true; - c.Enrich = AspNetCoreEnricher; + c.EnrichWithHttpRequest = AspNetCoreEnricher; }); }); @@ -107,7 +107,9 @@ private static TracerProviderBuilder ConfigureDefaultBuilder(this TracerProvider .AddHttpClientInstrumentation(h => { h.RecordException = true; - h.Enrich = HttpEnricher; + h.EnrichWithException = (activity, exception) => activity.SetTag("stackTrace", exception.StackTrace); + h.EnrichWithHttpRequestMessage = HttpEnricher_EnrichWithHttpRequestMessage; + h.EnrichWithHttpResponseMessage = HttpEnricher_EnrichWithHttpResponseMessage; }) .AddJaegerExporter(o => { @@ -181,49 +183,30 @@ public static void ValidateConfig(Observability config) } } - public static void HttpEnricher(Activity activity, string name, object rawEventObject) + public static void HttpEnricher_EnrichWithHttpRequestMessage(Activity activity, HttpRequestMessage request) { - if (name.Equals("OnStartActivity")) - { - if (rawEventObject is HttpRequestMessage request) - { - activity.DisplayName = $"{request.Method} {request.RequestUri.AbsolutePath}"; - activity.SetTag("http.request.path", request.RequestUri.AbsolutePath); - activity.SetTag("http.request.query", request.RequestUri.Query); - activity.SetTag("http.request.body", request.Content?.ReadAsStringAsync().GetAwaiter().GetResult() ?? "no_content"); - } - } - else if (name.Equals("OnStopActivity")) - { - if (rawEventObject is HttpResponseMessage response) - { - var content = response.Content?.ReadAsStringAsync().GetAwaiter().GetResult() ?? "no_content"; - activity.SetTag("http.response.body", content); - } - } - else if (name.Equals("OnException")) - { - if (rawEventObject is Exception exception) - { - activity.SetTag("stackTrace", exception.StackTrace); - } - } + activity.DisplayName = $"{request.Method} {request.RequestUri.AbsolutePath}"; + activity.SetTag("http.request.path", request.RequestUri.AbsolutePath); + activity.SetTag("http.request.query", request.RequestUri.Query); + activity.SetTag("http.request.body", request.Content?.ReadAsStringAsync().GetAwaiter().GetResult() ?? "no_content"); } - public static void AspNetCoreEnricher(Activity activity, string name, object rawEventObject) + public static void HttpEnricher_EnrichWithHttpResponseMessage(Activity activity, HttpResponseMessage response) { - if (name.Equals("OnStartActivity") - && rawEventObject is HttpRequest httpRequest) - { - if (httpRequest.Headers.TryGetValue("TraceId", out var incomingTraceParent)) - activity.SetParentId(incomingTraceParent); + var content = response.Content?.ReadAsStringAsync().GetAwaiter().GetResult() ?? "no_content"; + activity.SetTag("http.response.body", content); + } - if (httpRequest.Headers.TryGetValue("uber-trace-id", out incomingTraceParent)) - activity.SetParentId(incomingTraceParent); + public static void AspNetCoreEnricher(Activity activity, HttpRequest request) + { + if (request.Headers.TryGetValue("TraceId", out var incomingTraceParent)) + activity.SetParentId(incomingTraceParent); - activity.SetTag("http.path", httpRequest.Path); - activity.SetTag("http.query", httpRequest.QueryString); - } + if (request.Headers.TryGetValue("uber-trace-id", out incomingTraceParent)) + activity.SetParentId(incomingTraceParent); + + activity.SetTag("http.path", request.Path); + activity.SetTag("http.query", request.QueryString); } } } diff --git a/src/ConsoleClient/ConsoleClient.csproj b/src/ConsoleClient/ConsoleClient.csproj index d97f8fba7..99d795323 100644 --- a/src/ConsoleClient/ConsoleClient.csproj +++ b/src/ConsoleClient/ConsoleClient.csproj @@ -31,7 +31,7 @@ - + diff --git a/src/SharedUI/Shared/AppSettingsForm.razor b/src/SharedUI/Shared/AppSettingsForm.razor index f8648ee87..043b07707 100644 --- a/src/SharedUI/Shared/AppSettingsForm.razor +++ b/src/SharedUI/Shared/AppSettingsForm.razor @@ -10,9 +10,9 @@ + Title="Automatic Syncing" + Content="@AutomaticSyncingDocumentation" + Html="true"> ? @@ -43,6 +43,8 @@ var settings = new SettingsGetResponse(); appSettings = settings.App; garminSettings = settings.Garmin; + + configDocumentation = string.Empty; } protected override Task OnInitializedAsync() diff --git a/src/SharedUI/Shared/FormatSettingsForm.razor b/src/SharedUI/Shared/FormatSettingsForm.razor index 79f622b88..54c16b6c5 100644 --- a/src/SharedUI/Shared/FormatSettingsForm.razor +++ b/src/SharedUI/Shared/FormatSettingsForm.razor @@ -12,10 +12,10 @@ Format Types + Trigger="PopoverTrigger.Hover|PopoverTrigger.Click|PopoverTrigger.Focus" + Title="Convert to various Format Types" + Content="@FormatSettingsDocumentation" + Html="true"> ? @@ -34,10 +34,10 @@ Workout Title + Trigger="PopoverTrigger.Hover|PopoverTrigger.Click|PopoverTrigger.Focus" + Title="Workout Title Templating" + Content="@WorkoutTitleDocumentation" + Html="true"> ? @@ -54,35 +54,35 @@ Lap Types + Title="Customzing Lap Types" + Content="@LapTypesDocumentation" + Html="true"> ?
-
- -
-
- -
-
- -
+
+ +
+
+ +
+
+ +
@@ -95,9 +95,9 @@ Strength + Title="Strength Workouts" + Content="@StrengthDocumentation" + Html="true"> ? @@ -110,7 +110,7 @@
- + @@ -126,9 +126,9 @@ Device Info Settings + Title="Device Info Settings" + Content="@CustomDeviceInfoDocumentation" + Html="true"> ? @@ -154,9 +154,9 @@ + DataProvider="DeviceInfo_GetGridData" + PageSize="100" + Responsive="true"> @@ -185,9 +185,9 @@ Custom Zone Handling + Title="Custom Zone Handling" + Content="@CustomZoneHandlingDocumentation" + Html="true"> ? @@ -232,7 +232,11 @@ formatSettings = settings.Format; workoutTemplateExample = string.Empty; + configDocumentation = string.Empty; + configDocumentationBase = string.Empty; + + outputDirectory = string.Empty; } protected override Task OnInitializedAsync() diff --git a/src/SharedUI/Shared/GarminSettingsForm.razor b/src/SharedUI/Shared/GarminSettingsForm.razor index 3c864f906..01ac2cba2 100644 --- a/src/SharedUI/Shared/GarminSettingsForm.razor +++ b/src/SharedUI/Shared/GarminSettingsForm.razor @@ -154,6 +154,8 @@ { var settings = new SettingsGetResponse(); garminSettings = settings.Garmin; + configDocumentation = string.Empty; + configDocumentationBase = string.Empty; } protected override Task OnInitializedAsync() From b2245aacb7d2217744652f899084aefb54623c36 Mon Sep 17 00:00:00 2001 From: Bailey Date: Mon, 30 Dec 2024 17:17:10 -0600 Subject: [PATCH 06/21] Update mkdocs/docs/migration/migrations.md --- mkdocs/docs/migration/migrations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs/docs/migration/migrations.md b/mkdocs/docs/migration/migrations.md index a599830b1..50a171833 100644 --- a/mkdocs/docs/migration/migrations.md +++ b/mkdocs/docs/migration/migrations.md @@ -6,4 +6,4 @@ P2G uses major release versions to designate when a breaking or non-backwards co 1. [Migrating from V1 to V2](migrate-v1-v2.md) 1. [Migrating from V2 to V3](migrate-v2-v3.md) 1. [Migrating from V3 to V4](migrate-v3-v4.md) -1. [Migrating from V3 to V4](migrate-v4-v5.md) +1. [Migrating from V4 to V5](migrate-v4-v5.md) From 32331e261a6139b99d697b1c3ef5681767a8a50c Mon Sep 17 00:00:00 2001 From: Bailey Date: Mon, 30 Dec 2024 17:17:19 -0600 Subject: [PATCH 07/21] Update vNextReleaseNotes.md --- vNextReleaseNotes.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vNextReleaseNotes.md b/vNextReleaseNotes.md index ac9f9413f..6084b470a 100644 --- a/vNextReleaseNotes.md +++ b/vNextReleaseNotes.md @@ -11,7 +11,8 @@ - `console-stable` - `console-latest` - `console-v5.0.0` - - `console-v0` + - `console-v5` + - Api - `api-stable` - `api-latest` From b6f0c8ba5e140c50361126c6901019d86f88a535 Mon Sep 17 00:00:00 2001 From: Bailey Belvis Date: Mon, 30 Dec 2024 17:30:18 -0600 Subject: [PATCH 08/21] fix gha --- .github/actions/publish-ui-dist/action.yaml | 10 +++++++--- .github/workflows/pr-check.yml | 4 ++-- .github/workflows/publish-release.yaml | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/actions/publish-ui-dist/action.yaml b/.github/actions/publish-ui-dist/action.yaml index 27d00308b..b5558899f 100644 --- a/.github/actions/publish-ui-dist/action.yaml +++ b/.github/actions/publish-ui-dist/action.yaml @@ -7,6 +7,10 @@ inputs: framework: description: 'DotNet Framework' required: true + framework-path: + description: 'The folder pathname used when built' + required: false + default: 'win10-64' os: description: 'The OS we are running on' required: true @@ -42,11 +46,11 @@ runs: shell: pwsh - name: Rename Config - run: Rename-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os }}/configuration.example.json -NewName configuration.local.json + run: Rename-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework-path }}/${{ inputs.os }}/configuration.example.json -NewName configuration.local.json shell: pwsh - name: Remove nested Publish Dir - run: Remove-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os }}/publish -Recurse + run: Remove-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework-path }}/${{ inputs.os }}/publish -Recurse shell: pwsh # Create Build Artifact @@ -54,7 +58,7 @@ runs: uses: actions/upload-artifact@v4 with: name: ui_${{ inputs.os }}_${{ github.run_number }}-${{ github.run_id }} - path: ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os }} + path: ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework-path }}/${{ inputs.os }} # Installed Workload Id Manifest Version Installation Source diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 317184856..2966d781c 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -10,9 +10,9 @@ jobs: build-and-test: strategy: matrix: - dotnet: ['7.0'] + dotnet: ['9.0.101'] os: [windows-latest] - framework: ['net7.0-windows10.0.19041.0'] + framework: ['net9.0-windows10.0.19041.0'] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/publish-release.yaml b/.github/workflows/publish-release.yaml index 08ae39fc3..ee30c0fe0 100644 --- a/.github/workflows/publish-release.yaml +++ b/.github/workflows/publish-release.yaml @@ -72,6 +72,8 @@ jobs: needs: [publish-ui-dist, publish-docker-images] steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 with: name: ${{ needs.publish-ui-dist.outputs.artifact_name }} @@ -82,8 +84,6 @@ jobs: with: files: /downloaded # must be relative to gh workspace, does not support absolute paths :( dest: ui_win_${{ github.event.inputs.version }}.zip # this is hardcoded to output to ${{ github.workspace }}/ :( - - - uses: actions/checkout@v4 - name: Create Release and Upload Artifacts uses: ncipollo/release-action@v1 From 0deada3c89309167e15dbc8fb22c3a106d408e5f Mon Sep 17 00:00:00 2001 From: Bailey Belvis Date: Mon, 30 Dec 2024 17:49:35 -0600 Subject: [PATCH 09/21] os path not framework --- .github/actions/publish-ui-dist/action.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/publish-ui-dist/action.yaml b/.github/actions/publish-ui-dist/action.yaml index b5558899f..3cc119a5d 100644 --- a/.github/actions/publish-ui-dist/action.yaml +++ b/.github/actions/publish-ui-dist/action.yaml @@ -7,7 +7,7 @@ inputs: framework: description: 'DotNet Framework' required: true - framework-path: + os-path: description: 'The folder pathname used when built' required: false default: 'win10-64' @@ -46,11 +46,11 @@ runs: shell: pwsh - name: Rename Config - run: Rename-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework-path }}/${{ inputs.os }}/configuration.example.json -NewName configuration.local.json + run: Rename-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os-path }}/configuration.example.json -NewName configuration.local.json shell: pwsh - name: Remove nested Publish Dir - run: Remove-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework-path }}/${{ inputs.os }}/publish -Recurse + run: Remove-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os-path }}/publish -Recurse shell: pwsh # Create Build Artifact @@ -58,7 +58,7 @@ runs: uses: actions/upload-artifact@v4 with: name: ui_${{ inputs.os }}_${{ github.run_number }}-${{ github.run_id }} - path: ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework-path }}/${{ inputs.os }} + path: ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os-path }} # Installed Workload Id Manifest Version Installation Source From 881cc2e8e5d62da97d65dffa4c0094d54de90408 Mon Sep 17 00:00:00 2001 From: Bailey Date: Tue, 31 Dec 2024 06:58:12 -0600 Subject: [PATCH 10/21] more gha fixes --- .github/actions/publish-ui-dist/action.yaml | 4 --- src/ClientUI/ClientUI.csproj | 7 ++-- src/ClientUI/configuration.example.json | 37 --------------------- vNextReleaseNotes.md | 4 +++ 4 files changed, 7 insertions(+), 45 deletions(-) delete mode 100644 src/ClientUI/configuration.example.json diff --git a/.github/actions/publish-ui-dist/action.yaml b/.github/actions/publish-ui-dist/action.yaml index 3cc119a5d..4eacd37aa 100644 --- a/.github/actions/publish-ui-dist/action.yaml +++ b/.github/actions/publish-ui-dist/action.yaml @@ -45,10 +45,6 @@ runs: run: dotnet publish ${{ github.workspace }}/src/ClientUI/ClientUI.csproj -c Release -f ${{ inputs.framework }} -p:RuntimeIdentifierOverride=${{ inputs.os }} -p:PublishSingleFile=true -p:SelfContained=true shell: pwsh - - name: Rename Config - run: Rename-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os-path }}/configuration.example.json -NewName configuration.local.json - shell: pwsh - - name: Remove nested Publish Dir run: Remove-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os-path }}/publish -Recurse shell: pwsh diff --git a/src/ClientUI/ClientUI.csproj b/src/ClientUI/ClientUI.csproj index 67a5ae482..42c9cf13d 100644 --- a/src/ClientUI/ClientUI.csproj +++ b/src/ClientUI/ClientUI.csproj @@ -47,11 +47,10 @@ - - - - + + + diff --git a/src/ClientUI/configuration.example.json b/src/ClientUI/configuration.example.json deleted file mode 100644 index 47de40236..000000000 --- a/src/ClientUI/configuration.example.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Observability": { - - "Prometheus": { - "Enabled": false, - "Port": 4000 - }, - - "Jaeger": { - "Enabled": false, - "AgentHost": "localhost", - "AgentPort": 6831 - }, - - "Serilog": { - "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File" ], - "MinimumLevel": { - "Default": "Information", - "Override": { - "Microsoft": "Error", - "System": "Error" - } - }, - "WriteTo": [ - { "Name": "Console" }, - { - "Name": "File", - "Args": { - "path": "./output/log.txt", - "rollingInterval": "Day", - "retainedFileCountLimit": 7 - } - } - ] - } - } - } \ No newline at end of file diff --git a/vNextReleaseNotes.md b/vNextReleaseNotes.md index 6084b470a..36e6d7a79 100644 --- a/vNextReleaseNotes.md +++ b/vNextReleaseNotes.md @@ -5,6 +5,10 @@ - [#656] Uplift to .net 9 +## Housekeeping + +- [#672] Bump all dependencies + ## Docker Tags - Console From 7559e8b90671605893c510e8b03a7a394bec0ce7 Mon Sep 17 00:00:00 2001 From: Bailey Date: Tue, 31 Dec 2024 07:18:53 -0600 Subject: [PATCH 11/21] fix path name --- .github/actions/publish-ui-dist/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/publish-ui-dist/action.yaml b/.github/actions/publish-ui-dist/action.yaml index 4eacd37aa..b9cc6e2dc 100644 --- a/.github/actions/publish-ui-dist/action.yaml +++ b/.github/actions/publish-ui-dist/action.yaml @@ -10,7 +10,7 @@ inputs: os-path: description: 'The folder pathname used when built' required: false - default: 'win10-64' + default: 'win10-x64' os: description: 'The OS we are running on' required: true From 432f3e800ab3c7949abe710bbb259d7cc794c075 Mon Sep 17 00:00:00 2001 From: Bailey Date: Wed, 1 Jan 2025 07:18:25 -0600 Subject: [PATCH 12/21] try this --- .github/actions/publish-ui-dist/action.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/publish-ui-dist/action.yaml b/.github/actions/publish-ui-dist/action.yaml index b9cc6e2dc..0bfe68180 100644 --- a/.github/actions/publish-ui-dist/action.yaml +++ b/.github/actions/publish-ui-dist/action.yaml @@ -45,9 +45,9 @@ runs: run: dotnet publish ${{ github.workspace }}/src/ClientUI/ClientUI.csproj -c Release -f ${{ inputs.framework }} -p:RuntimeIdentifierOverride=${{ inputs.os }} -p:PublishSingleFile=true -p:SelfContained=true shell: pwsh - - name: Remove nested Publish Dir - run: Remove-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os-path }}/publish -Recurse - shell: pwsh + # - name: Remove nested Publish Dir + # run: Remove-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os-path }}/publish -Recurse + # shell: pwsh # Create Build Artifact - name: Upload Artifact ui_${{ inputs.os }}_${{ github.run_number }}-${{ github.run_id }} From b5f679d2bb5bc76f4ff94a75a5f9feb027669167 Mon Sep 17 00:00:00 2001 From: Bailey Date: Wed, 1 Jan 2025 07:43:02 -0600 Subject: [PATCH 13/21] update global.json to include Maui explicitly --- global.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/global.json b/global.json index f54920fda..f717d9895 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,8 @@ { "sdk": { "version": "9.0.101" + }, + "msbuild-sdks": { + "Microsoft.NET.Sdk.Maui": "9.0.100" } } \ No newline at end of file From d3c1d9ed0ca8dbcb9f29bcb60b3aa48a6e1c981f Mon Sep 17 00:00:00 2001 From: Bailey Date: Wed, 1 Jan 2025 08:03:09 -0600 Subject: [PATCH 14/21] and try this --- .github/actions/publish-ui-dist/action.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/publish-ui-dist/action.yaml b/.github/actions/publish-ui-dist/action.yaml index 0bfe68180..0702c6558 100644 --- a/.github/actions/publish-ui-dist/action.yaml +++ b/.github/actions/publish-ui-dist/action.yaml @@ -26,6 +26,10 @@ runs: with: dotnet-version: ${{ inputs.dotnet-version }} + - name: Install MAUI Workloads + run: dotnet workload install maui + shell: pwsh + - name: Restore MAUI Workloads run: dotnet workload restore shell: pwsh From 1b13f013749b692e75e8294ab4b3c321a823d63d Mon Sep 17 00:00:00 2001 From: Bailey Date: Wed, 1 Jan 2025 08:56:27 -0600 Subject: [PATCH 15/21] no idea anymore, works fine on my machine --- .github/actions/publish-ui-dist/action.yaml | 36 ++++++++++++------ .../Resources/Raw/configuration.local.json | 37 +++++++++++++++++++ 2 files changed, 62 insertions(+), 11 deletions(-) create mode 100644 src/ClientUI/Resources/Raw/configuration.local.json diff --git a/.github/actions/publish-ui-dist/action.yaml b/.github/actions/publish-ui-dist/action.yaml index 0702c6558..f87e92f1e 100644 --- a/.github/actions/publish-ui-dist/action.yaml +++ b/.github/actions/publish-ui-dist/action.yaml @@ -25,11 +25,18 @@ runs: uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ inputs.dotnet-version }} - - - name: Install MAUI Workloads - run: dotnet workload install maui + + - name: List SDKs + run: dotnet --list-sdks shell: pwsh + # I really shouldn't need to do this. The restore command below should be enough. + # However it seems the restore command does not install Maui base, which is needed + # to publish a running package. + # - name: Install MAUI Workloads + # run: dotnet workload install maui + # shell: pwsh + - name: Restore MAUI Workloads run: dotnet workload restore shell: pwsh @@ -44,6 +51,14 @@ runs: echo "RUNNER_TOOL_CACHE=$Env:RUNNER_TOOL_CACHE" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append shell: pwsh + - name: Clean + run: dotnet clean --configuration Debug && dotnet nuget locals all --clear + shell: pwsh + + - name: Restore + run: dotnet restore + shell: pwsh + # dotnet publish src/ClientUI/ClientUI.csproj -c Release -f net9.0-windows10.0.19041.0 -p:RuntimeIdentifierOverride=win-x64 -p:PublishSingleFile=true -p:SelfContained=true - name: Publish ${{ inputs.os }} run: dotnet publish ${{ github.workspace }}/src/ClientUI/ClientUI.csproj -c Release -f ${{ inputs.framework }} -p:RuntimeIdentifierOverride=${{ inputs.os }} -p:PublishSingleFile=true -p:SelfContained=true @@ -62,11 +77,10 @@ runs: # Installed Workload Id Manifest Version Installation Source -# --------------------------------------------------------------------- -# maui-android 7.0.92/7.0.100 VS 17.7.34031.279 -# android 33.0.68/7.0.100 VS 17.7.34031.279 -# ios 16.4.7098/7.0.100 VS 17.7.34031.279 -# maui-ios 7.0.92/7.0.100 VS 17.7.34031.279 -# maui-windows 7.0.92/7.0.100 VS 17.7.34031.279 -# maui-maccatalyst 7.0.92/7.0.100 VS 17.7.34031.279 -# maccatalyst 16.4.7098/7.0.100 VS 17.7.34031.279 +# --------------------------------------------------------------------------------- +# android 35.0.7/9.0.100 SDK 9.0.100, VS 17.12.35527.113 +# aspire 8.2.2/8.0.100 SDK 9.0.100, VS 17.12.35527.113 +# ios 18.1.9163/9.0.100 SDK 9.0.100, VS 17.12.35527.113 +# maccatalyst 18.1.9163/9.0.100 SDK 9.0.100, VS 17.12.35527.113 +# maui 9.0.0/9.0.100 SDK 9.0.100 +# maui-windows 9.0.0/9.0.100 SDK 9.0.100, VS 17.12.35527.113 diff --git a/src/ClientUI/Resources/Raw/configuration.local.json b/src/ClientUI/Resources/Raw/configuration.local.json new file mode 100644 index 000000000..7de5c2c8d --- /dev/null +++ b/src/ClientUI/Resources/Raw/configuration.local.json @@ -0,0 +1,37 @@ +{ + "Observability": { + + "Prometheus": { + "Enabled": false, + "Port": 4000 + }, + + "Jaeger": { + "Enabled": false, + "AgentHost": "localhost", + "AgentPort": 6831 + }, + + "Serilog": { + "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File" ], + "MinimumLevel": { + "Default": "Information", + "Override": { + "Microsoft": "Error", + "System": "Error" + } + }, + "WriteTo": [ + { "Name": "Console" }, + { + "Name": "File", + "Args": { + "path": "./output/log.txt", + "rollingInterval": "Day", + "retainedFileCountLimit": 7 + } + } + ] + } + } +} \ No newline at end of file From d6cc9e7e38914009670e569a2d1cdcd34c24fce3 Mon Sep 17 00:00:00 2001 From: Bailey Date: Wed, 1 Jan 2025 09:22:28 -0600 Subject: [PATCH 16/21] try this again --- .github/actions/publish-ui-dist/action.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/actions/publish-ui-dist/action.yaml b/.github/actions/publish-ui-dist/action.yaml index f87e92f1e..8d096a84a 100644 --- a/.github/actions/publish-ui-dist/action.yaml +++ b/.github/actions/publish-ui-dist/action.yaml @@ -33,9 +33,9 @@ runs: # I really shouldn't need to do this. The restore command below should be enough. # However it seems the restore command does not install Maui base, which is needed # to publish a running package. - # - name: Install MAUI Workloads - # run: dotnet workload install maui - # shell: pwsh + - name: Install MAUI Workloads + run: dotnet workload install maui + shell: pwsh - name: Restore MAUI Workloads run: dotnet workload restore @@ -44,6 +44,10 @@ runs: - name: List MAUI Workloads run: dotnet workload list shell: pwsh + + - name: Log Dependencies + run: dotnet list package --include-transitive + shell: pwsh - name: Prepare env run: | From 7561682767f304a9a3fc7e358b7c8dc34fc23415 Mon Sep 17 00:00:00 2001 From: Bailey Date: Wed, 1 Jan 2025 10:18:42 -0600 Subject: [PATCH 17/21] cmon chatgpt, help me out here --- .github/actions/publish-ui-dist/action.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/publish-ui-dist/action.yaml b/.github/actions/publish-ui-dist/action.yaml index 8d096a84a..6bc77e400 100644 --- a/.github/actions/publish-ui-dist/action.yaml +++ b/.github/actions/publish-ui-dist/action.yaml @@ -44,10 +44,6 @@ runs: - name: List MAUI Workloads run: dotnet workload list shell: pwsh - - - name: Log Dependencies - run: dotnet list package --include-transitive - shell: pwsh - name: Prepare env run: | @@ -62,6 +58,10 @@ runs: - name: Restore run: dotnet restore shell: pwsh + + - name: Log Dependencies + run: dotnet list package --include-transitive + shell: pwsh # dotnet publish src/ClientUI/ClientUI.csproj -c Release -f net9.0-windows10.0.19041.0 -p:RuntimeIdentifierOverride=win-x64 -p:PublishSingleFile=true -p:SelfContained=true - name: Publish ${{ inputs.os }} From e9b18cc695246abcb7399d7e67bbb8e3733b0ec4 Mon Sep 17 00:00:00 2001 From: Bailey Date: Thu, 2 Jan 2025 08:14:41 -0600 Subject: [PATCH 18/21] dotnet maui may be the single worst technology ever developed by microstoft --- .github/actions/publish-ui-dist/action.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/publish-ui-dist/action.yaml b/.github/actions/publish-ui-dist/action.yaml index 6bc77e400..406ff6291 100644 --- a/.github/actions/publish-ui-dist/action.yaml +++ b/.github/actions/publish-ui-dist/action.yaml @@ -58,15 +58,15 @@ runs: - name: Restore run: dotnet restore shell: pwsh - - - name: Log Dependencies - run: dotnet list package --include-transitive - shell: pwsh # dotnet publish src/ClientUI/ClientUI.csproj -c Release -f net9.0-windows10.0.19041.0 -p:RuntimeIdentifierOverride=win-x64 -p:PublishSingleFile=true -p:SelfContained=true - name: Publish ${{ inputs.os }} run: dotnet publish ${{ github.workspace }}/src/ClientUI/ClientUI.csproj -c Release -f ${{ inputs.framework }} -p:RuntimeIdentifierOverride=${{ inputs.os }} -p:PublishSingleFile=true -p:SelfContained=true shell: pwsh + + - name: Log Dependencies + run: dotnet list package --include-transitive + shell: pwsh # - name: Remove nested Publish Dir # run: Remove-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os-path }}/publish -Recurse From 778af5e7d2deaf94c00bbcd79ac9d24039b7ce48 Mon Sep 17 00:00:00 2001 From: Bailey Date: Thu, 2 Jan 2025 08:28:31 -0600 Subject: [PATCH 19/21] alright stackoverflow, let's see what you got --- .github/workflows/pr-check.yml | 66 +++++++++++++++++----------------- src/ClientUI/ClientUI.csproj | 3 +- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 2966d781c..53cda6732 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -19,33 +19,33 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Install dotnet - uses: actions/setup-dotnet@v3 - with: - dotnet-version: ${{ matrix.dotnet }} + # - name: Install dotnet + # uses: actions/setup-dotnet@v3 + # with: + # dotnet-version: ${{ matrix.dotnet }} - - name: List SDKs - run: dotnet --list-sdks + # - name: List SDKs + # run: dotnet --list-sdks - - name: Restore MAUI Workloads - run: dotnet workload restore - shell: pwsh + # - name: Restore MAUI Workloads + # run: dotnet workload restore + # shell: pwsh - - name: List MAUI Workloads - run: dotnet workload list - shell: pwsh + # - name: List MAUI Workloads + # run: dotnet workload list + # shell: pwsh - - name: Clean - run: dotnet clean --configuration Debug && dotnet nuget locals all --clear + # - name: Clean + # run: dotnet clean --configuration Debug && dotnet nuget locals all --clear - - name: Restore - run: dotnet restore + # - name: Restore + # run: dotnet restore - - name: Build - run: dotnet build --no-restore --configuration Debug + # - name: Build + # run: dotnet build --no-restore --configuration Debug - - name: Test - run: dotnet test + # - name: Test + # run: dotnet test publish-ui-dist: name: Publish UI Distribution @@ -68,19 +68,19 @@ jobs: framework: ${{ matrix.framework }} publish-docker-images: - name: Publish Docker Images - runs-on: ubuntu-latest - needs: build-and-test - strategy: - matrix: - dockerfile: ['Dockerfile.console', 'Dockerfile.api', 'Dockerfile.webui'] - include: - - dockerfile: 'Dockerfile.console' - tag: 'pr-validator-console-A' - - dockerfile: 'Dockerfile.api' - tag: 'pr-validator-api-A' - - dockerfile: 'Dockerfile.webui' - tag: 'pr-validator-webui-A' + # name: Publish Docker Images + # runs-on: ubuntu-latest + # needs: build-and-test + # strategy: + # matrix: + # dockerfile: ['Dockerfile.console', 'Dockerfile.api', 'Dockerfile.webui'] + # include: + # - dockerfile: 'Dockerfile.console' + # tag: 'pr-validator-console-A' + # - dockerfile: 'Dockerfile.api' + # tag: 'pr-validator-api-A' + # - dockerfile: 'Dockerfile.webui' + # tag: 'pr-validator-webui-A' steps: diff --git a/src/ClientUI/ClientUI.csproj b/src/ClientUI/ClientUI.csproj index 42c9cf13d..6e2626aaf 100644 --- a/src/ClientUI/ClientUI.csproj +++ b/src/ClientUI/ClientUI.csproj @@ -9,9 +9,10 @@ enable false - true + true None false + true PelotonToGarmin From a0ee274873c0cd6a594de41ac99789d3067f52a8 Mon Sep 17 00:00:00 2001 From: Bailey Date: Thu, 2 Jan 2025 08:47:21 -0600 Subject: [PATCH 20/21] fix --- .github/workflows/pr-check.yml | 52 +++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 53cda6732..034b8f333 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -67,29 +67,29 @@ jobs: os: ${{ matrix.os }} framework: ${{ matrix.framework }} - publish-docker-images: - # name: Publish Docker Images - # runs-on: ubuntu-latest - # needs: build-and-test - # strategy: - # matrix: - # dockerfile: ['Dockerfile.console', 'Dockerfile.api', 'Dockerfile.webui'] - # include: - # - dockerfile: 'Dockerfile.console' - # tag: 'pr-validator-console-A' - # - dockerfile: 'Dockerfile.api' - # tag: 'pr-validator-api-A' - # - dockerfile: 'Dockerfile.webui' - # tag: 'pr-validator-webui-A' - - steps: - - - uses: actions/checkout@v3 - - name: Publish Docker Images - uses: ./.github/actions/publish-docker-images - with: - dockerfile: ${{ matrix.dockerfile }} - tag: ${{ matrix.tag }} - secret_docker_username: ${{ secrets.DOCKER_USERNAME }} - secret_docker_password: ${{ secrets.DOCKER_PASSWORD }} - secret_github_package: ${{ secrets.GH_PACKAGE_SECRET}} + # publish-docker-images: + # name: Publish Docker Images + # runs-on: ubuntu-latest + # needs: build-and-test + # strategy: + # matrix: + # dockerfile: ['Dockerfile.console', 'Dockerfile.api', 'Dockerfile.webui'] + # include: + # - dockerfile: 'Dockerfile.console' + # tag: 'pr-validator-console-A' + # - dockerfile: 'Dockerfile.api' + # tag: 'pr-validator-api-A' + # - dockerfile: 'Dockerfile.webui' + # tag: 'pr-validator-webui-A' + + # steps: + + # - uses: actions/checkout@v3 + # - name: Publish Docker Images + # uses: ./.github/actions/publish-docker-images + # with: + # dockerfile: ${{ matrix.dockerfile }} + # tag: ${{ matrix.tag }} + # secret_docker_username: ${{ secrets.DOCKER_USERNAME }} + # secret_docker_password: ${{ secrets.DOCKER_PASSWORD }} + # secret_github_package: ${{ secrets.GH_PACKAGE_SECRET}} From 7561d760f050dd2732cde41f3e7fa0e162d9a80d Mon Sep 17 00:00:00 2001 From: Bailey Date: Thu, 2 Jan 2025 09:24:41 -0600 Subject: [PATCH 21/21] restore full workflow --- .github/workflows/pr-check.yml | 92 +++++++++++++++++----------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 034b8f333..2966d781c 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -19,33 +19,33 @@ jobs: steps: - uses: actions/checkout@v3 - # - name: Install dotnet - # uses: actions/setup-dotnet@v3 - # with: - # dotnet-version: ${{ matrix.dotnet }} + - name: Install dotnet + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ matrix.dotnet }} - # - name: List SDKs - # run: dotnet --list-sdks + - name: List SDKs + run: dotnet --list-sdks - # - name: Restore MAUI Workloads - # run: dotnet workload restore - # shell: pwsh + - name: Restore MAUI Workloads + run: dotnet workload restore + shell: pwsh - # - name: List MAUI Workloads - # run: dotnet workload list - # shell: pwsh + - name: List MAUI Workloads + run: dotnet workload list + shell: pwsh - # - name: Clean - # run: dotnet clean --configuration Debug && dotnet nuget locals all --clear + - name: Clean + run: dotnet clean --configuration Debug && dotnet nuget locals all --clear - # - name: Restore - # run: dotnet restore + - name: Restore + run: dotnet restore - # - name: Build - # run: dotnet build --no-restore --configuration Debug + - name: Build + run: dotnet build --no-restore --configuration Debug - # - name: Test - # run: dotnet test + - name: Test + run: dotnet test publish-ui-dist: name: Publish UI Distribution @@ -67,29 +67,29 @@ jobs: os: ${{ matrix.os }} framework: ${{ matrix.framework }} - # publish-docker-images: - # name: Publish Docker Images - # runs-on: ubuntu-latest - # needs: build-and-test - # strategy: - # matrix: - # dockerfile: ['Dockerfile.console', 'Dockerfile.api', 'Dockerfile.webui'] - # include: - # - dockerfile: 'Dockerfile.console' - # tag: 'pr-validator-console-A' - # - dockerfile: 'Dockerfile.api' - # tag: 'pr-validator-api-A' - # - dockerfile: 'Dockerfile.webui' - # tag: 'pr-validator-webui-A' - - # steps: - - # - uses: actions/checkout@v3 - # - name: Publish Docker Images - # uses: ./.github/actions/publish-docker-images - # with: - # dockerfile: ${{ matrix.dockerfile }} - # tag: ${{ matrix.tag }} - # secret_docker_username: ${{ secrets.DOCKER_USERNAME }} - # secret_docker_password: ${{ secrets.DOCKER_PASSWORD }} - # secret_github_package: ${{ secrets.GH_PACKAGE_SECRET}} + publish-docker-images: + name: Publish Docker Images + runs-on: ubuntu-latest + needs: build-and-test + strategy: + matrix: + dockerfile: ['Dockerfile.console', 'Dockerfile.api', 'Dockerfile.webui'] + include: + - dockerfile: 'Dockerfile.console' + tag: 'pr-validator-console-A' + - dockerfile: 'Dockerfile.api' + tag: 'pr-validator-api-A' + - dockerfile: 'Dockerfile.webui' + tag: 'pr-validator-webui-A' + + steps: + + - uses: actions/checkout@v3 + - name: Publish Docker Images + uses: ./.github/actions/publish-docker-images + with: + dockerfile: ${{ matrix.dockerfile }} + tag: ${{ matrix.tag }} + secret_docker_username: ${{ secrets.DOCKER_USERNAME }} + secret_docker_password: ${{ secrets.DOCKER_PASSWORD }} + secret_github_package: ${{ secrets.GH_PACKAGE_SECRET}}