new-navcontainer /bc-container - Restarting Service Tier failes - (own Database)

we use a script to run our local docker container with databases hosted on our server (reachable via wan).
till today, we managed to get the containers up and running (ok with some days of ....you know what(!) )
today the new-navcontainer / or new-bccontainer fails.
here is the part of the script we r using (restarting service tier takes about 15mins till failure):
        New-BCContainer -accept_eula `
                        -accept_outdated `
                        -containerName $containerName `
                        -Auth NavUserPassword `
                        -imageName $imageName `
                        -Credential $navCred `
                        -isolation hyperv `
                        -databaseServer $databaseServer `
                        -databaseInstance $databaseInstance `
                        -databaseName $databaseName `
                        -databaseCredential $databaseCredential `
                        -enableSymbolLoading `
                        -doNotExportObjectsToText `
                        -includeCSIDE `
                        -updateHosts `
                        -memoryLimit $memoryLimit `
                        -useBestContainerOS

hint: i added -isolation to check if it will help, but same result like with processIsolation
hint2: we tried to omit also "-useBestContainerOS"
hint3: tried with new-navcontainer instead of new-bccontainer
hint4: database is a bc14 rtm db --> tried some others (and sure other cumulative updates)
in de Logs of the container, when it is trying to restart the nst, i think see that it is trying to connect with the standard cronus db on the sqlexpress of the container - maybe with my credentials, which will surely not be correct
PS C:\Users\StephanWeikelt\Documents\DevOps\Scripte> New-BCContainer -accept_eula `
                        -accept_outdated `
                        -containerName $containerName `
                        -Auth NavUserPassword `
                        -imageName $imageName `
                        -Credential $navCred `
                        -isolation hyperv `
                        -databaseServer $databaseServer `
                        -databaseInstance $databaseInstance `
                        -databaseName $databaseName `
                        -databaseCredential $databaseCredential `
                        -enableSymbolLoading `
                        -doNotExportObjectsToText `
                        -includeCSIDE `
                        -updateHosts `
                        -memoryLimit $memoryLimit `
                        -useBestContainerOS
