[FEATURE REQ] Microsoft.Azure.ServiceBus - Separate OperationTimeout to allow for consistent retries

Library or service name.
Microsoft.Azure.ServiceBus
Is your feature request related to a problem? Please describe.
I am trying to use the TopicClient to send messages with a custom RetryPolicy to do something that I expected to be simple: I want to retry failures (at least ones that should be retried) 3 times, with a 3 second timeout for each attempt, and a 3 second delay between each attempt.
The problem is that TopicClient.OperationTimeout appears to be enforced for both the timeout of an individual retry attempt, and also for the overall operation to send the message. So for my use case I would want to set TopicClient.OperationTimeout to 3 seconds so that each individual attempt doesn't go on for too long, but doing so means that when the first attempt times out, the next two attempts won't get to happen as the overall 3 second time has now elapsed.
To solve this problem, I think TopicClient.OperationTimeout needs separating into two timeout values, one for individual retry attempts and one for the overall operation (which could potentially be optional).
Example
I've created a small sample app to demonstrate retries not happenning for cases where the individual attempt times out (e.g. failure to connect to host), and also show that the retries work as I need for operations that timeout quickly (e.g. failure to resolve hostname):
using System;
using System.Threading.Tasks;
using Microsoft.Azure.ServiceBus;
using Serilog;

namespace ServiceBusRetriesTimeoutRepro
{
    public static class Program
    {
        public static async Task Main()
        {
            ILogger log = new LoggerConfiguration()
                .WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss:fff} {Level:u3}] {Message:lj}{NewLine}{Exception}")
                .CreateLogger();

            log.Information("No such host (fails fast)...");
            await run(log, "Endpoint=sb://asdf.servicebus.windows.net/;SharedAccessKeyName=fghj;SharedAccessKey=klzx;EntityPath=MustHaveOneOfThese;");

            log.Information("Host exists, not a service bus (times out)...");
            await run(log, "Endpoint=sb://google.co.uk/;SharedAccessKeyName=fghj;SharedAccessKey=klzx;EntityPath=MustHaveOneOfThese;");
        }

        private static async Task run(ILogger log, string connStr)
        {
            ITopicClient topicClient = new TopicClient(new ServiceBusConnectionStringBuilder(connStr),
                new RetryFixedPolicy(3, TimeSpan.FromMilliseconds(100), log))
            {
                OperationTimeout = TimeSpan.FromSeconds(4)
            };

            Message message = new Message
            {
                Body = new byte[] { 1, 2, 3 }
            };

            log.Information("Starting to send message");

            try
            {
                await topicClient.SendAsync(message);
            }
            catch (Exception e)
            {
                log.Error(e, "An exception occurred whilst sending message");
            }

            log.Information("End");
        }
    }

    public class RetryFixedPolicy : RetryPolicy
    {
        private readonly int maxRetries;
        private readonly TimeSpan delayBetweenAttempts;
        private readonly ILogger log;

        public RetryFixedPolicy(int maxRetries, TimeSpan delayBetweenAttempts, ILogger log)
        {
            if (maxRetries <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(maxRetries), "Must retry at least once");
            }
            if (delayBetweenAttempts < TimeSpan.Zero)
            {
                throw new ArgumentOutOfRangeException(nameof(delayBetweenAttempts),
                    "Cannot have a negative delay between retry attempts");
            }

            this.maxRetries = maxRetries;
            this.delayBetweenAttempts = delayBetweenAttempts;
            this.log = log ?? throw new ArgumentNullException(nameof(log));
        }

        protected override bool OnShouldRetry(TimeSpan remainingTime, int currentRetryCount, out TimeSpan retryInterval)
        {
            if (currentRetryCount > maxRetries)
            {
                log.Error("Reached max retries ({MaxRetries}). Will not retry again", maxRetries);

                retryInterval = TimeSpan.Zero;
                return false;
            }

            log.Information("Retrying sending to service bus. Retry {CurrentRetryCount}/{MaxRetries}",
                currentRetryCount, maxRetries);

            retryInterval = delayBetweenAttempts;
            return true;
        }
    }
}

This produces the output:
[14:59:48:990 INF] No such host (fails fast)...
[14:59:49:017 INF] Starting to send message
[14:59:49:078 INF] Retrying sending to service bus. Retry 1/3
[14:59:49:187 INF] Retrying sending to service bus. Retry 2/3
[14:59:49:299 INF] Retrying sending to service bus. Retry 3/3
[14:59:49:412 ERR] Reached max retries (3). Will not retry again
[14:59:49:413 ERR] An exception occurred whilst sending message
Microsoft.Azure.ServiceBus.ServiceBusCommunicationException: No such host is known. ErrorCode: HostNotFound
 ---> System.Net.Sockets.SocketException (11001): No such host is known.
   at Microsoft.Azure.ServiceBus.ServiceBusConnection.CreateConnectionAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.ServiceBus.Amqp.AmqpLinkCreator.CreateAndOpenAmqpLinkAsync()
   at Microsoft.Azure.ServiceBus.Core.MessageSender.CreateLinkAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync(IList`1 messageList)
   --- End of inner exception stack trace ---
   at Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync(IList`1 messageList)
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout)
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout)
   at Microsoft.Azure.ServiceBus.Core.MessageSender.SendAsync(IList`1 messageList)
   at ServiceBusRetriesTimeoutRepro.Program.run(ILogger log, String connStr) in C:\code\ServiceBusRetriesTimeoutRepro\ServiceBusRetriesTimeoutRepro\Program.cs:line 40
[14:59:49:432 INF] End
[14:59:49:433 INF] Host exists, not a service bus (times out)...
[14:59:49:433 INF] Starting to send message
[14:59:53:448 INF] Retrying sending to service bus. Retry 1/3
[14:59:53:449 ERR] An exception occurred whilst sending message
Microsoft.Azure.ServiceBus.ServiceBusCommunicationException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ErrorCode: TimedOut
 ---> System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
   at Microsoft.Azure.ServiceBus.ServiceBusConnection.CreateConnectionAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.ServiceBus.Amqp.AmqpLinkCreator.CreateAndOpenAmqpLinkAsync()
   at Microsoft.Azure.ServiceBus.Core.MessageSender.CreateLinkAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync(IList`1 messageList)
   --- End of inner exception stack trace ---
   at Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync(IList`1 messageList)
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout)
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout)
   at Microsoft.Azure.ServiceBus.Core.MessageSender.SendAsync(IList`1 messageList)
   at ServiceBusRetriesTimeoutRepro.Program.run(ILogger log, String connStr) in C:\code\ServiceBusRetriesTimeoutRepro\ServiceBusRetriesTimeoutRepro\Program.cs:line 40
[14:59:53:452 INF] End

C:\code\ServiceBusRetriesTimeoutRepro\ServiceBusRetriesTimeoutRepro\bin\Debug\netcoreapp3.1\ServiceBusRetriesTimeoutRepro.exe (process 25404) exited with code 0.
Press any key to close this window . . .

Thank you for your feedback.  Tagging and routing to the team best able to assist.

Thank you for your feedback.  Tagging and routing to the team best able to assist.

@JoshKeegan  not sure I fully follow. The retry policy is for the operation (Send), while the timeout applies to the operation and the retry.
The default retry policy utilizes an exponential backoff policy to avoid the situation that you are seeing.

@JoshKeegan  not sure I fully follow. The retry policy is for the operation (Send), while the timeout applies to the operation and the retry.
The default retry policy utilizes an exponential backoff policy to avoid the situation that you are seeing.

@axisc the issue is that there is no timeout on an individual retry attempt, without which you don't have full control over your retries (so in the second scenario there are no retries).
RE the default retry policy: the same issue occurs there, although it requires a slightly modified version of the RetryExponential class to add logging (and also remove internal dependencies), here's the code illustrating that:
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.ServiceBus;
using Serilog;

namespace ServiceBusRetriesTimeoutRepro
{
    public static class Program
    {
        public static async Task Main()
        {
            ILogger log = new LoggerConfiguration()
                .WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss:fff} {Level:u3}] {Message:lj}{NewLine}{Exception}")
                .CreateLogger();

            log.Information("No such host (fails fast)...");
            await run(log, "Endpoint=sb://asdf.servicebus.windows.net/;SharedAccessKeyName=fghj;SharedAccessKey=klzx;EntityPath=MustHaveOneOfThese;");

