Python client hangs on first connection, on Ubuntu Server 18 and Ubuntu Server 20 but not on Ubuntu Server 16.

What version of gRPC and what language are you using?
gRPC: v1.31.0, Python
What operating system (Linux, Windows,...) and version?
Ubuntu Server 16.04,
Ubuntu Server 18.04,
Ubuntu Server 20.04,
Windows 10 Enterprise
What runtime / compiler are you using (e.g. python version or version of gcc)
gcc (Ubuntu 5.4.0-6ubuntu1 16.04.12) 5.4.0 20160609 - Python 3.5.2
gcc (Ubuntu 7.5.0-3ubuntu1 18.04) 7.5.0 - Python 3.6.9
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0 - Python 3.8.2
N/A - Python 3.8.5
What did you do?
I ran the gRPC Quick Start tutorial in Python on 4 separate virtual machines. The machines are Ubuntu Server 16, 18, 20, and Windows 10 Enterprise.
What did you expect to see?
I expect a simple hello world client-server example to execute in less than ~1 second.
What did you see instead?
For the Ubuntu Server 16 and Windows 10 Enterprise this is the case. However for Ubuntu server 18 and 20 the simple grpc/examples/python/helloworld/greeter_client.py takes around 45 seconds to respond.
Given the nature of this problem (no error is encountered and hence no error trace) there is not much in the form of output. The program completes successfully, but in a period of time that is troublesome. So, if you introduce an error via a KeyboardInterrupt while the client is hanging you will receive:
  File "greeter_client.py", line 37, in <module>
    run()
  File "greeter_client.py", line 31, in run
    response = stub.SayHello(helloworld_pb2.HelloRequest(name='you'))
  File "/home/james/.local/lib/python3.8/site-packages/grpc/_channel.py", line 824, in __call__
    state, call, = self._blocking(request, timeout, metadata, credentials,
  File "/home/james/.local/lib/python3.8/site-packages/grpc/_channel.py", line 813, in _blocking
    event = call.next_event()
  File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 338, in grpc._cython.cygrpc.SegregatedCall.next_event
  File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 169, in grpc._cython.cygrpc._next_call_event
  File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 163, in grpc._cython.cygrpc._next_call_event
  File "src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi", line 63, in grpc._cython.cygrpc._latent_event
  File "src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi", line 42, in grpc._cython.cygrpc._next
KeyboardInterrupt

Some additional notes:
I have also ran the Python client and Go server combination and the issue is still present. I then ran the Go client with Python server and there is no issue. I run the Python client and JavaScript server and the issue is present. I run JavaScript client and Python server and there is no issue. Therefore, the issue may be said to exist with the Python client.
I have tested all of these using Virtual Box. I have also ran tests locally in a debugger and set break points where the code is hanging on (see HANGS HERE ASSIGNING response OBJECT):
from __future__ import print_function
import logging

import grpc

import helloworld_pb2
import helloworld_pb2_grpc

def run():
    # NOTE(gRPC Python Team): .close() is possible on a channel and should be
    # used in circumstances in which the with statement does not fit the needs
    # of the code.
    with grpc.insecure_channel('localhost:50051') as channel: # added break
        stub = helloworld_pb2_grpc.GreeterStub(channel) # added break
        response = stub.SayHello(helloworld_pb2.HelloRequest(name='you')) # added break - HANGS HERE ASSIGNING `response` OBJECT
    print("Greeter client received: " + response.message) # added break

if __name__ == '__main__':
    logging.basicConfig()
    run()

Something interesting to note above is that adding additional response = stub.SayHello(helloworld_pb2.HelloRequest(name='you')) and calling the server multiple times makes no noticeable difference to execution time. What I mean here is that the issue seems to be a connection issue, once connected subsequent calls to execute immediately. This behavior may be verified with the route_guide example where multiple calls are made from the route_guide_client.py and it is obvious only the first call hangs on Ubuntu Server  20. I also followed a random online tutorial which echos a message and the client I wrote "from scratch" was still hanging on first connect.
In my estimation the root of the issue is (broadly) either a Python problem or a Linux problem (since the gRPC version is never changed from v1.31.0). So in an attempt to rule one of these out, I upgraded the Python version on the Ubuntu Server 16 box (recall there the gRPC Python Quick Start is working as expectred) to Python 3.7 (which was built from source). There is no issue, which leads me to believe there was some change introduced in Ubuntu 18 and still present in Ubuntu 20 which causes the initial connection to hang instead of connecting in a reasonable time. To complicate matters further, I ran a similar test in which I completed the gRPC Python Quick Start on an Ubuntu 20 VM hosted on GCP and there was NO issue present. Although I am confident it will be reproducible running Virtual Box on Ubuntu 20 Desktop; since with the right software combination on my local machine I can get the Python client code to either run without hanging or hang upon first connection.
Anything else we should know about your project / environment?
I am running Virtual Box 6.1 on Ubuntu Desktop 20.04. I downloaded all Ubuntu .iso images from Canonical this afternoon (Aug 28, 2020) including Ubuntu 20 Desktop and performed all of these tests on the host with a "fresh", minimal install of Ubuntu 20 Desktop. The Windows image is the official developer environment .ova file from Microsoft.
Thanks,
James

Thank you for the in depth investigation. It does look like a connection issue. To further debug, can I ask you to produce a trace log on your environment? To turn on trace log, please set environment variables GRPC_VERBOSITY=debug and GRPC_TRACE=all (read more).

No problem.
Here is the amended version of the client I just ran on my local machine.
# Copyright 2015 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""The Python implementation of the GRPC helloworld.Greeter client."""

from __future__ import print_function
import logging

import grpc

import helloworld_pb2
import helloworld_pb2_grpc

def run():
    # NOTE(gRPC Python Team): .close() is possible on a channel and should be
    # used in circumstances in which the with statement does not fit the needs
    # of the code.
    with grpc.insecure_channel('localhost:50051') as channel:
        stub = helloworld_pb2_grpc.GreeterStub(channel)
        response_0 = stub.SayHello(helloworld_pb2.HelloRequest(name='you'))
        stub = helloworld_pb2_grpc.GreeterStub(channel)
        response_1 = stub.SayHello(helloworld_pb2.HelloRequest(name='you'))
        stub = helloworld_pb2_grpc.GreeterStub(channel)
        response_2 = stub.SayHello(helloworld_pb2.HelloRequest(name='you'))
    print("Greeter client received: " + response_0.message)
    print("Greeter client received: " + response_1.message)
    print("Greeter client received: " + response_2.message)

if __name__ == '__main__':
    logging.basicConfig()
    run()

As I mentioned, I added 2 additional request/responses which contribute almost none to the overall execution time.

output.txt

I cannot paste the output as it exceeds the maximum length allowed. @lidizheng Please let me know if you have trouble accessing the file.

@jameOne It seems the resolver is having trouble with localhost:50051.

Can you check if localhost is set properly in your environment?
Can you try a different resolver by setting environment variable GRPC_DNS_RESOLVER=native?

D0831 13:09:27.577593604    6445 dns_resolver_ares.cc:184]   (c-ares resolver) resolver:0x55eaa9dbd8a0 AresDnsResolver::StartLocked() is called.
D0831 13:09:27.577596674    6445 grpc_ares_wrapper.cc:645]   (c-ares resolver) request:0x55eaa9d99b80 c-ares grpc_dns_lookup_ares_locked_impl name=localhost:50051, default_port=https
D0831 13:09:27.577653493    6445 grpc_ares_ev_driver.cc:158] (c-ares resolver) request:0x55eaa9d99b80 grpc_ares_ev_driver_create_locked
D0831 13:09:27.577679913    6445 grpc_ares_wrapper.cc:200]   (c-ares resolver) request:0x55eaa9d99b80 create_hostbyname_request_locked host:localhost port:33731 is_balancer:0 qtype:AAAA
D0831 13:09:27.577725082    6445 grpc_ares_wrapper.cc:200]   (c-ares resolver) request:0x55eaa9d99b80 create_hostbyname_request_locked host:localhost port:33731 is_balancer:0 qtype:A
D0831 13:09:27.577736032    6445 grpc_ares_wrapper.cc:227]   (c-ares resolver) request:0x55eaa9d99b80 on_hostbyname_done_locked qtype=A host=localhost ARES_SUCCESS
D0831 13:09:27.577740632    6445 grpc_ares_wrapper.cc:273]   (c-ares resolver) request:0x55eaa9d99b80 c-ares resolver gets a AF_INET result:
  addr: <IP_ADDRESS>
  port: 50051

D0831 13:09:27.577745522    6445 grpc_ares_ev_driver.cc:392] (c-ares resolver) request:0x55eaa9d99b80 new fd: c-ares fd: 10
D0831 13:09:27.577748092    6445 grpc_ares_ev_driver.cc:98]  (c-ares resolver) request:0x55eaa9d99b80 Ref ev_driver 0x55eaa9cfd900
D0831 13:09:27.577750552    6445 grpc_ares_ev_driver.cc:406] (c-ares resolver) request:0x55eaa9d99b80 notify read on: c-ares fd: 10
D0831 13:09:27.577753342    6445 grpc_ares_ev_driver.cc:463] (c-ares resolver) request:0x55eaa9d99b80 ev_driver=0x55eaa9cfd900 grpc_ares_ev_driver_start_locked. timeout in 120000 ms
D0831 13:09:27.577755682    6445 grpc_ares_ev_driver.cc:98]  (c-ares resolver) request:0x55eaa9d99b80 Ref ev_driver 0x55eaa9cfd900
D0831 13:09:27.577763612    6445 grpc_ares_ev_driver.cc:227] (c-ares resolver) request:0x55eaa9d99b80 ev_driver=0x55eaa9cfd900. next ares process poll time in 1000 ms
D0831 13:09:27.577765852    6445 grpc_ares_ev_driver.cc:98]  (c-ares resolver) request:0x55eaa9d99b80 Ref ev_driver 0x55eaa9cfd900
D0831 13:09:27.577773282    6445 dns_resolver_ares.cc:448]   (c-ares resolver) resolver:0x55eaa9dbd8a0 Started resolving. pending_request_:0x55eaa9d99b80

Re: localhost I simply ran /bin/bash ping localhost and received:

PING localhost (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from localhost (<IP_ADDRESS>): icmp_seq=1 ttl=64 time=0.026 ms
64 bytes from localhost (<IP_ADDRESS>): icmp_seq=2 ttl=64 time=0.014 ms
64 bytes from localhost (<IP_ADDRESS>): icmp_seq=3 ttl=64 time=0.024 ms
64 bytes from localhost (<IP_ADDRESS>): icmp_seq=4 ttl=64 time=0.031 ms
64 bytes from localhost (<IP_ADDRESS>): icmp_seq=5 ttl=64 time=0.026 ms
^C
--- localhost ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4102ms
rtt min/avg/max/mdev = 0.014/0.024/0.031/0.005 ms

There is no latency observed when running the above command.

I set the GRPC_DNS_RESOLVER=native environment variable (in addition to export GRPC_VERBOSITY=debug and GRPC_TRACE=all) as suggested and received the following output:

D0831 14:53:22.754569347    3970 ev_posix.cc:175]            Using polling engine: epollex
D0831 14:53:22.754635387    3970 lb_policy_registry.cc:40]   registering LB policy factory for "grpclb"
D0831 14:53:22.754642207    3970 lb_policy_registry.cc:40]   registering LB policy factory for "cds_experimental"
D0831 14:53:22.754645947    3970 lb_policy_registry.cc:40]   registering LB policy factory for "eds_experimental"
D0831 14:53:22.754652687    3970 lb_policy_registry.cc:40]   registering LB policy factory for "lrs_experimental"
D0831 14:53:22.754656507    3970 lb_policy_registry.cc:40]   registering LB policy factory for "priority_experimental"
D0831 14:53:22.754659027    3970 lb_policy_registry.cc:40]   registering LB policy factory for "weighted_target_experimental"
D0831 14:53:22.754661947    3970 lb_policy_registry.cc:40]   registering LB policy factory for "xds_routing_experimental"
D0831 14:53:22.754664507    3970 lb_policy_registry.cc:40]   registering LB policy factory for "pick_first"
D0831 14:53:22.754667597    3970 lb_policy_registry.cc:40]   registering LB policy factory for "round_robin"
D0831 14:53:22.754671117    3970 dns_resolver.cc:307]        Using native dns resolver
D0831 14:53:22.754851517    3970 dns_resolver.cc:262]        Start resolving.
I0831 14:53:22.755379187    3970 subchannel.cc:1085]         New connected subchannel at 0x55d537f7c120 for subchannel 0x7fa83c002f20
Greeter client received: Hello, you!
Greeter client received: Hello, you!
Greeter client received: Hello, you!

The response from the client was seemingly instantaneous i.e. it has solved the issue of hanging on first request, on my system (Ubuntu 20.04 Desktop). I will leave it to you @lidizheng to close the issue as I am assuming this was in fact a bug and not some how an issue with my process environment. I think you have narrowed it down to DNS resolution given there was NO latency with that last run.
Thanks for the quick response time.

@apolcyn Can you help to take a look why C-Ares takes more than 1 minute to connect to localhost?

The noteworthy thing from the log is:
D0831 13:10:45.577299339    6449 grpc_ares_wrapper.cc:285]   (c-ares resolver) request:0x55eaa9d99b80 on_hostbyname_done_locked: C-ares status is not ARES_SUCCESS qtype=AAAA name=localhost is_balancer=0: Timeout while
 contacting DNS servers

I'm guessing that the IPv4 localhost resolution worked instantaneously because it probably read directly from the local /etc/hosts file. However, the IPv6 answer was not in /etc/hosts and hence the query to the DNS server. The strange thing is why c-ares was unable to receive and responses from the DNS server that it discovered, though. Likely things got tripped up on either:
a) c-ares resolved the incorrect DNS server address from the local configuration
b) c-ares resolved the correct address of the the local DNS server, but the DNS server or the network that it's on is for some reason unavailable.
@jameOne if you have a packet trace, e.g.:
tcpdump -i <name of primary network interface here> 'port 53'

that may also give some insight
It may also be interesting if you could share the contents of your /etc/resolve.conf files.

@apolcyn I will certainly attach those items. I am very curious as to what is causing this issue on my system. It does not seem terribly common and is a bit beyond me so thanks to all for helping me troubleshoot. Hopefully it ends up being worth tour time.
FYI I am now away from my computer for a couple days and will post these items when I return. Thanks again.

@apolcyn I see a smiliar behavior on Windows 10 Enterprise with C#. So it might be a problem with c-core. The code tested is minimal but using grpclb. The request happens at 17:56:18 and is stalled until 17:56:29 with only timer stuff in between. I put a breakpoint in the DNS server code and it also only received the request after those 10 seconds and responded immediately.
public static async Task Main(string[] args)
{
  Environment.SetEnvironmentVariable("GRPC_VERBOSITY", "DEBUG");
  Environment.SetEnvironmentVariable("GRPC_TRACE", "all");
  using var logger = TextWriter.Synchronized(File.CreateText("test.txt"));
  GrpcEnvironment.SetLogger(new TextWriterLogger(logger));

  Channel channel = new Channel("dns://<IP_ADDRESS>:8010/test.my-company.com", ChannelCredentials.Insecure, new[]
  {
    new ChannelOption("grpc.lb_policy_name", "grpclb"),
    new ChannelOption("grpc.service_config", "{\"serviceConfig\":{\"load_balancing_config\":{ \"grpclb\": {} },\"waitForReady\":true}}"),
    new ChannelOption("grpc.dns_enable_srv_queries", 1)
  });

  var client = new Delay.DelayClient(channel);
  var reply = await client.TestDelayAsync(new DelayRequest{Ticks = DateTime.UtcNow.Ticks});
  Console.WriteLine("Ticks: " + reply.Ticks);
  reply = await client.TestDelayAsync(new DelayRequest{Ticks = DateTime.UtcNow.Ticks});
  Console.WriteLine("Ticks: " + reply.Ticks);

  await channel.ShutdownAsync();
  Console.WriteLine("Press any key to exit...");
  Console.ReadKey();
}

test.txt

@Falco20019 you're issue also seems strange, however mainly because it's on Windows, I'm not sure it's the same issue that @jameOne is running into.
That said, from the test.txt log:
$ cat test.txt | grep 'c-ares resolver' | grep grpc_ares_wrapper.cc
D0901 17:56:18.733932 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:648: (c-ares resolver) request:000002BB3EE73860 c-ares grpc_dns_lookup_ares_locked_impl name=test.my-company.com, default_port=https
D0901 17:56:18.745498 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:429: (c-ares resolver) request:000002BB3EE73860 Using DNS server <IP_ADDRESS>:8010
D0901 17:56:18.746775 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:203: (c-ares resolver) request:000002BB3EE73860 create_hostbyname_request_locked host:test.my-company.com port:47873 is_balancer:0 qtype:AAAA
D0901 17:56:29.989310 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:203: (c-ares resolver) request:000002BB3EE73860 create_hostbyname_request_locked host:test.my-company.com port:47873 is_balancer:0 qtype:A
D0901 17:56:43.051926 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:300: (c-ares resolver) request:000002BB3EE73860 on_srv_query_done_locked name=_grpclb._tcp.test.my-company.com ARES_SUCCESS
D0901 17:56:43.051952 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:304: (c-ares resolver) request:000002BB3EE73860 ares_parse_srv_reply: 0
D0901 17:56:43.051995 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:203: (c-ares resolver) request:000002BB3EE73860 create_hostbyname_request_locked host:lb.my-company.com port:18975 is_balancer:1 qtype:AAAA
D0901 17:56:56.220586 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:203: (c-ares resolver) request:000002BB3EE73860 create_hostbyname_request_locked host:lb.my-company.com port:18975 is_balancer:1 qtype:A
D0901 17:57:09.181271 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:229: (c-ares resolver) request:000002BB3EE73860 on_hostbyname_done_locked qtype=A host=lb.my-company.com ARES_SUCCESS
D0901 17:57:09.181319 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:276: (c-ares resolver) request:000002BB3EE73860 c-ares resolver gets a AF_INET result:
D0901 17:57:09.195026 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:286: (c-ares resolver) request:000002BB3EE73860 on_hostbyname_done_locked: C-ares status is not ARES_SUCCESS qtype=AAAA name=test.my-company.com is_balancer=0: DNS server returned answer with no data
D0901 17:57:09.195320 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:286: (c-ares resolver) request:000002BB3EE73860 on_hostbyname_done_locked: C-ares status is not ARES_SUCCESS qtype=A name=test.my-company.com is_balancer=0: DNS server returned answer with no data
D0901 17:57:09.196111 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:286: (c-ares resolver) request:000002BB3EE73860 on_hostbyname_done_locked: C-ares status is not ARES_SUCCESS qtype=AAAA name=lb.my-company.com is_balancer=1: DNS server returned answer with no data
I0901 17:57:09.196649 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:130: (c-ares resolver) request:000002BB3EE73860 c-ares address sorting: input[0]=<IP_ADDRESS>:8010
I0901 17:57:09.197446 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:130: (c-ares resolver) request:000002BB3EE73860 c-ares address sorting: output[0]=<IP_ADDRESS>:8010

The 11 second jump between these two logs:
D0901 17:56:18.746775 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:203: (c-ares resolver) request:000002BB3EE73860 create_hostbyname_request_locked host:test.my-company.com port:47873 is_balancer:0 qtype:AAAA
D0901 17:56:29.989310 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc:203: (c-ares resolver) request:000002BB3EE73860 create_hostbyname_request_locked host:test.my-company.com port:47873 is_balancer:0 qtype:A

is strange.
For one, do you happen to know what is the CPU usage (and number of available cores) during this?