NavContainerHelper is version <IP_ADDRESS>
NavContainerHelper is running as administrator
Host is Microsoft  - 1909
Docker Client Version is 19.03.8
Docker Server Version is 19.03.8
Using image mcr.microsoft.com/businesscentral/onprem:1904-rtm-de-ltsc2019
Removing notWorkingContainer from host hosts file
Removing C:\ProgramData\NavContainerHelper\Extensions\notWorkingContainer
Creating Container notWorkingContainer
Version: 14.0.29537.0-de
Style: onprem
Platform: 14.0.29530.0
Generic Tag: <IP_ADDRESS>
Container OS Version: 10.0.17763.437 (ltsc2019)
Host OS Version: 10.0.18363.720 (1909)
A better Generic Container OS exists for your host (mcr.microsoft.com/dynamicsnav:10.0.183
Using generic image mcr.microsoft.com/dynamicsnav:10.0.18363.720-generic
Patching navinstall.ps1 for 13.x and 14.x (issue #907)
Generic Container OS Version: 10.0.18363.720 (1909)
Generic Tag of better generic: <IP_ADDRESS>
Using locale de-DE
Using hyperv isolation
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog t
Downloading C:\ProgramData\NavContainerHelper\Extensions\notWorkingContainer\my\navinstall.ps1
Files in C:\ProgramData\NavContainerHelper\Extensions\notWorkingContainer\my:
- AdditionalOutput.ps1
- AdditionalSetup.ps1
- MainLoop.ps1
- navinstall.ps1
- SetupVariables.ps1
- SetupWebClient.ps1
- updatehosts.ps1
Creating container notWorkingContainer from image mcr.microsoft.com/dynamicsnav:10.0.18363.720-generic
d12953254e69cd3e46be7fb98f124de8fd424fc6734139126b87922b7c890392
Waiting for container notWorkingContainer to be ready
Installing Business Central
Installing Url Rewrite
Installing OpenXML
Installing DotNetCore
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
Copying Web Client Files
Copying Windows Client Files
Copying PowerShell Scripts
Copying ConfigurationPackages
Copying Test Assemblies
Copying TestToolKit
Copying UpgradeToolKit
Copying Extensions
Copying ClientUserSettings
Copying ReportBuilder
Changing Database Server Collation to Latin1_General_100_CI_AS
SQL Server 2017 transmits information about your installation experience, as well as otherearn more about SQL Server 2017 data processing and privacy controls, please see the Priva
Copying Cronus database
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
Installation took 113 seconds
Installation complete
Initializing...
Setting host.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hos
Setting gateway.docker.internal to <IP_ADDRESS> in container hosts file (copy from host
Setting kubernetes.docker.internal to <IP_ADDRESS> in container hosts file (copy from host ho
Setting host.containerhelper.internal to <IP_ADDRESS> in container hosts file
Starting Container
Hostname is notWorkingContainer
PublicDnsName is notWorkingContainer
WARNING: Container starts with TimeZone = Mitteleuropäische Zeit, which is not recognized
Using NavUserPassword Authentication
Import Encryption Key
Stopping local SQL Server
WARNING: Waiting for service 'SQL Server (SQLEXPRESS) (MSSQL$SQLEXPRESS)' to
stop...
WARNING: Waiting for service 'SQL Server (SQLEXPRESS) (MSSQL$SQLEXPRESS)' to
stop...
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 80B182F6353DEB5BE5741FD76DB6BC83D540FDB7
Modifying Service Tier Config File with Instance Specific Settings
Restarting Service TierError
Installing Business Central
Installing Url Rewrite
Installing OpenXML
Installing DotNetCore
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
Copying Web Client Files
Copying Windows Client Files
Copying PowerShell Scripts
Copying ConfigurationPackages
Copying Test Assemblies
Copying TestToolKit
Copying UpgradeToolKit
Copying Extensions
Copying ClientUserSettings
Copying ReportBuilder
Changing Database Server Collation to Latin1_General_100_CI_AS
SQL Server 2017 transmits information about your installation experience, as well as otherearn more about SQL Server 2017 data processing and privacy controls, please see the Priva
Copying Cronus database
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
Installation took 113 seconds
Installation complete
Initializing...
Setting host.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hos
Setting gateway.docker.internal to <IP_ADDRESS> in container hosts file (copy from host
Setting kubernetes.docker.internal to <IP_ADDRESS> in container hosts file (copy from host ho
Setting host.containerhelper.internal to <IP_ADDRESS> in container hosts file
Starting Container
Hostname is notWorkingContainer
PublicDnsName is notWorkingContainer
WARNING: Container starts with TimeZone = Mitteleuropäische Zeit, which is not recognized
tance Specific Settings
Restarting Service Tier
Initialization of container notWorkingContainer failed
In C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\<IP_ADDRESS>\ContainerHandling\Wait-NavContainerReady.ps1:44 Zeichen:17
+ ...             throw "Initialization of container $containerName failed" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Initialization of container notWorkingContainer failed:String) [], RuntimeException
    + FullyQualifiedErrorId : Initialization of container notWorkingContainer failed

Update:
NavContainerHelper is version <IP_ADDRESS>
we got still the same problem.
tried to connect to my local sql server and use a db inside of it - not working
hangs @ Restarting NST
Self Signed Certificate Thumbprint CDC9C0A065027DF77444E342711FE6A310AD20DE
Modifying Service Tier Config File with Instance Specific Settings
Restarting Service Tier

are we the only ones who use "external" sql-dbs in docker? all of my collegues have the same issue - maybe my script is not working correctly, but how can it be determinated?
all of our former containers - created with exactly the same script - are working, but we won't get new ones up and running :'(

Sorry for the delay.
Could you try to use Get-NavContainerEventLog on your failed container and see what the eventlog says is wrong?

yeah for sure - i don't know why it is using "LOCALHOST\SQLEXPRESS"
...
Starting Container
Hostname is freddy
PublicDnsName is freddy
Using NavUserPassword Authentication
Import Encryption Key
Stopping local SQL Server
WARNING: Waiting for service 'SQL Server (SQLEXPRESS) (MSSQL$SQLEXPRESS)' to
stop...
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 9DA6B0C30509DEE3AFC5678D144559E8170D74F0
Modifying Service Tier Config File with Instance Specific Settings
**Restarting Service Tier**
...

1.)
Server instance: NAV
Tenant ID: nav-systemapplication
Session type: Background
Session ID: 2
User:
Type: System.Data.SqlClient.SqlException
ClientConnectionId: 46a30bc3-dc8c-449f-97ff-4472c24fcb0a
Class: 20
LineNumber: 0
Number: -1
Server: LOCALHOST\SQLEXPRESS
State: 0
Source: .Net SqlClient Data Provider
ErrorCode: -2146232060
Message: A transport-level error has occurred when sending the request to the server. (provider: Session Provider, error: 19 - Physical connection is not usable)
StackTrace:
     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
     at System.Data.SqlClient.TdsParserStateObject.SNIWritePacket(SNIHandle handle, SNIPacket packet, UInt32& sniError, Boolean canAccumulate, Boolean callerHasConnectionLock)
     at System.Data.SqlClient.TdsParserStateObject.WriteSni(Boolean canAccumulate)
     at System.Data.SqlClient.TdsParserStateObject.WritePacket(Byte flushMode, Boolean canAccumulate)
     at System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte[] buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj, Boolean isDelegateControlRequest)
     at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
     at System.Data.SqlClient.SqlInternalTransaction.Commit()
     at System.Data.SqlClient.SqlTransaction.Commit()
     at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.<>c__DisplayClass120_0.<ExecuteAction>b__0()
HResult: -2146232060
StackTrace:
     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
     at System.Data.SqlClient.TdsParserStateObject.SNIWritePacket(SNIHandle handle, SNIPacket packet, UInt32& sniError, Boolean canAccumulate, Boolean callerHasConnectionLock)
     at System.Data.SqlClient.TdsParserStateObject.WriteSni(Boolean canAccumulate)
     at System.Data.SqlClient.TdsParserStateObject.WritePacket(Byte flushMode, Boolean canAccumulate)
     at System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte[] buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj, Boolean isDelegateControlRequest)
     at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
     at System.Data.SqlClient.SqlInternalTransaction.Commit()
     at System.Data.SqlClient.SqlTransaction.Commit()
     at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.<>c__DisplayClass120_0.<ExecuteAction>b__0()

2.)
Server instance: NAV
Category: Sql
ClientSessionId: 00000000-0000-0000-0000-000000000000
ClientActivityId: 209b55ce-47f0-4bb9-baeb-3e567c0ddf4e
ServerSessionUniqueId: 9fdc2448-83ce-416b-a727-bce8e98394d4
ServerActivityId: f4ea44a2-757e-4e3b-a517-5600b5eb4d23
EventTime: 04/08/2020 09:32:50
Message (SqlException): RootException: SqlException
A transport-level error has occurred when sending the request to the server. (provider: Session Provider, error: 19 - Physical connection is not usable)
ExceptionStackTrace:
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParserStateObject.SNIWritePacket(SNIHandle handle, SNIPacket packet, UInt32& sniError, Boolean canAccumulate, Boolean callerHasConnectionLock)
   at System.Data.SqlClient.TdsParserStateObject.WriteSni(Boolean canAccumulate)
   at System.Data.SqlClient.TdsParserStateObject.WritePacket(Byte flushMode, Boolean canAccumulate)
   at System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte[] buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlInternalTransaction.Commit()
   at System.Data.SqlClient.SqlTransaction.Commit()
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.<>c__DisplayClass120_0.<ExecuteAction>b__0()
CallerStackTrace:
   at Microsoft.Dynamics.Nav.Runtime.LogWriterHelper.LogExceptionEventWithTelemetry(String tag, Category category, Exception exception, Verbosity verbosity, EventLogEntryType eventLogEntryType)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.CloseDeadConnection(DbException exception, Boolean logException)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.HandleDeadConnection(SqlExceptionAdapter exceptionAdapter, Exception lastException)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.MapException(SqlExceptionAdapter exceptionAdapter, String commandText, Boolean isRollbackAction, Nullable`1 timeout)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.<>c__DisplayClass120_0.<ExecuteAction>b__0()
   at Microsoft.Dynamics.Nav.Types.NavThread.<>c__DisplayClass30_0.<RunExternalAction>b__0()
   at Microsoft.Dynamics.Nav.Types.NavThread.RunExternalAction[T](Func`1 action)
   at Microsoft.Dynamics.Nav.Types.NavThread.RunExternalAction(Action action)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.<>c__DisplayClass123_0.<ExecuteActionWithTrace>b__0(Stopwatch watch)
   at Microsoft.Dynamics.Nav.Diagnostic.NavDiagnostics.<>c__DisplayClass93_0.<SendTraceTagOnThreshold>b__0(Stopwatch watch)
   at Microsoft.Dynamics.Nav.Diagnostic.NavDiagnostics.SendTraceTagOnThreshold[T](String tag, Category category, Verbosity verbosity, Int32 threshold, Func`2 action, PrivacyClassification classification, Func`1 includedMessage, String message, Func`1 parameters)
   at Microsoft.Dynamics.Nav.Diagnostic.NavDiagnostics.SendTraceTagOnThreshold(String tag, Category category, Verbosity verbosity, Int32 threshold, Action`1 action, PrivacyClassification classification, Func`1 includedMessage, String message, Func`1 parameters)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ExecuteActionWithTrace(EventTask task, String tenantId, Int32 sessionId, String userName, Action action, String commandText, Boolean isAdoCommand)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.EndTransaction(NavSqlEndTransactionType endType)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnectionScope.OnDisposing()
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnectionScope.Dispose(Boolean disposing)
   at Microsoft.Dynamics.Nav.Runtime.NavSession.InnerDispose()
   at Microsoft.Dynamics.Nav.Runtime.NavSession.<DisposeAsync>d__132.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.Dynamics.Nav.Runtime.NavSession.DisposeAsync(ShutdownScope shutdownScope, Boolean notifyClient, Boolean abortChannel, Boolean alwaysAsync, Boolean externalStopRequest)
   at Microsoft.Dynamics.Nav.Runtime.NavSession.Dispose(Boolean disposing)
   at Microsoft.Dynamics.Nav.Runtime.NavTenant.Microsoft.Dynamics.Nav.Runtime.ITenantSessionHandler.RunTenantActionInSystemSession(Action`2 action, Boolean throwExceptions, Boolean useCurrentCulture, Boolean allowAppsDisabledMode, LanguageSetting language)
   at Microsoft.Dynamics.Nav.Runtime.AssemblyGetter.CompileBusinessApplicationEvents()
   at Microsoft.Dynamics.Nav.Runtime.NCLCodeLoader.CompileBusinessEventAssemblies()
   at Microsoft.Dynamics.Nav.Runtime.NavEnvironment.OnApplicationMounted()
   at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.AddSystemTenant(String appDatabaseServerName, String appDatabaseName, String appDatabaseUserName, ProtectedDatabasePassword appDatabasePassword, Boolean verifyConnection, String newEncryptionKey, IDatabasePasswordPublicEncryptionKeyStorage keyStorage, Boolean allowOverwritePublicKey, Boolean verifyServerInstanceKey)
   at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.AddSingleLegacyTenant(String databaseServerName, String databaseName, String databaseUserName, ProtectedDatabasePassword databasePassword, EncryptionProvider encryptionProvider, AzureKeyVaultSettings azureKeyVaultSettings)
   at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.ConfigureTenants(ServerUserSettings settings, String encryptionKey)
   at Microsoft.Dynamics.Nav.Runtime.NavTaskFactory.<>c__DisplayClass11_0.<StartNewTask>b__0()
   at System.Threading.Tasks.Task.Execute()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart(Object obj)

ProcessId: 28340
Tag: 000018O
ThreadId: 12
CounterInformation:

3.)
Server instance: NAV
Category: Sql
ClientSessionId: 00000000-0000-0000-0000-000000000000
ClientActivityId: 209b55ce-47f0-4bb9-baeb-3e567c0ddf4e
ServerSessionUniqueId: 9fdc2448-83ce-416b-a727-bce8e98394d4
ServerActivityId: f4ea44a2-757e-4e3b-a517-5600b5eb4d23
EventTime: 04/08/2020 09:32:50
Message (SqlException): This message had personal data removed. The original may still be in transient telemetry. Find it using the transientTelemetryId.
RootException: SqlException
ExceptionStackTrace:
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParserStateObject.SNIWritePacket(SNIHandle handle, SNIPacket packet, UInt32& sniError, Boolean canAccumulate, Boolean callerHasConnectionLock)
   at System.Data.SqlClient.TdsParserStateObject.WriteSni(Boolean canAccumulate)
   at System.Data.SqlClient.TdsParserStateObject.WritePacket(Byte flushMode, Boolean canAccumulate)
   at System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte[] buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
   at System.Data.SqlClient.SqlInternalTransaction.Commit()
   at System.Data.SqlClient.SqlTransaction.Commit()
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.<>c__DisplayClass120_0.<ExecuteAction>b__0()
CallerStackTrace:
   at Microsoft.Dynamics.Nav.Runtime.LogWriterHelper.LogExceptionEventWithTelemetry(String tag, Category category, Exception exception, Verbosity verbosity, EventLogEntryType eventLogEntryType)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.CloseDeadConnection(DbException exception, Boolean logException)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.HandleDeadConnection(SqlExceptionAdapter exceptionAdapter, Exception lastException)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.MapException(SqlExceptionAdapter exceptionAdapter, String commandText, Boolean isRollbackAction, Nullable`1 timeout)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.<>c__DisplayClass120_0.<ExecuteAction>b__0()
   at Microsoft.Dynamics.Nav.Types.NavThread.<>c__DisplayClass30_0.<RunExternalAction>b__0()
   at Microsoft.Dynamics.Nav.Types.NavThread.RunExternalAction[T](Func`1 action)
   at Microsoft.Dynamics.Nav.Types.NavThread.RunExternalAction(Action action)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.<>c__DisplayClass123_0.<ExecuteActionWithTrace>b__0(Stopwatch watch)
   at Microsoft.Dynamics.Nav.Diagnostic.NavDiagnostics.<>c__DisplayClass93_0.<SendTraceTagOnThreshold>b__0(Stopwatch watch)
   at Microsoft.Dynamics.Nav.Diagnostic.NavDiagnostics.SendTraceTagOnThreshold[T](String tag, Category category, Verbosity verbosity, Int32 threshold, Func`2 action, PrivacyClassification classification, Func`1 includedMessage, String message, Func`1 parameters)
   at Microsoft.Dynamics.Nav.Diagnostic.NavDiagnostics.SendTraceTagOnThreshold(String tag, Category category, Verbosity verbosity, Int32 threshold, Action`1 action, PrivacyClassification classification, Func`1 includedMessage, String message, Func`1 parameters)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ExecuteActionWithTrace(EventTask task, String tenantId, Int32 sessionId, String userName, Action action, String commandText, Boolean isAdoCommand)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.EndTransaction(NavSqlEndTransactionType endType)
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnectionScope.OnDisposing()
   at Microsoft.Dynamics.Nav.Runtime.NavSqlConnectionScope.Dispose(Boolean disposing)
   at Microsoft.Dynamics.Nav.Runtime.NavSession.InnerDispose()
   at Microsoft.Dynamics.Nav.Runtime.NavSession.<DisposeAsync>d__132.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.Dynamics.Nav.Runtime.NavSession.DisposeAsync(ShutdownScope shutdownScope, Boolean notifyClient, Boolean abortChannel, Boolean alwaysAsync, Boolean externalStopRequest)
   at Microsoft.Dynamics.Nav.Runtime.NavSession.Dispose(Boolean disposing)
   at Microsoft.Dynamics.Nav.Runtime.NavTenant.Microsoft.Dynamics.Nav.Runtime.ITenantSessionHandler.RunTenantActionInSystemSession(Action`2 action, Boolean throwExceptions, Boolean useCurrentCulture, Boolean allowAppsDisabledMode, LanguageSetting language)
   at Microsoft.Dynamics.Nav.Runtime.AssemblyGetter.CompileBusinessApplicationEvents()
   at Microsoft.Dynamics.Nav.Runtime.NCLCodeLoader.CompileBusinessEventAssemblies()
   at Microsoft.Dynamics.Nav.Runtime.NavEnvironment.OnApplicationMounted()
   at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.AddSystemTenant(String appDatabaseServerName, String appDatabaseName, String appDatabaseUserName, ProtectedDatabasePassword appDatabasePassword, Boolean verifyConnection, String newEncryptionKey, IDatabasePasswordPublicEncryptionKeyStorage keyStorage, Boolean allowOverwritePublicKey, Boolean verifyServerInstanceKey)
   at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.AddSingleLegacyTenant(String databaseServerName, String databaseName, String databaseUserName, ProtectedDatabasePassword databasePassword, EncryptionProvider encryptionProvider, AzureKeyVaultSettings azureKeyVaultSettings)
   at Microsoft.Dynamics.Nav.Runtime.NavTenantCollection.ConfigureTenants(ServerUserSettings settings, String encryptionKey)
   at Microsoft.Dynamics.Nav.Runtime.NavTaskFactory.<>c__DisplayClass11_0.<StartNewTask>b__0()
   at System.Threading.Tasks.Task.Execute()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart(Object obj)

ProcessId: 28340
Tag: 000018O
ThreadId: 12
CounterInformation:

4.)
Server instance: NAV
Category: Sql
ClientSessionId: 00000000-0000-0000-0000-000000000000
ClientActivityId: 209b55ce-47f0-4bb9-baeb-3e567c0ddf4e
ServerSessionUniqueId: 9fdc2448-83ce-416b-a727-bce8e98394d4
ServerActivityId: f4ea44a2-757e-4e3b-a517-5600b5eb4d23
EventTime: 04/08/2020 09:32:50
Message Tenant ID: nav-systemapplication
Session type: Background
Session ID: 2
The connection to SQL server was lost
Database server: LOCALHOST\SQLEXPRESS
Database name: CRONUS.
ProcessId: 28340
Tag: 00001NL
ThreadId: 12
CounterInformation:

The problem here is that when using -useBestContainerOS, it will re-platform the container. When doing that it performs an install of Business Central on the fly (in the new container) and it leaves the service tier running (using SQL Express which always gets used during install - could be optimized in this case).
Then it stops the local SQL Server, configures the container and normally it would start the Service Tier - but since that is already running - it tries to restart it - which fails because the local SQL Server isn't running.
I will fix this in the ContainerHelper for old images and in the next the generic image.
In the meantime, you can add this parameter to your new-navcontainer:
-myscripts @( @{ "navinstall.ps1" = '. "c:\run\navinstall.ps1"; Stop-Service -Name $NavServiceName -WarningAction Ignore' } )

Which will stop the service tier after installation - and now it will not restart, but start the service tier after configuration.

hmmm
"hint2: we tried to omit also "-useBestContainerOS""
--> didn't work
BUT(!) with your additional parameter, it runs like a charm!
thnks for rescue me again ;)
<3