            log.Information("Host exists, not a service bus (times out)...");
            await run(log, "Endpoint=sb://google.co.uk/;SharedAccessKeyName=fghj;SharedAccessKey=klzx;EntityPath=MustHaveOneOfThese;");
        }

        private static async Task run(ILogger log, string connStr)
        {
            RetryPolicy fixedRetryPolicy = new RetryFixedPolicy(3, TimeSpan.FromMilliseconds(100), log);
            RetryPolicy exponentialBackoffRetryPolicy = new CustomRetryExponential(TimeSpan.FromMilliseconds(10),
                TimeSpan.FromMilliseconds(10), TimeSpan.FromMilliseconds(10), 3, log);

            ITopicClient topicClient = new TopicClient(new ServiceBusConnectionStringBuilder(connStr),
                // Swap retry policies here
                exponentialBackoffRetryPolicy)
            {
                OperationTimeout = TimeSpan.FromSeconds(4)
            };

            Message message = new Message
            {
                Body = new byte[] { 1, 2, 3 }
            };

            log.Information("Starting to send message");

            try
            {
                await topicClient.SendAsync(message);
            }
            catch (Exception e)
            {
                log.Error(e, "An exception occurred whilst sending message");
            }

            log.Information("End");
        }
    }

    /// <summary>
    /// Copy of RetryExponential with added logging to demonstrate issue
    /// </summary>
    public sealed class CustomRetryExponential : RetryPolicy
    {
        private static readonly ThreadLocal<Random> concurrentRandom = new ThreadLocal<Random>(() => new Random());
        private readonly ILogger log;

        public CustomRetryExponential(TimeSpan minimumBackoff, TimeSpan maximumBackoff, TimeSpan deltaBackoff, int maxRetryCount, ILogger log)
        {
            this.log = log;
            //TimeoutHelper.ThrowIfNonPositiveArgument(deltaBackoff, nameof(deltaBackoff));
            //TimeoutHelper.ThrowIfNegativeArgument(minimumBackoff, nameof(minimumBackoff));
            //TimeoutHelper.ThrowIfNonPositiveArgument(maximumBackoff, nameof(maximumBackoff));

            //if (maxRetryCount <= 0)
            //{
            //    throw new ArgumentOutOfRangeException(
            //        nameof(maxRetryCount),
            //        Resources.ArgumentMustBePositive.FormatForUser(nameof(maxRetryCount)));
            //}

            //if (minimumBackoff >= maximumBackoff)
            //{
            //    throw new ArgumentException(Resources.ExponentialRetryBackoffRange.FormatForUser(minimumBackoff, maximumBackoff));
            //}

            this.MinimalBackoff = minimumBackoff;
            this.MaximumBackoff = maximumBackoff;
            this.DeltaBackoff = deltaBackoff;
            this.MaxRetryCount = maxRetryCount;
        }

        /// <summary>
        /// Minimum backoff interval.
        /// </summary>
        /// <value>The minimum backoff interval.</value>
        public TimeSpan MinimalBackoff { get; }

        /// <summary>
        /// Gets or sets the maximum backoff interval.
        /// </summary>
        /// <value>The maximum backoff interval.</value>
        public TimeSpan MaximumBackoff { get; }

        /// <summary>
        /// Gets or sets the backoff interval associated with the retry.
        /// </summary>
        /// <value>The backoff interval associated with the retry.</value>
        public TimeSpan DeltaBackoff { get; }

        /// <summary>
        /// Gets or sets the maximum number of allowed retries.
        /// </summary>
        /// <value>The maximum number of allowed retries.</value>
        public int MaxRetryCount { get; }

        /// <summary>
        /// Called to see if a retry should be performed.
        /// </summary>
        /// <param name="remainingTime">The remaining time before the timeout expires.</param>
        /// <param name="currentRetryCount">The number of attempts that have been processed.</param>
        /// <param name="retryInterval">The amount of time to delay before retry.</param>
        protected override bool OnShouldRetry(TimeSpan remainingTime, int currentRetryCount, out TimeSpan retryInterval)
        {
            if (currentRetryCount > this.MaxRetryCount)
            {
                log.Error("Reached max retries ({MaxRetries}). Will not retry again", MaxRetryCount);

                retryInterval = TimeSpan.Zero;
                return false;
            }

            // Logic: - first use currentRetryCount to calculate the size of the interval.
            //        - then get the interval in terms of sleep time (between min and max sleep time)
            //        - if interval to large to fit inside remainingTime, we quit.
            var randomizedInterval = concurrentRandom.Value.Next((int)(this.DeltaBackoff.TotalMilliseconds * 0.8), (int)(this.DeltaBackoff.TotalMilliseconds * 1.2));
            double increment = (Math.Pow(2, currentRetryCount) - 1) * randomizedInterval;
            double timeToSleepMsec = Math.Min(this.MinimalBackoff.TotalMilliseconds + increment, this.MaximumBackoff.TotalMilliseconds);
            retryInterval = TimeSpan.FromMilliseconds(timeToSleepMsec);

            log.Information("Retrying sending to service bus. Retry {CurrentRetryCount}. Interval {RetryInterval}",
                currentRetryCount, retryInterval);

            return true;
        }
    }

    public class RetryFixedPolicy : RetryPolicy
    {
        private readonly int maxRetries;
        private readonly TimeSpan delayBetweenAttempts;
        private readonly ILogger log;

        public RetryFixedPolicy(int maxRetries, TimeSpan delayBetweenAttempts, ILogger log)
        {
            if (maxRetries <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(maxRetries), "Must retry at least once");
            }
            if (delayBetweenAttempts < TimeSpan.Zero)
            {
                throw new ArgumentOutOfRangeException(nameof(delayBetweenAttempts),
                    "Cannot have a negative delay between retry attempts");
            }

            this.maxRetries = maxRetries;
            this.delayBetweenAttempts = delayBetweenAttempts;
            this.log = log ?? throw new ArgumentNullException(nameof(log));
        }

        protected override bool OnShouldRetry(TimeSpan remainingTime, int currentRetryCount, out TimeSpan retryInterval)
        {
            if (currentRetryCount > maxRetries)
            {
                log.Error("Reached max retries ({MaxRetries}). Will not retry again", maxRetries);

                retryInterval = TimeSpan.Zero;
                return false;
            }

            log.Information("Retrying sending to service bus. Retry {CurrentRetryCount}/{MaxRetries}",
                currentRetryCount, maxRetries);

            retryInterval = delayBetweenAttempts;
            return true;
        }
    }
}

Which outputs:
[11:38:20:843 INF] No such host (fails fast)...
[11:38:20:876 INF] Starting to send message
[11:38:20:975 INF] Retrying sending to service bus. Retry 1. Interval 00:00:00.0100000
[11:38:21:004 INF] Retrying sending to service bus. Retry 2. Interval 00:00:00.0100000
[11:38:21:018 INF] Retrying sending to service bus. Retry 3. Interval 00:00:00.0100000
[11:38:21:033 ERR] Reached max retries (3). Will not retry again
[11:38:21:035 ERR] An exception occurred whilst sending message
Microsoft.Azure.ServiceBus.ServiceBusCommunicationException: No such host is known. ErrorCode: HostNotFound
 ---> System.Net.Sockets.SocketException (11001): No such host is known.
   at Microsoft.Azure.ServiceBus.ServiceBusConnection.CreateConnectionAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.ServiceBus.Amqp.AmqpLinkCreator.CreateAndOpenAmqpLinkAsync()
   at Microsoft.Azure.ServiceBus.Core.MessageSender.CreateLinkAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync(IList`1 messageList)
   --- End of inner exception stack trace ---
   at Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync(IList`1 messageList)
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout)
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout)
   at Microsoft.Azure.ServiceBus.Core.MessageSender.SendAsync(IList`1 messageList)
   at ServiceBusRetriesTimeoutRepro.Program.run(ILogger log, String connStr) in C:\code\ServiceBusRetriesTimeoutRepro\ServiceBusRetriesTimeoutRepro\Program.cs:line 45
[11:38:21:058 INF] End
[11:38:21:058 INF] Host exists, not a service bus (times out)...
[11:38:21:059 INF] Starting to send message
[11:38:25:065 INF] Retrying sending to service bus. Retry 1. Interval 00:00:00.0100000
[11:38:25:066 ERR] An exception occurred whilst sending message
Microsoft.Azure.ServiceBus.ServiceBusCommunicationException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ErrorCode: TimedOut
 ---> System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
   at Microsoft.Azure.ServiceBus.ServiceBusConnection.CreateConnectionAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.ServiceBus.Amqp.AmqpLinkCreator.CreateAndOpenAmqpLinkAsync()
   at Microsoft.Azure.ServiceBus.Core.MessageSender.CreateLinkAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync(IList`1 messageList)
   --- End of inner exception stack trace ---
   at Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync(IList`1 messageList)
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout)
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout)
   at Microsoft.Azure.ServiceBus.Core.MessageSender.SendAsync(IList`1 messageList)
   at ServiceBusRetriesTimeoutRepro.Program.run(ILogger log, String connStr) in C:\code\ServiceBusRetriesTimeoutRepro\ServiceBusRetriesTimeoutRepro\Program.cs:line 45
[11:38:25:069 INF] End

C:\code\ServiceBusRetriesTimeoutRepro\ServiceBusRetriesTimeoutRepro\bin\Debug\netcoreapp3.1\ServiceBusRetriesTimeoutRepro.exe (process 15316) exited with code 0.
Press any key to close this window . . .

So it doesn't matter which retry policy is used, the same issue exists because there is no control over the timeout of an individual retry attempt.

@axisc the issue is that there is no timeout on an individual retry attempt, without which you don't have full control over your retries (so in the second scenario there are no retries).
RE the default retry policy: the same issue occurs there, although it requires a slightly modified version of the RetryExponential class to add logging (and also remove internal dependencies), here's the code illustrating that:
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.ServiceBus;
using Serilog;

namespace ServiceBusRetriesTimeoutRepro
{
    public static class Program
    {
        public static async Task Main()
        {
            ILogger log = new LoggerConfiguration()
                .WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss:fff} {Level:u3}] {Message:lj}{NewLine}{Exception}")
                .CreateLogger();

            log.Information("No such host (fails fast)...");
            await run(log, "Endpoint=sb://asdf.servicebus.windows.net/;SharedAccessKeyName=fghj;SharedAccessKey=klzx;EntityPath=MustHaveOneOfThese;");