@apolcyn If you assume it‘s unrelated, I can also create a separate issue to keep the threads clean if preferred. I will do some more testing tomorrow. It took me some time to even find out why grpclb was not working anymore (missed https://github.com/grpc/proposal/blob/master/A26-grpclb-selection.md) and what ChannelOption keys to set as the ChannelOptions static class has no constants for it. The CPU usage should have been fine as the machine was mostly used for these tests at that moment and it‘s a quad core machine. But I will report tomorrow from my tests after a fresh reboot. It was also reproducible and always happened after the restart. Once the channel has the resolution finished, it went pretty quick.
I did another test in another environment (internal framework) where the first call resulted in a delay of 35 seconds. After that, everything went smooth. Other calls to targets addressed directly by IP4 in between went t though directly. So it seems to be related to DNS resolution or GRPCLB (as both was skipped for IP4) as it used the fake:/// schema in the logs.

@Falco20019 opening a different issue for what you're seeing would be helpful, I think. Thanks!
It's definitely interesting that this is reproduceable for you and happens particularly after reboot.
One thing that might be relevant is that the only thing that happens between the 11-second separated logs I mentioned is a call to https://github.com/c-ares/c-ares/blob/abe1ff1ff379e38629d57d7ef7221d4c770ad1b8/ares_gethostbyname.c#L81 (which itself in turn call back into C-core). That is supposed to be non-blocking. However, if CPU is not saturated, then there may be something weird going on there.

@apolcyn, here is the contents of my /etc/resolv.conf:
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver <IP_ADDRESS>
options edns0
search home

Using the route command packaged with net-tools provided:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         mynetwork.home  <IP_ADDRESS>         UG    100    0        0 enp39s0
link-local      <IP_ADDRESS>         <IP_ADDRESS>     U     1000   0        0 enp39s0
<IP_ADDRESS>     <IP_ADDRESS>         <IP_ADDRESS>   U     100    0        0 enp39s0

I then ran sudo tcpdump -i enp39s0 'port 53' &> tcp_dump.txt and waited about 15 seconds. In a separate pair of terminals I started the python gRPC server and client W/O the flags suggested by @lidizheng and so the client was exhibiting the connection issue during this test taking around 1 minute to print the greeting. Please see the attached tcp_dump.txt file.
tcp_dump.txt

The similiar issue hit，we have a mini cluster with 3 nodes,: node1, node2, node3

/etc/hosts has 3 nodes fqdn and its ip configured
/etc/resolv.conf empty
/etc/nsswitch.conf hosts files dns myhostname

We tried etcd client to connect etcd server with python grpc. But get timeouted out. After tracking down the issue, we found that grpc resolving takes some seconds. Strace shows a weird behavor: grpc ares resolver connect to <IP_ADDRESS>:53 first, and get connection refuse, and the try the second time. And this time, it waits for about 3 seconds and then timeout.


Show "temp reaction" when sending a reaction to indicate progress in it's status

If it errors, switch the temp reaction to the error icon (same as an errored message). If it doesn't error, just face nicely into the sent reaction type.
The goal here is user feedback so the user knows what's going on

done


Memory Leak in basicVSR++ (?)

Using distributed training on an 8xV100 machine with all configs from the REDS dataset and setting the samples_per_gpu up to two the training crashed after four hours as it ran out of memory.
As you can see in the image is uses around 100GB for most of the time and then slowly creeps up to 420GB until one of the workers crashes due to an out of memory error.

Hello I have never encountered this problem, could you tell us more what command you used for training?

@contentis  hi,have you solve it? I also encountered.

Closing this Issue due to no more feedback. Please feel free to reopen it if needed.


Recal plugin does not work with lt 0.8 worked wiht 0.7

not happy here.

This plugin isn't a part of LT. Please open your issue with the Recall plugin. Giving specifics to the author would be helpful. I use Reminisce which is known to work with 0.8.0


Add hot keys for commenting and re-formatting lines

This code should improve the hot keys for query formatter.
when i am on querybook in the online editor, and i am working on code within a cell block, and i have some code highlighted
the commenting out standard I have experience in to comment and uncomment code is control forward slash (ctr + /)
word wrapped lines of text are treated as a single line.
when i am on querybook in the online editor, and i am working on code within a cell block
the code shifting standard I have experience in to move code up and down is alt up arrow key and alt down arrow key (alt + ↑, alt + ↓)
word wrapped lines of text are treated as a single line

hey Alex, shortcut should be configured in keyMap.ts for standardization. For the two you are adding, I have some questions:

block-comment is already provided, does it not work on Windows?
It is a good idea to add swap lines, since it is provided in codemirror sublime keymap, I just copied the code there and added it in this PR https://github.com/pinterest/querybook/pull/782.

Hi! I have updated the MR. So, the main idea for this commit was to add a new shortcut (Ctrl+ /) for comment/uncomment string. The current editor works fine with (Cmd+/) but Ctrl is more natural for Windows users.

@alexVasylenko ah got it, it is actually because codemirror doesn't support cmd+/ for windows. Originally I imagined it would auto use ctrl in that case. I added a PR here for auto coversion and https://github.com/pinterest/querybook/pull/793 and now ctrl+/ should work out of the box.


required-features implicit binaries for test does not check for dep syntax

Problem
A project with a binary with required-features = ["dep_name/feature_name"] will only build the binary when the given dependency's feature is enabled.  This feature syntax is not checked when the binary is built as an implicit dependency of an integration test, and thus the binary will not get built during cargo test --features dep_name/feature_name when I think it should.
Steps
The following patch updates one of Cargo's tests to exercise this case.
diff --git a/tests/testsuite/required_features.rs b/tests/testsuite/required_features.rs
index 6afd917ee..7d7b547c3 100644
--- a/tests/testsuite/required_features.rs
+++ b/tests/testsuite/required_features.rs
@@ -4,6 +4,7 @@ use cargo_test_support::install::{
     assert_has_installed_exe, assert_has_not_installed_exe, cargo_home,
 };
 use cargo_test_support::is_nightly;
+use cargo_test_support::paths::CargoPathExt;
 use cargo_test_support::project;

 #[cargo_test]
@@ -910,7 +911,17 @@ fn dep_feature_in_cmd_line() {
         )
         .file("src/main.rs", "fn main() {}")
         .file("examples/foo.rs", "fn main() {}")
-        .file("tests/foo.rs", "#[test]\nfn test() {}")
+        .file(
+            "tests/foo.rs",
+            r#"
+            #[test]
+            fn bin_is_built() {
+                let s = format!("target/debug/foo{}", std::env::consts::EXE_SUFFIX);
+                let p = std::path::Path::new(&s);
+                assert!(p.exists(), "foo does not exist");
+            }
+            "#,
+        )
         .file(
             "benches/foo.rs",
             r#"
@@ -936,7 +947,9 @@ fn dep_feature_in_cmd_line() {
         .file("bar/src/lib.rs", "")
         .build();

-    p.cargo("build").run();
+    // This is a no-op.
+    p.cargo("build").with_stderr("[FINISHED] dev [..]").run();
+    assert!(!p.bin("foo").is_file());

     // bin
     p.cargo("build --bin=foo")
@@ -967,19 +980,23 @@ Consider enabling them by passing, e.g., `--features=\"bar/a\"`
     assert!(p.bin("examples/foo").is_file());

     // test
+    // This is a no-op, since no tests are enabled.
     p.cargo("test")
         .with_stderr("[FINISHED] test [unoptimized + debuginfo] target(s) in [..]")
         .with_stdout("")
         .run();

+    // Delete the target directory so this can check if the main.rs gets built.
+    p.build_dir().rm_rf();
     p.cargo("test --test=foo --features bar/a")
         .with_stderr(
             "\
+[COMPILING] bar v0.0.1 ([CWD])
 [COMPILING] foo v0.0.1 ([CWD])
 [FINISHED] test [unoptimized + debuginfo] target(s) in [..]
 [RUNNING] target/debug/deps/foo-[..][EXE]",
         )
-        .with_stdout_contains("test test ... ok")
+        .with_stdout_contains("test bin_is_built ... ok")
         .run();

     // bench

Possible Solution(s)
The implicit binary check is done here.  This does not check for the extended feature syntax, which is normally done here.  Ideally the code for checking required-features should be shared.
Notes
cargo 1.42.0-nightly (f6449ba23 2020-01-21)

If no one is working on this, I'll try to take a stab.


Reconsider the approach of applying the full normalization

We recently attempted to activate the pkg.translator.prometheus.NormalizeName feature gate in the collector. This feature gate applies full metrics normalization by default in both the Prometheus receiver and exporter. However, the process did not go smoothly and was seen as an unnecessary disruptive change. Two issues were reported regarding this matter:

https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21743
https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/23208

After discussing the topic in the Collector SIG on June 6th, a decision was made to revert the feature gate back to its alpha state until both issues are resolved.
To initiate the discussion towards resolving these problems, I have two questions:
1. Why do we need to change the original Prometheus metrics names in the Prometheus receiver?
While it is beneficial to populate as many fields as possible in an OTel metric object from the available information in a Prometheus endpoint, including the metric unit, changing the original metric name seems unnecessary. Unless we have predefined mappings, we cannot convert a Prometheus metric name into an OTel metric with a name compliant with the OTel spec. By simply removing the unit and _total suffixes, we end up with metric names that may be unfamiliar to users. For example, a commonly used Prometheus metric, process_cpu_seconds_total, would become process_cpu after the full normalization, which lacks references in both OTel and Prometheus contexts. However, if we retain the name process_cpu_seconds_total in the OTel metric name (with s as the unit), it is evident where the metric originates.
If we decide against changing the original name in the Prometheus receiver:

The Prom -> OTel -> Prom scenario remains unaffected since the full normalization in the Prometheus exporter will not add additional prefixes if they already exist in the metric name.
In an OTel -> Prom -> OTel scenario (assuming full normalization exists in the Prometheus exporter), different results would be obtained. For instance, system.cpu.time would become an OTel metric named system_cpu_time_seconds_total instead of system_cpu_time. I believe both system_cpu_time_seconds_total and system_cpu_time metric names should be acceptable since it is not possible to revert back to system.cpu.time.

2. Do we want to provide an option for the end user to disable/enable the full normalization in the Prometheus exporter? If so, what would be the default setting?
Unlike the Prometheus receiver, the full normalization in the Prometheus exporter is important as it prevents the loss of the unit field value during conversion. However, there might be situations where users prefer to avoid additional suffixes and keep the metric name as close to the original OTel name as possible. Considering the feedback from https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21743, it seems reasonable to provide this option. If we do include it, what should be the default behavior? It is plausible that the default setting should be the enabled full normalization, but alternative viewpoints are welcome.

Discussed this issue in the Prometheus WG meeting.
Q 1: @gouthamve mentioned that Prometheus is going to support dots in metric names going forward, so, potentially, we can restore OTel metric names in the OTel -> Prom -> OTel scenario by applying the full normalization. I'm still not sure if it justifies changing all the Prometheus metrics in the Prometheus receiver because of the reasons mentioned above (process_cpu_seconds_total -> process_cpu). Maybe we can update the Prometheus exporter normalization and mark all the metrics coming from it (e.g., by adding a special note to the HELP section) in a way that the Prometheus receiver from the other side can read the hint and restore the original OTel metric names. If the hint contains the original OTel metric name like otel:system.cpu.time, we don't even need to depend on the dots support. @open-telemetry/wg-prometheus WDYT?
Q 2: Look like there are no objections to making the normalization on the Prometheus exporter side configurable and having it enabled by default.

Sorry I missed the discussion yesterday; I'm just getting back from leave and am catching up now.  The response to enabling the feature gate makes me think our approach might have to change.  If we tried to make the change at a future point, we would likely run into the same pushback, and i'm not sure the value we are getting for the change is worth the pain it would cause users right now.
My suggestion is that we enable normalization on prometheus exporters by default, but disable it on the prometheus receiver by default.  It would essentially make only additive changes by default.  Prom -> OTel -> Prom would still round trip successfully in that case, but OTel -> Prom -> OTel would end up with extra suffixes in addition to underscores.  To round-trip OTel -> Prom -> OTel, a user would need to:

Disable sanitization (. -> _) in their OTel SDK prometheus exporter.  This knob would be introduced after prometheus allows dots.
Enable suffix trimming in their prometheus receiver.

Since we want OTel SDK prometheus exporters to work with older prometheus servers, sanitization (. -> _) will have to stay the default behavior.  That means regardless of whether we trim suffixes in the prometheus receiver by default, a user would have to change default behavior to be able to round-trip metric names.
I'm not a fan of encoding/decoding information from/to the HELP text.  It seems likely to break, and pollutes the help text with information users are unlikely to care about.

My suggestion is that we enable normalization on prometheus exporters by default, but disable it on the prometheus receiver by default.

I like it. Echoes what I said here: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21743#issuecomment-1602634542

My suggestion is that we enable normalization on prometheus exporters by default, but disable it on the prometheus receiver by default.

@dashpole I agree with this in general. But WDYT about the suggestion I mentioned in my previous comment about adding an OTel metric hint to the HELP section by the Prometheus exporter. For example, if any metric has otel:system.cpu.time in the HELP section, the OTel Prometheus receiver would use that name instead. It'll make OTel -> Prom -> OTel work without dots support and any configuration option on the Prometheus receiver. Is that realistic?

I'm not a fan of encoding/decoding information from/to the HELP text. It seems likely to break, and pollutes the help text with information users are unlikely to care about.

OK, let's proceed with the configuration options for the full normalization, which will be disabled on the receiver and enabled on the exporter. We probably don't need a feature gate for that, and the existing one can be deprecated.

This has been completed in the collector


Column sort follows ForeignKeys

You have two models:
from peewee import ForeignKey, PrimaryKey, CharField, Model

class Purchase(Model):
     user = ForeignKey(User)

class User(Model):
    id = PrimaryKey()
    name = CharField()

Before you could not write
class PurchaseView(ModelView):
    column_sortable_list = (('user', 'user.name'), )

because it would fail saying that 'user.name' is not a field of Purchase.
I tried with:
class PurchaseView(ModelView):
    column_sortable_list = (('user', User.name), )

but I have an exception
 OperationalError: (1066, "Not unique table/alias: 't2'")

What I do is splitting on the dot and following foreign keys.

Would you be up for adding a test for this?
The SQLAlchemy tests have a good example: https://github.com/flask-admin/flask-admin/blob/master/flask_admin/tests/sqla/test_basic.py#L1537

OK I'll do this. Thanks for the pointer :)
Le ven. 14 août 2015 7:05 AM, Paul Brown<EMAIL_ADDRESS>a
écrit :

Would you be up for adding a test for this?
The SQLAlchemy tests have a good example:
https://github.com/flask-admin/flask-admin/blob/master/flask_admin/tests/sqla/test_basic.py#L1537
—
Reply to this email directly or view it on GitHub
https://github.com/flask-admin/flask-admin/pull/986#issuecomment-130966914
.

Oddly, I'm able to set a list's default sort on a foreign key, but I'm unable to make the foreign column click-sortable.
class SubscriptionAdmin(sqla.ModelView):
    # works. uid is a foreign key.
    column_default_sort = 'uid'

    # neither of these work:
    # column_sortable_list = ('uid', )
    # column_sortable_list = (psmodels.Person.uid,)

What I have to have the column click-sortable (here it is the "user" column)
    column_default_sort = 'pur_cart.cart_user.user_name'
    column_sortable_list = [('user', 'pur_cart.cart_user.user_name'),
'pur_total']

where my models are
class Purchase(Model):
    pur_cart = ForeignKey(Cart)
    pur_total = IntegerField()

class Cart(Model):
    cart_user = ForeignKey(User)

class User(Model):
     user_name = CharField()

Le mer. 19 août 2015 à 08:14, boolbag<EMAIL_ADDRESS>a écrit :

Oddly, I'm able to set a list's default sort on a foreign key, but I'm
unable to make the foreign column click-sortable.
class SubscriptionAdmin(sqla.ModelView):
# works. uid is a foreign key.
column_default_sort = 'uid'
# neither of these work:
# column_sortable_list = ('uid', )
# column_sortable_list = (psmodels.Person.uid,)

—
Reply to this email directly or view it on GitHub
https://github.com/flask-admin/flask-admin/pull/986#issuecomment-132458363
.

What I have to have the column click-sortable (here it is the "user" column)
    column_default_sort = 'pur_cart.cart_user.user_name'
    column_sortable_list = [('user', 'pur_cart.cart_user.user_name'),
'pur_total']

where my models are
class Purchase(Model):
    pur_cart = ForeignKey(Cart)
    pur_total = IntegerField()

class Cart(Model):
    cart_user = ForeignKey(User)

class User(Model):
     user_name = CharField()

What I have to have the column click-sortable (here it is the "user" column)
    column_default_sort = 'pur_cart.cart_user.user_name'
    column_sortable_list = [('user', 'pur_cart.cart_user.user_name'),
'pur_total']

where my models are
class Purchase(Model):
    pur_cart = ForeignKey(Cart)
    pur_total = IntegerField()

class Cart(Model):
    cart_user = ForeignKey(User)

class User(Model):
     user_name = CharField()

@ptbrowne Thank you so much for sharing the syntax that works for you! That tuple cleared it up for me, it's working great now.
column_sortable_list = (('person', psmodels.Person.uid), )
Btw for me it only works without the quotes on the second element, probably a different setup somewhere.

I tested this on the peewee example by changing:
column_sortable_list = ('title', ('user', User.email), 'date')
to
column_sortable_list = ('title', ('user', 'User.email'), 'date')
Here's the error I got: https://gist.github.com/anonymous/d058f256d9c6ad997e89
It would be better to abstract this login into something that could be used for searching, sorting, filters, list columns, etc. Like SQLA does: https://github.com/flask-admin/flask-admin/blob/master/flask_admin/contrib/sqla/view.py#L335

Why would you want to use a string there ?

SQLAlchemy backend has this logic abstracted into a method: https://github.com/flask-admin/flask-admin/blob/master/flask_admin/contrib/sqla/view.py#L324

@ptbrowne Now I'm confused about what this fixing.

Sorting already works on foreign keys with this syntax: column_sortable_list = ('title', ('user', User.username), 'date')
Your message says "what is the advantage of using a string there?", but your test uses the foreign key field name + the field in the other model as a string like: "model1.test1"
When I create a gist similar to the test case (but using column_sortable_list), I get this error: OperationalError: no such column: t2.username (https://gist.github.com/pawl/ce519c38308fc8c16fc2#file-test_peewee_sortable-py-L43)

I think this one was fixed by https://github.com/flask-admin/flask-admin/issues/1192


Open-source all CI/CD scripts and configuration that runs in Jenkins

Everything in GHA is open-source and in repos. The Jenkins scripts and configuration should follow suit. Anyone should be able to reproduce the OpenSearch CI/CD infrastructure after opensearch-project/opensearch-ci#2 and importing scripts and configuration that would be OSS.
We have those scripts in source control now, but it remains private. Need to OSS those.

All relevant jobs are public now and source controlled in public repo https://github.com/opensearch-project/opensearch-build/tree/main/jenkins


depends_on attribute is converted incorrectly.

hcl:
resource "aws_sns_topic" "test_topic" {
name         = "test_topic"
display_name = "Test Topic"
depends_on = [
aws_iam_role_policy.example,
]
}
With the above terraform init and plan works fine.
json generated by hcl2json:
"aws_sns_topic": {
"test_topic": [
{
"depends_on": [
"${aws_iam_role_policy.example}"
],
"display_name": "Test Topic",
"name": "test_topic"
}
]
}
When I try to do terraform init it gives the following error:
Error: Invalid expression
on test.tf.json line 27, in resource.aws_sns_topic.test_topic[0].depends_on:
56:                         "${aws_iam_role_policy.example}"
A single static variable reference is required: only attribute access and
indexing with constant keys. No calculations, function calls, template
expressions, etc are allowed here.

This is a duplicate of #12


Awesome logo!

The logo is just genius, well done!

All credit goes to @piq9117

yeah, wanted to chime in to say this too. Took me a second, but it's beautiful.


X86 unwind buffer limit checks

The x86 instruction unwinder can be asked to disassemble non-instruction
blocks of memory, and if the final bytes of that block look like a long
x86 instruction, it can cause the llvm disassembler to read past the end
of the buffer. Use the maximum allowed instruction length that we pass
to the llvm disassembler as a way to limit this to the size of the buffer.
An example of how to trigger this is when lldb does a function call, it
puts a breakpoint on the beginning of main() and uses that as the return
address from the function call. When we stop at that location, lldb may
try to find the first frame up the stack. Because this is on the first
instruction of a function, it will get the word-size value at the stack
pointer and assume that this was the caller's pc value. But this is random
stack memory and could point to anything - an object in memory, something
in the data section, whatever. And if we have a symbol for that thing,
we'll try to disassemble it.
This was leading to infrequent crashes in customer scenarios; figured out
what was happening with address sanitizer.
rdar://problem/30463256

@swift-ci please test


README.md

<EMAIL_ADDRESS>

Thanks for the feedback. We would like to look into it - could you please give us more details? Apologies for any inconvenience caused.


Investigate if we should byte-code manipulate an entire hierarchy

From<EMAIL_ADDRESS>on October 29, 2008 12:34:50
Let's say we have a class called A which extends B. Suppose B has a
protected method called "myMethod" and we wish to create a partial mock of
A where only this method is mocked. Now we need to do both
@PrepareForTest({A.class, B.class}) which is non intuitive, perhaps we
should implicitly load B with the MockClassloader when doing
@PrepareForTest(A.class)?
Original issue: http://code.google.com/p/powermock/issues/detail?id=50

From<EMAIL_ADDRESS>on November 03, 2008 05:14:10
This is now done automatically using the @PrepareForTest annotation. Users can
override this behavior by falling back to using @PrepareOnlyThisForTest.

From<EMAIL_ADDRESS>on November 03, 2008 05:14:24
Status: Fixed


TxProposal < v3 no longer supported

I upgraded to 1.9.1 (via Bitcore 4.1.0) last night, as well as updated my program to use the latest version of bitcore-wallet-client (3.0.0). Today after a payment proposal was created using the client, Bitcore got stuck in a shutdown loop (I have it configured as an Upstart service) with the following error:
[2016-08-17T16:23:33.790Z] info: ::ffff:<IP_ADDRESS> web socket subscribe: inv
[2016-08-17T16:23:35.194Z] info: ::ffff:<IP_ADDRESS> "POST /insight-api/addrs/utxo" 200 16996 474.648 "bws-1.9.1"
[2016-08-17T16:23:35.222Z] error: uncaught exception: [Error: TxProposal < v3 no longer supported.]
[2016-08-17T16:23:35.231Z] error: Error: TxProposal < v3 no longer supported.
    at Function.TxProposal.fromObj (/home/bitcoin/bitcore-node/node_modules/bitcore-wallet-service/lib/model/txproposal.js:70:11)
    at /home/bitcoin/bitcore-node/node_modules/bitcore-wallet-service/lib/storage.js:332:31
    at arrayMap (/home/bitcoin/bitcore-node/node_modules/bitcore-wallet-service/node_modules/lodash/index.js:1406:25)
    at Function.map (/home/bitcoin/bitcore-node/node_modules/bitcore-wallet-service/node_modules/lodash/index.js:6710:14)
    at /home/bitcoin/bitcore-node/node_modules/bitcore-wallet-service/lib/storage.js:331:17
    at handleCallback (/home/bitcoin/bitcore-node/node_modules/bitcore-wallet-service/node_modules/mongodb/lib/utils.js:96:12)
    at /home/bitcoin/bitcore-node/node_modules/bitcore-wallet-service/node_modules/mongodb/lib/cursor.js:858:16
    at handleCallback (/home/bitcoin/bitcore-node/node_modules/bitcore-wallet-service/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:156:5)
    at setCursorDeadAndNotified (/home/bitcoin/bitcore-node/node_modules/bitcore-wallet-service/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:496:3)
    at nextFunction (/home/bitcoin/bitcore-node/node_modules/bitcore-wallet-service/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:640:7)
[2016-08-17T16:23:35.232Z] info: Beginning shutdown

It's now crashing every time I try to query the proposals, for instance if I start up Copay.

Hi, sorry about this, it is a known issue already fixed in the master branch. We just published v1.10.0, please check it out and let us know if you still have this issue.

How would I upgrade just bitcore-wallet-service? I'm running Bitcore v4.1.0.


expect you to release source code ?

Hi,
Just wondering when you are planning to release the source code and data.
Thanks

Hi, our code and pretrained model are already released. Thanks for your interests on our work.


Branch ID should not be a constant

There are a number of places where branch ID is treated as a constant (using the default branch ID).  Branch ID isn't a constant and the UI needs the capability to switch between branches.

Fixed in 6f773c6b7757e581c3cae69a23acb58d9c48f3db


feat: capture shipping address from ApplePay

Description
A proposal to be able to request and retrieve the shipping address from an Apple Pay payment.
The behavior is quite identical to the actual retrieval of billingAddress from Apple Pay and updates the client session with the shippingAddress entered in Apple Pay.

This should be non-breaking as isCaptureShippingAddressEnabled is optional and disabled by default

Other Notes

Other changes that are not specifically related to the intent of the PR

Manual Testing
Add manual testing notes here if applicable, otherwise remove this section
Screenshots
If applicable, otherwise remove this section
Contributor Checklist

[ ]  All status checks have passed prior to code review
[ ]  I have added unit tests to a reasonable level of coverage where suitable
[ ]  I have added UI tests to new user flows, if applicable
[ ]  I have manually tested newly added UX
[ ]  I have open a documentation PR, if applicable

Reviewer Checklist

[ ]  I have verified that a suitable set of automated tests has been added
[ ]  I have verified that the title prefix aligns to the code changes + whether a release is expected after merging the PR
[ ]  I have verified the documentation PR aligns with this PR, if applicable

Before Merging

[ ]  If introducing a breaking change, I have communicated it internally
[ ]  Any related documentation PRs are ready to merge

Other Stuff

You can find out more about our automation checks here
Find out more about conventional commits here

Closing as handled by https://github.com/primer-io/primer-sdk-ios/pull/985


Version Replicator - Take II

So after playing with it a bit more I got the replicator to do its thing, however, we have a problem.  Once the replicator sends the versions to the Target instance, all versions that existed previously, get deleted.  In other words, it wipes out the target instance versions.
Many thanks for your guidance on this, big fan of your work.

This is an attribute of the underlying replication subsystem, specifically the DurboImporter.

Hi Justin, thank you very much for your prompt response.  Can you please elaborate a bit more, just want to make sure I fully understand....
Again, thank you very much indeed.

All the Version Replicator does is call the standard Replication API (https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/bundle/src/main/java/com/adobe/acs/commons/replication/impl/ReplicateVersionImpl.java#L143). It has no control over what happens on the receiving end. That behavior is defined by the existing replication subsystem.


MPV or GnomeMPV not play video files

Hi,
I am using Ubuntu 16.04 with latest nix stable version.
I install mpv. When I play a audio file it plays from command line. But when I start a video file it gives this error:
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
[vo/opengl/x11] X11 error: BadValue (integer parameter out of range for operation)
[vo/opengl/x11] Type: 0, display: 0x7f34e022e9f0, resourceid: 0, serial: 5c
[vo/opengl/x11] Error code: 2, request code: 9b, minor code: 3
After that I installed gnome-mpv. When I play the video file it gives this error:
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
Thank you

Seems like  you ran into this unsolved problem:  #31189.
A workaround is described here, involving creating /run/opengl-driver/ and making some symlinks to your system opengl drivers.

@hedning thank you for your interest. i will not try to edit the system files ... I am not expert user. Nix is independed and portable. I will wait for solution.

I try on a new computer. It worked.


ClusterNetworkPolicy is not enforced correctly when a rule's From or To is empty

Describe the bug
When a rule's From or To is empty, this rule will not be appended to the converted NetworkPolicy: https://github.com/antrea-io/antrea/blob/7121422a4cc6768fb6f74602c8cc9233a63529b3/pkg/controller/networkpolicy/clusternetworkpolicy.go#L310-L321
For example, create the below rule:
apiVersion: crd.antrea.io/v1alpha1
kind: ClusterNetworkPolicy
metadata:
  name: test-cnp
spec:
  appliedTo:
  - podSelector: {}
    namespaceSelector: {}
  egress:
  - action: Drop
    enableLogging: true
    name: defaultegressdrop
  ingress:
  - action: Drop
    enableLogging: true
    name: baselineingress
  priority: 5
  tier: baseline

Getting the controlplane NetworkPolicy, the ruls is missing:
# kubectl get acnp test-cnp
NAME       TIER       PRIORITY   DESIRED NODES   CURRENT NODES   AGE
test-cnp   baseline   5          2               0               6m27s

# kubectl get networkpolicy.controlplane -o yaml 6cd8b735-fcaf-401a-aca6-91032727bc02
apiVersion: controlplane.antrea.tanzu.vmware.com/v1beta2
appliedToGroups:
- 3531148b-82bf-5ed7-96d1-2b55af7949de
kind: NetworkPolicy
metadata:
  creationTimestamp: null
  generation: 2
  name: 6cd8b735-fcaf-401a-aca6-91032727bc02
  uid: 6cd8b735-fcaf-401a-aca6-91032727bc02
priority: 5
sourceRef:
  name: test-cnp
  type: AntreaClusterNetworkPolicy
  uid: 6cd8b735-fcaf-401a-aca6-91032727bc02
tierPriority: 253

It was introduced in v1.1 when adding support for peer namespace selection.
To Reproduce
Create an Antrea ClusterNetworkPolicy with the above yaml.
Versions:
Please provide the following information:

Antrea version (Docker image tag). v1.1.0 ~ v1.1.1

I'm assuming this affects the main branch as well, so I want to postpone the 1.2 release given that this seems like a major bug

I am actually failing to understand how this causes the ClusterNetworkPolicy to be not enforced correctly. For a rule without a From/To peer in ANP and ACNP, the effect of that rule is essentially none... I do understand that for other book-keeping purposes (i.e. maintaining rule counts and rule names etc.) this is a valid issue.

/cc @abhiraut

I might be wrong, but take the above policy as example:
  appliedTo:
  - podSelector: {}
    namespaceSelector: {}
  ingress:
  - action: Drop
    enableLogging: true
    name: baselineingress

Doesn't it mean all traffic from all sources should be dropped and logged?

The comment says "If this field is empty, this rule matches all sources."
https://github.com/antrea-io/antrea/blob/e7051c02dcc2b137ee132b7c4d193f357f03d814/pkg/apis/crd/v1alpha1/types.go#L352-L355

I might be wrong, but take the above policy as example:
  appliedTo:
  - podSelector: {}
    namespaceSelector: {}
  ingress:
  - action: Drop
    enableLogging: true
    name: baselineingress

Doesn't it mean all traffic from all sources should be dropped and logged? If no rule is transmitted to agent, how could it be enforced?

Yes I just realized that this is a valid case...
// NetworkPolicyPeer is supposed to match all addresses when it is empty and no clusterGroup is present.
// It's treated as an IPBlock "<IP_ADDRESS>/0".

I will add a E2E testcase for this specific scenario as well as I think it is missing as of now

I might be wrong, but take the above policy as example:
  appliedTo:
  - podSelector: {}
    namespaceSelector: {}
  ingress:
  - action: Drop
    enableLogging: true
    name: baselineingress

Doesn't it mean all traffic from all sources should be dropped and logged? If no rule is transmitted to agent, how could it be enforced?

this does make sense to me. I see Yang has pushed a fix.


[aries-js-worker] Safari raise "Could not decode a text frame as UTF-8." in WebSocket Communication

I am trying to test the aries js worker(aries-framework-go/cmd/aries-js-worker/index.html) and had some success in Chrome, including make connection with a router agent, make connection with other edge agent through router agent and send message to other edge agent.
And I move on to safari on OSX, it run "didexchange" "receiveInvitation" fine with a router agent invitation, and I try to "accecptRequest" in router agent. WebSocket in safari it raise WebSocket connection failed: Could not decode a text frame as UTF-8.
Expected result
Expect edge agent receive respond from router agent and complete connection
Actual result
[Log] incoming msg : – "cc053257-db0f-436f-a95c-e5752286b7c8" – "didexchange_states" – {Message: Object, Properties: {connectionID: "c4993e26-7b72-4883-bf59-ef3c3bdd058c", invitationID: "a4ca4538-9bd7-4a44-b03f-c489d185e09e"}, ProtocolName: "didexchange", …} (index.html, line 74)
{Message: Object, Properties: {connectionID: "c4993e26-7b72-4883-bf59-ef3c3bdd058c", invitationID: "a4ca4538-9bd7-4a44-b03f-c489d185e09e"}, ProtocolName: "didexchange", StateID: "requested", Type: "post_state"}ObjectMessage: {@id: "a4ca4538-9bd7-4a44-b03f-c489d185e09e", @type: "https://didcomm.org/didexchange/1.0/invitation", label: "carl-router-agent", recipientKeys: ["6Lqa4j2huX9L6fNWWjTjgNwZLkEU3sK2WQTQR9TErNrE"], serviceEndpoint: "wss://router.unifysoft.com/ws"}ObjectProperties: {connectionID: "c4993e26-7b72-4883-bf59-ef3c3bdd058c", invitationID: "a4ca4538-9bd7-4a44-b03f-c489d185e09e"}ObjectProtocolName: "didexchange"StateID: "requested"Type: "post_state"Object Prototype
[Error] WebSocket connection to 'wss://myserver' failed: Could not decode a text frame as UTF-8.
[Log]  [aries-framework/ws] 2020/06/30 08:09:27 UTC - ws.(*connPool).listener -> ERROR Error reading request message: failed to read: WebSocket closed: unclean connection close: status = StatusAbnormalClosure and reason = "" (wasm_exec.js, line 47)
[Log]  [aries-framework/ws] 2020/06/30 08:09:27 UTC - ws.(*connPool).close -> ERROR connection close error (wasm_exec.js, line 47)
test case

Run "make run-openapi-demo" on local machine

Create invitation with carl router agent by "http://localhost:10093/connections/create-invitation" on swagger page

Host "aries-framework-go/cmd/aries-js-worker/index.html" on local web server

Open aries js worker web page

Start agent and start notifier

Run "didexchange" "receiveInvitation" with previous generated invitation

Run "didexchange" "acceptInvitation" with connection id return in step 6

Back to swagger page, accecpt the new connection

WebSocket error raise in js worker

@cyrilhl Thank you for letting us know.

@cyrilhl can you please test with the latest version and let us know?

@cyrilhl can you please test with the latest version and let us know?

Thank you for your prompt action, and I had testing on safari on both OSX and iOS, both of them work properly now.


WARNING about input molecules

Thank you for your outstanding work and sharing!
This WARNING occured while predicting the mass spectra of some smiles codes using your pre-trained model:

The model then stops continuing the prediction.
This suggests that it may be due to a problem with the input smiles codes, but I checked the 1840th smiles code entered: ‘CC1=CC2Cc3nc4cc(Cl)cccc4c(NCCCNCCCNc4c5c(nc6ccccc46)CCCC5)c3C(C1)C2 ‘. Locally rdkit recognises this smiles code without this WARNING. What could be the reason for this kind of problem and how can I change the code or check in advance if the input smiles code can be used for prediction.
Thanks again for your outstanding work. I appreciate all your help!

Hi CesareWang,
Thanks for your interest and kind words!
I tried parsing the compound that you provided with the version of rdkit used for the project (2021.03.3) and it was unable to parse. Can you confirm that you are using the correct rdkit version?
In any case, you could simply modify the code (or your input file) to skip this compound.

Hello, thank you very much for your reply and help!
Based on your valuable suggestion, I wrote this script to try to preprocess my input data.
from rdkit import Chem
import massformer.data_utils as data_utils
from massformer.data_utils import H_MASS, O_MASS, NA_MASS, N_MASS, C_MASS, par_apply_series
from tqdm import tqdm

file_paths = ["/home/dell/massformer-master/predictions/split_part_1.csv",
              "/home/dell/massformer-master/predictions/split_part_2.csv"]

def process_smiles(smiles):
    try:
        mol = Chem.MolFromSmiles(smiles)
        if mol is not None:
            inchikey_s = data_utils.mol_to_inchikey_s(mol)
            scaffold = data_utils.get_murcko_scaffold(mol)
            formula = data_utils.mol_to_formula(mol)
            inchi = data_utils.mol_to_inchi(mol)
            mw = data_utils.mol_to_mol_weight(mol, exact=False)
            exact_mw = data_utils.mol_to_mol_weight(mol, exact=True)
            return mol, inchikey_s, scaffold, formula, inchi, mw, exact_mw
    except:
        pass
    return None, None, None, None, None, None, None

for file_path in tqdm(file_paths, desc="Processing files"):
    smiles_df = pd.read_csv(file_path)

    mol_df = smiles_df.copy()
    mol_df["mol"], mol_df["inchikey_s"], mol_df["scaffold"], mol_df["formula"], mol_df["inchi"], mol_df["mw"], mol_df["exact_mw"] = zip(*mol_df["smiles"].apply(process_smiles))

    mol_df_unprocessed = mol_df[mol_df["mol"].isnull()]

    mol_df = mol_df.dropna(subset=["mol"])

    print("invalid SMILES:")
    print(mol_df_unprocessed)

    mol_df_output_file = file_path.replace('.csv', '_cleaned_20240807.csv')
    mol_df_unprocessed_output_file = file_path.replace('.csv', '_unprocessed_20240807.csv')

    mol_df.to_csv(mol_df_output_file, index=False)
    mol_df_unprocessed.to_csv(mol_df_unprocessed_output_file, index=False)

Fortunately, with the rdkit version you gave, this script helped me to sieve out some molecules that could not be processed. But as I continued to try to predict the processed data with the pre-trained model, a new, warning about N-atoms appeared, as shown in the figure below.

Based on the location of the error, i.e. the function "data_utils.get_murcko_scaffold", I wrote another script to try to filter out which smiles were causing the problem.
    # preprocess molecules
    mol_df = smiles_df.copy()
    mol_df["mol"] = par_apply_series(mol_df["smiles"], data_utils.mol_from_smiles)

    # Separate valid and invalid SMILES
    valid_mol_df = mol_df.dropna(subset=["mol"])
    invalid_mol_df = mol_df[mol_df["mol"].isna()]

    # Separate valid and invalid SMILES for scaffolds
    valid_mol_df["scaffold"] = par_apply_series(valid_mol_df["mol"], data_utils.get_murcko_scaffold)

    # Identify SMILES that couldn't be processed into scaffolds
    invalid_scaffold_df = valid_mol_df[valid_mol_df["scaffold"].isna()]

    # Drop invalid scaffolds from the valid DataFrame
    valid_mol_df = valid_mol_df.dropna(subset=["scaffold"])

    # Save the invalid scaffolds to a new CSV
    invalid_scaffold_df.to_csv("invalid_scaffolds.csv", index=False, columns=["smiles"])
    print(invalid_scaffold_df)

However, none of the smiles codes reported an error in this script anymore. Also, when I run the code used for prediction multiple times, the prediction process always stops at a different progression. This is very confusing to me. Is it the code that messes with the input data orders? Could you please help me to see how my pre-processing code should be further modified to identify these molecules that are causing the error.
Thank you very much for your help!

Thank you very much for your reply and help!
As your valuable suggestion, I have filtered out the smiles codes in the input data that cannot be processed properly. The processed smiles code can perform the series of operations from "mol_from_smiles" to "init_from_smiles" normally. However, when executing "inference", a new issue appeared. May I ask what could be the reason for this issue and how can I solve this error?

Sincerely thank you for your help!

It seems like the preprocessing failed, since there is an instance of a molecule that is not a SMILES string or an RDKit mol object. Maybe you should take a look at that one?


Unable to build for mingw-w64 on linux (debian bullseye)

ie I'm trying to avoid making a windows build environment :fearful:
Exporting the openvr demo via mingw-w64 via linux godot worked well (thanks!).
When trying to build openxr the  godot-cpp scons build works.
But the openxr scons build fails
$ scons platform=windows
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o glad/glad.os -c -DWIN32 -D_WIN32 -D_WINDOWS -W3 -GR -D_CRT_SECURE_NO_WARNINGS -std:c++latest -O2 -EHsc -DNDEBUG /MD -fPIC -Iglad -I. -Isrc -Igodot-cpp/godot-headers -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Iopenxr_loader/1.0.18/include glad/glad.c
gcc: error: /MD: No such file or directory
gcc: error: unrecognized command-line option ‘-W3’; did you mean ‘-W’?
gcc: error: unrecognized command-line option ‘-GR’; did you mean ‘-R’?
gcc: error: unrecognized command-line option ‘-std:c++latest’
gcc: error: unrecognized command-line option ‘-EHsc’
scons: *** [glad/glad.os] Error 1
scons: building terminated because of errors.

or
$ scons platform=windows use_llvm=yes
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
clang -o glad/glad.os -c -fPIC -O3 -fPIC -Iglad -I. -Isrc -Igodot-cpp/godot-headers -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Iopenxr_loader/1.0.18/include glad/glad.c
clang++ -o src/ARVRInterface.os -c -fPIC -O3 -std=c++17 -fPIC -O3 -fPIC -Iglad -I. -Isrc -Igodot-cpp/godot-headers -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Iopenxr_loader/1.0.18/include src/ARVRInterface.cpp
In file included from src/ARVRInterface.cpp:4:
In file included from src/ARVRInterface.h:7:
src/openxr/OpenXRApi.h:43:10: fatal error: 'GL/gl.h' file not found
#include <GL/gl.h>
         ^~~~~~~~~
1 error generated.
scons: *** [src/ARVRInterface.os] Error 1
scons: building terminated because of errors.

gl.h is available at /usr/x86_64-w64-mingw32/include/GL/gl.h
Is there a performance advantage to openxr? I'm likely to be an early adopter of godot 4.0 alpha and/or may move the build target to linux at some point (worse videocard atm). Advice?
Openvr was a bit a janky even with a very high end system but I haven't made any efforts to investigate yet.

I'm guessing at least part of this is debian mingw lacking the openxr bits?
https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-openxr

I think the scons script is probably missing a few key things for mingw. I personally don't use it so I can't set it up properly and test if it works.
If you compare the SConstruct files for the OpenVR and OpenXR plugins and compare the settings when use_llvm=yes you'll probably find some differences. Feel free to test and submit a PR :)

Someone assumed in a build script that Win32 implies MSVC - -EHsc, -W3, and -GR are all msvc flags. That's what caused your first build problem. The second one, where you forced LLVM, didn't have that but you're missing the openGL header on Windows. Typically on Windows you use an OpenGL wrapper like glad (which I see mentioned) instead of <GL/gl.h> because the standard Windows version of that header is GL 1.1.


AVG on one row = undefined

alacon 'create table abc (a int); insert into abc values (4);select avg(*) from abc GROUP BY a'

Gives me
[ 1, 1, [ { 'AVG(*)': undefined } ] ]

I would expect
[ 1, 1, [ { 'AVG(*)': 4 } ] ]

Hmmm. Might be a problem with the AVG function in general
alacon 'create table abc (a int); insert into abc values (4),(5);select * from abc GROUP BY a;select avg(*) from abc GROUP BY a'
[ 1,
  2,
  [ { a: 4 }, { a: 5 } ],
  [ { 'AVG(*)': undefined }, { 'AVG(*)': undefined } ] ]

Ok ok ok - its because im using AVG(*) instead of AVG(a)
alacon 'create table abc (a int); insert into abc values (4);select avg(a) from abc GROUP BY a'
[ 1, 1, [ { 'AVG(a)': 4 } ] ]

Better read into the SQL specs before I state a bug...


⚠ Accela has degraded performance

In 03e32cb, Accela (https://aca-prod.accela.com/santaclara) experienced degraded performance:

HTTP code: 200
Response time: 11581 ms

Resolved: Accela performance has improved in d41a39c.


anki: 2.1.8 -> 2.1.9

Motivation for this change
newest stable from https://apps.ankiweb.net/index.html#download and latest manual
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using ~nix-shell -p nox --run "nox-review wip"~ nix run nixpkgs.nox -c nox-review wip --against master
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

@grahamcofborg build anki

anki was already failing on darwin before this patch


README link to https://groups.google.com/forum/#!forum/error-prone-announce says Group does not exist or don't have permission to view it

ATTENTION! Please read and follow:

if this is a question about Error Prone, send it to<EMAIL_ADDRESS>if this is a bug or feature request, fill the form below as best as you can.

Description of the problem / feature request:
README link to https://groups.google.com/forum/#!forum/error-prone-announce says Group does not exist or don't have permission to view it
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Click on the link for announcements in the README
Have you found anything relevant by searching the web?
Nope. No existing issues or error-prone-discuss@ that I can see.

Thanks for the report.  It looks like the permissions on the announce group were not set properly, so I updated them.  Can you please try again and let me know if it is working for you now?

Yup, looks good!


Adding hover effects to buttons

Fixes #13
Changes proposed
The current sign in and sign up buttons doesn't have hover effect .. This pr adds hover effect
Screenshots

Note to reviewers

Should we add the color in the config ?

Should we add the color in the config ?

I have make little bits changes according me

Thank you for your contribution
@Atharva1723

oh okay you updated the name accordingly


Exit non-zero if a unknown subcommand is given

Currently it just prints the help message and exits 0.
We do this by modifying the helpCommand and helpSubcommand cli.Commands
to return an error if they are called with an unknown subcommand. This
propogates up to the app which exits with 3 and prints the error.
Thanks to @danslimmon for the initial approach!
Fixes #276

cc/ @meatballhat @danslimmon

@jszwedko Nice. It's a new codebase for me, so I was trying to be as non-invasive as possible with #396. But your way is better.

I know that feeling, thank you for the feedback!


Added helper functions to set more default options

When using Guzzle I like to set a default base_uri and some default request parameters so I added some functions for this. I also added a generic withOptions method so users can set their own default options.

Hey thanks for the PR! Can you explain with an example showing how this would work and is useful? My main concern is that looking at the implementation, none of the defaults being set would ever actually persist across requests so you aren't getting any real benefit, ie:
Zttp::withBase('http://example.com');

Zttp::get('/foo', []);

...will not actually use that base URI when performing the GET request.
I don't want to add any static properties or anything to the base Zttp class either, so I'm not sure it's really possible to add this functionality while staying true to the spirit of Zttp as a more-or-less stateless utility for just firing off arbitrary requests with a simple API.
What do you think?

I use it by making a zttp instance this way:
        $params = [
            'key' => env('GOOGLE_API')
        ];
        $this->zttp = Zttp::withOptions([
            'base_uri' => 'https://maps.googleapis.com/maps/api/place/',
            'query' => $params
        ]);

and later using it this way:
        $url = 'autocomplete/json';
        $params = [
            'input' => $query,
            'types' => 'geocode',
            'language' => 'nl'
        ];
        $addresses = $this->zttp->get($url, $params)->json()['predictions'];

It does go against the spirit you just mentioned, so I can close it if you want. In my use-case, i have tens of different calls to the same API with the same credentials and baseurl. For me using it this way is a lot cleaner.


Use requirements.txt in setup.py

The file requirements.txt is now used in setup.py so that there cannot be discrepancies between them.
The trezor package is now retrieved from PyPI instead of requiring a mirror at https://github.com/electrum-dash/python-trezor

Will push something to fix the CI issue.

nACK - requirements.txt and setup.py should be independent files.


Optimize Minigui rendering

Currently, the Minigui UI is rendered using circles with drop shadows & gradient fills. This is fine when running on desktop but struggles on mobile GPUs.
We should render the UI elements to off-screen canvases and convert them to static images to improve performance.

The implication here is that you would connect minigui to an arbitrary backend, not just a server running off localhost. That would be pretty nice to pull off.

@brilee i'm pretty sure you already can have it run on an arbitrary backend?


replace line endings for windows generated files

If the browscap.ini file was generated on a Windows system, each getbrowser call will fail with an exception
Crossjoin\Browscap\Exception\ParserRuntimeException: Parent 'DefaultProperties' not found.

This PR wants to solve this.
NOTE: I only tested this with version 2.x, because actually I dont have a system with PHP 7.

Hi.
please tell us when and especially where this error occurs. I think we need the full error-message, because in my opinion this pull request makes no sense.

I get the same error on my Windows machine, although it worked before (developed on Windows). Some unit tests fail now. I think this has to do with an updates Browscap source, because it's the only think that might have changed in the meantime...

@swen100 @crossjoin Here is the trace you requested:
Crossjoin\Browscap\Exception\ParserRuntimeException: Parent 'DefaultProperties' not found.

D:\xampp\htdocs\browscap\vendor\crossjoin\browscap\src\Parser\Sqlite\Writer.php:389
D:\xampp\htdocs\browscap\vendor\crossjoin\browscap\src\Parser\Sqlite\Writer.php:317
D:\xampp\htdocs\browscap\vendor\crossjoin\browscap\src\Parser\Sqlite\Writer.php:265
D:\xampp\htdocs\browscap\vendor\crossjoin\browscap\src\Parser\Sqlite\Writer.php:167
D:\xampp\htdocs\browscap\vendor\crossjoin\browscap\src\Browscap.php:200
D:\xampp\htdocs\browscap\tests\BrowscapTest\UserAgentsTest.php:210
D:\xampp\php\pear\PHPUnit\TextUI\Command.php:176
D:\xampp\php\pear\PHPUnit\TextUI\Command.php:129

Let me explain what I did.
As you maybe know I am part of the team that maintains the browscap project which creates the browscap.ini files. If I do some changes I often test these changes against this library, but only in version 1. Now I want to test against version 2 too.
What is the failure in the code?
On these tests the browscap.ini file is created on the fly. If the test script runs on a Windows system, the browscap.ini file contains Windows line endings (\r\n).
In your script the found section is splitted into its lines.
list($pattern, $properties) = explode("\n", $data, 2);

If the line contains windows line endings, the \r is left at the end of the line.
For the saved pattern only the last character is removed.
$pattern = substr($pattern, 1, -1);

With this on windows systems the saved pattern includes the ].

O.k., then maybe u can use this instead:
list($pattern, $properties) = array_map('trim', explode("\n", $data, 2));

Or, if only the \r for the pattern should be removed:
list($pattern, $properties) = array_map('trim', explode("\n", $data, 2), ["\r"]);

Swen

@swen100 Why not just replace the line endings like in my change?

I also think that the version from @mimmi20 is the better one.

Merged. Thanks @mimmi20!


Autocomplete popover not closing when clicking on the appbar

Bug type
Component
Component name
AppBar
What happened?
Autocomplete popover not closing when clicking on the appbar
Expected behavior
Autocomplete popover should close when clicking on the appbar
Reproduction link
https://try.mudblazor.com/snippet/GYGcFkwAovkHjGdO
Reproduction steps

Click on the autocomplete component to open popover
Click on the appbar
See how the popover stays open

Relevant log output
No response
Version (bug)
6.0.17
Version (working)
No response
What browsers are you seeing the problem on?
Microsoft Edge
On what operating system are you experiencing the issue?
Windows
Pull Request

[X] I would like to do a Pull Request

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Its a known z-index problem. In your example you can give your mudappbar to z-index that is less than 5.


chat history

has anyone created a project that saves history to some db ?
and use data as context

maybe something like this?
this way we will never hit 4000 token limit

In python there's a way to accomplish that with NLTK%20and%20response.), not sure in GO.

@ahmedRSA If you don't need to keep all history, then you can create array of requests and responses historyList []openai.ChatCompletionMessage and append it each time you sending request to CreateChatCompletion(), then after you got a response, in response.Usage.TotalTokens you'll see number of tokens spend for current request+response.
Based on this data you can create trimHistoryList() function to trim head of the array based on your conditions.

why don't u connect to a db and write token/s on every input submission to the logged-in user document (non SQL)?

@ahmedRS how to chat based on history, after logout, user login again, I want them to be able to continue the discussion based on their previous conversation history. use previous data as context.


Add CBC stations

Source
https://www.tvpassport.com/tv-listings
Channels
CBC Halifax - CBHT-DT - CBHTDT.ca
CBC Ottowa - CBOT-DT - CBOTDT.ca
CBC Winnipeg - CBWT-DT - CBWTDT.ca
CBC Calgary - CBRT-DT - CBRTDT.ca
CBC Edmonton - CBXT-DT - CBXTDT.ca
Notes
Add EPG for other CBC stations. Vancouver, Toronto and Montreal already have valid sources

Added in https://github.com/iptv-org/epg/commit/9f7162a08bd4ca03b944904553868622cad82704


Provide option to customize the location of the root-folder for frontend code.

Since each project is different and often the structure must follow some company policy, I think it would be useful to have an option to specifiy the root-folder (location of package.json) where the frontend code is located.
The frontend-maven-plugin also supports this option and usually tutorials put the frontend code in src/main/frontend. I wouldn't go as far as to set this new option to a specific value, but as an optional possibility to customize.

Hi @davidkron,
Thank you for your message. I agree customizing the location of the package.json file would be useful. Let's plan it for the next release. The location of the frontend code is not constrained by the plugin however. It can be placed wherever the developer wants (e.g. main/src/frontend, js/app...).
Regards
Vincent


Use .//text() to extract text from selector

And expose functions that operate on selectors. Fixes #7

Codecov Report

Merging #8 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master     #8   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           2      2
  Lines          42     42
  Branches        6      6
=====================================
  Hits           42     42

Impacted Files
Coverage Δ

html_text/html_text.py
100% <100%> (ø)
:arrow_up:

html_text/__init__.py
100% <100%> (ø)
:arrow_up:

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 f56c0ba...494abe0. Read the comment docs.

This is in 0.3.0 now, somehow I forgot to make a release


Temporary fix for RasterGridPlot

As described in https://github.com/ioam/holoviews/issues/976 RasterGridPlot currently fails because it has no streams attribute. This is because it's a very atypical plot type that does not currently support streams, making streams and comms work with it will be some effort. Once this has been merged we should open an issue to add that support.

Not sure why the tests didn't fail here but the broken plot in Exploring_Data seems to be working.

@jlstevens Ready to merge, just a very tiny stub for the time being.

Once this has been merged we should open an issue to add that support.

Please do!


Update Composer dependencies (2021-03-22-00-03)

Visual regression test passed!
View the visual regression test report


Add clear data notification ab test

Task/Issue URL: https://app.asana.com/0/361428290920652/950570149935908
Tech Design URL: N/A
Description:
Add clear data notification experiment
Steps to test this PR:
TEST PREPARATION:

In VariantManager, comment out all variants other than "me", "mt", "mf", "mu"
Open NotificationScheduler and change scheduleClearDataNotification(duration.toLong(), TimeUnit.DAYS) to scheduleClearDataNotification(30, TimeUnit.SECONDS)
Open Charles and prepare to watch networking traffic

TEST ONE: Notification launched from active app

Launch the app from a clean installation
Ensure the notification fires after ~30 seconds
Check that the notification shown mnot_s pixel fires
Tap the notification content and ensure the settings page is opened
Check that the notification launched mnot_l pixel fires
Launch the app again and ensure the notification does not show

TEST TWO: Notification launched from killed app

Launch the app from a clean installation
Kill the app
Ensure the notification fires after ~30 seconds
Check that the notification shown mnot_s pixel fires
Tap the notification content and ensure the settings page is opened
Check that the notification launched mnot_l pixel fires
Launch the app again and ensure the notification does not show

TEST THREE: Notification dismissed

Launch the app from a clean installation
Ensure the notification fires after ~30 seconds
Check that the notification shown mnot_s pixel fires
Tap the notification and ensure the settings page is opened
Check that the notification cancelled mnot_c pixel fires

TEST FOUR: Notification not shown if clear data already set

Launch the app from a clean installation
Update the auto clear data settings so they are not blank
Ensure the notification does not fire
Kill the app and relaunch
Again, ensure the notification does not fire

TEST FIVE: Disable/Enable Notifications

Disable app notifications
Ensure that mnot_d pixel fires on next launch
Relaunch the app and ensure the mnot_d pixel does not fire a second time
Enable app notifications
Ensure that mnot_e pixel fires on next launch
Relaunch the app and ensure the mnot_e pixel does not fire a second time

TEST SIX: Database migration

Install the version of the app in develop and launch it
Upgrade to this branch
Make sure nothing explodes 💥

Internal references:
Software Engineering Expectations
Technical Design Template

It's not clear how to test the notification cancelling. TEST 3 seems to be the same as TEST 1?

I swiped the notification, tapped on settings, disabled notifications for the app and then launched the app but didn't see the cancel notification or notifications disabled pixel.  (Pixel 2, API 27)

I disabled notifications completely for the app (without doing it via the notification) and still don't see the notifications disabled pixel.

 When you tap the notification and go straight to settings you can by-pass onboarding.  So when you then launch it subsequently you see the onboarding again.  Probably best not to schedule the notification if onboarding hasn't been completed?

Thanks for reviewing @brindy.

Excuse the cut and paste fail! I have updated test three to be a "swipe" away notification.
I see the mnot_c cancel pixel every time I swipe dismiss a notification. The enabled/disabled mnot_e & mnot_d weren't always showing or could be slow. I've moved them to app onResume so we seen them faster
As above
I'm ok with this for the experiment. It's an edge case and if they have installed, launched and then forgotten about us without doing the onboarding, then I want to entice them back. Will add making a smoother onboarding specific notification as a future improvement though.


chore(holesky): pin lighthouse image, change docs

Minor changes to reflect the new Lighthouse release that removes the always-prefer-builder-payload flag. The image is now pinned, and docs have been changed a bit.
The section on what flags to provide is a bit generic but it's okay for now. Ideally we should add a comprehensive guide on which flags to enable on all beacon clients/validators clients.

@mempirate I have to re-request a review otherwise I cannot merge it -- can we loosen up the requirements for merging for us core devs?


EKM Provider specification

As a HSM vendor, we would like to write a EKM Provider for MS Sql-server. However, the necessary specification, header files are missing in the documentation.
I would like to kindly ask you to provide us with the proper link to this information.
best regards
Marcel Dasen
VP Engineering
Securosys SA

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

ID: be1f2c05-a6cd-c645-3328-f3a2dfaaf6a6
Version Independent ID: c71aae83-1916-738d-a2dd-0c3917f86551
Content: Extensible Key Management (EKM) - SQL Server
Content Source: docs/relational-databases/security/encryption/extensible-key-management-ekm.md
Product: sql
Technology: security
GitHub Login: @jaszymas
Microsoft Alias: jaszymas

@mdasen -- thank you for your feedback and request.  Please consider these resources:

SQL Server on Microsoft Q&A
DBA Stack Exchange
Stack Overflow

@jaszymas -- please look into this potential documentation issue.

These pages describes how to configurate SQL Server to integrate with HSM. But the question is about how to develop the EKM interface of HSM.

Related to #8797

This is a question we cannot answer in the documentation repository, because it is far beyond our scope. I would strongly recommend reaching out to Microsoft through an account manager to speak to the product group directly. I am closing this issue, as well as the related issue.


how to exit the warpd properly?

info

os:Linux xx 5.15.32-1-MANJARO #1 SMP PREEMPT Mon Mar 28 09:16:36 UTC 2022 x86_64 GNU/Linux
warpd: r73.f7d1202

question
I can start it from terminal with warpd. I have seen the readme and man.md. Not really clear how to exit it. Last I just kill it with KDE system monitor. Is that ok?
Is there a way like a icon in system tray to control the warpd start, stop or exit? Just like Screenkey.

If by 'exit' you mean 'deactivate', you just press the escape key.  Though the user is expected it running the background.

Thanks for your reply. I know what you means. I can do deactivate and pkill. Thanks all the same.
From An idea

在 2022年4月29日，10:30，rvaiya @.***> 写道：
If by 'exit' you mean 'deactivate', you just press the escape key.  Though the user is expected it running the background.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.


java.lang.StringIndexOutOfBoundsException

FATAL EXCEPTION:
java.lang.StringIndexOutOfBoundsException: begin 0, end 178, length 176
at java.lang.String.checkBoundsBeginEnd(String.java:3942)
at java.lang.String.substring(String.java:2467)

Heelo @AlimuddinSodel ,thanks for your issue, I'm analyzing the error sent and I'll be back soon with updates.

@iamageo did you fix the issue?

Hello @AlimuddinSodel, I couldn't reproduce the specified error, can you give me details of your implementation?

Try to scroll recyclerView continuously

try again using new version 1.0.2
See:
Fix https://github.com/iamageo/AnotherReadMoreLibrary/issues/35
Full Changelog: https://github.com/iamageo/AnotherReadMoreLibrary/compare/1.0.1...1.0.2

Thanks man. its working now

Thanks for your contributing! ✨


fix error due to breaking change in http 0.13

As you can see from below screenshot:

And further discussion on solution can be found here:
https://github.com/dart-lang/http/issues/538
The breaking change of the http makes all the request originally in string, now must be Uri, if the user's Flutter is 2.0+
In this commit I was using Uri.parse to refactor all the place using http package method, changing the string to Uri.

Thanks for the contribution! @SeasonLeee


Error when trying to install a package

Running insider pro build 14971. Successfully ran bootstrap.ps1, but when I try to install packages, I get the above error. I aliased vcpkg to my_source_dir/vcpkg/vcpkg.exe
I had no issues on the previous build and I don't know if this is related to some of the changes they have made to powershell in this build. I'll also put in a report in the feedback hub.

This is quite curious. I'm unable to reproduce this on 14974, so I doubt it's a windows issue. Most likely, it looks like we're not changing directory correctly [2] before calling our script to fetch required dependencies [1]. I would guess that we aren't properly detecting the vcpkg root folder.
First, what do you get as a result of vcpkg version? Could you confirm that you have a .vcpkg-root file in the root of your enlistment, along with a scripts\fetchDependency.ps1 script from that directory?
Finally, the immediate workaround is to either:

Run ./vcpkg.exe install sdl2 directly from the enlistment root once. That should pull down all the core dependencies and then you shouldn't hit this issue for installing other packages.
Install CMake 3.5+ from https://cmake.org/download/. You may need to also install git.

[1] https://github.com/Microsoft/vcpkg/blob/master/toolsrc/src/vcpkg_Environment.cpp#L74
[2] https://github.com/Microsoft/vcpkg/blob/master/toolsrc/src/main.cpp#L66

Reinstalling CMake fixed it. Something must have transferred wrong when upgrading from the last build.
Thanks for the quick reply! I think you all have something great here and I am looking forward to contributing to the packages after I mess around with it some more.
Have a good holiday.


monaco-graphql: work with multiple instances?

Looking at the monaco-graphql API I was wondering if it's possible to use it for individual instances?
Let's have a look at this example:
import { api as GraphQLAPI } from 'monaco-graphql';
GraphQLAPI.setSchema(`
type Query {
    foo: String
}
`);

Assuming I have two instances of monaco editor running, how can I set a different schema or settings in general for individual instances?

this mode is designed to be run with as many instances of monaco editor as you like, but currently the language worker only supports one schema at a time.

Would you be interested to make the API multi editor compatible? I'd be happy to help if you give me some pointers. Before working on this we should have a discussion around the API though.

well, it is multi editor compatible! i’ve been able to implement multiple editor instances just fine using this mode. for example, a schema editor and operation editor side by side has worked for me. another example is graphql-code-generator site where they have a PR to introduce this mode with multiple editors.
you may be thinking of multiple schemas maybe? we are far off from needing to support multiple schemas. most graphql projects involve a single schema or a single endpoint to access a federated schema. we have much more important features to support first if that’s the goal

@jensneuse you can do editor.create(id, { language: 'graphqlDev'}) as much as you like, and create many monaco editor instances.
then, if you want users to be able to switch schemas, that can happen dynamically using setSchema() or setSchemaURI(). so you could have a dropdown for switching schemas like in our example here in this repo. or you could have each tab of your editor associated with a different schema URL via a sidebar configuration, and then call setSchema(schemaUrl) dynamically when mounting that tab.
eventually down the line, we may want to be able to model vscode-graphql and have a multi-project, multi-schema configuration where a file's URI determines which schema it can access. however, most graphql projects only consume one schema at a time, and there are many many ways to allow users to switch schemas with the current mode.

so you could have a dropdown for switching schemas like in our example here in this repo

@acao Would you mind sharing the URL for this repo? I couldn't find it.

I got rid of that example because it was annoying to implement in a simple vanilla js example. ended up doubling the size of the monaco webpack example :(
I'm pretty sure setSchema({ url: "" }) was working, but setSchemaUrl("") may have had a bug

Okay, I have tried to set .setSchema(), .setSchemaUrl() and .setSchemaConfig({url: ""}). The auto-completion feature is not working fine with any of these APIs for multiple schemas. also when the schema is not set then auto-completion shows random values based on previous texts of the edito.
I'll again try with a dedicated example to make sure where the issue is.

do you see the appropriate schema requests happening in the network tab?

@Nishchit14 I am addressing these issues in the in flight PR! sorry I closed this before. you will be able to pass GraphQLSchema, request a remote schema, pass AST or introspection JSON or schema SDL, what have you. totally have re-architected the mode. it needs more fine tuning and refactoring but this PR should be ready in a couple of weeks. would love it if you could give the canary release a review!

Yery very nice!

I'm also circling back to an idea one of you originally suggested last year even - monaco-graphql really doesn't need to worry about schema requests. it should expect the user to provide the schema synchronously, and just as schema primitive at the very least, maybe that and introspection JSON.
the other formats are convenient for passing off to the webworker, but really we should just follow codemirror-graphql here and expect the user to fetch and provide the GraphQLSchema perhaps?

I originally wanted to follow monaco-json's model of supporting the schema requests, but their language service actually has a lot of complexity in how it handles schemas:
https://github.com/microsoft/vscode-json-languageservice/blob/main/src/services/jsonSchemaService.ts
I'm not sure what the best route is to take for graphql. I would like to keep a schema cache, that way we can store information about the schemas every time they change. I think there's a route to even using graphql-config in the browser if we allow users to override the default loaders with just the url loader.
But at the same time, in graphql userland, for something like this, often people will want to provide their schemas in their own ways, and we can just add the simple behaviour of reloading the language features and workers when the schema changes, and focus on other things than managing schemas. What do we think?

It makes total sense to me! I think, the user should fetch the schema the way they want and provide it as a static string. Makes the lifecycle of the worker a lot easier.

#1997 now allows multiple schemas at once, and allows you to specify a fileMatch ala monaco-json


trial using latest mono

Trial using the "csharp" Linux environment on Travis to reduce install times

Can you please help me about the installation process of the visual F#.