Note that with the next containerhelper, that parameter will automatically be applied if the generic image doesn't contain the fix. You might need to remove your parameter when that happens.

Note that with the next containerhelper, that parameter will automatically be applied if the generic image doesn't contain the fix. You might need to remove your parameter when that happens.

jep - my collegues have to use the param by themself because i'll not update my script.
so thnank you very much again!


Offline mode

We can launch in offline mode but launch fails when we are actually offline.

Put this in the caches, makes more sense


Table not created during migration

If I use the following:
        $table->addColumn('modified_at', 'timestamp', [
            'null' => false,
            'default' => 'CURRENT_TIMESTAMP',
            'update'  => 'CURRENT_TIMESTAMP',
            'precision' => 4,
        ]);

The use of update causes the migration of the entire table to fail.
Tested with SQLite as the database engine.

Is there anything special about where you define $table or is it just something like $table = $this->table('test_table');?

That’s exactly it yes. I followed the examples in the documentation.

You seem to have forgotten the final $table->update() or $table->create() statement.
I dont like that they are needed - they should be auto-used at the end based on the existence of them.
But as for now, closing as user error.

Erm, it's not a user error!
My example is a very simplified example of the specific column that causes the entire migration to fail, as I alluded to in the initial report!
As I have stated, I have already nailed down the issue for you: the use of update in a column definition. It has nothing to do with forgetting update() or create().

How can this be reproduced? We all use it this way and we do not see this issue.
Please provide a way to reproduce it.

Yes, CURRENT_TIMESTAMP as default value won't work in SQLite. Two way we can solve that.

On create phinx can ignore CURRENT_TIMESTAMP as column default value if the adapter type is sqlite
Or we can simply implement login in our migration file..

->addColumn('added_on', 'datetime', ['default' => $this->getAdapter()->getAdapterType() === "mysql" ? "CURRENT_TIMESTAMP" : null])


Unit test scaffolding

Jonah's PR

All looks good, 'cept for the codeclimate errors. I noticed that one of the errors says that a function is limited to a max of 5 arguments??? Can we raise this? Seems a little over the top.


Resolve #726 Panic Nova Edit Feature

When typing “edit” into the debugger, Panic Nova would not wait because it requires the -w flag, and the call to system was not respecting it. This commit uses the Shellwords.split method to separate it into another argument for system so Nova or other editors that require a flag work properly.

@ko1 Moved require as requested. Doing that was not something that occurred to me since I'm so used to just putting it at the top of most classes, but happy to oblige 😄.

Thank you!


Logging in dataflow functions

Bug Description
The bytes in the Kafka topic I am trying to read has proprietary serialization, the python logging I added into a function called by flow.map() does not log out to stdout, for example:
import logging

logger = logging.getLogger(__name__)

...

def deserialize(key_bytes__payload_bytes):
    key_bytes, payload_bytes = key_bytes__payload_bytes

   # this doesn't log to stdout
    logger.info(type(key_bytes))

    key = json.loads(key_bytes.decode("utf-8")) if key_bytes else None
    payload = json.loads(payload_bytes.decode("utf-8")) if payload_bytes else None
    return key, payload

...

How can I go about enabling the logging within the python functions in the dataflow?
Python version (python -V)
3.9.7
Bytewax version (pip list | grep bytewax)
0.11.0
Relevant log output
No response
Steps to Reproduce
Run the following dataflow:
import logging

logger = logging.getLogger(__name__)

flow = Dataflow()
flow.input(
    "input",
    KafkaInputConfig(
        brokers=[f"{os.environ['bootstrap_servers']}"],
        topic=f"{os.environ['topic']}",
        starting_offset="beginning",
        tail=False,
        **additional_configs,
    ),
)

def deserialize(key_bytes__payload_bytes):
    key_bytes, payload_bytes = key_bytes__payload_bytes

   # this doesn't log to stdout
    logger.info(type(key_bytes))

    key = json.loads(key_bytes.decode("utf-8")) if key_bytes else None
    payload = json.loads(payload_bytes.decode("utf-8")) if payload_bytes else None
    return key, payload

flow.map(deserialize)

flow.capture(StdOutputConfig())

run_main(flow)

@ShahNewazKhan thanks for filing. For the first issue of logging, you will have to explicitly set the logging level in the code to INFO by adding something like the below to your code:
import logging

logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)

I hope that helps

Setting the logging level did the trick, thank!


What about Defender for Cloud and Sentinel

How do Defender for Cloud and Microsoft Sentinel fit into this architecture? it would be helpful to include some information about these important security monitoring services.

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 59e64035-d0cb-d2cf-0848-4153b5cfe876
Version Independent ID: 59e64035-d0cb-d2cf-0848-4153b5cfe876
Content: Implement logging and monitoring for Azure OpenAI large language models - Azure Architecture Center
Content Source: docs/example-scenario/ai/log-monitor-azure-openai.yml
Service: architecture-center
Sub-service: example-scenario
GitHub Login: @jakeatmsft
Microsoft Alias: jacwang

@DeanGross
Thanks for your feedback! We will investigate and update as appropriate.

Sent message to Jake Wang via Teams

Defender for Cloud and Azure Sentinel would serve as the underlying security audit layer of your application.  You can use Azure Sentinel to identify security threats to your Azure subscription to ensure your application security.

@jakeatmsft do you have a response for @DeanGross?  And if so, can you also put the answer to this one way or the other, in your article?  This is key information to include in the article.