            log.Information("Host exists, not a service bus (times out)...");
            await run(log, "Endpoint=sb://google.co.uk/;SharedAccessKeyName=fghj;SharedAccessKey=klzx;EntityPath=MustHaveOneOfThese;");
        }

        private static async Task run(ILogger log, string connStr)
        {
            RetryPolicy fixedRetryPolicy = new RetryFixedPolicy(3, TimeSpan.FromMilliseconds(100), log);
            RetryPolicy exponentialBackoffRetryPolicy = new CustomRetryExponential(TimeSpan.FromMilliseconds(10),
                TimeSpan.FromMilliseconds(10), TimeSpan.FromMilliseconds(10), 3, log);

            ITopicClient topicClient = new TopicClient(new ServiceBusConnectionStringBuilder(connStr),
                // Swap retry policies here
                exponentialBackoffRetryPolicy)
            {
                OperationTimeout = TimeSpan.FromSeconds(4)
            };

            Message message = new Message
            {
                Body = new byte[] { 1, 2, 3 }
            };

            log.Information("Starting to send message");

            try
            {
                await topicClient.SendAsync(message);
            }
            catch (Exception e)
            {
                log.Error(e, "An exception occurred whilst sending message");
            }

            log.Information("End");
        }
    }

    /// <summary>
    /// Copy of RetryExponential with added logging to demonstrate issue
    /// </summary>
    public sealed class CustomRetryExponential : RetryPolicy
    {
        private static readonly ThreadLocal<Random> concurrentRandom = new ThreadLocal<Random>(() => new Random());
        private readonly ILogger log;

        public CustomRetryExponential(TimeSpan minimumBackoff, TimeSpan maximumBackoff, TimeSpan deltaBackoff, int maxRetryCount, ILogger log)
        {
            this.log = log;
            //TimeoutHelper.ThrowIfNonPositiveArgument(deltaBackoff, nameof(deltaBackoff));
            //TimeoutHelper.ThrowIfNegativeArgument(minimumBackoff, nameof(minimumBackoff));
            //TimeoutHelper.ThrowIfNonPositiveArgument(maximumBackoff, nameof(maximumBackoff));

            //if (maxRetryCount <= 0)
            //{
            //    throw new ArgumentOutOfRangeException(
            //        nameof(maxRetryCount),
            //        Resources.ArgumentMustBePositive.FormatForUser(nameof(maxRetryCount)));
            //}

            //if (minimumBackoff >= maximumBackoff)
            //{
            //    throw new ArgumentException(Resources.ExponentialRetryBackoffRange.FormatForUser(minimumBackoff, maximumBackoff));
            //}

            this.MinimalBackoff = minimumBackoff;
            this.MaximumBackoff = maximumBackoff;
            this.DeltaBackoff = deltaBackoff;
            this.MaxRetryCount = maxRetryCount;
        }

        /// <summary>
        /// Minimum backoff interval.
        /// </summary>
        /// <value>The minimum backoff interval.</value>
        public TimeSpan MinimalBackoff { get; }

        /// <summary>
        /// Gets or sets the maximum backoff interval.
        /// </summary>
        /// <value>The maximum backoff interval.</value>
        public TimeSpan MaximumBackoff { get; }

        /// <summary>
        /// Gets or sets the backoff interval associated with the retry.
        /// </summary>
        /// <value>The backoff interval associated with the retry.</value>
        public TimeSpan DeltaBackoff { get; }

        /// <summary>
        /// Gets or sets the maximum number of allowed retries.
        /// </summary>
        /// <value>The maximum number of allowed retries.</value>
        public int MaxRetryCount { get; }

        /// <summary>
        /// Called to see if a retry should be performed.
        /// </summary>
        /// <param name="remainingTime">The remaining time before the timeout expires.</param>
        /// <param name="currentRetryCount">The number of attempts that have been processed.</param>
        /// <param name="retryInterval">The amount of time to delay before retry.</param>
        protected override bool OnShouldRetry(TimeSpan remainingTime, int currentRetryCount, out TimeSpan retryInterval)
        {
            if (currentRetryCount > this.MaxRetryCount)
            {
                log.Error("Reached max retries ({MaxRetries}). Will not retry again", MaxRetryCount);

                retryInterval = TimeSpan.Zero;
                return false;
            }

            // Logic: - first use currentRetryCount to calculate the size of the interval.
            //        - then get the interval in terms of sleep time (between min and max sleep time)
            //        - if interval to large to fit inside remainingTime, we quit.
            var randomizedInterval = concurrentRandom.Value.Next((int)(this.DeltaBackoff.TotalMilliseconds * 0.8), (int)(this.DeltaBackoff.TotalMilliseconds * 1.2));
            double increment = (Math.Pow(2, currentRetryCount) - 1) * randomizedInterval;
            double timeToSleepMsec = Math.Min(this.MinimalBackoff.TotalMilliseconds + increment, this.MaximumBackoff.TotalMilliseconds);
            retryInterval = TimeSpan.FromMilliseconds(timeToSleepMsec);

            log.Information("Retrying sending to service bus. Retry {CurrentRetryCount}. Interval {RetryInterval}",
                currentRetryCount, retryInterval);

            return true;
        }
    }

    public class RetryFixedPolicy : RetryPolicy
    {
        private readonly int maxRetries;
        private readonly TimeSpan delayBetweenAttempts;
        private readonly ILogger log;

        public RetryFixedPolicy(int maxRetries, TimeSpan delayBetweenAttempts, ILogger log)
        {
            if (maxRetries <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(maxRetries), "Must retry at least once");
            }
            if (delayBetweenAttempts < TimeSpan.Zero)
            {
                throw new ArgumentOutOfRangeException(nameof(delayBetweenAttempts),
                    "Cannot have a negative delay between retry attempts");
            }

            this.maxRetries = maxRetries;
            this.delayBetweenAttempts = delayBetweenAttempts;
            this.log = log ?? throw new ArgumentNullException(nameof(log));
        }

        protected override bool OnShouldRetry(TimeSpan remainingTime, int currentRetryCount, out TimeSpan retryInterval)
        {
            if (currentRetryCount > maxRetries)
            {
                log.Error("Reached max retries ({MaxRetries}). Will not retry again", maxRetries);

                retryInterval = TimeSpan.Zero;
                return false;
            }

            log.Information("Retrying sending to service bus. Retry {CurrentRetryCount}/{MaxRetries}",
                currentRetryCount, maxRetries);

            retryInterval = delayBetweenAttempts;
            return true;
        }
    }
}

Which outputs:
[11:38:20:843 INF] No such host (fails fast)...
[11:38:20:876 INF] Starting to send message
[11:38:20:975 INF] Retrying sending to service bus. Retry 1. Interval 00:00:00.0100000
[11:38:21:004 INF] Retrying sending to service bus. Retry 2. Interval 00:00:00.0100000
[11:38:21:018 INF] Retrying sending to service bus. Retry 3. Interval 00:00:00.0100000
[11:38:21:033 ERR] Reached max retries (3). Will not retry again
[11:38:21:035 ERR] An exception occurred whilst sending message
Microsoft.Azure.ServiceBus.ServiceBusCommunicationException: No such host is known. ErrorCode: HostNotFound
 ---> System.Net.Sockets.SocketException (11001): No such host is known.
   at Microsoft.Azure.ServiceBus.ServiceBusConnection.CreateConnectionAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.ServiceBus.Amqp.AmqpLinkCreator.CreateAndOpenAmqpLinkAsync()
   at Microsoft.Azure.ServiceBus.Core.MessageSender.CreateLinkAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync(IList`1 messageList)
   --- End of inner exception stack trace ---
   at Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync(IList`1 messageList)
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout)
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout)
   at Microsoft.Azure.ServiceBus.Core.MessageSender.SendAsync(IList`1 messageList)
   at ServiceBusRetriesTimeoutRepro.Program.run(ILogger log, String connStr) in C:\code\ServiceBusRetriesTimeoutRepro\ServiceBusRetriesTimeoutRepro\Program.cs:line 45
[11:38:21:058 INF] End
[11:38:21:058 INF] Host exists, not a service bus (times out)...
[11:38:21:059 INF] Starting to send message
[11:38:25:065 INF] Retrying sending to service bus. Retry 1. Interval 00:00:00.0100000
[11:38:25:066 ERR] An exception occurred whilst sending message
Microsoft.Azure.ServiceBus.ServiceBusCommunicationException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ErrorCode: TimedOut
 ---> System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
   at Microsoft.Azure.ServiceBus.ServiceBusConnection.CreateConnectionAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.ServiceBus.Amqp.AmqpLinkCreator.CreateAndOpenAmqpLinkAsync()
   at Microsoft.Azure.ServiceBus.Core.MessageSender.CreateLinkAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync(IList`1 messageList)
   --- End of inner exception stack trace ---
   at Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync(IList`1 messageList)
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout)
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout)
   at Microsoft.Azure.ServiceBus.Core.MessageSender.SendAsync(IList`1 messageList)
   at ServiceBusRetriesTimeoutRepro.Program.run(ILogger log, String connStr) in C:\code\ServiceBusRetriesTimeoutRepro\ServiceBusRetriesTimeoutRepro\Program.cs:line 45
[11:38:25:069 INF] End

C:\code\ServiceBusRetriesTimeoutRepro\ServiceBusRetriesTimeoutRepro\bin\Debug\netcoreapp3.1\ServiceBusRetriesTimeoutRepro.exe (process 15316) exited with code 0.
Press any key to close this window . . .

So it doesn't matter which retry policy is used, the same issue exists because there is no control over the timeout of an individual retry attempt.

I see. Yes, we don't have a way to define granular timeout for each retry attempt. It is meant to simplify the configuration.
I would instead recommend reducing the number of retries, which can be done by adjusting the retry policy.
hope this helps.

I see. Yes, we don't have a way to define granular timeout for each retry attempt. It is meant to simplify the configuration.
I would instead recommend reducing the number of retries, which can be done by adjusting the retry policy.
hope this helps.

Hi @axisc,
I don't think reducing the number of retries would help. In the second scenario in my example code (hostname resolves but service bus port cannot be connected to) no retries occur. Whatever the number of retries is set to, this problem will happen as the library waits for ITopicClient.OperationTimeout to be reached before terminating the initial attempt.
Perhaps I didn't initially highlight this strongly enough, but without any control over the timeout of an individual attempt I believe retries are broken due to there being cases where retries just won't happen.

Hi @axisc,
I don't think reducing the number of retries would help. In the second scenario in my example code (hostname resolves but service bus port cannot be connected to) no retries occur. Whatever the number of retries is set to, this problem will happen as the library waits for ITopicClient.OperationTimeout to be reached before terminating the initial attempt.
Perhaps I didn't initially highlight this strongly enough, but without any control over the timeout of an individual attempt I believe retries are broken due to there being cases where retries just won't happen.

The issue here is that there are certain error conditions where retry will not help. If those error conditions are identified, the subsequent retries should be stopped.
We currently tag this on an Exception level, but there is probably value in enabling client overrides when required.
Let me take this as a feature request and add it to the backlog.

The issue here is that there are certain error conditions where retry will not help. If those error conditions are identified, the subsequent retries should be stopped.
We currently tag this on an Exception level, but there is probably value in enabling client overrides when required.
Let me take this as a feature request and add it to the backlog.

@JoshKeegan Please note that a newer package Azure.Messaging.ServiceBus is available as of November 2020. While the older package Microsoft.Azure.ServiceBus will continue to receive critical bug fixes, we strongly encourage you to upgrade. Read the migration guide  for more details.
The ServiceBusClient in the newer SDK allows you to provide custom retry policy that will let you customize timeouts for individual retry attempts. You might want to take a look at

Samples for Azure.Messaging.ServiceBus
The retry options you can customize

@shankarsama Is this something you are still considering for Microsoft.Azure.ServiceBus package? If not, then we can close this issue.

Thanks for your patience @JoshKeegan
Closing this issue as there are no new features planned for Microsoft.Azure.ServiceBus. Please do try the newer Azure.Messaging.ServiceBus package as mentioned in the previous comment and share any feedback you have.


