ironmansoftware / powershell-universal

Issue tracker for PowerShell Universal
https://powershelluniversal.com
35 stars 2 forks source link

Universal 5.0 changing Git Sync Settings result in deletion of Sync Settings #3688

Closed ganslm closed 1 week ago

ganslm commented 1 week ago

Version

5.0.4

Severity

Medium

Environment

msi

Steps to Reproduce

  1. Create Git Sync settings.
  2. Try to Update settings (e. g. click on "Pause git sync"

Expected behavior

Update settings accordingly.

Actual behavior

Removes Git Sync completely.

Additional Environment data

Operating System: Windows Server 2022

Screenshots/Animations

No response

adamdriscoll commented 1 week ago

I haven't reproduced this. Did you try on v5.0.5 at all? The pause switch isn't displaying the status correctly but it didn't delete everything.

ganslm commented 1 week ago

Yes, I already installed v5.0.5. This time I event got an error message:

An error occured. An explicit value for the identity column cannot be inserted in the GitSettings table if IDENTITY_INSERT is set to OFF. at PowerShellUniversal.Extensibility.EFTable2.Insert(T item) in C:\actions-runner\_work\universal\universal\src\PowerShellUniversal.Extensibility\Persistence\EFTable.cs:line 223 at PowerShellUniversal.GitSettingsService.SetSettings(GitSettings settings) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\Git\GitSettingsService.cs:line 63 at Universal.Server.Pages.Settings.Git.OnPause(Boolean value) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Pages\Settings\Git.razor:line 185 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span1 copyOfArgs, BindingFlags invokeAttr) --- End of stack trace from previous location --- at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at AntDesign.AntInputBoolComponentBase.ChangeValue(Boolean value) at AntDesign.Switch.HandleClick(MouseEventArgs e) at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

For your Information, I am using MSSQL 2022.

adamdriscoll commented 1 week ago

I can reproduce this when I use SQL. Thank you.