Thank you for your feedback.  We have created internal ticket 100217 to track and investigate this issue.

#please-close


Ark 3.7 Docker Image

If you haven't already, please read through our contributing guidelines before opening your PR
What is the purpose of this PR?
Closes #625.
Creates a tagged Docker Image for Python 3.7.
How did you implement your changes
Take a look at #627 for a dedicated Ark 3.6 Image.
A few changes to the .travis.yml file in addition to pushing a new tag python-3.7.
Remaining issues
None atm.
DO NOT MERGE

@srivarra looks like both Docker images were successfully pushed to Dockerhub. I'll be doing some testing on MIBIAN later to see if the Docker image issue between 3.6 and 3.7 pops up.

Resolved with #636


Development servers can't receive socket heartbeat response

Our staging and homologation servers can't maintain a connected socket as it keeps remounting it on every heartbeat.
http://stg.branchpage.com
http://hml.branchpage.com
This behaviour doesn't happen on localhost neither on the production server.

Already tried:

Scale apps to hobby
Disable check_origin


remove refs to DCAF in seedfile

I rule and have completed some work on Case Manager that's ready for review!
couple of changes to make sandbox generic
This pull request makes the following changes:

Remove references to DCAF in seedfile

no view changes
It relates to the following issue #s:

bumps #1817

For reviewer:

Adjust the title to explain what it does for the notification email to the listserv.
Tag this PR:

feature if it contains a feature, fix, or similar. This is anything that contains a user-facing fix in some way, such as frontend changes, alterations to backend behavior, or bug fixes.
dependencies if it contains library upgrades or similar. This is anything that upgrades any dependency, such as a Gemfile update or npm package upgrade.

If it contains neither, no need to tag this PR.

godmode


HOP-358 - add context menu to close tabs (Close, Closes others, Close all)

Will add code to allow closing tabs that are not active

what is tabs that are not active ?

all tabs unchanged
all tabs not running and unchanged

I saw the
// FIXME: Works only if you activate the item
comments and thought something still needs to be done. I will take a look and merge if it does what expected

activeItem = item;   // It's workaround for method TypeHandler.close() to work;
item.getTypeHandler().close();


[Feature]: React 18 Support

What is the new or updated feature that you are suggesting?
Support React 18 features, perhaps this issue can be used as a tracking issue?
Why should this feature be included?
React 18 is the future...

Things I've tried so far that seem to work, using miniflare:

Replacing ReactDOM.render with ReactDOM.createRoot
useId returns an identifier that appears to be stable across client and server

❌ Can't install the beta on npm 7 because of peer dep mismatch with @remix-run/react

Npm error

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving<EMAIL_ADDRESS>npm ERR! Found<EMAIL_ADDRESS>npm ERR! node_modules/react
npm ERR<EMAIL_ADDRESS>from the root project
npm ERR!   peer<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm ERR!   node_modules/react-dom
npm ERR<EMAIL_ADDRESS>from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm ERR! node_modules/@remix-run/react
npm ERR<EMAIL_ADDRESS>from the root project
npm ERR!
npm ERR! Conflicting peer dependency<EMAIL_ADDRESS>npm ERR! node_modules/react
npm ERR!   peer<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm ERR!   node_modules/@remix-run/react
npm ERR<EMAIL_ADDRESS>from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

⚠ It appeats Remix needs some tweaks on how it inserts scripts and links into the document https://github.com/reactwg/react-18/discussions/114 and https://github.com/reactwg/react-18/discussions/108
I'm not completely clear where this work would be done, it's possible that some of these practices would need to be baked into Remix and others left up to the user to do inside of the entry module.

❌ 🐛  I think I've found a bug.

Run https://github.com/tom-sherman/remix-react-18
Navigate to /demos/params/shh-its-a-secret

Uncaught Error: An error occurred during hydration. The server HTML was replaced with client content
    at throwOnHydrationMismatchIfConcurrentMode (react-dom.development.js:14450)
    at tryToClaimNextHydratableInstance (react-dom.development.js:14462)
    at updateHostComponent$1 (react-dom.development.js:20606)
    at beginWork (react-dom.development.js:22348)
    at HTMLUnknownElement.callCallback2 (react-dom.development.js:4126)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:4175)
    at invokeGuardedCallback (react-dom.development.js:4239)
    at beginWork$1 (react-dom.development.js:27123)
    at performUnitOfWork (react-dom.development.js:26288)
    at workLoopSync (react-dom.development.js:26198)

I keep getting the error references in #2564 with<EMAIL_ADDRESS>it comes from the hydrate function call in entry.client.tsx.
Warning: ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot

Closing this as there should be no issues running React 18. Our templates do still install 17 by default, so you need to follow the upgrade guide until we decide to upgrade by default. If you have any specific problems with React 18, please open a new issue!

@chaance the app doesn't work with hydrateRoot API (with naive change), so how should we follow the upgrade guide?

I upgraded to React 18 using hydrateRoot in this repro and didn't have any issues. If you have a project that doesn't work can you point it to me? I've been having a bunch of issues with Stackblitz today so anything I could run locally would be helpful. https://github.com/chaance/remix-repros/tree/main/react-18

I confirm this works:
https://github.com/chaance/remix-repros/blob/main/react-18/app/entry.client.tsx

There's also an unreleased update in React that should fix issues with hydrating the root document. If you install next instead of 18.1.0, this may also fix any remaining issues that may occur.
https://github.com/facebook/react/pull/24523
npm i react@next react-dom@next

@chaance - I'll take a look in in the evening and let you know! Thanks for the repro 👍

React 18.2.0 is released with the fix, so I think there should be no more blockers.

@chaance, I tried to run your repo with 18.1.0 and 18.2.0. I am seeing the following warning and error messages in the console. Not sure if I am doing something wrong:

Hi @chaance, I tried to run your repo with 18.1.0 and 18.2.0. I am seeing the following warning and error messages in the console. Not sure if I am doing something wrong:

Also to add, the behavior with 18.1.0 and 18.2.0 is somewhat different. With 18.1.0, the main page appears for about 1 second and then disappears - I see a white screen. With 18.2.0, the app is more stable - the main page does not disappear. Regardless, the above errors appear in the console regardless of version 18.1.0 or 18.2.0.

I've seen these errors too. Go to a incognito mode in your browser and check if you see them there. If not, then it's probably a extension like react dev tools, apollo dev tools, etc that you have installed and those are the ones injecting some tags in the dom causing the mismatch. I've found some discussion #24430

@benjaminhonorio, you hit the nail on the head! That was exactly the issue. The errors go away in an Incognito window. Thanks so much for your help.

The Apollo Client Devtools chrome extension causes this error for me.


Program crashes when i try to open Files menu

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: Code OSS 1.95.1-1 (also happens on 1.95.0-1)
OS Version: Arch Linux, Kernel 6.11.5.arch1-1, Gnome 47 Wayland

Steps to Reproduce:

Open VS Code (Code OSS).
Try to open Files Menu.

VS Code is crashing when i try to open the Files menu. It happens when i click on "File" in the menu bar or when i e.g. click on "Edit" and move the mouse to "File" while the Edit menu is opened. (Other menus are opening without problems, just "File" is closing/crashing the program.)
Here is a Systemd Coredump, maybe it helps.
code-oss-1.95.1-1-coredump-crash-filesmenu-2024.11.01.txt

Arch Linux package internal report: https://gitlab.archlinux.org/archlinux/packaging/packages/code/-/issues/5
Official VS Code binaries by Microsoft are not affected. So we are not likely to find help here.

I can reproduce the issue.
Bisecting the code indicates that the first bad commit is this one.
So the issue is likely caused by the update to Electron 32.

Yup, I addressed that in the issue above.

starting it with older Electron version mitigates the issue

I have the same issue and I just downgraded code, which fixed the problem.
Assuming you installed visual studio code from AUR follow these steps
If you don't have yay:
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si

Install Downgrade
yay -S downgrade

Downgrade Code
Finally run this and select a version(I downgraded to 1.94.2):
sudo downgrade code

Downgrading can also be done by downloading/installing this version:
https://archive.archlinux.org/packages/c/code/code-1.94.2-1-x86_64.pkg.tar.zst
and in /etc/pacman.conf by adding:
IgnorePkg = code

So pacman won't upgrade the package until you noticed  that the bug is fixed, so you can remove the pacman.conf modification.

Fix is on Electron side: electron/electron#44341
The easiest workaround for now is to simply set window.titleBarStyle to custom.

The easiest workaround for now is to simply set window.titleBarStyle to custom.

It needs to be set in user settings (press F1 > "Preferences: User settings"), it does not work in workspace settings.

I have the same issue and I just downgraded code, which fixed the problem.
Assuming you installed visual studio code from AUR follow these steps
If you don't have yay:
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
Install Downgrade
yay -S downgrade
Downgrade Code
Finally run this and select a version(I downgraded to 1.94.2):
sudo downgrade code

This allowed me to finish something just under the wire. Thank you.

/duplicate https://github.com/microsoft/vscode/issues/232723


Tooltip shows setter docstring instead of GETTER docstring

Environment data

VS Code version: 1.52.1
Extension version (available under the Extensions sidebar): v2021.2.576481509
OS and version: CentOS7
Python version (& distribution if applicable, e.g. Anaconda): 3.6.8
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): none
Relevant/affected Python packages and their versions: none
Relevant/affected Python-related VS Code extensions and their versions: none
Value of the python.languageServer setting: Microsoft

Expected behaviour
When mouse is over a property, tooltip should display the docstring of the property's GETTER.
Actual behaviour
Tooltip show the property's SETTER.
Steps to reproduce:

Write basic class with property name

class Person:
    """ Represents a person. """

    def __init__(self, name=''):
        self.name = name

    @property
    def name(self) -> str:
        """ GETTER. """
        return self._name

    @name.setter
    def name(self, value: str) -> None:
        """ SETTER. """
        self._name: str = value

if __name__ == '__main__':
    p1 = Person(name='john')
    p1.name

Mouse over the property name.

Logs
NA

Thanks for your feedback! We have recently released a new and more performant language server called Pylance which likely solves these issues you are reporting.  You can download Pylance from the marketplace and install it alongside the core Python extension. Because our team's development efforts have shifted to support the new language server, we'd encourage you to try it out.
In the meantime, I'll transfer this issue over to the Microsoft Python Language Server repo for tracking. If you try out Pylance and this issue persists, you can open an issue on the pylance-release repo.


machine provision should allow to change options.

machine provision command should allow docker engine and swarm options.
It will be helpful to use same docker host with environment changes like proxy servers etc.

I agree that would be really nice.
It is a hack, but today it is actually possible to do this by editing the Machine's config.json and calling docker-machine provision on it.
I'm hopeful that someday we can detangle calculated machine properties such as public IPv4 address from the "desired config" , so that it could be exposed to the end user and made first-class in some form.

It is a hack, but today it is actually possible to do this by editing the Machine's config.json and calling >docker-machine provision on it.