feat: add Python bindings by SQLAlchemy

Signed-off-by: Aurutus<EMAIL_ADDRESS>Continue the work of #75. Using SQLAlchemy to make python binding

@kemingy I belive this is ready for merge

cc @VoVAllen

I'm trying to use PDM to build and publish it.

We should add the Python lint & test to CI.

I'v created an example CI in https://github.com/BeautyyuYanli/pgvecto.rs-python (or 835fd21) . Not sure how to implement it in the monorepo.

We should add the Python lint & test to CI.

I'v created an example CI in BeautyyuYanli/pgvecto.rs-python (or 835fd21) . Not sure how to implement it in the monorepo.

The actions related file should be placed under the .github/workflows dir.
BTW, Python lint requires at least black + ruff. There is no cargo thing in Python.

I guess it will be messy to combine the python check (and potential other binding's) with the Rust check in the same one file...

I guess it will be messy to combine the python check (and potential other binding's) with the Rust check in the same one file...

It doesn't have to be the same file. BTW, the lint & test should only be triggered when there are changes to Python related files.

CI of build && lint is required to start the auto-merge. How to bypass it?

please run the Python Release action for the first time

please run the Python Release action for the first time

@gaocegege @VoVAllen Please help configure the PyPI release. Ref https://docs.pypi.org/trusted-publishers/adding-a-publisher/.
It needs to be triggered on the action page.

https://pypi.org/project/pgvecto_rs/
Already setup the project and trusted publisher

@all-contributors please add @BeautyyuYanli @AuruTus  for code contribution


Different commands return the virtualMachine id differently

Describe the bug
I am using the following commands to determine the private ip address of my vmss nodes.
az vmss nic list --vmss-name vmss-name --resource-group myresourcegroup --query [].[virtualMachine.id,ipConfigurations[0].privateIpAddress] --output json
az vmss list-instances --name vmss-name --resource-group myresourcegroup --query "[].[id,osProfile.computerName]" --output json
The return value for the two commands give me
'/subscriptions/xxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Compute/virtualMachineScaleSets/vmss-name/virtualMachines/0': {   'private_ip': '<IP_ADDRESS>'},
'/subscriptions/xxxxxxx/resourceGroups/MYRESOURCEGROUP/providers/Microsoft.Compute/virtualMachineScaleSets/vmss-name/virtualMachines/0': {   'hostname': 'hostname07f000000'},
I would like to match based on the VM id but one command returns the resource group in UPPERCASE and the other returns the resource group in lowercase. Can it just return it however the resource group is specified?
To Reproduce
Run the two command and compare the id for the VMs
az vmss list-instances --name vmss-name --resource-group myresourcegroup --query "[].[id,osProfile.computerName]" --output json
az vmss nic list --vmss-name vmss-name --resource-group myresourcegroup --query [].[virtualMachine.id,ipConfigurations[0].privateIpAddress] --output json
Expected behavior
I expect that the VM ids would be the same for both commands so that I don't have to do anything special in my script to match them.
Environment summary
Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build) / CLI version (az --version) / OS version / Shell Type (e.g. bash, cmd.exe, Bash on Windows)
Additional context
Add any other context about the problem here.

This is the format returned by the service.

Cleaning up old issues from 2016 - 2018. Please reopen this issue if it is still a concern.


Make nlohmann friendly for inclusion.

[Describe your pull request here. Please read the text below the line, and make sure you follow the checklist.]
New PR for #1250
The one change I haven't tested is the natvis bit because I don't have an MSVC system on hand. Other than that, I tried installing regularly, running the tests and including my way and it worked as expected.
Pull request checklist
Read the Contribution Guidelines for detailed information.

[x]  Changes are described in the pull request, or an existing issue is referenced.
[x]  The test suite compiles and runs without error.
[x]  Code coverage is 100%. Test cases can be added by editing the test suite.
[x]  The source code is amalgamated; that is, after making changes to the sources in the include/nlohmann directory, run make amalgamate to create the single-header file single_include/nlohmann/json.hpp. The whole process is described here.

Please don't

The C++11 support varies between different compilers and versions. Please note the list of supported compilers. Some compilers like GCC 4.7 (and earlier), Clang 3.3 (and earlier), or Microsoft Visual Studio 13.0 and earlier are known not to work due to missing or incomplete C++11 support. Please refrain from proposing changes that work around these compiler's limitations with #ifdefs or other means.
Specifically, I am aware of compilation problems with Microsoft Visual Studio (there even is an issue label for these kind of bugs). I understand that even in 2016, complete C++11 support isn't there yet. But please also understand that I do not want to drop features or uglify the code just to make Microsoft's sub-standard compiler happy. The past has shown that there are ways to express the functionality such that the code compiles with the most recent MSVC - unfortunately, this is not the main objective of the project.
Please refrain from proposing changes that would break JSON conformance. If you propose a conformant extension of JSON to be supported by the library, please motivate this extension.
Please do not open pull requests that address multiple issues.

I'm a bit confused as to the problem this is trying to solve.  When would PROJECT_SOURCE_DIR not be the same as CMAKE_CURRENT_LIST_DIR in the top level CMake?  The usual way to add a third party CMake library to another CMake project is via add_subdirectory, not include(), although it shouldn't matter too much which way you do it.
We (at kitware) are currently using this as a third party library via find_package for external or add_subdirectory for internal, without issue.  So what doesn't work that this is trying to fix?  It wasn't really clear what doesn't work since you should be abel to do the following as is without changing anything:
CMakeLists.txt
...
add_subdirectory(3rdParty)
...
add_subdirectory(src)
...

3rdParty/CMakeLists.txt
...
find_package(nlohmann_json 3.2.0 QUIET)
if(nlohmann_json_FOUND)
  message(STATUS "Nlohmann JSON found externally.")
else()
  message(STATUS "Nlohmann JSON not found externally; will use included version.")
  add_subdirectory(json)
endif()

3rdParty/json/CMakeLists.txt
# Set any project specific options for nlohmann_json
set(BUILD_TESTING OFF)
add_subdirectory(nlohmann_json)

src/CMakeLists.txt
...
target_link_libraries(performous PRIVATE nlohmann_json::nlohmann_json)
...

3rdParty/json/nlohmann_json is then the source for this project as a git submodule.
This should work as a third party library infrastructure in general with each 3rdParty/foo containing a CMakeLists.txt that sets the foo specific build options and adds the sub-directory for 3rdParty/foo/libfoo which is the project's actual code.

Coverage remained the same at 100.0% when pulling 4b1f2c6e7e3712206cc0fdf92bafd64bff1b4a98 on performous:performous into 910a895027b674df1366a473f4e6817683595eac on nlohmann:develop.

it's perhaps an unusual way to do things

Using include to add another project carries a slew of implications with it that break other CMake code in the project.  It pulls the included file in and processes it in the directory the include is called from rather than changing the working directory, so CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR aren't valid in the included CMakeLists.txt file.  Similarly, since the project() command is executed in the included file anything after the include has the PROJECT_* variables set to the value from the included file instead of the current project:
project(foo ...)
# PROJECT_<...> variables set correctly for the foo project
include(3rdParty/json/CMakeLists.txt)
# PROJECT_<...> variables now set to the values from nlohmann_json

There should probably be better documentation in CMake for some of these implications and to suggest not to add additional cmake projects in that way.  Using add_subdirectory keeps things scoped accordingly.

I have little experience with CMake and trust @chuckatkins in this regard. To my understanding, the PR would add a fix to support a discouraged way of including the library. If this is the case, then I'd rather not have the PR merged, especially as #1260 added a comment https://github.com/nlohmann/json#integration on how to use CMake for the library.


Clean up sources for SciML

Updates artifacts to the latest Float32 pack for SciML

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 76.19%. Comparing base (a482da0) to head (49ecc0d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #31   +/-   ##
=======================================
  Coverage   76.19%   76.19%
=======================================
  Files           8        8
  Lines         231      231
=======================================
  Hits          176      176
  Misses         55       55

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Define consensus critical limits

There are various places in the code where consensus critical memory limits ought to be defined and enforced:

[x] A limit on the maximum number of nodes in a DAG
[x] A limit on the maximum number of bits of witness data
[x] A limit on the maximum number of possible cells allocated for Bit Machine evaluation
[x] A limit on the maximum number of possible stack frames allocated for Bit Machine evaluation
[x] A limit on the maximum bitSize of any type annotation (possibly implied by the above).

There are various places in the code where consensus critical time limits ought to be defined and enforced, but possibly only through extraweight.

[x] A limit on the total number of cells ever copied by copyBits
[x] A limit on the total number of iterations through the main BitMachine loop

https://github.com/BlockstreamResearch/simplicity/blob/master/C/limitations.h now defines several of these consensus limits.

The maximum number of nodes in a DAG is DAG_LEN_MAX.
The maximum number of cells allocated for Bit Machine evaluation is CELLS_MAX.

Completed in https://github.com/BlockstreamResearch/simplicity/pull/129 and https://github.com/BlockstreamResearch/simplicity/pull/130.


Can't find compiler package with nimscripter 1.0.21 when Nim is installed in non-standard directory

Hello,
First, thank you for your work. 😄 Unfortunately, as stated above the newest version of nimscripter, 1.0.21, doesn't work when Nim, tested with version 1.6.12, is installed in a different directory, for example in /usr/local. Trying to build the first example from README.md file ends with the error: Error: cannot open file: /usr/local/compiler/nimeval.
The previous approach, with file config.nims works good, the path is set properly.

Does it work still if you use have the config.nims?

Unfortunately, no. Still the same error.

A standard day in the development. 😆 Binary file nim is located in /usr/local/bin, compiler source in /usr/local/lib/nim. It seems like Nim in code solves $nim to path to the binary, while everything works as expected when it is made via configuration.
I was trying to find any related issue in Nim, but without results. Probably I missed something.

Hmph, the only issue is that the fix is not back-ported, so I guess to support 1.6.x I still need that import hack I mentioned.

Or mark 1.0.20 as the last, which was working with 1.6 series. I'm not sure if it will be back-ported, everything depends on when the 2.0 version will be available.

This is related to https://nim-lang.org/docs/packaging.html - the last line indicates:

The "compiler" directory contains compiler sources and should not be part of the compiler binary package

@FedericoCeratto it is true for Linux 😉. For example, on FreeBSD compiler package contains patches and hacks which are needed for Nim to works, like generating a documentation. The reason: many paths are hard-coded.


Null safety

This is a request to add support for null safety to this package. See the migration guide for details about enabling null safety.

With the release of flutter beta 2.2.0 today, this issue git more pressing, because it requires mockito ^5.0.0 which in turn requires crypto ^3.0.0.
Because mockito >=5.0.0 depends on analyzer ^1.0.0 which depends on crypto ^3.0.0, mockito >=5.0.0 requires crypto ^3.0.0.
Because analyzer ^1.0.0 depends on crypto ^3.0.0 and corsac_jwt 0.4.0 depends on crypto ^2.1.5, analyzer ^1.0.0 is incompatible with corsac_jwt 0.4.0.

Anyone know of a solid alternative package?

Fixed by #21


Support other models?

How hard is it to implement quantizing other models to 4 bit. I see there is already a python file for bloom but that only comes in really small and really big flavors.
But if we could convert other 13-30b models it would be a big help. Or is the plan to wait on bitsandbytes?

Oh, I see you just added opt. I can compare it vs flexgen. The GPT open assistant models are what I was thinking of because my 8bit support is sketchy and this seems to work flawless.


Saving and loading executables

Just in ascii form, or in bytes I guess. Tiny files. Wouldn't even need an in-interface load option, just use cli flags :)

I can add it, but I think it takes away a bit of authenticity, so I won't document it in readme.

Perfect! :)

Done. 5439f865afbf669d6c051d8f224bfcd7b19789ff
Saves ram to file with 's', loads file with first command line argument.

Now that save and load are implemented, it would make sense to also make it possible to run in non-interactive mode, so that only output gets printed to stdout. Input to the program could be provided with  arguments following the filename, and it would be red from the last address (instead of a random value). Then multiple machines could be tied together using bash script :)