Thanks for this info. It will save lot of my time :)
I think, this could be mentioned in [Provision docks] (https://docs.docker.com/machine/reference/provision/) with a Warning Note

Since it gets into using plumbing to accomplish "real work", I'm a bit hesitant, since I don't want users to rely on plumbing that might change.  However, since I do feel the feature could be very useful, I will strongly keep it in mind for the future.
Since it's "resolved", I'm going to go ahead and close this issue.


Add code links to README

Code I used:
import requests
from bs4 import BeautifulSoup
import lxml
import os

response = requests.get("https://github.com/mCodingLLC/VideosSampleCode/tree/master/videos")
soup = BeautifulSoup(response.text, "lxml")
links = {int(obj["href"].split("/")[6][:3]): obj["href"] for obj in soup.find_all("a", class_="js-navigation-open Link--primary")}

with open("README.md") as f:
    lines = f.readlines()

# with open("new_readme.txt", "w") as f:
#     new_lines: list[str] = []
#     n = 0
#     for line in lines:
#         if not line.startswith("|"):
#             new_lines.append(line)

#         elif line == "| N | Video | \n":
#             new_lines.append("| N | Video | Code |\n")

#         elif line == "| --- | --- |\n":
#             new_lines.append("| --- | --- | --- |\n")

#         if line.startswith("|") and line[2].isnumeric():
#             try:
#                 new_lines.append(f"{line.strip()} [here]({links[int(line.split(' ')[1])]}) |\n")
#             except KeyError:
#                 new_lines.append(line)
#             n += 1

#     f.writelines(new_lines)

with open("new_readme.txt", "w") as f:
    new_lines: list[str] = []
    n = 0
    for line in lines:
        if line.startswith("|") and line[2].isnumeric():
            splitted_lines = line.split(str(n))
            try:
                splitted_lines[1] = f"({links[int(line.split(' ')[1])]})" + splitted_lines[1]
                new_lines.append(str(f"[{n}]").join(splitted_lines))
            except KeyError:
                new_lines.append(str(f"{n}").join(splitted_lines))
            n += 1

        else:
            new_lines.append(line)

    f.writelines(new_lines)

os.remove("README.md")
os.rename("new_readme.txt", "README.md")

The commented code creates a separate column and adds here with a link to the code.

Instead of linking the number, could you add a new column that just says "src" all the way down and put the links on that column. Also could you make the links relative instead of absolute: https://github.blog/2013-01-31-relative-links-in-markup-files/


month and day without a year date should not return the date that is in the past.

Resolved in build 1.4.118


Avoid logging credentials

This commit adds filtering to avoid logging credentials in the debug
logs. If logging of credentials, e.g. for debugging secret parsers,
is required GOPASS_DEBUG_LOG_SECRETS can be set to an non empty
string to enable logging of secrets.
Fixes #1883
RELEASE_NOTES=[BUGFIX] Avoid logging credentials
Signed-off-by: Dominik Schulz<EMAIL_ADDRESS>

Is the mime parser logging resolved? I don't feel so, since it's the error itself that would contain the plaintest line that's probably going to be the password if it's not a Mime secret.

Yes, the MIME vector should be resolved, too. See https://github.com/gopasspw/gopass/pull/1886/files?diff=split&w=1#diff-a3f960f5e161571c71dc434416d9be495d7e0799c7528e088c213db56c28d2fcR20
I've tested it. I'm not sure if we missed any other places, but the most obvious ones should be addressed now.


L1 - TvSettings - VTS Test case bugs - Tag 1.3.0

Bank 6:

The color temperature RGB gain test cases range is from 0 to 2047. VTS handles only values from 1 to 2047. Correction is required.
In the test_l1_tvSettings_positive_GetColorTemp_Ggain_onSource test case, the variable is incorrectly compared.

Bank 7:

For all component color test cases, tvDataColor_NONE is not a valid parameter. Correction is required in the YAML file.
The size of the Gamma Table is incorrectly specified. Correction is required.
In SaveGammaTable, for the positive test case, the error code is wrongly compared with "Invalid param."
In test_l1_tvSettings_negative_GetDefaultGammaTable, the color temperature index value is incorrectly assigned and parsed.

Test suite name correction required for test_l1_tvSettings_positive_GetPQParams

This issue is now considered as part of #31


Add linux kernel benchmark

Adds a script for running vast-front on the Linux kernel benchmark, along with instructions for setting up the benchmark and running the script.

Sure I can add the converter


fix(#54): period baseUrl isn't used

Fixes #54

Trying to find a testvector to add so I can create some unit tests as well

LGTM!


0.12.7 -> 0.12.8 now strange behavior with dynamic component

Hello!
Can't say for sure what's going on, but I've got the problem.
In 0.12.7 everything is ok, but in 0.12.8 my app started to lag a lot and now I've got warnings like
You may have an infinite update loop for the watcher with expression "offersList"
The code I've got most warnings for looks like this:
<div
    v-if="isOffersPresent"
    v-component="{{offersView}}"
    offers-list="{{offers.result}}"
></div>

So it's a dynamic component with dynamic props and replace: false
Any hints?

Got it on fiddle!
http://jsfiddle.net/wvbqbyLp/23/
For some strange reason the problem is dependent on number of items to be repeated inside item and on number of props item has got inside its data function.
O_o

If you comment out these lines: https://github.com/yyx990803/vue/blob/dev/src/batcher.js#L73-L79
Does the app still lag?

@yyx990803 Aye,still lag. Warning is different now: "Duplicate objects are not supported in v-repeat when using components or transitions"

@yyx990803 And another thing: The app now freezes in infinite loop with those warnings

Can you try this branch: https://github.com/yyx990803/vue/tree/fix-batcher-infinite-check
It should have fixed the infinite check, just want to make sure it also fixed the performance problem.

@yyx990803 Didn't help :( Infinite check is still present.
Probably should investigate more. The problem occurs only at one page. We're also using a few hacks to work with ES6, maybe those hacks in the way.

@yyx990803 Ah, set Vue.config.async to false. This is where the fun begins.

Hmm, it fixed your fiddle though. Are you using the file in dist? I didn't
build in that branch.
On Fri, Jul 31, 2015 at 2:12 AM Andrey<EMAIL_ADDRESS>wrote:

@yyx990803 https://github.com/yyx990803 Ah, set Vue.config.async to
false. This is where the fun begins.
—
Reply to this email directly or view it on GitHub
https://github.com/yyx990803/vue/issues/1098#issuecomment-126578324.

@yyx990803 I did build it with grunt build, yeah.
I've tried new version in separated document on another computer, can't get it right new.
I've also tried to reproduce the example right now, but can't even get Vue v0.12.8 to work in async=false mode. Getting Cannot read property 'appendChild' of null error

http://jsfiddle.net/wvbqbyLp/24/
Added Vue.config.async = false
Getting Cannot read property 'appendChild' of null error too. Looks like on the current computer the code behaves different. Before I did get inifinite loop with the same code.

async: false probably doesn't help here.
The fiddle is now working properly in the fix branch, if your app is still having an infinite loop, then it probably does have an infinite loop... you will need to make a new fiddle showing infinite loop problem with the fix branch.
Some low-level details:
In your fiddle, your item component has a lot of default data fields; these fields are being merged into the objects in the offers array. Every field causes an $add call. In 0.12.7, when you $add an object inside the array, the watcher watching that array is not triggered. In 0.12.8 it does, so every $add call triggers the v-repeat to be updated again - which is why the infinite check has something to do with the number of elements in the array. This is also why there is a performance issue.
The fix branch makes sure a watcher is only updated once every async update cycle, and only counts infinite loops if a watcher pushes itself into the queue again.

@yyx990803 thanks for detailed explanation! It makes some things clear to me.
But still, I have some points.

Could you please give me working fiddle with my code example and Vue.config.async = false? I have some thoughts about the problem not always being visible.

I want to make accent to following points: I've tested 2 versions of Vue.js: 0.12.8 regular and fix-batcher-infinite-check. There were also 2 versions of code: with async false and true. So I've made 4 different tests. So, lets review the results:
0.12.8 regular & async = true: bunch of You may have an infinite update loop for the watcher with expression "offersList" errors;
0.12.8 regular & async = false: infinite loop or Cannot read property 'appendChild' of null error (depends on computer)

fix-batcher-infinite-check & async = false: Everything is fine! Yay!
fix-batcher-infinite-check & async = true: infinite loop or Cannot read property 'appendChild' of null error (depends on computer)
So either I've failed in building fix-batcher-infinite-check properly or the problems just don't occur on your system.

I can see the point: yes, when setting async = false I get an error with the fix branch too.
Are you using async = false in your actual app? Honestly I don't recommend doing so exactly because of this type of situation.

@yyx990803 Well yes I do. Actually I didn't intended to. I've used Vue.config.async = true from the beginning. The thing is so funny! TIll version 0.12 Vue.js had a bug (probably) that components used inside wait-for component would ignore Vue.config.async = true and work synchronously. After trying to move to v 0.12 I've found my app not working because in the new version Vue.config.async = true finnaly began to work, while the whole app now is designed to work depending on synchronous Vue.js behavior.

Hmm, there's one hack you can try - remove these lines from 0.12.8: https://github.com/yyx990803/vue/blob/79b6eac029493b78d257031bcfb5153979d05f15/src/observer/index.js#L139-L144

I'm going to close this for now, since the issue is now about async: false. Let me know if the suggestion above helped in anyway.


[Head_Detector_Demo] PySvelte is unable to build on Colab

Describe the bug
I'm running Head_Detector_Demo on the Colab. When I'm running this notebook installation steps, the installation of PySvelte fails without details.
Code example

System Info
Google Colab with Python 3
Additional context
I also tried to build it directly on Colab machine.
The result is pretty the same
Obtaining file:///content/PySvelte
Preparing metadata (setup.py): started
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Preparing metadata (setup.py): finished with status 'error'
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Is there a specific python version to use?
Checklist

[x] I have checked that there is no similar issue in the repo (required)

This is affecting any demos using PySvelte. The underlying issue has been resolved, and once this pull request is resolved, the issue will be resolved here. For the time being, I will leave this open for anyone else who may have this issue.
For the time being, if you change %pip install git+https://github.com/neelnanda-io/PySvelte.git to %pip install git+https://github.com/austinleedavis/PySvelte-fixColabSetup.git, you will be able to install the demo and use it.

Thanks for the answer. I was actually able to run the demo with curcuitsvis library. It is working perfectly fine.

This has been resolved


Question: How does the node selection for job for multiple instance types in queues work?

Hi!
I would like to understand how the node selection process works in multiple queue setting once I have selected queue which has more instance types.
My questions are about the multi-queue setup defined by the config at the very end below.
1. The sinfo command does not display the instance types as they will be selected. Why and how to know which instance type will be selected? Is it somehow based on the CPU count?
$ sinfo
PARTITION AVAIL  TIMELIMIT  NODES  STATE NODELIST
ko*           up   infinite     32  idle~ ko-dy-c5a8xlarge-[1-9],ko-dy-c5a24xlarge-[1-3],ko-dy-c5axlarge-[1-20]
ok          up   infinite     30  idle~ ok-dy-m4large-[1-10],ok-dy-m4xlarge-[1-10],ok-dy-m42xlarge-[1-10]

$ srun -p ko /bin/hostname
ko-dy-c5axlarge-1

$srun -p ok /bin/hostname
ok-dy-m4large-1

2.  Can a user define the preference of nodes for partition in the parallel cluster config file?
The closest thing I found is the weight setting for slurm.
Is there a way how to influence e.g. this config file
 cat /opt/slurm/etc/pcluster/slurm_parallelcluster_ko_partition.conf
# This file is automatically generated by pcluster

NodeName=ko-dy-c5a24xlarge-[1-3] CPUs=96 State=CLOUD Feature=dynamic,c5a.24xlarge,c5a-24xlarge
NodeName=ko-dy-c5a8xlarge-[1-9] CPUs=32 State=CLOUD Feature=dynamic,c5a.8xlarge,c5a-8xlarge
NodeName=ko-dy-c5axlarge-[1-20] CPUs=4 State=CLOUD Feature=dynamic,c5a.xlarge,c5a-xlarge

NodeSet=ko_nodes Nodes=ko-dy-c5a24xlarge-[1-3],ko-dy-c5a8xlarge-[1-9],ko-dy-c5axlarge-[1-20]
PartitionName=ko Nodes=ko_nodes MaxTime=INFINITE State=UP

3. If many jobs are submitted at once e.g. in a job array: is the logic modified or is the situation handled as if the job were submitted "sequentially"?
The config file used for experimenting with submissions:
[aws]
aws_region_name = ca-central-1

[aliases]
ssh = ssh {CFN_USER}@{MASTER_IP} {ARGS}

[global]
cluster_template = default
update_check = true
sanity_check = true

[cluster default]
base_os = alinux2
key_name = parallel-cluster-master-node
vpc_settings = default

scheduler = slurm
master_instance_type = t2.small
queue_settings = ko, ok

[vpc default]
vpc_id = vpc-MASKED
master_subnet_id = subnet-MASKED

[scaling custom]
scaledown_idletime = 2

[queue ok]
compute_resource_settings = m4-large, m4-xlarge, m4-2xlarge
compute_type = spot

[queue ko]
compute_resource_settings = c5a-xlarge, c5a-8xlarge, c5a-24xlarge
compute_type = spot

[compute_resource m4-large]
instance_type = m4.large
initial_count = 0

[compute_resource m4-xlarge]
instance_type = m4.xlarge
initial_count = 0

[compute_resource m4-2xlarge]
instance_type = m4.2xlarge
initial_count = 0

[compute_resource c5a-xlarge]
instance_type = c5a.xlarge
initial_count = 0
max_count = 20

[compute_resource c5a-8xlarge]
instance_type = c5a.8xlarge
initial_count = 0

[compute_resource c5a-24xlarge]
instance_type = c5a.24xlarge
initial_count = 0

Hi Ondrej,
ParallelCluster doesn't interfer with Slurm scheduling logic so you can refer to official srun and job array Slurm documentation.
I can anyway share this Multiple queue mode tutorial specific for ParallelCluster.
In the tutorial you can see that:

You can specify a constraint during job submission to select the instance type to be used for your job:

-C "[c5.2xlarge*1&t2.micro*2]" – specifies the specific node constraints for this job. This requests one (1) c5.2xlarge node and two (2) t2.micro nodes to be used for this job.

The first queue you specified in the queue_settings parameter is configured as the default one and it will be used if you don't specify a partition during job submission.

Note that, because you didn't specify a specific queue, the default queue (spot) is used.

Let us know if it helps.
Enrico

Hi @enrico-usai,

ParallelCluster doesn't interfer with Slurm scheduling logic so you can refer to official srun and job array Slurm documentation.

Good to know
I know about the possibilities of using the --constraint option and I also know about preference among queues - thank you for mentioning them.
FYI: I found more reasonable documentation from slurm for node selection

https://slurm.schedmd.com/cpu_management.html#Step1
https://slurm.schedmd.com/slurm.conf.html

From the documentation of slurm.conf it seems that the following resources can be specified: The resources checked at node registration time are: CPUs, RealMemory and TmpDisk.
From the example I mentioned above NodeName=ko-dy-c5a24xlarge-[1-3] CPUs=96 State=CLOUD Feature=dynamic,c5a.24xlarge,c5a-24xlarge pcluster specify only CPUs
it seems that the memory, gpus (and disc space)  are not taken into account, am I right?

@enrico-usai another question is how would you recommend introducing weight settings from the slurm.conf documentation into parallel cluster setup?
Should I use post_installation boostrap actions?
Copy paste from the documentation:
Weight
The priority of the node for scheduling purposes. All things being equal, jobs will be allocated the nodes with the lowest weight which satisfies their requirements. For example, a heterogeneous collection of nodes might be placed into a single partition for greater system utilization, responsiveness and capability. It would be preferable to allocate smaller memory nodes rather than larger memory nodes if either will satisfy a job's requirements. The units of weight are arbitrary, but larger weights should be assigned to nodes with more processors, memory, disk space, higher processor speed, etc. Note that if a job allocation request can not be satisfied using the nodes with the lowest weight, the set of nodes with the next lowest weight is added to the set of nodes under consideration for use (repeat as needed for higher weight values). If you absolutely want to minimize the number of higher weight nodes allocated to a job (at a cost of higher scheduling overhead), give each node a distinct Weight value and they will be added to the pool of nodes being considered for scheduling individually. The default value is 1.

Found the details in /opt/slurm/etc/slurm.conf, so parallel cluster setups SLURM so it allocates the nodes in fact based on CPU count.
# TRES AND GPU CONFIG OPTIONS
GresTypes=gpu
SelectType=select/cons_tres
SelectTypeParameters=CR_CPU

Explanation copied from the slurm cpu_management documentation
EXAMPLE 4: CONSUMABLE RESOURCES WITH MINIMIZATION OF RESOURCE FRAGMENTATION
A job requires 12 CPUs (12 tasks and 1 CPU per task with no overcommitment).
Allocate CPUs using the minimum number of nodes and the minimum number of sockets
required for the job in order to minimize fragmentation of allocated/unallocated CPUs in the cluster.

slurm.conf options:

SelectType=select/cons_res
SelectTypeParameters=CR_Core,CR_CORE_DEFAULT_DIST_BLOCK

Hi @oplatek thanks for all the detailed comments.

it seems that the memory, gpus (and disc space) are not taken into account, am I right?

Memory: you can find a discussion here: https://github.com/aws/aws-parallelcluster/issues/2198
Gpus: ParallelCluster sets gpu information in the /opt/slurm/etc/pcluster/slurm_parallelcluster_compute_gres.conf file.

another question is how would you recommend introducing weight settings from the slurm.conf documentation into parallel cluster setup?

You can modify Slurm config under /opt/slurm/etc/pcluster/ and configure a Weight for each node with a post install action. ParallelCluster will not override configs under /opt/slurm/etc/pcluster/ until you perform a cluster update.  See similar request here: https://github.com/aws/aws-parallelcluster/issues/2054#issuecomment-698478278

so parallel cluster setups SLURM so it allocates the nodes in fact based on CPU count.

Yes, CPUs is the basic information we are using as a consumable resource. We're using select/cons_tres plugin that is an efficient way to permit multiple jobs to be co-scheduled on nodes when resources permit it (you can anyway use the --exclusive srun option if needed).
cons_tres plugin provides all the same functionality provided by cons_res plugin plus additional functionality specifically related to GPUs: https://slurm.schedmd.com/cons_res.html
Enrico

Thank you @enrico-usai very helpful comments! -- closing the issue - I learned what I needed.


requirements are placed in a separate file

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
requirements are placed in a separate file

Thank you for the PR


[Bug] Brass Mixer will not process items

Describe the bug
Brass Mixer won't mix items, but the normal mixer will.
The mixer will accept any valid recipe (moving the whisk down), but it will not mix.
To Reproduce
Steps to reproduce the behavior:

Create a new world
Power a Mechanical Mixer
Test to make sure that the Mechanical Mixer works (use Andesite Alloy as a test)
Replace Mechanical Mixer with Brass Mixer
Try and fail to have it mix something like Andesite Alloy

Expected behavior
The Brass Mixer should at least be able to mix items.
Screenshots

The first three images show that the mixer has a proper setup and does not lack RPM or have other issues.
The last 2 images show that the regular mixer works, even with modded recipes.
Desktop (please complete the following information):

OS: Windows 10
Minecraft Version 1.20.1
Forge Version 47.2.0
Mod Version 1.20.1-1.6.0-fix1.jar
Other Mods

Additional context

Just had this troubleshooted in Create Discord. I can thankfully mix items, but not with the Brass Mixer from Create: Encased.
I had the regular mixer finish mixing in a few seconds (around ~5 or so for Andesite Alloy) but fail to mix it in a few minutes with a Brass Mixer.

Does it with other mixers ?

Duplicate from #68

Train Mixer and Copper Mixer do not work.

I think that can be fixed by disabling the option that mixe x2 in the config

@Lainwright-Lazuli I want to know if I give you an experimental build, if you can test if the fix work ?


How to use createDate to pass parameters to header and body in apiRuquest

Describe the bug
How to use createDate to pass parameters to header and body in apiRuquest

Browser and Version

Browser [chrome, ]
Version [v1.0.5]

To Reproduce
Steps to reproduce the behavior:

add a  apiRequest
add a createDate

Screenshots
Additional context

Hello @alex-ge123,
Could you please review the status of this PR (https://github.com/langflow-ai/langflow/pull/2470) and confirm if the issue has been resolved on your end as well?
Thanks!

Hi @alex-ge123 ,

I hope you're doing well. Just a friendly reminder that if we do not hear back from you within the next 3 days, we will close this issue. If you need more time or further assistance, please let us know.
Thank you for your understanding!


Cherry pick glTF parse support custom extsnions and parser

Please check if the PR fulfills these requirements

[x] The commit message follows our guidelines
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

Codecov Report
Patch coverage: 20.99% and no project coverage change.

Comparison is base (2155a84) 43.15% compared to head (d0d48c9) 43.16%.

:exclamation: Current head d0d48c9 differs from pull request most recent head ba26f01. Consider uploading reports for the commit ba26f01 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@                   Coverage Diff                    @@
##           experimental/0.9-plus.0    #1534   +/-   ##
========================================================
  Coverage                    43.15%   43.16%
========================================================
  Files                          352      351    -1
  Lines                        17969    17969
  Branches                      2644     2637    -7
========================================================
+ Hits                          7755     7756    +1
+ Misses                        9532     9529    -3
- Partials                       682      684    +2

Impacted Files
Coverage Δ

packages/loader/src/GLTFLoader.ts
11.76% <0.00%> (-0.74%)
:arrow_down:

packages/loader/src/gltf/GLTFResource.ts
11.11% <0.00%> (ø)

packages/loader/src/gltf/GLTFSchema.ts
100.00% <ø> (ø)

packages/loader/src/gltf/GLTFUtil.ts
2.70% <ø> (ø)

...kages/loader/src/gltf/parser/GLTFMaterialParser.ts
3.07% <3.07%> (ø)

.../src/gltf/extensions/KHR_draco_mesh_compression.ts
4.76% <4.54%> (-13.42%)
:arrow_down:

packages/loader/src/gltf/parser/GLTFMeshParser.ts
1.98% <8.33%> (ø)

packages/loader/src/gltf/parser/GLTFParser.ts
21.42% <21.42%> (ø)

packages/loader/src/gltf/parser/GLTFSceneParser.ts
5.20% <22.22%> (ø)

packages/loader/src/gltf/parser/GLTFValidator.ts
9.52% <22.22%> (ø)

... and 16 more

... and 2 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Do we still need developer payload android

Version of react-native-iap
4.4.6
Version of react-native
0.61.4
Question?
Thank you for creating this awesome library. I was able to follow steps and create my desired output easily. We are willing to share same in-app-purchase experience for both Android and iOS. You achieved to do!
Do we still need to put developerPayloadAndroid in finishTransaction(purchase: InAppPurchase/ProductPurchase, isConsumable?: boolean, developerPayloadAndroid?: string). Since the library is changing and growing day by day, I wanted to make sure. And looks like google does not support it anymore.
My plan is to validate receipts in a server like this https://github.com/mifi/in-app-subscription-example

@hyochan can you have a look at this

as far as I understood, https://github.com/mifi/in-app-subscription-example/blob/master/in-app-subscription-backend-example/index.js#L135 having something like that will do the same. so there is no need for developerPayloadAndroid. Is it true?

I'm also knowing this to be the legacy field but they are not completed moved away although deprecated. I just exposed those variables.

so its fine not to put it?

@zeritte Yes this is optional I think.


Postmark TLS Configuration Changes

Just checking in to find out if Postmark's upcoming TLS configuration changes have already been accounted for in this plugin.

@k7y6t5 behind the scenes, the Postmark Craft plugin uses wildbit/swiftmailer-postmark for sending mail. This library doesn't do any TLS processing and will support all TLS versions as long as the system library supports them.
You need to make sure that your cURL/openSSL version supports TLS version greater than 1.0. This is the system library responsible for actually connecting via TLS.
This should be supported unless you're using a very old version of openSSL - support for TLS 1.1 & 1.2 was added back in 2012 (in OpenSSL 1.0.1).
As mentioned in the update post, we’ve set up a temporary endpoint at api-ssl-temp.postmarkapp.com that has these changes already applied, so you can use it to test/validate your system against it.
How to test:
The easiest and most implementation-agnostic way to test this is to update your hosts file to point at the test endpoint (temporarily), by adding an entry like so:
<IP_ADDRESS> api.postmarkapp.com
For any other related questions, please feel free to comment on this thread!


[$500] Distance - Distance request briefly shows local currency instead of workspace currency after creating it

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.4.46-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by:  Applause - Internal Team
Slack conversation:
Action Performed:
Precondition:

Default workspace currency is different from local currency

Go to staging.new.expensify.com
Go to workspace chat
Go to + > Request money > Distance
Create a distance request

Expected Result:
The amount in distance request preview in the main chat will show default workspace currency
Actual Result:
The amount in distance request preview in the main chat briefly shows local currency
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/20458bc8-834d-47ab-b012-28386673e607
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~010a112a7314639b9b
Upwork Job ID:<PHONE_NUMBER>001948160
Last Price Increase: 2024-03-06

@kadiealexander  FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

We think that this bug might be related to #wave5
CC @dylanexpensify

Proposal
Please re-state the problem that we are trying to solve in this issue.
When creating a distance request, the user's local currency code is shown in the preview instead of the workspace currency.
What is the root cause of that problem?
When creating a distance request, we already calculate the distance amount and include the workspace currency here.
https://github.com/Expensify/App/blob/af68510ad375bc99679908ce26dafead3a8b3dc1/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js#L349-L350
The currency is taken from the workspace mileage rate.
https://github.com/Expensify/App/blob/af68510ad375bc99679908ce26dafead3a8b3dc1/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js#L251
However, there are 2 places where the currency is overwritten with the local currency.
First, when we arrive at the distance confirmation page, the manual (amount) tab is unmounted. This will trigger this useEffect clean up which sets the transaction currency with the original currency. The original currency is the user local currency.
https://github.com/Expensify/App/blob/af68510ad375bc99679908ce26dafead3a8b3dc1/src/pages/iou/request/step/IOURequestStepAmount.js#L106-L113
Second, when the confirmation page is mounted, we check if the transaction contains an originalCurrency attribute, if yes, the transaction currency is set to originalCurrency.
https://github.com/Expensify/App/blob/af68510ad375bc99679908ce26dafead3a8b3dc1/src/pages/iou/request/step/IOURequestStepConfirmation.js#L111-L118
They assume that when the user arrives, the originalCurrency is already removed from the transaction because we clear it when pressing the Next button, but only from the manual page/tab.
https://github.com/Expensify/App/blob/af68510ad375bc99679908ce26dafead3a8b3dc1/src/pages/iou/request/step/IOURequestStepAmount.js#L136
https://github.com/Expensify/App/blob/af68510ad375bc99679908ce26dafead3a8b3dc1/src/libs/actions/IOU.ts#L294-L296
What changes do you think we should make in order to solve the problem?

I see that this originalCurrency logic is only being used for manual case because both scan and distance don't have an amount input, so it makes sense to check whether the request is manual or not before doing the cleanup. Also, we need to clear the originalCurrency when pressing the Next button in distance tab.
> IOURequestStepConfirmation
useEffect(() => {
    if (!transaction || !transaction.originalCurrency || requestType !== CONST.IOU.REQUEST_TYPE.MANUAL) {
        return;
    }
    // If user somehow lands on this page without the currency reset, then reset it here.
    IOU.setMoneyRequestCurrency_temporaryForRefactor(transactionID, transaction.originalCurrency, true);
}, []);

> IOURequestStepAmount
useEffect(() => (iouRequestTypeRef.current = iouRequestType), [iouRequestType]);

useEffect(() => {
    return () => {
        if (isSaveButtonPressed.current || iouRequestTypeRef.current !== CONST.IOU.REQUEST_TYPE.MANUAL) {
            return;
        }
        IOU.setMoneyRequestCurrency_temporaryForRefactor(transactionID, originalCurrency.current, true);
    };
}, []);

> IOURequestStepDistance
const navigateToNextStep = () =>
    IOU.setMoneyRequestOriginalCurrency_temporaryForRefactor(transactionID, null);

What alternative solutions did you explore? (Optional)
The originalCurrency is basically being used to reset the transaction currency when the user cancels editing the amount, I don't see it being useful for the start page. So, we can ignore the originalCurrency effect when we are not editing amount.
https://github.com/Expensify/App/blob/af68510ad375bc99679908ce26dafead3a8b3dc1/src/pages/iou/request/step/IOURequestStepAmount.js#L99-L113
Currently, we check for backTo params to check whether it's an amount edit page or not, so I'm gonna use that too for now.
useEffect(() => {
    if (!backTo) return;
    ...restOfTheCode
}, [])

Then, we don't need the changes on other pages anymore.

Not overdue!

@sobitneupane please review the proposal from @bernhardoj.

Thanks for the proposal @bernhardoj.
We can go with your alternative proposal. Let's define a variable isEditing and we can use it in https://github.com/Expensify/App/blob/af68510ad375bc99679908ce26dafead3a8b3dc1/src/pages/iou/request/step/IOURequestStepAmount.js#L166
The code was introduced by https://github.com/Expensify/App/pull/34075 to solve https://github.com/Expensify/App/issues/33608 issue.
🎀 👀 🎀 C+ reviewed

neither proposal is very clear to me tbh

Ok, I think think is pretty confusing because there are so many places where data is being modified in useEffect callbacks. I also think checking for the presence of a backTo param to see if we're manually editing a field feels like a really convoluted approach that's very tightly coupled to our UI flows.

However, there are 2 places where the currency is overwritten with the local currency.

Can someone explain to me what would happen if we were to just remove these effects completely?

https://github.com/Expensify/App/blob/b051dc40de616cabf8c0bb46312526d74963ca31/src/pages/iou/request/step/IOURequestStepAmount.js#L99-L113
https://github.com/Expensify/App/blob/005580dca9cc82c4a5ba720af337513e553e2d9f/src/pages/iou/request/step/IOURequestStepConfirmation.js#L111-L118

@roryabraham
The first one is to revert the currency to the "draft" (original) currency.
https://github.com/Expensify/App/assets/50919443/e86feb59-bb7f-4eff-9374-6f6c25205776
If we remove it, then the currency will be updated even without pressing the Save button (on the edit page).
I believe the second one is to mimic the behavior of the previous version of the money request page. Currently, when we select a currency from the currency selection page, it will immediately be saved to the transaction draft.
If the user directly accesses the confirmation page (by changing the URL), the second useEffect will revert the currency to the "draft" (original) currency.

Open the money request page
Change the currency from A to B (originalCurrency is A, currency is B)
Change the URL to the confirmation page
The second useEffect will kick in and the currency shown will be currency A (originalCurrency)

Previously, the currency would only be saved when we pressed the Next button, so if the user directly accessed the page, the user would see the first currency.

Open the money request page
Change the currency from A to B (currency is A)
Change the URL to the confirmation page
The currency shown will be currency A (currency)

If we remove it, then we will see the updated currency on confirmation page.
https://github.com/Expensify/App/assets/50919443/1d5898f1-4c42-473b-87fc-facda1e8a333

I also think checking for the presence of a backTo param to see if we're manually editing a field feels like a really convoluted approach that's very tightly coupled to our UI flows.

Currently, the edit amount and the start amount page use the same component, IOURequestStepAmount. What if we create a new one for edit, IOURequestStepEditAmount, which just uses IOURequestStepAmount and passes isEditing props to it?

Thanks for taking the time to explain @bernhardoj

The first one is to revert the currency to the "draft" (original) currency

Where is it getting saved? I think this should only happen when you click the save button. Rather than what we have now, which is:

it's "immediately" saved
if we leave without clicking the save button, we revert it back
"

which is much more confusing than just saving it when you click the save button.
This feels like the root cause of our issues in both cases. What do you think?

@roryabraham

Where is it getting saved?

When we pick a currency.
https://github.com/Expensify/App/blob/37a2dbb9dd5e89d61210feb0eb1de3a80cb6ca6d/src/pages/iou/request/step/IOURequestStepCurrency.js#L80-L84
Actually, my comment about the second useEffect is a bit misleading. In the previous version, if we were at the start page, selecting a currency will immediately save it to the transaction draft.
However, if we were editing the currency, we just go back to the edit amount page with the currency added to the params. Pressing the save button will save the currency from the params.

I think this should only happen when you click the save button

I also prefer this one (using the params approach). What about we revert https://github.com/Expensify/App/pull/34075 and fix the issue that the PR is trying to solve? The issue is very simple to fix, we just need to pass the selected currency to the params and use it when it's available in currency selection page,
const currency = currencyFromParams || currencyFromTransaction;

just like we did before in the amount page.

Not overdue, @roryabraham any thoughts on the above?

@roryabraham Those useEffects were introduced by this PR to resolve https://github.com/Expensify/App/issues/33608
One way would be to revert the changes made by https://github.com/Expensify/App/pull/34075 and solve https://github.com/Expensify/App/issues/33608 issue with a different approach.

I like the idea of reverting https://github.com/Expensify/App/pull/34075, and the two useEffects I linked above, and solving this and the old issue https://github.com/Expensify/App/issues/33608 with a different approach, such as using route params as suggested in @bernhardoj's last comment.
However, so far we don't have a proposal on this issue outlining such an approach clearly.

I have updated my proposal to include the revert and fix the old issue as the main solution and moved the previous main solution as the 2nd alternative.

To solve it, we can allow the currency picker page to accept the currency from params and transaction object, similar to what we do in the old amount page.

@bernhardoj Can you please add more explanation about the solution of the issue. Please also add details on where will you make changes.
I like the idea you are proposing. If we are okay with passing currency through param, your proposal should do the job.
Challenges that we might face with the solution are:

Direct revert of the PR doesn't look likely as it was two months old PR. We should be careful of the changes that are made after that PR.
How will we handle the case where invalid currency is used as currency param in direct link?

Direct revert of the PR doesn't look likely as it was two months old PR

Yes, we need to manually do it.

How will we handle the case where invalid currency is used as currency param in direct link?

We can check whether the currency is valid or not, just like we did on this old money request page
https://github.com/Expensify/App/blob/1f3e31fae69a168dd4f76a91faf257c33e334364/src/pages/iou/steps/NewRequestAmountPage.js#L70

Can you please add more explanation about the solution of the https://github.com/Expensify/App/issues/33608. Please also add details on where will you make changes.

Added the component name and the code to handle invalid currency

Thanks for the update @bernhardoj
@roryabraham I think we can go with @bernhardoj's proposal

Thanks for iterating on this a bit, feeling better about where we landed

PR is ready
cc: @sobitneupane

PR was merged yesterday

This one is a false alert https://github.com/Expensify/App/issues/37643#issuecomment-2067787598 sorry for that

@kadiealexander the PR was deployed to production on 2024-04-22, so the next step is to pay this out on Monday 2024-04-29

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

[ ] [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
[ ] [@sobitneupane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[ ] [@sobitneupane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[ ] [@sobitneupane] Determine if we should create a regression test for this bug.
[ ] [@sobitneupane] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[ ] [@kadiealexander] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

Payment Summary

Contributor: @bernhardoj due $500 via Upwork
Reviewer: @sobitneupane owed $500 via NewDot

BugZero Checklist (@kadiealexander)

[x] I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
[x] I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
[x] I have paid out the Upwork contracts or cancelled the ones that are incorrect
[x] I have verified the payment summary above is correct

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

[ ]  [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

https://github.com/Expensify/App/pull/34075

[ ]  [@sobitneupane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:

https://github.com/Expensify/App/pull/34075#issuecomment-2097917879

[ ]  [@sobitneupane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[ ]  [@sobitneupane] Determine if we should create a regression test for this bug.
Yes

[ ]  [@sobitneupane] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Proposal
Prerequisite: Have a workspace with a currency set to different currency than your local currency

Open the workspace chat
Create a new distance request
Verify the distance request preview shows the workspace currency

Do we agree 👍 or 👎

Requested payment in newDot.

Regression test: https://github.com/Expensify/Expensify/issues/394860

$500 approved for @sobitneupane