VALIDATOR-368: allowed angle brackets in email addresses

VALIDATOR-368: allowed angle brackets in email addresses

this PR was done 70 days ago. It awaits review and merge

I should be able to come back around to this component is a week or two. I am working on releasing Commons IO ATM...

Hi, any idea when this fix can be reviewed/merged?  thx


Firmware update fails: raspberry pi4 + RaspBee + hass.io + deconz addon

Hi there,
I just want to update the firmware of my raspbee but I get following output. I followed every step like discribed.
Hardware:

Raspberry Pi 4b (hassio 32Bit)
RaspBee (current firmware version: 26050500)

Here is the whole log:
# docker run -it --rm --device=/dev/ttyAMA0 --privileged --cap-add=ALL -v /lib/m
odules:/lib/modules --entrypoint "/firmware-update.sh" marthoc/hassio-addon-deco
nz-armhf
-------------------------------------------------------------------

       marthoc/deconz Conbee/RaspBee Firmware Flashing Script

                       Version: 0.4

-------------------------------------------------------------------

Enter C for Conbee, R for RaspBee, or press Enter now to exit: R

-------------------------------------------------------------------

Firmware available for flashing:

deCONZ_ConBeeII_0x26480700.bin.GCF
deCONZ_ConBeeII_0x26490700.bin.GCF
deCONZ_Rpi_0x261f0500.bin.GCF
deCONZ_Rpi_0x26320500.bin.GCF
deCONZ_Rpi_0x26330500.bin.GCF

Enter the firmware file name from above, including extension,
or press Enter now to exit.

File Name : deCONZ_Rpi_0x26330500.bin.GCF

-------------------------------------------------------------------

Device: RaspBee

Firmware File: deCONZ_Rpi_0x26330500.bin.GCF

Are the above device and firmware values correct?
Enter Y to proceed, any other entry to exit: Y

Flashing...

GCFFlasher V3_05 (c) dresden elektronik ingenieurtechnik gmbh
Reboot device RaspBee (RaspBee)
deCONZ firmware version 26050500
action: reset device RaspBee
action: update firmware after 2 ms
could not sync with bootloader

Flashing Error! Please re-run this script...

Similar issue here, but it ends with the following:

What am I doing wrong here?

Same issue here.

Is this actually working for anyone?

Having the same issue here. Would love to find a solution for that.

Looks like we have to wait for @marthoc to look into this. Update script is only tested on Debian-based distos but not on HassOS, which is a very much stripped down version of Linux.

Not a fix but you can update the firmware outside the docker image: https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Update-deCONZ-manually#update-in-raspbian

Yes but not on HassOS, where capabilities 'outside the docker image' are very limited. Only option is to physically remove RaspBee and update firmware in another Raspi. Or temporarily boot Raspbian and do the firmware update there. It's not a big issue but still not ideal. Just a limitation of using deCONZ Add-On with HassOS that I was not aware of.

Hi, I tried it inside the Docker image on my Raspi4 but it gives me the following
root@raspberrypi:/tmp# sudo GCFFlasher_internal -f deCONZ_Rpi_0x26350500.bin.GCF
/usr/bin/GCFFlasher_internal.bin: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found (required by /usr/lib/libwiringPi.so)

Since months I am unable to update my firmware :(((

@hmrc87 - related to #228. Updates will be posted in that issue.
With respect to HassOS, I thought it may now be possible to update the device firmware through the web interface in that Add-On (possibly not). I have discontinued work on my Home Assistant deCONZ add-on. Those images are very out of date and I will be removing them from Docker Hub so that no further confusion is caused.


Revert "Correct guid generation"

Reverts Microsoft/PowerBI-visuals-tools#131.
Just noticed this logic has already been implemented inside generateVisualGuid().

@AviSander the logic you refer  is only escaping the second part, not for the complete guid, the concatenation of name + generateVisualGuid().
If you run the test I created it will fail, see issue #129 for more details


feat(Navigation): carbon-ify the header and left nav

What kind of change does this PR introduce?
Carbonizes the header and left nav:

Did you write unit test?
I did not. (Probably deserves a separate PR since we don't have a testing framework set up).
If relevant, link to documentation update:
N/A
Summary
See #24
Other information
N/A

@kellychurchill should be all set now 🙂


Lat/Lon data crossing the international date line fails in create_cell_geometry.

Recording an issue that was registered in slack and already fixed. Reproducible example was worked into a test and is offered below for posterity. Thanks @jhammondusgs
Error was:
Error in create_cell_geometry(X_coords = X_coords, Y_coords = Y_coords,  :
 Data and geometry not found to intersect. Check projection?

Found that the data was being handled inappropriately. Required fixes for crossing the international date line, lat/loon in 0-360 range, and dealing with nearly regular vectors of positions.

Reproducible Code
```r
library(sf)
library(dplyr)
library(intersectr)
library(RNetCDF)
download.file("https://github.com/USGS-R/intersectr/files/3118249/flxf06.gdas.1979.grb2.nc.zip", "flxf06.gdas.1979.grb2.nc.zip")
unzip("flxf06.gdas.1979.grb2.nc.zip")
nc_file <- "flxf06.gdas.1979.grb2.nc"
nc <- open.nc(nc_file)
x <- var.get.nc(nc, "lon")
y <- var.get.nc(nc, "lat")
close.nc(nc)
analysis_projection <-  ncmeta::nc_gm_to_prj(ncmeta::nc_grid_mapping_atts("flxf06.gdas.1979.grb2.nc"))
geom <- read_sf("fairbanks_area/fairbanks_area.shp") %>%
st_transform(analysis_projection)
st_crs(geom)
cells <- create_cell_geometry(X_coords = X_coords, Y_coords = Y_coords,
analysis_projection, geom = geom, regularize = TRUE)
[flxf06.gdas.1979.grb2.nc.zip](https://github.com/USGS-R/intersectr/files/3118249/flxf06.gdas.1979.grb2.nc.zip)

</details>

Fixed in #9 Related to #8


Is there a way to manually pass in user_context?

I'm not using Flask-Login but I'd like to manually pass in some information for user_context, would this be possible?
Here is where it's being set in raven/contrib/flask.py

While it seems we dont (and should) expose the methods on the Sentry() wrapper, you can just call Sentry().client.user_context()

Okay thanks! Do you by any chance have a 1 liner example of how to get the
context of Sentry() to pass user_context? If possible I'd like to do it in
one of my auth methods in my User model
On Monday, April 20, 2015, David Cramer<EMAIL_ADDRESS>wrote:

Closed #600 https://github.com/getsentry/raven-python/issues/600.
—
Reply to this email directly or view it on GitHub
https://github.com/getsentry/raven-python/issues/600#event-285737841.

@ryanio
sentry = Sentry(app)
@app.before_request
def bind_user_context():
sentry.client.user_context(...)

Awesome that makes a lot of sense, thanks!
On Monday, April 20, 2015, David Cramer<EMAIL_ADDRESS>wrote:

@ryanio https://github.com/ryanio
sentry = Sentry(app)
@app.before_request
def bind_user_context():
sentry.client.user_context(...)
—
Reply to this email directly or view it on GitHub
https://github.com/getsentry/raven-python/issues/600#issuecomment-94606159
.


paddlepaddle-gpu seems not accessible

I'm on macOS, and whenever I try python3.8 -m pip install paddlepaddle-gpu I get Could not find a version that satisfies the requirement paddlepaddle-gpu (from versions: none)
$ python3.8 -m pip install paddlepaddle-gpu
ERROR: Could not find a version that satisfies the requirement paddlepaddle-gpu (from versions: none)
ERROR: No matching distribution found for paddlepaddle-gpu
``

I've searched the web and didn't find compelling solution to that problem

Have you tried installing from the baidu mirror mentioned in the PaddleOCR installation instructions here: https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_en/quickstart_en.md?
I will update the README


Full kit for federations

Produce a full kit for federations to use.

Three referees
Timekeeper
3 or 5 person jury
Support a single computer running Blue Owl with all devices connected via Ethernet.

Continental championships use 3 person jurys.  Powering off the countdown, jury and announcer laptops would be acceptable — the main issue is the trouble of having to install and keep Node up to date on the 3 devices.

Building an Electron app would at least ease that process.
Another option is to increase the cost and build time by bundling a single-board computer like a Raspberry Pi with each microcontroller. The project scope gets quite a bit bigger, but that would allow us to coordinate everything from one main computer. We can then run web servers and clients directly in Node.js and pass configurations such as the MQTT URL and the platform via custom endpoints. The individual devices could potentially even be remotely upgraded to newer versions from the main computer.
I'll create a separate issue for what we have planned for the first milestone to support the 3 person jury with each device connected directly to a laptop.

Another option would be https://github.com/fivdi/pi-io

A GUI for specific hardware builds is out of scope for this project. Commercial devices will be made available separately.


Chisel and FIRRTL

I see that Chisel(3) is the front-end and FIRRTL is the back-end of the design flow (before the real Verilog back-end). However, does this need to be exposed to a user of Chisel? Both are (now) written in Scala. Why having an extra download and $PATH setting for FIRRTL? Why not simply combining those two tools in the new and happy Scala world with sbt as driver.
If people want to see the flow from Chisel to FIRRTL and then to Verilog or hack FIRRTL transformation paths then this options shall be available. But that's a completely different story from a newbie getting feets wet with Chisel(3).
Martin

When it comes to the the current process of "installing" Firrtl and adding to the $PATH, I intend to remove this shortly. This repo now depends on Firrtl so it should be handled through Scala anyway. This is kind of an awkward implementation detail from earlier days.
A more contentious point, I'd also like to remove any notion of Verilog onward from chisel3 (and firrtl), instead having actual simulation be handled by "top-level" repos (like ucb-bar/chisel-testers).


error code -9814

Hi,
I am getting below error. Can anyone please help.
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9814)
Thanks

Hi @monish152,
I'd suggest you open a question on Stack Overflow and tag alamofire. We use our GitHub project for bug reports and feature requests.
Best of luck! 🍻

From our Contribution Guidelines
Asking Questions
We don't use GitHub as a support forum. For any usage questions that are not specific to the project itself, please ask on Stack Overflow instead. By doing so, you'll be more likely to quickly solve your problem, and you'll allow anyone else with the same question to find the answer. This also allows maintainers to focus on improving the project for others.


BUG: Resulting translation files not correct

After upgrading to 2.0.2 the files coming back are not correct.  Consider this:
https://github.com/timheuer/tacticview/pull/8/commits/0c7c1933bc89bb00ec2209e0a60fb95dc09a0516#diff-a8585a8435a28fbd36e66f9b21a54f23c255394e03998cd1bedd5d197e998dbc
This is most definitely not French (it is Finnish).  And the German (de) one came back english.  It's almost as if the first batch is 'off' a bit.  The fr and a few files after that are all still Finnish.
In my debugging I'm pretty sure this:
https://github.com/IEvangelist/resource-translator/blob/main/src/api.ts#L51
needs to be batchedLocales instead of batchCount.
But I can't figure out why then it is only getting the last request -- it's definitely issuing an API call, but the resulting translations merged are only the last call.

Fixed in this in https://github.com/IEvangelist/resource-translator/commit/068cb0320f42203e41299eccbf4b52ff2c6ccff4, the order in which the results were concatenated together were reversed.

@IEvangelist this is still happening for me.  See run: https://github.com/timheuer/tacticview/runs/1403636993?check_suite_focus=true and resulting PR.  While the groups seem to be translating correctly the final result set has empty arrays resulting in copying the last ones again: https://github.com/timheuer/tacticview/runs/1403636993?check_suite_focus=true#step:3:262

I believe that this has since been fixed. There is a new release v2.1.1 which makes many improvements. The inputs are slightly different, I'd be curious if this is still an issue or not.


fix shouldResetTickmarkLabels e2e test

Type of PR: fix
Overview of change:
Fix missed typo in method name

👍


Can't install on WSL

Hi
When running 'pip install mkdocs-with-pdf' (Jul 3 21 release from pip) on WSL on Win10 running Ubuntu 20.04 (ver 2) I get the following error from pip / pillow:
`Building wheels for collected packages: Pillow
Running setup.py bdist_wheel for Pillow ... error
Complete output from command /home/user/.env/mkdocs/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-26cvi43d/Pillow/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/tmpa6pyqilipip-wheel- --python-tag cp36:
/usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'

Failed building wheel for Pillow
Running setup.py clean for Pillow`
and then at the end
Command "/home/user/.env/mkdocs/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-26cvi43d/Pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-7gglh1tc-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/.env/mkdocs/include/site/python3.6/Pillow" failed with error code 1 in /tmp/pip-build-26cvi43d/Pillow/
Seems an option supplied with pillow needs some adjustment?

It turns out - 'wheel' was missing so I needed to do pip install wheel first and then upgrade pip as well (pip install -U pip)
You'd still hope for a user friendly message...


get_best_match returning a tuple instead of a single MatchCandidate instance

Unclear why this is happening.

Turns out I had a stray enumerate() lul


Spyder 3.6 not displaying all variables in Variable Explorer

Description
What steps will reproduce the problem?

What is the expected output? What do you see instead?
Please provide any additional information below
Version and main components

Spyder Version: 3.1.4
Python Version: 3.6.1
Qt Versions: 5.6.2, PyQt5 5.6 on Windows

Dependencies
pyflakes >=0.6.0 :  1.5.0 (OK)
pep8 >=0.6       :  1.7.0 (OK)
pygments >=2.0   :  2.2.0 (OK)
qtconsole >=4.2.0:  4.3.0 (OK)
nbconvert >=4.0  :  5.1.1 (OK)
pandas >=0.13.1  :  0.20.1 (OK)
numpy >=1.7      :  1.12.1 (OK)
sphinx >=0.6.6   :  1.5.6 (OK)
rope >=0.9.4     :  0.9.4-1 (OK)
jedi >=0.9.0     :  0.10.2 (OK)
matplotlib >=1.0 :  2.0.2 (OK)
sympy >=0.7.3    :  1.0 (OK)
pylint >=0.25    :  1.6.4 (OK)

Spyder Version: 3.1.4
Python Version: 3.6.1
When I run programs, some variables are missing in the Variable Explorer. These I have to keep printing and checking. This is quite annoying

Did you try unchecking "Exclude unsupported data types" in the options (the small button with the cogwheels icon underneath the close button of the variable explorer)?
If that does not help, can you give an example (as small as possible)?

Closing because of lack of response.


Make log viewer compatible with output in color

Summary
Container log viewer is not compatible with containers that use terminal escape code to display text in color.
Proposal
Argo CD has this feature and is using the LogsViewer component from  argo-ui package.

Would you like to submit a PR?

@alexec Unfortunately i have zero knowledge in Go and React...

I want the feature too. I’ll take care of it.


An error occurred trying to download 'https://iottools.blob.core.windows.net/iotdashboard/Windows10IoTCoreDashboard.application'.

Hi,
It seems iot dashboard setup.exe doesn't work. Something wrong with OneClick app. However, by provided link from error -  app is downloaded and works well.
Error details:
Log file:
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [NTProductType] = 1 {int}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 10.0.0 {version}
Launching Application.
URLDownloadToCacheFile failed with HRESULT '-2146697208'
Error: An error occurred trying to download 'https://iottools.blob.core.windows.net/iotdashboard/Windows10IoTCoreDashboard.application'.

Thank you for letting us know @dzhyuliuk. Do you mind filing this with our Feedback Hub? That way it's triaged? I'll also give a heads-up to the team. Thanks!
Instructions for Feedback Hub are here.

@dzhyuliuk, I checked with our team and currently this is not a known issue. Once you file this in Feedback Hub, could you provide me with the title of the issue? Thanks!


Projects not styled

The default black is still visible on most of the projects pages

Hi, I am now taking over this project. Is this still an issue?

Yes


How to properly load and read a binn object from a data buffer without too many allocations?

Hi, having troubles about figuring out how to use binn without wasting too much memory since i'm into a resource-limited environment (retrocomputing, DOS), and i want to know if opening and reading data also makes additional allocations, since i'm a bit confused how the inner works in binn.
this is my code for example:
    int mapsize = 0;
    char* mapdata = vfs_load(mapfile, &mapsize);
    if(mapdata == NULL)
        return -1;

    binn* maproot = binn_open(mapdata);
    binn_release(maproot);
    free(mapdata);

binn_open just allocates just the binn structure and nothing else and fetches the data directly from the buffer without copying?, and if is for string (i assume i have to copy them with memcpy, before i free the data buffer) and objects too?
i use mostly binn for reading map data, not writing.

As stated here:
binn_open will allocate memory for a binn structure.
binn_load accepts a pointer to a pre-allocated structure, like in the stack.
Example usage of binn_load:
  binn map;
  BOOL result = binn_load(data, &map);

If you use binn_free with the above map variable it will just clear the memory (in this case).
Do not use binn_release. It is intended to be used with fully allocated items.
binn_open makes just a single allocation of size = sizeof(binn), that can be released with binn_free
When reading a string/blob/container, it will return a pointer to a region inside the the given data. So if you release memory of data then the pointers will point to invalid memory. You can either postpone the memory release or copy the string/blob to somewhere.

so binn_release() is only used for binn_open() and only deallocates the binn structure that was allocated dynamically?

I wrote above:

Do not use binn_release !!!!


Link data_files outside virtualenv

How would this feature be useful?

I have ton of applications that are exposing not only executables but also desktop files (for menu), icons, user settings, etc. They are added into package using data_files argument to setuptools.setup. Managing all of them became real hell. If pipx had ability to link data_files for application that is installed to user folder (just like with entrypoint), it would enable me to isolate them using pipx.
Describe the solution you'd like

Create registry of data_files from application's metadata AND files which are present inside application's virtual environment (think: logical conjunction operation). They should have entry in data_files like share/applications/app.desktop which now ends up in <appvenv>/share/applications/app.desktop. Entry in data_files can be malformed and files can be installed in wrong paths hence double checking with files present in virtualenv.
Registry of linked files could be as simple as plain text file where each line is path to file in virtual environment, relative to the root of venv (like share/applications/app.desktop). It would then saved inside application's virtual environment.
During uninstall, all links will be deleted, just like it is now done with entrypoints.
Tricky part are conflicts: trying to create a link which already exists and points to different file. For me, best thing to do would be to fail and produce verbose error message to the user.
To preserve backwards compatibility, additional flag to install subcommand would be helpful, something like --link-data-files. By default set to False.
Describe alternatives you've considered

Wrapping pipx with some additional script which will do the stuff described above. However, it seems sketchy to me, better would be to integrate this functionality into pipx itself.

I think you can do a lot of this with proper packaging and use for example setuptools' datafiles (https://setuptools.readthedocs.io/en/latest/userguide/datafiles.html) or with a python freeze solution mentioned above.  This is not something we're going to implement with pipx.


Composable strategies

I have idea of "composable" strategies.
It should make simple package.json merging or split all strategies for small units.
In the case of package.json:
const packageJsonStrategy = compose({
  scripts: hashStrategy,
  dependencies: hashStrategy,
  eslint: eslintStrategy,
  ...
})

Or for mixed structures, like yaspeller:
const yaspellerStrategy = compose({
  dictionary: listStrategy,
  ...
})

For other fields define property, like default, or use regexp, or use predicates 🤷♀


Feed cluster creation status into frontend

We've received complaints that without prior experience with Claudie, it's difficult to know what's happening, whether everything is going well, and how long it should the user keep waiting.
I propose we start feeding "status updates" into Frontend somehow.
For example, a periodic GRPC call to Context box (or whatever makes sense).
At first, relaying these status updates into the Front logs might suffice.
Later, we'll be ready to display this information via a GUI, shall that be agreed upon as the path to take.
Proposed example, to help illustrate my thoughts:
$ kubectl -n claudie logs frontend -c frontend -f
10:45 inputManifest.yaml found by k8s_sidecar
10:46 inputManifest.yaml sent into context_box
10:47 Creating desired state for MyInputManifest...
10:47 Finished computing desired state for MyInputManifest
10:48 Creating infrastructure for MyInputManifest via Terraformer...
10:53 Creating infrastructure for MyInputManifest via Terraformer...
10:58 Creating infrastructure for MyInputManifest via Terraformer...
11:00 Finished creating infrastructure for MyInputManifest via Terraformer.
11:00 Creating VPN for MyInputManifest via Ansibler...
11:05 Creating VPN for MyInputManifest via Ansibler...
11:07 Finished creating VPN for MyInputManifest via Ansibler.
11:07 Creating Kubernetes cluster myCluster1 of MyInputManifest via Kube-eleven...
11:07 Creating Kubernetes cluster myCluster2 of MyInputManifest via Kube-eleven...
11:12 Creating Kubernetes cluster myCluster1 of MyInputManifest via Kube-eleven...
11:12 Creating Kubernetes cluster myCluster2 of MyInputManifest via Kube-eleven...
11:17 Creating Kubernetes cluster myCluster1 of MyInputManifest via Kube-eleven...
11:17 Creating Kubernetes cluster myCluster2 of MyInputManifest via Kube-eleven...
11:19 Finished creating Kubernetes cluster myCluster1 of MyInputManifest via Kube-eleven.
11:19 Finished creating Kubernetes cluster myCluster2 of MyInputManifest via Kube-eleven.
11:19 Provisioning Kubernetes cluster myCluster1 of MyInputManifest via Kuber and Ansibler...
11:19 Provisioning Kubernetes cluster myCluster2 of MyInputManifest via Kuber and Ansibler...
11:21 Finished provisioning Kubernetes cluster myCluster1 of MyInputManifest via Kuber and Ansibler.
11:21 Finished provisioning Kubernetes cluster myCluster2 of MyInputManifest via Kuber and Ansibler.
11:21 Kubeconfig for myCluster1 of MyInputManifest is now available as Kubernetes Secret ${kubeconfig1_secret_name}. Happy kubing!
11:21 Kubeconfig for myCluster2 of MyInputManifest is now available as Kubernetes Secret ${kubeconfig2_secret_name}. Happy kubing!

We like the idea of the feature itself, but we need to think about how to implement this from the inter-dependency point of view, so as not to product too much spaghetti code, and not have too many dependencies from one microservice to another.

Idea: We could introduce a WorkflowState (This would Replace the Error field in database) that would contain 2 values
type Stage string
const (
 Terraformer Stage = "..."
 Ansibler Stage = "..."
 ...
)

type WorkflowState struct {
 Stage Stage
 Error error
}

This would be stored in MongoDB where frontend would pull this value from context-box in some interval and display the values in the frontend service in more readable form
This values would be updated by the builder service, after every completed step it would call context-box to update the state. e.g. after terraformer finishes builder makes a call to context-box to update the state.
Since context-box is the only service that has access to the DB it could also have states when scheduler picks-up or stores the config, and same for builder
Thoughts ? @MiroslavRepka

I like the idea and the implementation, I had a similar one in my head for a while now :). However, there are a few states for each service, i.e. in Ansible Setting up the VPN, or Setting up the Loadbalancers, etc for each Input manifest. These states might be even more granular, i.e. on per cluster bases, like  Setting up the VPN for Cluster1 and VPN has been set up for Cluster2. This might get tricky to manage, especially when an error occurs, although it depends on how much information we want to pass on to the user.
Overall I think this is the right direction. :)


Prepare for next development iteration

Purpose

Prepare for next development iteration
Add Ballerina Module.md

Codecov Report

Merging #958 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #958   +/-   ##
=======================================
  Coverage   46.02%   46.02%
=======================================
  Files          26       26
  Lines        2501     2501
=======================================
  Hits         1151     1151
  Misses       1090     1090
  Partials      260      260

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 83e2035...383e9a5. Read the comment docs.


App doesn't run in the background

It would be cool to keep the app running in the background so that you get notifications on your PC when you get texts. Similar to the way iMessage works on mac

Could I also suggest having an option to enable starting on boot in the background?
With Linux it could be as simple as adding an option to have a -b argument when starting the binary that tells it to start in the background?

Yeah that would be great. Send in a PR!
On Sat, Jul 14, 2018 at 4:35 PM Alex Botelho<EMAIL_ADDRESS>wrote:

Could I also suggest having an option to enable starting on boot in the
background?
With Linux it could be as simple as adding an option to have a -b argument
when starting the binary that tells it to start in the background?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/reyesalex/Android-Messages-Desktop-UNOFFICIAL/issues/2#issuecomment-405056493,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGsQ3ZiQHmkJK-qpoRn3lrexo14EBgBoks5uGoA2gaJpZM4U3MN5
.


Stop Django >=1.10.1 from ignoring form submissions of StreamFields with default values

Fixes #2994
The story in brief: a change to the ModelForm logic in Django 1.10 meant that, as of Django 1.10.1, there's an explicit "is this field present in the form submission" check. (If it isn't present, and the model field has a default, it falls back on the default value.)
Django 1.10.1 does this in a fairly crude way, by looking for an item in the postdata matching the field name, with a special case for checkbox widgets (which set the flag dont_use_model_field_default_for_empty_data to indicate that they might be legitimately absent from the form submission). This broke various widgets that map themselves to HTML form fields in non-trivial ways, including StreamField's BlockWidget.
https://github.com/django/django/pull/7217 (due for Django 1.10.2, but not yet merged into stable/1.10.x at the time of writing) fixes this in a more robust way by having widgets provide a value_omitted_from_data method to report whether the field is considered missing.
This PR thus provides two separate fixes - for both the 1.10.1 and forthcoming 1.10.2 implementations - to persuade ModelForm that the StreamField really is present on the form despite not having a field in postdata that exactly matches its name.

Merged in 869349f86c9eea55ab277d237fd136b6a5721d00 (master) / 8e67d2d56aab3cf8e4aada575fab602314d4a6dc (1.6.x)


Check if file exists when executable path is passed in through jib dockerClient.executable

Currently, in order to verify if the docker path provided (either default or specified by the user) is installed correctly, we actually run the executable. The side effect of this is that any arbitrary executable can be executed by Jib.
This PR avoids the need to run the executable by using Files.isExecutable which verifies if the path provided exists and the JVM has the correct permissions to execute the path. However in the case of verifying whether docker is on PATH, running the docker command seems unavoidable at the moment. Reasoning in https://github.com/GoogleContainerTools/jib/pull/3744#discussion_r955307325
Verified with ./gradlew jib-gradle-plugin:integrationTest

Thank you for the review @elefeint! Changes also succeeded on continuous build. The integration tests cover both scenarios: when default docker is installed and when docker executable is provided.  Will be merging this PR.


General issues observed/improvements needed

Short battery life. ~ 10% and 0.08 V depletion over 22 hours on a reasonably sunny day (though low sun angle in winter)
Water level sensor leads too short and brittle for plug/socket to be easily connected. One solder joint broke on sensor after assembly.
Would be better to be able to twist top end cap or whole unit to face south. Solar panel cable comes out of one side and prevents rotation. Could end caps be assembled without epoxy?
Top end cap needs to be heightened to avoid plug bolt hitting solar panel.
Epoxying solar cable penetration instead of using a gland seal may be a failure point
Birds likely to sit on solar panel and deposit sunblock

Note: short battery life is with 4,400 mah battery and 6-min transmission interval. Change to 60-min interval for sake of longevity.

Add an on/off switch

If powering down for longer periods to save power, change cell mode (to, e.g., ULP and don't use standby). See https://docs.particle.io/reference/device-os/sleep/


FPS setting

In the Evo 64px data sheet, there are two operating modes: “Fast” and “Close-range”. Where is the frames/second setting?

Hello @ncrasta,
Please contact our support team at<EMAIL_ADDRESS>Thanks,
Baptiste


Sampling with floating-point distributions seems to be significantly slower

Not sure if this is expected or if it's a bug.
python -m timeit -s "from fldr import fldr_preprocess; from fldr import fldr_sample; l = range(10000); x = fldr_preprocess([1 for _ in l])" "fldr_sample(x)"

50000 loops, best of 5: 6 usec per loop
python -m timeit -s "from fldr import fldrf_preprocess; from fldr import fldr_sample; l = range(10000); x = fldrf_preprocess([1/len(l) for _ in l])" "fldr_sample(x)"

50 loops, best of 5: 5.1 msec per loop

Thanks for the runtime measurements.  These numbers are in line with expectation for preprocessing floats, since the floating-point algorithm (which itself is not very optimized) is significantly more expensive than the integer arithmetic algorithm.
The implementation in C is much faster.  We should consider using e.g., Cython to create a Python API.

Ok, thanks.
FYI the runtime measurements only include sampling, not preprocessing. I also noted that using the alternative floating-point algorithm mentioned in #4 resulted in runtimes much more comparable to the integer algorithm.
python -m timeit -s "from fldr.fldrf import fldr_preprocess_float_c as fldrf_preprocess; from fldr import fldr_sample; l = range(10000); x = fldrf_preprocess([1/len(l) for _ in l])" "fldr_sample(x)"

50000 loops, best of 5: 7.16 usec per loop
Thanks again for the great work.

Thanks again for confirming.  I will change the default implementation to use the alternative preprocessing algorithm in light of #4 and #5.

FYI the runtime measurements only include sampling, not preprocessing.
Good point, I missed the fact that your timeit script uses -s for "setup".


Light separation / Albedo demodulation

Brief Description
This PR separates light output from the ray tracing stage into separate diffuse and specular light buffers. In addition, albedo is demodulated from the ray tracing step and is added during the post-processing stage. This technique is a necessary precursor for spatial filtering, and it also improves visual quality across the board.
Note: This PR reduces performance by ~10% on mid-range devices. However, the advantages the technique brings outweigh the performance penalty.
Advantages:

Improved temporal filter. As a result of the light separation, this PR now temporally filters different amounts for diffuse and specular light. This means diffuse surfaces, which reflect light the same amounts in all directions, can use a long temporal filter. And specular surfaces can filter in line with their roughness property. This drastically reduces noise and improves visual quality.

Full resolution textures. Albedo is now always rasterized at full resolution, since its now only applied in the post-processing step.

This PR also opens the door for some fast to implement future improvements

Mip mapping. Since albedo is now entirely rasterized, it supports mip mapping and anisotropic filtering. This can be enabled to get rid of aliasing from textures. But since we still use progressive rendering, the max mip level needs to be increased as frames are rendered so as not to overblur textures.

Improve temporal reprojection. Currently, history samples are only rejected if the mesh IDs don't match. This leads to a lot of temporal artifacts for models with shared geometry in a single mesh, which is made especially prevalent by the increased temporal filtering strength of this PR. We can improve the reprojection by rejecting history if positions and normals don't match.

The shadow catcher is no longer supported. It is tricky (but not impossible) to implement with decoupled lighting. We are thinking it might make the most sense to remove the shadow catcher from the renderer and instead add support for Three.js fog. Fog can achieve similar looks to the shadow catcher, but in a more physically based way.

Since we won't take full advantage of the PR until these features are also in, is it best to create separate PRs for these features to merge into this branch? At that point we can merge the entire thing in to master when it's ready. Otherwise, we'd be merging this PR with a 10% performance hit that's not providing as much as a visual boost as theoretically possible.
Pull Request Guidelines

[x] I have added pull requests labels which describe my contribution.
[x] All existing tests passed.

[ ] I have added tests to cover my changes, of which pass.

[x] I have compared the render output of my branch to master.
[x] My code has passed the ESLint configuration for this project.
[x] My change requires modifications to the documentation.

[ ] I have updated the documentation accordingly.

I ran all the example scenes on my machine:
Windows 10
Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, 2601 Mhz, 6 Core(s), 12 Logical Processor(s)
GeForce RTX 2060

My observations are not based on precise measurements:

The render converges very fast, faster than I remember.
The Lee Perry Smith Head and Georgia Tech Dragon look very smooth on the lit areas, and edges are super sharp. Very little grain in the shadowed areas.
Speed of convergence was the most evident in the PBR spheres scene. Less than 3 seconds.
I don't remember the renderer-test scene looking as great as it does now.
No errors on the console.

Like you said, there's no more shadow catcher. I believe that Design Pro scenes use it. Would we be able to merge this PR then?

@carlos-lopez-garces Thanks a lot for giving this a run. It's good to confirm it runs well on high end devices.
I've been really confused about the next possible steps for the renderer. Everything in this PR will be used in the future, so I think it's great to review and to confirm everything works.. But I need a couple days to do some more investigation into spatial denoising. After that I can summarize my thoughts to the team and we can figure out if we want to merge this PR before or after spatial denoising.

Like you said, there's no more shadow catcher. I believe that Design Pro scenes use it. What would be the alternative for Design Pro?
Noah was prototyping it, and we think a simple fog implementation that blends the render with the environment map could replace the shadow catcher.  It shouldn't be too hard to implement proper.


Fix wrong handling of npm content retrieving through folo service

NPM content retrieving has its own logic now, but current folo service does not use it yet for npm cases. So this pr fix it by adding a new folo resource for npm cases.

Oops, pr in wrong branch. Close this.


pytorch 0.4 support

I think the pytorch version is >0.4, but I get the following error
======================================================================
ERROR: test_ptclassifier (attacks.carlini_unittest.TestCarliniL2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data1/helend/lucasgyshen/adversarial-robustness-toolbox/art/attacks/carlini_unittest.py", line 268, in test_ptclassifier
    ptc.fit(x_train, y_train, batch_size=batch_size, nb_epochs=1)
  File "/data1/helend/lucasgyshen/adversarial-robustness-toolbox/art/classifiers/pytorch.py", line 143, in fit
    (_, m_batch) = self._model(i_batch)
  File "/data1/helend/anaconda3/envs/lucasgyshen/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/data1/helend/lucasgyshen/adversarial-robustness-toolbox/art/attacks/carlini_unittest.py", line 46, in forward
    x = self.pool(F.relu(self.conv(x)))
  File "/data1/helend/anaconda3/envs/lucasgyshen/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/data1/helend/anaconda3/envs/lucasgyshen/lib/python3.5/site-packages/torch/nn/modules/conv.py", line 301, in forward
    self.padding, self.dilation, self.groups)
RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #2 'weight'

I think it is because of the new feature of pytorch 0.4. Can you fix it? Thank you.

Thanks for letting us know! We'll try to support PyTorch 0.4 soon.

I think it's because of PyTorch's from_numpy() function, which casts the numpy array to a CPU tensor. If the model is running on CUDA, which happens if PyTorch detects a CUDA-compatible GPU:
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
self._model.to(device)

then there's a mismatch (torch.FloatTensor vs torch.cuda.FloatTensor).
The solution is to cast CPU tensors to CUDA tensors with .to(device) and convert them to CPU tensors with .cpu(). before converting them to numpy arrays. If the environment does not support CUDA, both .to() and .cpu() do nothing.

Thanks, @samuelemarro! I'll try your solution and see if it works for both PyTorch 0.3 and 0.4.

Hi! Any update on this? Thanks

I just pushed a fix (commit 51a001c). @sunlightsgy, @marcociccone, let me know if the issue is solved for you. @samuelemarro I used your solution, thanks for that!


Add GitHub Actions workflow to automate release creation on tagged pushes

[x] Do only one thing
[x] Non-breaking API changes
[x] Tested

What did this pull request do?
This pull request adds a GitHub Actions workflow that automatically creates a GitHub release whenever a new tag is pushed to the repository. This automation ensures that every tagged version has a corresponding release, simplifying the release management process and making it easier for users to access specific versions of the GORM library.
User Case Description
Motivation
Currently, releases may not be consistently created for every tagged version, which can lead to confusion for users looking to download specific versions of GORM. Automating the release creation process ensures that releases are always up-to-date with the latest tags.
Implementation Details

Workflow File Added: .github/workflows/release-on-tag.yml
Trigger: The workflow triggers on any push to a tag pattern ('*'), i.e., when a new tag is pushed.
Actions Used:

actions/create-release@v1: Creates a new GitHub release based on the pushed tag.

Benefits

Consistency: Ensures that every tag has a corresponding release.
Automation: Reduces manual work for maintainers by automating the release process.
User Experience: Improves accessibility for users who rely on GitHub releases to download specific versions.

How did you test this code?

Forked Repository Testing: Tested the workflow in my forked repository by pushing new tags and verifying that releases are automatically created.
Existing Release Handling: Confirmed that the workflow handles the case where a release already exists without failing.
Workflow Logs: Monitored the workflow runs to ensure that all steps execute as expected and that appropriate messages are logged.

Additional Notes

Non-Breaking Change: This addition does not introduce any breaking changes to the API or existing functionality.
Single Responsibility: The pull request focuses solely on adding the release automation workflow.
Documentation: Included comments within the workflow file for clarity.
Contribution Guidelines: Reviewed the contribution guidelines to ensure compliance.

Hi,
I've noticed that the CI tests are failing on this pull request. I've only added a GitHub Actions workflow file to automate release creation on tagged pushes and haven't modified any application code or tests.
I checked the CI logs but couldn't identify how my changes might have caused the failures. It seems the test failures might be unrelated to this PR.
Could someone please take a look or advise me on how to proceed?
Thank you!


Removed version syntax as its no longer needed per Docker Docs

Pull Request Checklist

[x] Target branch: Pull requests should target the dev branch.
[x] Description: Briefly describe the changes in this pull request.
[x] Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
[x] Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
[x] Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
[x] Testing: Have you written and run sufficient tests for the changes?

Description
Removes version: syntax in docker-compose files. If left in, it throws an obsolete warning. I removed them from the docker-compose files to reduce unnecessary warnings and to keep the code up to current standards. See Version top-level element (obsolete) for reference.

Changelog Entry
Added

N/A

Fixed

N/A

Changed

N/A

Removed

Removed version: from docker-compose files due to the syntax being obsolete.

Security

N/A

Breaking Changes

N/A

Additional Information

Version top-level element (obsolete) for reference.

Thanks everyone!


Fastnlight: Watch iptvspotlight.com

Fastnlight requests the watch of the watch_keyword iptvspotlight\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

iptvspotlight\.com has been seen in 0 true positives, 0 false positives, and 0 NAAs.

Approved by Jeff Schaller in Charcoal HQ


Prevent Stack from creating a network

Question:
I am running Portainer on a plain Docker without Swarm and Compose. I am using the Stack feature to create my stacks. I have a bunch of stacks but all of them should be within the same network. This is working with network_mode but the stack will always have it's own network next to this called stackname_default.
Is there a way to prevent a stack from creating a default network?

Looking at docker doc, compose will always try to create a default network for your stack.
Seemsy ou can only prevent it by saying your stack should use a pre-existing network

@r7l please only report bugs and feature requests here.
For any Docker/Portainer usage questions, please join our community channel at https://portainer.slack.com

@deviantony Well, there is an option here called Question and i am already on slack but when i was asking a question there i was completely ignored. I only see one barely used channel there but i won't come to ask a question again.