Ability to use localhost DNS required

Currently if /etc/resolv.conf contains only localhost nameservers, the following error occurs when starting containers (from the docker daemon logs):

time="2017-02-19T16:10:50.505005194Z" level=info msg="No non-localhost DNS nameservers are left in resolv.conf. Using default external servers: [nameserver <IP_ADDRESS> nameserver <IP_ADDRESS>]"

The problem with this behaviour is that in some company networks access to all non-managed DNS servers. Compounded with the changes to systemd-resolved which as of version 232 of systemd no longer uses a symlinked resolv.conf but proxies through a server running on <IP_ADDRESS>, I can't create containers without specifying the DNS for every container I start (which is not tolerant to my development laptop moving between the company and my personal network and is pretty inconvenient).
In my opinion, the behaviour that should be adopted is that a DNS proxy (like the one that is used on the default network) runs on the network's default gateway and that all embedded DNS server instances forward to this server which can then use the host machine's DNS configuration. In general, I don't really feel like setting the nameservers to a fixed value by default is a good practice, even if it is Google DNS which you set it to.
Note that containers on the default network, do not have this problem as they presumably do not use the embedded DNS server and route their DNS requests to the gateway IP.
Is there a reason (a security one maybe) that you don't allow localhost DNS nameservers other than the fact they would not be available to the container using the localhost IP?
I am not sure if it's related to #1548 but no one there is reporting the log error I have mentioned and are in fact saying that adding <IP_ADDRESS> to their /etc/resolv.conf is helping, so probably not.
This issue would be helped with the resolution of #1046 which would allow alternate but is still not useful for a mobile device where the private DNS server is only available on the network that is forcing the use of it.

@flungo This is fixed in the docker master and will be available in the next release. This works for containers on user defined networks because Docker embedded DNS is required to differentiate if the resolver is a host loopback IP or the container's loopback (when you have a local resolver in the container itself).

Still seem to be experiencing a problem using Docker 17.05.0-ce. Should this have been resolved or is the fix not yet included in the Docker release? If the change should be in 17.05.0-ce then I will try to provide more detail on my scenario and what's not working.
My current docker version output:
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.8.1
 Git commit:   89658bed64
 Built:        Fri May  5 22:40:58 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.8.1
 Git commit:   89658bed64
 Built:        Fri May  5 22:40:58 2017
 OS/Arch:      linux/amd64
 Experimental: false

@flungo It should work in 17.05. Can you share your env details about how you are creating the containers with the host loopback IP as resolver ?

This does not work in 17.05. AFAIK the internal DNS resolver runs in the container namespace, which can't see a resolver on the host.
What is desperately needed is for the internal resolver to setup datagram and stream sockets so it can actually communicate with a process on the host that can then forward queries in host-space to the host's resolvers.

I am assuming you are using user defined networks because the docker DNS server is not enabled for the default bridge (docker0 bridge) network. Here is a capture showing how the hostmode resolver works with docker DNS. I am running a 17.06 RC binary in this node, but 17.05 should work as well.
ubuntu@ip-172-31-10-183:~$ sudo dnsmasq -d --user=root --resolv-file=/home/ubuntu/dnsmasq_resolv.conf --log-queries
sudo: unable to resolve host ip-172-31-10-183: Connection refused
dnsmasq: started, version 2.75 cachesize 150
dnsmasq: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
dnsmasq: reading /home/ubuntu/dnsmasq_resolv.conf
dnsmasq: using nameserver <IP_ADDRESS>#53
dnsmasq: read /etc/hosts - 7 addresses

ubuntu@ip-172-31-10-183:~$ docker network create -d bridge docker
02679f9e944717ed03bdd33f768bdc7b16d0962b1331d5516accce31b20929cb
ubuntu@ip-172-31-10-183:~$ docker run -it --name dnstest --net docker sanimej/ubuntu bash

root@f2c6ac1599c2:/# dig +short google.com
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
root@f2c6ac1599c2:/# dig +short AAAA google.com
2607:f8b0:400a:807::200e
root@f2c6ac1599c2:/#

dnsmasq logs
dnsmasq: query[A] google.com from <IP_ADDRESS>
dnsmasq: forwarded google.com to <IP_ADDRESS>
dnsmasq: reply google.com is <IP_ADDRESS>
dnsmasq: reply google.com is <IP_ADDRESS>
dnsmasq: reply google.com is <IP_ADDRESS>
dnsmasq: reply google.com is <IP_ADDRESS>
dnsmasq: reply google.com is <IP_ADDRESS>
dnsmasq: reply google.com is <IP_ADDRESS>
dnsmasq: query[AAAA] google.com from <IP_ADDRESS>
dnsmasq: forwarded google.com to <IP_ADDRESS>
dnsmasq: reply google.com is 2607:f8b0:400a:807::200e

I will go ahead and close this issue. If you have issues getting it to work can you show a reproducible  procedure with the relevant details and also the deamon logs in debug mode when an external query is sent from a container.

Sorry for the delay. I'll document the current behavior on 17.05.0 CE then upgrade and see if anything changes. It is possible that the problem I am experiencing is different from what I first reported. My pre-upgrade environment is:
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.8.1
 Git commit:   89658bed64
 Built:        Fri May  5 22:40:58 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.8.1
 Git commit:   89658bed64
 Built:        Fri May  5 22:40:58 2017
 OS/Arch:      linux/amd64
 Experimental: false

In order to make it easy to identify when there is a problem and replicate the problem I was having on my Univerity campus where DNS requests to external servers is restricted I added rules equilient to these to my firewall:
iptables -I FORWARD -o WAN -m tcp --dport 53 -j DROP
iptables -I FORWARD -o WAN -m udp --dport 53 -j DROP

The local recursor which I am using is systemd-resolved and the /etc/resolv.conf on the host is a symlink to ../usr/lib/systemd/resolv.conf with the contents:
# This is a static resolv.conf file for connecting local clients to
# systemd-resolved via its DNS stub listener on <IP_ADDRESS>.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver <IP_ADDRESS>

systemd-resolved is using the upstream DNS server given by DHCP which is the firewall which I added the rules to and on the host I am able to resolve addresses.
If I now run docker run --rm flungo/netutils dig google.com I get:
; <<>> DiG 9.10.4-P6 <<>> google.com
;; global options: +cmd
;; connection timed out; no servers could be reached

Looking at the docker logs, the following has been logged:
Jul 03 20:11:09 my-hostname dockerd[18063]: time="2017-07-03T20:11:09.016166930+01:00" level=info msg="No non-localhost DNS nameservers are left in resolv.conf. Using default external servers: [nameserver <IP_ADDRESS> nameserver <IP_ADDRESS>]"
Jul 03 20:11:09 my-hostname dockerd[18063]: time="2017-07-03T20:11:09.016191091+01:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers: [nameserver 2001:4860:4860::8888 nameserver 2001:4860:4860::8844]"

Running docker run --rm flungo/netutils cat /etc/resolv.conf confirms that this is how the DNS has been configured inside of the container:
# This is a static resolv.conf file for connecting local clients to
# systemd-resolved via its DNS stub listener on <IP_ADDRESS>.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver <IP_ADDRESS>
nameserver <IP_ADDRESS>

This becomes even more frustrating when trying to build an image. If I try to build my netutils image with docker build -t flungo/latex src/ you get:
Sending build context to Docker daemon  2.048kB
Step 1/4 : FROM alpine
 ---> 4a415e366388
Step 2/4 : MAINTAINER Fabrizio Lungo<EMAIL_ADDRESS> ---> Running in faa10fca375a
 ---> facc0229a08b
Removing intermediate container faa10fca375a
Step 3/4 : RUN apk add --update iproute2 bind-tools curl openssl nmap nmap-scripts tcpdump
 ---> Running in ffee7793cbb4
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.5/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.c51f8f92.tar.gz: No such file or directory
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.5/community: temporary error (try again later)
WARNING: Ignoring APKINDEX.d09172fd.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
  bind-tools (missing):
    required by: world[bind-tools]
  curl (missing):
    required by: world[curl]
  iproute2 (missing):
    required by: world[iproute2]
  nmap (missing):
    required by: world[nmap]
  nmap-scripts (missing):
    required by: world[nmap-scripts]
  openssl (missing):
    required by: world[openssl]
  tcpdump (missing):
    required by: world[tcpdump]
The command '/bin/sh -c apk add --update iproute2 bind-tools curl openssl nmap nmap-scripts tcpdump' returned a non-zero code: 7

The solutions would be for me to change the DNS setup on the machine and instead write the DNS servers provided over DHCP into the host's /etc/resolv.conf or (what I have been doing) adding a dropin when on the University network to the docker service which sets DNS flag to manually specify the university DNS (annoyingly different depending on where on campus you are).
Given in my first post I said it worked on default networking, either the way default networking works has been changed or this may be a different issue. Runing in a custom network appears to work.
Logs from debug mode after trying to run docker run --rm flungo/netutils dig google.com:
Jul 03 20:48:03 my-hostname systemd[1]: Started Docker Application Container Engine.
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.520751675+01:00" level=debug msg="Calling GET /_ping"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.521973303+01:00" level=debug msg="Calling POST /v1.29/containers/create"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.522316094+01:00" level=debug msg="form data: {\"AttachStderr\":true,\"AttachStdin\":false,\"AttachStdout\":true,\"Cmd\":[\"dig\",\"google.com\"],\"Domainname\":\"\",\"Entrypoint\":null,\"Env\":[],\"HostConfig\":{\"AutoRemove\":true,\"Binds\":null,\"BlkioDeviceReadBps\":null,\"BlkioDeviceReadIOps\":null,\"BlkioDeviceWriteBps\":null,\"BlkioDeviceWriteIOps\":null,\"BlkioWeight\":0,\"BlkioWeightDevice\":null,\"CapAdd\":null,\"CapDrop\":null,\"Cgroup\":\"\",\"CgroupParent\":\"\",\"ConsoleSize\":[0,0],\"ContainerIDFile\":\"\",\"CpuCount\":0,\"CpuPercent\":0,\"CpuPeriod\":0,\"CpuQuota\":0,\"CpuRealtimePeriod\":0,\"CpuRealtimeRuntime\":0,\"CpuShares\":0,\"CpusetCpus\":\"\",\"CpusetMems\":\"\",\"DeviceCgroupRules\":null,\"Devices\":[],\"DiskQuota\":0,\"Dns\":[],\"DnsOptions\":[],\"DnsSearch\":[],\"ExtraHosts\":null,\"GroupAdd\":null,\"IOMaximumBandwidth\":0,\"IOMaximumIOps\":0,\"IpcMode\":\"\",\"Isolation\":\"\",\"KernelMemory\":0,\"Links\":null,\"LogConfig\":{\"Config\":{},\"Type\":\"\"},\"Memory\":0,\"MemoryReservation\":0,\"MemorySwap\":0,\"MemorySwappiness\":-1,\"NanoCpus\":0,\"NetworkMode\":\"default\",\"OomKillDisable\":false,\"OomScoreAdj\":0,\"PidMode\":\"\",\"PidsLimit\":0,\"PortBindings\":{},\"Privileged\":false,\"PublishAllPorts\":false,\"ReadonlyRootfs\":false,\"RestartPolicy\":{\"MaximumRetryCount\":0,\"Name\":\"no\"},\"SecurityOpt\":null,\"ShmSize\":0,\"UTSMode\":\"\",\"Ulimits\":null,\"UsernsMode\":\"\",\"VolumeDriver\":\"\",\"VolumesFrom\":null},\"Hostname\":\"\",\"Image\":\"flungo/netutils\",\"Labels\":{},\"NetworkingConfig\":{\"EndpointsConfig\":{}},\"OnBuild\":null,\"OpenStdin\":false,\"StdinOnce\":false,\"Tty\":false,\"User\":\"\",\"Volumes\":{},\"WorkingDir\":\"\"}"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.558197414+01:00" level=debug msg="container mounted via layerStore: /var/lib/docker/btrfs/subvolumes/99f8ebfca16a750cfbb7fb979395faccc8ecd9b0aebfa3883d300617eba2bf66"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.572647411+01:00" level=debug msg="Calling POST /v1.29/containers/a6c2415084f3016811b4c5a8048ac15777bcd51aee05c73d1276e998ee4ea107/attach?stderr=1&stdout=1&stream=1"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.573067638+01:00" level=debug msg="attach: stderr: begin"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.573102810+01:00" level=debug msg="attach: stdout: begin"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.575429049+01:00" level=debug msg="Calling GET /v1.29/events?filters=%7B%22container%22%3A%7B%22a6c2415084f3016811b4c5a8048ac15777bcd51aee05c73d1276e998ee4ea107%22%3Atrue%7D%2C%22type%22%3A%7B%22container%22%3Atrue%7D%7D"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.576710378+01:00" level=debug msg="Calling POST /v1.29/containers/a6c2415084f3016811b4c5a8048ac15777bcd51aee05c73d1276e998ee4ea107/start"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.577854476+01:00" level=debug msg="container mounted via layerStore: /var/lib/docker/btrfs/subvolumes/99f8ebfca16a750cfbb7fb979395faccc8ecd9b0aebfa3883d300617eba2bf66"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.578456224+01:00" level=debug msg="Assigning addresses for endpoint relaxed_kilby's interface on network bridge"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.578501145+01:00" level=debug msg="RequestAddress(LocalDefault/<IP_ADDRESS>/16, <nil>, map[])"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.595836537+01:00" level=debug msg="Assigning addresses for endpoint relaxed_kilby's interface on network bridge"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.612216625+01:00" level=info msg="No non-localhost DNS nameservers are left in resolv.conf. Using default external servers: [nameserver <IP_ADDRESS> nameserver <IP_ADDRESS>]"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.612254794+01:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers: [nameserver 2001:4860:4860::8888 nameserver 2001:4860:4860::8844]"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.623693648+01:00" level=debug msg="Programming external connectivity on endpoint relaxed_kilby (dd51276f3e21ee6a078e3f0ae1c991f7af5766c442efc0c5ca77b0b87ccbca7f)"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.755644958+01:00" level=debug msg="sandbox set key processing took 75.94953ms for container a6c2415084f3016811b4c5a8048ac15777bcd51aee05c73d1276e998ee4ea107"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.864562046+01:00" level=debug msg="libcontainerd: received containerd event: &types.Event{Type:\"start-container\", Id:\"a6c2415084f3016811b4c5a8048ac15777bcd51aee05c73d1276e998ee4ea107\", Status:0x0, Pid:\"\", Timestamp:(*timestamp.Timestamp)(0xc420862a60)}"
Jul 03 20:48:44 my-hostname dockerd[23972]: time="2017-07-03T20:48:44.873545700+01:00" level=debug msg="libcontainerd: event unhandled: type:\"start-container\" id:\"a6c2415084f3016811b4c5a8048ac15777bcd51aee05c73d1276e998ee4ea107\" timestamp:<seconds:1499111324 nanos:864378399 > "
Jul 03 20:49:02 my-hostname dockerd[23972]: time="2017-07-03T20:49:02.970777011+01:00" level=debug msg="containerd: process exited" id=a6c2415084f3016811b4c5a8048ac15777bcd51aee05c73d1276e998ee4ea107 pid=init status=9 systemPid=24194
Jul 03 20:49:02 my-hostname dockerd[23972]: time="2017-07-03T20:49:02.977664192+01:00" level=debug msg="libcontainerd: received containerd event: &types.Event{Type:\"exit\", Id:\"a6c2415084f3016811b4c5a8048ac15777bcd51aee05c73d1276e998ee4ea107\", Status:0x9, Pid:\"init\", Timestamp:(*timestamp.Timestamp)(0xc42080f0a0)}"
Jul 03 20:49:02 my-hostname dockerd[23972]: time="2017-07-03T20:49:02.977843639+01:00" level=debug msg="attach: stdout: end"
Jul 03 20:49:02 my-hostname dockerd[23972]: time="2017-07-03T20:49:02.977861370+01:00" level=debug msg="attach: stderr: end"
Jul 03 20:49:02 my-hostname dockerd[23972]: time="2017-07-03T20:49:02.978206042+01:00" level=debug msg="Revoking external connectivity on endpoint relaxed_kilby (dd51276f3e21ee6a078e3f0ae1c991f7af5766c442efc0c5ca77b0b87ccbca7f)"
Jul 03 20:49:02 my-hostname dockerd[23972]: time="2017-07-03T20:49:02.981256036+01:00" level=debug msg="DeleteConntrackEntries purged ipv4:0, ipv6:0"
Jul 03 20:49:03 my-hostname dockerd[23972]: time="2017-07-03T20:49:03.105721336+01:00" level=debug msg="Releasing addresses for endpoint relaxed_kilby's interface on network bridge"
Jul 03 20:49:03 my-hostname dockerd[23972]: time="2017-07-03T20:49:03.105756719+01:00" level=debug msg="ReleaseAddress(LocalDefault/<IP_ADDRESS>/16, <IP_ADDRESS>)"
Jul 03 20:49:03 my-hostname dockerd[23972]: time="2017-07-03T20:49:03.248830525+01:00" level=debug msg="Client context cancelled, stop sending events"

If this is a valid bug, then most users wont be noticing as most users aren't using a localhost resolver and sitting in a network where DNS requests to google DNS would be blocked after falling back.
Going to upgrade now and post back if this is still the same.

Upgraded to the latest version (built from source using the AUR package) and can still reproduce as described in my last post.
 Like I mentioned earlier Docker DNS server is activated only on user created networks and not on the default bridge network.
Instead of doing..
docker run --rm flungo/netutils dig google.com
try
docker network create -d bridge testnet

docker run --rm --net testnet flungo/netutils dig google.com

@sanimej Using a custom network creates a resolver which works as expected now. The issue is currently is with the default network and so I think this may be different to the one I originally posted. The default network should also be made to work when using a localhost resolver.
Is the default network in the scope of libnetwork or do I need to report on a different repo?
Thanks for your assistance.

# docker version
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:20:42 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:20:42 2017
 OS/Arch:      linux/amd64
 Experimental: false

Docker daemon launch command line: --dns <IP_ADDRESS> --storage-driver=aufs --log-driver=journald
/etc/resolv.conf:
$ cat /etc/resolv.conf
# This is a static resolv.conf file for connecting local clients to
# systemd-resolved via its DNS stub listener on <IP_ADDRESS>.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver <IP_ADDRESS>

Commands:
$ docker network inspect testnet
[
    {
        "Name": "testnet",
        "Id": "a55432658701c3dc9b40e9777516d39929ecef5f5d40abfc0c0f34918b097d11",
        "Created": "2017-07-04T06:27:29.498205627+10:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "<IP_ADDRESS>/16",
                    "Gateway": "<IP_ADDRESS>"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "Containers": {
            "3b723de150d4590150d528858de93f2e0bd84ba177402f042646d83ecfd51a7b": {
                "Name": "inspiring_lalande",
                "EndpointID": "958680a5678b8f103474526f7f31fd814e0c0c1370e6156fb51cde66139ce43b",
                "MacAddress": "02:42:ac:15:00:02",
                "IPv4Address": "<IP_ADDRESS>/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]

Now the container:
$ docker run -it --rm --net testnet ubuntu:zesty bash
root@3b723de150d4:/# apt-get update
Err:1 http://security.ubuntu.com/ubuntu zesty-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu zesty InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu zesty-updates InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu zesty-backports InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Reading package lists...  They have been ignored, or old ones used instead.
root@3b723de150d4:/# cat /etc/resolv.conf
nameserver <IP_ADDRESS>
options ndots:0

Wireshark shows no requests from the container successfully making it to the local host resolver.
AFAIK this is completely expected because the internal resolver still runs in the network namespace of the container, not the host - so localhost requests wouldn't make it out.
The only reliable way I've fixed this is by forcing --dns <IP_ADDRESS> and running a dnsmasq instance on my host listening on that interface, and forwarding to systemd.
Probing around in a privileged container on a user network, I note the following iptables rules being inserted for docker:
# iptables -L -n -v -t nat
Chain PREROUTING (policy ACCEPT 39 packets, 3431 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 3 packets, 201 bytes)
 pkts bytes target     prot opt in     out     source               destination
    1    67 DOCKER_OUTPUT  all  --  *      *       <IP_ADDRESS>/0            <IP_ADDRESS>

Chain POSTROUTING (policy ACCEPT 4 packets, 268 bytes)
 pkts bytes target     prot opt in     out     source               destination
    1    67 DOCKER_POSTROUTING  all  --  *      *       <IP_ADDRESS>/0            <IP_ADDRESS>

Chain DOCKER_OUTPUT (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DNAT       tcp  --  *      *       <IP_ADDRESS>/0            <IP_ADDRESS>           tcp dpt:53 to:<IP_ADDRESS>:44649
    1    67 DNAT       udp  --  *      *       <IP_ADDRESS>/0            <IP_ADDRESS>           udp dpt:53 to:<IP_ADDRESS>:37340

Chain DOCKER_POSTROUTING (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 SNAT       tcp  --  *      *       <IP_ADDRESS>           <IP_ADDRESS>/0            tcp spt:44649 to::53
    0     0 SNAT       udp  --  *      *       <IP_ADDRESS>           <IP_ADDRESS>/0            udp spt:37340 to::53

And for completeness this is the ip routing table:
# ip route
default via <IP_ADDRESS> dev eth0
<IP_ADDRESS>/16 dev eth0 proto kernel scope link src <IP_ADDRESS>

The hosts iptables while the test container is running:
# iptables -L -n -v -t nat
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    8   591 DOCKER     all  --  *      *       <IP_ADDRESS>/0            <IP_ADDRESS>/0            ADDRTYPE match dst-type LOCAL

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 33 packets, 2231 bytes)
 pkts bytes target     prot opt in     out     source               destination
    3   219 DOCKER     all  --  *      *       <IP_ADDRESS>/0           !<IP_ADDRESS>/8          ADDRTYPE match dst-type LOCAL

Chain POSTROUTING (policy ACCEPT 33 packets, 2231 bytes)
 pkts bytes target     prot opt in     out     source               destination
    6   373 MASQUERADE  all  --  *      !docker0  <IP_ADDRESS>/16        <IP_ADDRESS>/0
    9   592 MASQUERADE  all  --  *      !br-a55432658701  <IP_ADDRESS>/16        <IP_ADDRESS>/0
   28  2183 RETURN     all  --  *      *       <IP_ADDRESS>/24     <IP_ADDRESS>/24
    0     0 RETURN     all  --  *      *       <IP_ADDRESS>/24     <IP_ADDRESS>
    0     0 MASQUERADE  tcp  --  *      *       <IP_ADDRESS>/24    !<IP_ADDRESS>/24     masq ports: 1024-65535
    0     0 MASQUERADE  udp  --  *      *       <IP_ADDRESS>/24    !<IP_ADDRESS>/24     masq ports: 1024-65535
    0     0 MASQUERADE  all  --  *      *       <IP_ADDRESS>/24    !<IP_ADDRESS>/24

Chain DOCKER (2 references)
 pkts bytes target     prot opt in     out     source               destination
    5   321 RETURN     all  --  docker0 *       <IP_ADDRESS>/0            <IP_ADDRESS>/0
    0     0 RETURN     all  --  br-a55432658701 *       <IP_ADDRESS>/0            <IP_ADDRESS>/0

# iptables -L -n -v
Chain INPUT (policy ACCEPT 632 packets, 38849 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     udp  --  virbr0 *       <IP_ADDRESS>/0            <IP_ADDRESS>/0            udp dpt:53
    0     0 ACCEPT     tcp  --  virbr0 *       <IP_ADDRESS>/0            <IP_ADDRESS>/0            tcp dpt:53
    0     0 ACCEPT     udp  --  virbr0 *       <IP_ADDRESS>/0            <IP_ADDRESS>/0            udp dpt:67
    0     0 ACCEPT     tcp  --  virbr0 *       <IP_ADDRESS>/0            <IP_ADDRESS>/0            tcp dpt:67

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
47446   41M DOCKER-ISOLATION  all  --  *      *       <IP_ADDRESS>/0            <IP_ADDRESS>/0
30107   40M ACCEPT     all  --  *      docker0  <IP_ADDRESS>/0            <IP_ADDRESS>/0            ctstate RELATED,ESTABLISHED
    0     0 DOCKER     all  --  *      docker0  <IP_ADDRESS>/0            <IP_ADDRESS>/0
17339  987K ACCEPT     all  --  docker0 !docker0  <IP_ADDRESS>/0            <IP_ADDRESS>/0
    0     0 ACCEPT     all  --  docker0 docker0  <IP_ADDRESS>/0            <IP_ADDRESS>/0
27990   39M ACCEPT     all  --  *      br-a55432658701  <IP_ADDRESS>/0            <IP_ADDRESS>/0            ctstate RELATED,ESTABLISHED
    0     0 DOCKER     all  --  *      br-a55432658701  <IP_ADDRESS>/0            <IP_ADDRESS>/0
15662  882K ACCEPT     all  --  br-a55432658701 !br-a55432658701  <IP_ADDRESS>/0            <IP_ADDRESS>/0
    0     0 ACCEPT     all  --  br-a55432658701 br-a55432658701  <IP_ADDRESS>/0            <IP_ADDRESS>/0
    0     0 ACCEPT     all  --  *      virbr0  <IP_ADDRESS>/0            <IP_ADDRESS>/24     ctstate RELATED,ESTABLISHED
    0     0 ACCEPT     all  --  virbr0 *       <IP_ADDRESS>/24     <IP_ADDRESS>/0
    0     0 ACCEPT     all  --  virbr0 virbr0  <IP_ADDRESS>/0            <IP_ADDRESS>/0
    0     0 REJECT     all  --  *      virbr0  <IP_ADDRESS>/0            <IP_ADDRESS>/0            reject-with icmp-port-unreachable
    0     0 REJECT     all  --  virbr0 *       <IP_ADDRESS>/0            <IP_ADDRESS>/0            reject-with icmp-port-unreachable

Chain OUTPUT (policy ACCEPT 646 packets, 37339 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     udp  --  *      virbr0  <IP_ADDRESS>/0            <IP_ADDRESS>/0            udp dpt:68

Chain DOCKER (2 references)
 pkts bytes target     prot opt in     out     source               destination

Chain DOCKER-ISOLATION (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DROP       all  --  br-a55432658701 docker0  <IP_ADDRESS>/0            <IP_ADDRESS>/0
    0     0 DROP       all  --  docker0 br-a55432658701  <IP_ADDRESS>/0            <IP_ADDRESS>/0
47446   41M RETURN     all  --  *      *       <IP_ADDRESS>/0            <IP_ADDRESS>/0

Partial process tree of docker while the container was running:
root      2850  0.5  0.7<PHONE_NUMBER>4 ?        Ssl  06:43   0:05 dockerd -H fd:// --dns <IP_ADDRESS> --storage-driver=aufs --log-driver=journald
root      2862  0.1  0.1<PHONE_NUMBER>4 ?        Ssl  06:43   0:01  \_ docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc
root      7440  0.0  0.0 274536  3516 ?        Sl   06:55   0:00      \_ docker-containerd-shim 965d370c54f8b513645a52a5d1f9c331c57f1134b27457037755075ab0ed8f6a /var/run/docker/libcontainerd/965d370c54f8b513645a52a5d1f9c331c57f1134b27457037755075ab0ed8f6a docker-runc
root      7459  0.0  0.0  18380  2468 pts/4    Ss+  06:55   0:00          \_ bash

@flungo  Container can be configured with either its own loopback IP as the resolver (cases where the DNS server is running in the container namespace) or host loopback IP as the resolver (when it comes from host's /etc/resolv.conf). Docker DNS server runs in the host namespace but listens to the DNS queries from the container. So it can handle these two cases differently and route the queries to the host resolver in the latter case.
Its not possible to do this for containers on the default bridge network because the queries are directly sent to the configured resolver IP; ie: it can't' differentiate between local loopback vs host loopback. If this use case is a requirement for you consider using user defined networks.

@wrouesnel If you have --dns <IP_ADDRESS> configured for the docker daemon this is equivalent to configuring --dns <IP_ADDRESS> on every docker run. This will take precedence over the resolver IPs from host's /etc/resolv.conf. So the queries will be sent to <IP_ADDRESS> in the container's network namespace which obviously won't work if your resolver is running in the host <IP_ADDRESS>.53.
Can you try without the --dns <IP_ADDRESS> in the docker daemon config ?

@sanimej Ok that seems to be work. Still leaves me with nothing for bridge0 and builds, so I still have to do the workaround but so long as DNS gets to the host properly that's progress.

@wrouesnel docker build does take a --network config. See if that works for you.

I get that the default network doesn't use the embedded DNS server for backward compatibility reasons - but I feel like it would be useful to have the option to enable it in there, which would be a neat, easy, one-line-in-a-config-file solution to these problems (which I think many people are still running into).

I am running containers that do not just depend on a host-localhost dns proxy but a similar http proxy. Creating a new network for that is a joke. The proxies on the host will have to change config and restart to start listening on the new bridge. And after a reboot they will fail to come up, because the bridges are not there anymore. Again change config and restart ... Or run an instance per bridge ...?
Just give us the reverse of "--publish" to make host-localhost services available in containers by port. I bet there are a thousand more valid use-cases for that (i.e. printing localhost:631)

Containers on that default bridge can also not deal with network-roaming hosts. The copy of resolv.conf will get outdated. You will have to manually update it or restart your container. A problem that a host-localhost resolver proxy could solve ... but there is no way to get to it.

Such a port mapping could be done with iptables or something like socat. Fun fact, when starting dockerd from an init system it will report running before the default bridge is up. So your services starting after dockerd might still fail to listen on the bridge.

For clarification, my containers in user-defined networks need to access DNS running in a default-bridge container (on same host).  Docker host has DHCP reservation (Host IP = DNS IP, so /etc/resolv.conf nameserver entry points to it’s own IP address - not “localhost”).  This does not appear to work.  I cannot resolve DNS from the user-defined network containers.


Merge Development into Main

Codecov Report
Base: 33.42% // Head: 33.42% // No change to project coverage :thumbsup:

Coverage data is based on head (9ea9885) compared to base (1f1c2fc).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #60   +/-   ##
=======================================
  Coverage   33.42%   33.42%
=======================================
  Files          63       63
  Lines         377      377
  Branches       37       37
=======================================
  Hits          126      126
  Misses        218      218
  Partials       33       33

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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


nimble/iso: Add ISO Rx datapath and extend ISO Broadcast API

This adds ISO Rx datapath and along with Broadcast Sink ISO API
and implementation.
This also extends btshell application with Broadcast ISO related commands.
Depends on: https://github.com/apache/mynewt-nimble/pull/1700

Fixed coding style issues
The remaining coding style issues discovered by CI are false positives


The uninstallation script is much slower than direct file deletion

I used the provided script to uninstall Azure PowerShell:
$AzModules |
  ForEach-Object {
    Remove-Module -Name $_ -ErrorAction SilentlyContinue
    Write-Output "Attempting to uninstall module: $_"
    Uninstall-Module -Name $_ -AllVersions
  }

But the uninstallation is extremely slow.
Alternatively, I got the location of modules with
Get-Module -ListAvailable Az*

    Directory: C:\Users\user1\Documents\PowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     6.4.0                 Az                                  Core,Desk
Script     2.5.3                 Az.Accounts                         Core,Desk {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave…}
Script     1.1.1                 Az.Advisor                          Core,Desk {Get-AzAdvisorRecommendation, Enable-AzAdvisorRecommendation, Disable-AzAdvisorRecommendation, Get-AzAdvisorConfigura…
Script     2.4.0                 Az.Aks                              Core,Desk {Get-AzAksCluster, New-AzAksCluster, Remove-AzAksCluster, Import-AzAksCredential…}

Then delete everything with
Remove-Item -Recurse -Force C:\Users\user1\Documents\PowerShell\Modules\Az*

This is much faster.

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

ID: c7a2bfe1-b332-e523-007b-5216111343ca
Version Independent ID: b3ce94fa-6e76-4ffe-e70e-07f7a321fcd4
Content: Uninstall Azure PowerShell
Content Source: docs-conceptual/azps-6.4.0/uninstall-az-ps.md
Service: azure-powershell
GitHub Login: @mikefrobbins
Microsoft Alias: mirobb

@jiasli - Thanks for bringing this to our attention.
I'm going to assign this to the document author so they can update the document accordingly.

@jiasli While the command you provided is indeed much faster, it would remove any PowerShell module the user has installed in the current user scope that begins with Az, not just the ones installed by the Az PowerShell module.
The code provided in the official documentation determines what modules were installed based on the hidden XML file in the module's directory and then iterates through them, performing the uninstallation.
We are open to ideas for improving the uninstallation process, but it must accurately uninstall only the modules that were installed by the Az PowerShell module.


Cannot Modify BASEDIR

When I generate-daemons I want to change the directory of the scripts to the root instead of in a bin dir.
It appears that the BASEDIR is hard coded like this:
# discover BASEDIR
BASEDIR=`dirname "$0"`/..
BASEDIR=`(cd "$BASEDIR"; pwd)`

The BASEDIR gets set to the level above the location of the script. This makes sense when you are in bin but not if you are in the root or even if you are in a nested dir.
BASEDIR should be configurable.

By BASEDIR all other things are calculated conf/logs folder etc. This will be a bigger change...If you like to provide a PR incl. tests i would appreciate that...But at the moment i don't see a real advantage nor a use case for it...

:+1:
my /etc/init.d/appname
...
# Application
APP_NAME="appname"
APP_LONG_NAME="appname"

# discover BASEDIR
BASEDIR=`dirname "$0"`/..
BASEDIR=`(cd "$BASEDIR"; pwd)`
ls -l "$0" | grep -e '->' > /dev/null 2>&1
if [ $? = 0 ]; then
  #this is softlink
  _PWD=`pwd`
  _EXEDIR=`dirname "$0"`
  cd "$_EXEDIR"
  _BASENAME=`basename "$0"`
  _REALFILE=`ls -l "$_BASENAME" | sed 's/.*->\ //g'`
   BASEDIR=`dirname "$_REALFILE"`/..
   BASEDIR=`(cd "$BASEDIR"; pwd)`
   cd "$_PWD"
fi

[ -f "$BASEDIR"/bin/../conf/pre-run.sh ] && . "$BASEDIR"/bin/../conf/pre-run.sh

# Debugger
echo $0 $@ " --- " $BASEDIR >> /tmp/debug.log

# Wrapper
WRAPPER_CMD="./wrapper"
WRAPPER_CONF="$BASEDIR/etc/wrapper.conf"
...

debugger output:
/etc/rc0.d/K80appname stop  ---  /etc
/etc/init.d/appname stop  ---  /opt/appname
/etc/rc3.d/S20appname start  ---  /etc
/etc/init.d/appname start  ---  /opt/appname

this is my point to set BASEDIR.
I tried it in pom.xml:
<environmentSetupFileName>/opt/appname/config_basedir.sh</environmentSetupFileName>

to redefine BASEDIR but here didn't work beacuse of it.

For init.d script, i create softlink to the real script. that should work


Allow render HTML with css/js external links

This PR allows to render some HTMLs which has <style>, <script> tags when SANITIZER disabled. This also makes it simpler when configuring some external renderers.

I'm concerned with this PR because someone could link to /user/repo/render/.... and have XSS execute. I know that they chose to do this by disabling SANITIZER, but this seems especially dangerous. If merged, we should at least create a big warning in docs, and perhaps in admin saying the config is insecure.

Warning added in the docs.

Could we use Content Security Policy headers to prevent any XSS?

@delvh @wxiaoguang both done.

The introduced DisplayInIFrame seems redundancy and confusing. Many render doesn't support the DisplayInIFrame, and it's only used for the external render.
In my mind, the logic might be:
if (externalRender) {
    if (renderInIframe) {
        show iframe
    } else {
        render in page
    }
} else {
    render in page
}

And the DISABLE_SANITIZER + USE_IFRAME makes it difficult to understand all combinations.

DISABLE_SANITIZER=true, USE_IFRAME=true
DISABLE_SANITIZER=false, USE_IFRAME=true
What's the difference of them? Does USE_IFRAME require DISABLE_SANITIZER=true?

DISABLE_SANITIZER is just available when USE_IFRAME is false. I have changed the logic.

Personally I do not think this design is good. It would make the  config system and Render interface confusing.
If most people like, I have no objection.

You are referring to https://github.com/go-gitea/gitea/pull/19017#discussion_r895168355, correct?
I am generally in favor of it, the only problem I can foresee is that it would be a breaking change, correct?
Or is the DISABLE_SANITIZER not part of 1.16?

You are referring to #19017 (comment), right? I am generally in favor of it, the only problem I can foresee is that it would be a breaking change, correct? Or is the DISABLE_SANITIZER configuration not part of 1.16?

I think this is not a break change. This PR allows output a throughout HTML document with scripts/css but not only a DIV. Before this PR, external tools have to remove HTML tag and HEAD tag.

I propose a PR

https://github.com/lunny/gitea/pull/23

Major changes:

Add missing USE_IFRAME to app.ini
Clarify how USE_IFRAME works: it suppresses DISABLE_SANITIZER option and there will be no sanitizer.
Introduce markup.PostProcessRenderer and markup.ExternalRenderer, only the external render needs to implement the markup.ExternalRenderer interface (aka SanitizerDisabled and DisplayInIFrame)
Introduce ctx.InStandalonePage, it's simpler than AllowIFrame, only the standalone render page needs InStandalonePage=true, all other calls to renders just leave it to false and the iframe will be generated accordingly.

Hmm, still some nits should be fixed
The height + overflow: hidden would make the one-line content not visible.

Final question, keep DISABLE_SANITIZER+USE_IFRAME, or use RENDER_PAGE_MODE=default/no-sanitizer/iframe instead?

Final question, keep DISABLE_SANITIZER+USE_IFRAME, or use one option like RENDER_PAGE_MODE=default/no-sanitizer/iframe instead?

I vote both.

As it is non-breaking, I'm for the enum instead of the booleans approach.

As it is non-breaking, I'm for the enum instead of the booleans approach.

That will make it break imo. DISABLE_SANITIZER will be dropped.

#19017 (comment):

DISABLE_SANITIZER is not in 1.16. It's a good chance to make it clear.

So it is not breaking for users who are on a stable version, which should be almost everyone.

If that, we need a migration and deprecated warning in setting.

Beside the option, still one more thing (sorry for bothering ...)
Now the iframe is using sandbox="allow-same-origin allow-scripts", then the rendered JS can access to the window.config which contains CSRF token, then the JS can make requests as the current users. Is it fine?

https://github.com/go-gitea/gitea/pull/19017#discussion_r896029490:
Now we certainly know that we cannot allow that.
If we allow that, we have an obvious and unintended privilege escalation.
I am strongly against allowing the scripts now.

#19017 (comment): Now we certainly know that we cannot allow that.
If we allow that, we have an obvious and unintended privilege escalation. I am strongly against allowing the scripts now.

Only allow-scripts can be used here. I am working on it.

OK, all fixed. Now the iframe is protected by browser's same-origin policy. @techknowlogick
Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.
Refer: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox
If this token is not used, the resource is treated as being from a special origin that always fails the same-origin policy (potentially preventing access to data storage/cookies and some JavaScript APIs).

Codecov Report

Merging #19017 (c7df5bf) into main (7d1770c) will decrease coverage by 0.18%.
The diff coverage is 19.25%.

@@            Coverage Diff             @@
##             main   #19017      +/-   ##
==========================================
- Coverage   47.36%   47.18%   -0.19%
==========================================
  Files         967      968       +1
  Lines      134131   134224      +93
==========================================
- Hits        63530    63332     -198
- Misses      62876    63178     +302
+ Partials     7725     7714      -11

Impacted Files
Coverage Δ

modules/markup/console/console.go
38.46% <ø> (+2.74%)
:arrow_up:

modules/markup/csv/csv.go
29.16% <ø> (+0.88%)
:arrow_up:

modules/markup/external/external.go
1.28% <0.00%> (-0.04%)
:arrow_down:

modules/markup/markdown/markdown.go
58.78% <ø> (-0.55%)
:arrow_down:

modules/markup/orgmode/orgmode.go
52.88% <ø> (+0.99%)
:arrow_up:

modules/setting/markup.go
4.90% <0.00%> (-0.72%)
:arrow_down:

routers/web/repo/compare.go
46.95% <0.00%> (ø)

routers/web/repo/render.go
0.00% <0.00%> (ø)

modules/markup/renderer.go
57.80% <15.15%> (-10.48%)
:arrow_down:

routers/web/repo/view.go
42.07% <73.68%> (+0.80%)
:arrow_up:

... and 14 more

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 7d1770c...c7df5bf. Read the comment docs.


Gender Classification using DL(new issue)

Deep Learning Simplified Repository (Proposing new issue)
:red_circle: Project Title : Gender Classification using DL
:red_circle: Aim : To build ensemble model + improve read me section and add more visualizations
:red_circle: Dataset : https://www.kaggle.com/datasets/cashutosh/gender-classification-dataset
:red_circle: Approach :  Combine predictions from Custom CNN + VGGNet + ResNet models to build a final ensemble model.

📍 Follow the Guidelines to Contribute in the Project :

You need to create a separate folder named as the Project Title.
Inside that folder, there will be four main components.

Images - To store the required images.
Dataset - To store the dataset or, information/source about the dataset.
Model - To store the machine learning model you've created using the dataset.
requirements.txt - This file will contain the required packages/libraries to run the project in other machines.

Inside the Model folder, the README.md file must be filled up properly, with proper visualizations and conclusions.

:red_circle::yellow_circle: Points to Note :

The issues will be assigned on a first come first serve basis, 1 Issue == 1 PR.
"Issue Title" and "PR Title should be the same. Include issue number along with it.
Follow Contributing Guidelines & Code of Conduct before start Contributing.

:white_check_mark: To be Mentioned while taking the issue :

Full name : Pratibha Balgi
GitHub Profile Link : https://github.com/Pratzybha
Email ID<EMAIL_ADDRESS>Participant ID (if applicable):
Approach for this Project : Mentioned above
What is your participant role? GSSOC-EXT 2024

Happy Contributing 🚀
All the best. Enjoy your open source journey ahead. 😎

Full name : Titiksha Agrawal
GitHub Profile Link : https://github.com/AgrawalTitiksha/
Email ID<EMAIL_ADDRESS>Participant ID (if applicable):
Approach for this Project : Load the dataset from Kaggle, preprocess the images, and split the data into training, validation, and testing sets. Develop and train three separate models: Custom CNN, VGGNet, and ResNet, and then combine their predictions using techniques like voting, averaging, or stacking to create the final ensemble model. Evaluate the performance of the ensemble model using metrics like accuracy, precision, and recall.
What is your participant role? Hacktoberfest-2024 Contributor

Hi @Pratzybha  this project is already present in this repository.

Hence closing this issue as duplicate.


[BEAM-9645] Fix premature removal of Docker container and logs

The default would lead to removing the Docker container on container exit which would prevent log retrieval. This was a regression of fbc84b61240a3d83d9c19f7ccc17ba22e5d7e2c9.

CC @sunjincheng121

I saw that there is also BEAM-8015, will retag this when merging.

Thanks for this PR @mxm
I am checking now~~

For context see this comment here: https://github.com/apache/beam/pull/9452#discussion_r402637170

LGTM. +1 to merged.

LGTM
cc @youngoli


Make common CLI

This branch is for making a common CLI for JVM and Native, instead of duplicating the code in both places. I think we can commands to the REPL before merging, so I'll let this be a draft for now.
I ended up also modifying the workflows a bit: there are now 2 separate workflows for native and JVM stuff (and they only upload artifacts if on version-3). The scalafix workflow also runs the formatter now.

idk why the workflows aren't running, will figure out later


{compute} az image-version create: --target-region-encryption and --target-region-cvm-encryption parameters modified to be used independently

Related command

The --target-region-encryption and the --target-region-cvm-encryption parameters should be independent of one another but right now the --target-region-cvm-encryption parameter ONLY works when --target-region-encryption is also specified.
https://github.com/Azure/azure-cli/issues/22995
Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

compute


Not providing frame_centers crashes

The tutorial claims that if you don't provide frame_centers in the calibration file then it'll just pick the middle of the frame, but this doesn't currently work (and there's no evidence in the code that this feature has been implemented).

Thanks for the bug report, will investigate.

Should be fixed with https://github.com/scexao-org/vampires_dpp/commit/083504204af80a33f44fa27ee05ef04552bcaac5


Bundle with Rollup

v4 should be bundled with Rollup and only support modern browsers (definition of what that means TBA)

addressed in #93


Define depth of first soil layer used by the abiotic (etc) models based on soil model constant

Is your feature request related to a problem? Please describe.
Currently the soil model defines a constant (CoreConsts.depth_of_active_soil_layer) which sets the depth of soil which is considered to be biogeochemically active, i.e. the depth of topsoil simulated in the soil model. The abiotic/hydrology models then also define soil layers separately (using config options).
@vgro pointed out that this is strange as we really want the first soil layer to correspond to the topsoil simulated by the soil model. At present the default options for both are set to 0.25m, but this still would allow users to select different values for the different models.
Describe the solution you'd like
I'm not 100% sure if we want to do this, but we could populate the topsoil layer height based on the core depth_of_active_soil_layer constant. This would have the advantage that the abiotic environmental information calculated for the 1st soil layer would always correspond to the layer that the soil model simulates. The drawback would be that this makes the system more inflexible.

The depth of the soil layers is defined in the core schemer and initialized by the plant model. We could add the 0.25m as an additional layer or replace it; for the abiotic model it does not matter what the values are.

I think CoreConsts.depth_of_active_soil_layer should be renamed CoreConsts.depth_of_active_soil as it isn't a layer. Then a function can be written to extract reasonable averages for soil temp and moisture for the biologically active soil.

This has been addressed by the introduction of a layer structure. I'm closing this issue in favour of #532 and #533, which specifically set out the cleaning up that I need to do to move the litter and soil models to use the new system


allow plugin in directory with index.js file

Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Description
Resolves #3897
Checklist:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly. (PR: #)
[ ] I have added tests to cover my changes (if not applicable, please state why)
[x] All new and existing tests passed.

Nice. Could you add a test case for it?

@Atinux ye, i was thinking about adding them. But i didnt ended up with where it should be. E.g. create new test fixture or put it somewhere in existing ones ( if second - which one will be better ) ?

@aldarund You can put it either in basic or with-config ☺

added


Add ARM64 support to c9s images

With ARM64 increasing market share, it makes sense to have native images for this platform too.

[test]

[test]

Hello @vmuzikar , thank you for the contribution.
Please note, that even though this PR can get merged we are not planning to support non-x86 community images in form of testing.
The x86_64 architecture will still be the only one on which the test will be run. Would you be OK with this approach?

@zmiklank Yes, I think it's fine for our use case (Keycloak Operator testing). Thanks.


Make does not sucessfully make SDK

Here is what happens when I run Make,
After this, I add the include directory in my source code, and the sdk runs into a hal/types.h error - stating this is not being linked during the linkage of the files. I also attempting referencing all sdk src files within the g++ compilation and this does not help.
make[1]: Entering directory '/home/jacob/SourceCode/LiDAR/rplidar_sdk/sdk/sdk'
 CXX  src/rplidar_driver.cpp
src/rplidar_driver.cpp: In member function ‘virtual int rp::standalone::rplidar::RPlidarDriverImplCommon::_getSyncBitByAngle(int, int)’:
src/rplidar_driver.cpp:671:16: warning: variable ‘last_angleInc_q16’ set but not used [-Wunused-but-set-variable]
  671 |     static int last_angleInc_q16 = 0;
      |                ^~~~~~~~~~~~~~~~~
src/rplidar_driver.cpp:673:9: warning: unused variable ‘syncBit_check_threshold’ [-Wunused-variable]
  673 |     int syncBit_check_threshold = (int)((5 << 16) / angleInc_q16) + 1;//find syncBit in 0~3 degree
      |         ^~~~~~~~~~~~~~~~~~~~~~~
src/rplidar_driver.cpp: In member function ‘virtual u_result rp::standalone::rplidar::RPlidarDriverImplCommon::_cacheUltraCapsuledScanData()’:
src/rplidar_driver.cpp:771:46: warning: unused variable ‘last_scan_count’ [-Wunused-variable]
  771 |     size_t                                   last_scan_count = 0;
      |                                              ^~~~~~~~~~~~~~~
src/rplidar_driver.cpp: In member function ‘virtual void rp::standalone::rplidar::RPlidarDriverImplCommon::_capsuleToNormal(const rplidar_response_capsule_measurement_nodes_t&, rplidar_response_measurement_node_hq_t*, size_t&)’:
src/rplidar_driver.cpp:850:17: warning: unused variable ‘syncBit_check_threshold’ [-Wunused-variable]
  850 |             int syncBit_check_threshold = (int)((2 << 16) / angleInc_q16) + 1;//find syncBit in 0~1 degree
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
src/rplidar_driver.cpp: In function ‘_u32 rp::standalone::rplidar::_crc32cal(_u32, void*, _u16)’:
src/rplidar_driver.cpp:1027:23: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses]
 1027 |     _u8 leftBytes = 4 - len & 0x3;
      |                     ~~^~~~~
src/rplidar_driver.cpp: In member function ‘virtual void rp::standalone::rplidar::RPlidarDriverImplCommon::_ultraCapsuleToNormal(const rplidar_response_ultra_capsule_measurement_nodes_t&, rplidar_response_measurement_node_hq_t*, size_t&)’:
src/rplidar_driver.cpp:1238:32: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
 1238 |             if ((dist_predict1 == 0xFFFFFE00) || (dist_predict1 == 0x1FF)) {
      |                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~
src/rplidar_driver.cpp:1246:32: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
 1246 |             if ((dist_predict2 == 0xFFFFFE00) || (dist_predict2 == 0x1FF)) {
      |                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~
src/rplidar_driver.cpp:1256:21: warning: unused variable ‘syncBit_check_threshold’ [-Wunused-variable]
 1256 |                 int syncBit_check_threshold = (int)((3 << 16) / angleInc_q16)+1;//find syncBit in 0~1 degree
      |                     ^~~~~~~~~~~~~~~~~~~~~~~
src/rplidar_driver.cpp: In member function ‘virtual u_result rp::standalone::rplidar::RPlidarDriverImplCommon::startMotor()’:
src/rplidar_driver.cpp:2222:26: warning: control reaches end of non-void function [-Wreturn-type]
 2222 |         setLidarSpinSpeed(600);//set default rpm to tof lidar
      |         ~~~~~~~~~~~~~~~~~^~~~~
src/rplidar_driver.cpp: In member function ‘virtual void rp::standalone::rplidar::RPlidarDriverImplCommon::_ultraCapsuleToNormal(const rplidar_response_ultra_capsule_measurement_nodes_t&, rplidar_response_measurement_node_hq_t*, size_t&)’:
src/rplidar_driver.cpp:1249:31: warning: ‘scalelvl2’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1249 |                 dist_predict2 = (dist_predict2 << scalelvl2);
      |                 ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/rplidar_driver.cpp:1241:31: warning: ‘scalelvl1’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1241 |                 dist_predict1 = (dist_predict1 << scalelvl1);
      |                 ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 CXX  src/hal/thread.cpp
 CXX  src/arch/linux/net_serial.cpp
src/arch/linux/net_serial.cpp: In member function ‘virtual void rp::arch::net::raw_serial::cancelOperation()’:
src/arch/linux/net_serial.cpp:428:12: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
  428 |     ::write(_selfpipe[1], "x", 1);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/string.h:495,
                 from /home/jacob/SourceCode/LiDAR/rplidar_sdk/sdk/sdk/src/arch/linux/arch_linux.h:40,
                 from src/arch/linux/net_serial.cpp:35:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘virtual bool rp::arch::net::raw_serial::bind(const char*, uint32_t, uint32_t)’ at src/arch/linux/net_serial.cpp:91:12:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 200 equals destination size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 CXX  src/arch/linux/net_socket.cpp
src/arch/linux/net_socket.cpp: In member function ‘virtual u_result rp::arch::net::StreamSocketImpl::send(const void*, size_t)’:
src/arch/linux/net_socket.cpp:438:17: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
  438 |         if (ans == (int)len) {
      |             ~~~~^~~~~~~~~~~
 CXX  src/arch/linux/timer.cpp
mkdir -p `dirname /home/jacob/SourceCode/LiDAR/rplidar_sdk/sdk/output/Linux/Release/librplidar_sdk.a`
 pack rplidar_driver.o->librplidar_sdk.a
 pack thread.o->librplidar_sdk.a
 pack net_serial.o->librplidar_sdk.a
 pack net_socket.o->librplidar_sdk.a
 pack timer.o->librplidar_sdk.a
make[1]: Leaving directory '/home/jacob/SourceCode/LiDAR/rplidar_sdk/sdk/sdk'
make[1]: Entering directory '/home/jacob/SourceCode/LiDAR/rplidar_sdk/sdk/app'
make[2]: Entering directory '/home/jacob/SourceCode/LiDAR/rplidar_sdk/sdk/app/simple_grabber'
 CXX  main.cpp
main.cpp:192:17: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
  192 |                 "Version: "RPLIDAR_SDK_VERSION"\n"
      |                 ^
main.cpp: In function ‘u_result capture_and_display(rp::standalone::rplidar::RPlidarDriver*)’:
main.cpp:118:41: warning: ‘virtual u_result rp::standalone::rplidar::RPlidarDriver::grabScanData(rplidar_response_measurement_node_t*, size_t&, _u32)’ is deprecated [-Wdeprecated-declarations]
  118 |     ans = drv->grabScanData(nodes, count);
      |                                         ^
In file included from /home/jacob/SourceCode/LiDAR/rplidar_sdk/sdk/app/simple_grabber/../../sdk/include/rplidar.h:42,
                 from main.cpp:30:
/home/jacob/SourceCode/LiDAR/rplidar_sdk/sdk/app/simple_grabber/../../sdk/include/rplidar_driver.h:269:33: note: declared here
  269 |     DEPRECATED(virtual u_result grabScanData(rplidar_response_measurement_node_t * nodebuffer, size_t & count, _u32 timeout = DEFAULT_TIMEOUT)) = 0;
      |                                 ^~~~~~~~~~~~
/home/jacob/SourceCode/LiDAR/rplidar_sdk/sdk/app/simple_grabber/../../sdk/include/rplidar_driver.h:44:34: note: in definition of macro ‘DEPRECATED’
   44 |         #define DEPRECATED(func) func __attribute__ ((deprecated))
      |                                  ^~~~
main.cpp:120:41: warning: ‘virtual u_result rp::standalone::rplidar::RPlidarDriver::ascendScanData(rplidar_response_measurement_node_t*, size_t)’ is deprecated [-Wdeprecated-declarations]
  120 |         drv->ascendScanData(nodes, count);
      |                                         ^
In file included from /home/jacob/SourceCode/LiDAR/rplidar_sdk/sdk/app/simple_grabber/../../sdk/include/rplidar.h:42,
                 from main.cpp:30:
/home/jacob/SourceCode/LiDAR/rplidar_sdk/sdk/app/simple_grabber/../../sdk/include/rplidar_driver.h:297:33: note: declared here
  297 |     DEPRECATED(virtual u_result ascendScanData(rplidar_response_measurement_node_t * nodebuffer, size_t count)) = 0;
      |                                 ^~~~~~~~~~~~~~
/home/jacob/SourceCode/LiDAR/rplidar_sdk/sdk/app/simple_grabber/../../sdk/include/rplidar_driver.h:44:34: note: in definition of macro ‘DEPRECATED’
   44 |         #define DEPRECATED(func) func __attribute__ ((deprecated))
      |

if I write a file:
main.cpp:
#include <rplidar.h>
int main() {return 0;}

I receive:
rplidar.h:38:10: fatal error: hal/types.h: No such file or directory
   38 | #include "hal/types.h"
      |          ^~~~~~~~~~~~~
compilation terminated.

same issue

@GasserJC did you manage to solve this issue by any chance ?

@gaborszita , @GasserJC , @VictorConscience  did you find a solution ?

@VictorConscience I believe flynn248 at this repo resolved it.
https://github.com/JacSchn/5G-Beamforming-from-Visual-and-Lidar-Rendering

I fixed it by changing
https://github.com/Slamtec/rplidar_sdk/blob/babe753f39f16f4c6a6dec2c33b4ed541ca0e502/sdk/include/rplidar.h#L38
to
#include "../src/hal/types.h"


Use mpv's new create_osd_overlay API

The new API was added in https://github.com/mpv-player/mpv/commit/07287262513c0d1ea46b7beaf100e73f2008295f for mpv 0.31 and doesn't add new functionality, but it makes the existing private interface publicly available, so it should be used eventually. In my journey of fixing the performance regression, I also ported syncplay's code to use this new API.
This was rebased on top of #295 in order to merge cleanly.
I did not change any code regarding the minimum version requirement of mpv because I didn't know how you would like to do that. I see that there is still code supporting some old mpv client with a version lower than 0.6. Please decide for yourself how you want to handle this or whether you want to accept it at all. There is a legacy layer that will map to the new API without any functional differences (at least as of now).

#261 is already going to have to bump minimum supported version to at least 0.17.
That said the policy we'd like to keep is to support player versions at least as old as found in latest LTS releases of popular distros. Which in case of mpv right now means 0.27 - so before this is merged it needs to cleanly handle older version.
Initial workaround on the other hand probably just needs a quick review.

Since there is a compatibility layer on the side of mpv, I would rather not want to duplicate this even into scripts unless necessary (I. e. removed by mpv) and reject it.

I agree. Though instead of rejecting this outright I think it makes sense to simply keep it around until it's needed (mpv removes/changes old API) or until the point where raising minimum supported mpv version to 0.31 won't be a problem.

Sure, we can leave it floating around here. I have my forked repositories for pull requests in a separate org anyway for easier organization.


Translation : kubernetes-dev-services.adoc.po

Hello everyone,
I would like to inform you that I am working on the translation of the file:
kubernetes-dev-services.adoc.po

This change was pushed along with the AMQP.


Scaled DoE test fails too often

This test in DoE fails too often https://github.com/experimental-design/bofire/blob/cffd409b6df5bb00396ec5b258ebb6f66cb7feca/tests/bofire/strategies/test_doe.py#L286

@bertiqwerty

@Osburg: any ideas what is the problem?

Hey @jduerholt @dlinzner-bcs,
This is probably not a satisfying answer, but in the setting of a linear model, a low dimensional space domain and a small number of candidates there seem to be local minima ipopt ends up in. Ipopt typically exits with a convergence to acceptable tolerance in cases where the test fails. I assume the reason might be that using only 4 candidates leads with relatively high probability to the situation that all experiments are concentrated in the same region of the design space and ipopt won't find the optimal solutions with one candidate in each corners, but instead it approaches a local minimum which typically looks like this
[[-0.     1.   ]
 [-0.    -0.   ]
 [-0.    -0.   ]
 [ 1.     0.287]]

I tried to increase the number of candidates, with 6 candidates the test ran successfully for 100 times in a row. So I'd suggest to slightly increase the number of candidates. Alternatively, one could lower the (acceptable) tolerance for convergence, but this would require to give access to the ipopt_options of find_local_max_ipopt() in the DoEStrategy i guess...
Also sry for general inactivity recently, I have a submission deadline in 2 weeks :/
Cheers
Aaron :)


GEODE-8626: Omitting field-mapping tag of cache.xml when using Simple JDBC Connector

Use the default mapping when using the Simple JDBC Connector in cache.xml and without the field-mapping tag
Thank you for submitting a contribution to Apache Geode.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[X] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

[X] Has your PR been rebased against the latest commit within the target branch (typically develop)?

[X] Is your initial contribution a single, squashed commit?

[X] Does gradlew build run cleanly?

[X] Have you written or updated unit tests to verify your changes?

[-] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

Note:
Please ensure that once the PR is submitted, check Concourse for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to<EMAIL_ADDRESS>

@masaki-yamakawa I apologize for the delay in reviewing this change.
@jchen21 and @dschneider-pivotal would you be in a position to review this PR?

Reviewing the code.

@jchen21 Thank you for your review.
I have fixed some of the source code and added comments.

@jchen21
I have fixed all suggestions and added comments.
Please re-review when you're available.

@jchen21
I have fixed all suggestions and added comments.
Please re-review when you're available.

@masaki-yamakawa I have reviewed your code again. Please see the comments in the code.

@masaki-yamakawa I have reviewed your code again. Please see the comments in the code.

@jchen21 Thank you for your review. I have fixed the code following your suggestion.

@jchen21 Thank you for your review. I have fixed the code following your suggestion.

@masaki-yamakawa Once you are ready, please click the re-request review button on the reviewers section.

@masaki-yamakawa Once you are ready, please click the re-request review button on the reviewers section.

@agingade This PR is ready to be reviewed. Please review it when you're available.

@agingade This PR is ready to be reviewed. Please review it when you're available.

@agingade This PR is ready to be reviewed. Please review it when you're available.

@masaki-yamakawa
Participants in team discussion: @jchen21 @dschneider-pivotal
Thanks for your PR. Sorry for delay in responding to this.
We had a team discussion around this PR as it deflects from the way Geode configuration is done (the recommended way). In the past Geode/GemFire was built with cache.xml as a way to configure the system; based on its drawback and keep the overall cluster configuration easier, it was decided to adopt/build Cluster Configuration Service with gfsh as the tool to accomplish it (currently there is work getting done to support the same through new management APIs). As the Cluster Configuration Service got matured, the use of xml is gradually getting deprecated.
The change proposed with this ticket/PR feels like going back to the cache.xml way of configuring the system. Can you please let us know the reason behind not using the cluster configuration service and going with cache.xml; we would like to understand more about the usecase/requirement and see if there are any other better options.
Also, you can achieve what you are looking for, by exporting the cluster configuration info (once defined using gfsh - which is an xml output) and then importing it to any test/dev/prod system. Can this suffice your requirement?
On the other note, based on the PR review, it expects the user class to be in the server side classpath; currently this is not a requirement while using PDX type/object; one of the main functionality of PDX is to support data stores without needing a class definition on the server. The product takes care of this internally when one configures the jdbc mapping automatically.
Please let us know your thoughts.

@agingade This PR is ready to be reviewed. Please review it when you're available.

@masaki-yamakawa
Participants in team discussion: @jchen21 @dschneider-pivotal
Thanks for your PR. Sorry for delay in responding to this.
We had a team discussion around this PR as it deflects from the way Geode configuration is done (the recommended way). In the past Geode/GemFire was built with cache.xml as a way to configure the system; based on its drawback and keep the overall cluster configuration easier, it was decided to adopt/build Cluster Configuration Service with gfsh as the tool to accomplish it (currently there is work getting done to support the same through new management APIs). As the Cluster Configuration Service got matured, the use of xml is gradually getting deprecated.
The change proposed with this ticket/PR feels like going back to the cache.xml way of configuring the system. Can you please let us know the reason behind not using the cluster configuration service and going with cache.xml; we would like to understand more about the usecase/requirement and see if there are any other better options.
Also, you can achieve what you are looking for, by exporting the cluster configuration info (once defined using gfsh - which is an xml output) and then importing it to any test/dev/prod system. Can this suffice your requirement?
On the other note, based on the PR review, it expects the user class to be in the server side classpath; currently this is not a requirement while using PDX type/object; one of the main functionality of PDX is to support data stores without needing a class definition on the server. The product takes care of this internally when one configures the jdbc mapping automatically.
Please let us know your thoughts.

@agingade
Thanks for your comment.
I am using "Peer-to-Peer Configuration" to build the application. Specifically, it is an application that integrates Tomcat and Geode.
It achieves high-performance by managing data in the App heap (Geode). Then, the data in Geode is persisted to RDB asynchronously.
I understand that gfsh and cluster configuration Import/Export can be used in this configuration. However, I would like to avoid this method because of the complication in operation and the risk of mistakes.
Thus I want a configuration file that reads the region definition when the App is launched.
Nowadays, yml, json and annotations are commonly used.
Geode does not support these, so I chose to use XML.

I know SpringData For ApacheGeode, but I don't use it because I want to use Geode's native API.

This PR has been open for some while with no recent activity.  Please keep Geode tidy by closing PRs you're not actively using.

@agingade
This PR is to make the current behavior of using cache.xml closer to the behavior of using gfsh.
I would like to consider it separately from the discussion of whether to use cache.xml in the future.
What do you think?

@agingade
I would like to take this PR to the next step.
Is there anything I can do?

@masaki-yamakawa
My worry is abandoning the xml support in near future. If you insist to go with this approach, its fine with me.
One change that could help code maintainability is moving your changes (which is duplicate of the code/logic from CreateMappingPreconditionCheckFunction) to RegionMapping as helper methods and then accessing it from both place.
E.g.:
if (mapping.getFieldMappings().isEmpty() && mapping.getPdxName != null) {
mapping.createMappingUsingPdx();
}

@agingade
Thank you for your concern. I have no problem.
I agree with your suggestion. And I had implemented it that way in a previous change.
But the review resulted in the current implementation.
https://github.com/apache/geode/pull/5637#discussion_r554270893

@masaki-yamakawa
I am not sure what this comment means:

Though it looks like duplicating the code, it does avoid unnecessary serialization and deserialization of user defined classes like Employee, which is more important.

I am unable to see unnecessary serialization because of moving the code/logic from one place to another place....
From maintenance point of view, its better to be in one place (as helper methods and calling it from multiple places).

@agingade
Thank you for your comment.
I'll try again.

@agingade
I have moved the common methods of CreateMappingPreconditionCheckFunction class and RegionMappingConfiguration class to JdbcConnectorServiceImpl class.
If I move the createInstance method, the existing test ( CreateMappingCommandDUnitTest ) does not pass, so I leave the related methods in CreateMappingPreconditionCheckFunction class and RegionMappingConfiguration class.

@masaki-yamakawa
Thanks for your contribution to Geode. Appreciate your patience in getting this done. It was a tricky one as it was adding a new way to build field mapping.

Thanks @jinmeiliao  @agingade @jchen21 for review.
Is this PR OK to merge?
If there's anything I shouldo do, please let me know.


L2 Projection Framework

DTK needs a general shared domain and interface L2 projection framework.

A shared domain implementation has been completed. I suspect it could easily be generalized for shared domain problems.

Interface implementation is next.

We will not a general framework to this for version 2. If we end up adding l2 projection we will do so as an extra operator. Closing as will not fix.


⚠ Samsung has degraded performance

In 5c05b07, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2731 ms

Resolved: Samsung performance has improved in aa3ce98.


Add kostal-piko-ba to stable

Add kostal-piko-ba to stable

RE-CHECK!

RE-CHECK!

Hi,
some review comments:

please check if you can assign better matching roles to the objects (see https://github.com/ioBroker/ioBroker.docs/blob/master/docs/en/dev/stateroles.md)
you use Sentry, please add at least an info to the readme about this!
this.stop is a method or ?! https://github.com/hombach/ioBroker.kostal-piko-ba/blob/master/main.js#L175
yes cleaning an interval before setting a new one is a good idea to prevent double calls, e.g. (https://github.com/hombach/ioBroker.kostal-piko-ba/blob/master/main.js#L202)

Please check and adjust and inform back here

Open points fixed and version bumbed to1.0.2


google/cloud-speech: longRunningRecognize fails with error 3 "RecognitionAudio not set." since 2019-09-18

Environment details

OS: Windows 10, Ubuntu
PHP version: 7.2.22
Package name and version: (See below.)

$ composer info
(...)
google/auth                           v1.5.2             Google Auth Library for PHP
google/cloud-core                     v1.33.0            Google Cloud PHP shared dependency, providing functionality useful to all components.
google/cloud-speech                   v0.27.0            Cloud Speech Client for PHP
google/cloud-storage                  v1.14.0            Cloud Storage Client for PHP
google/cloud-text-to-speech           v0.5.0             Cloud Text-to-Speech Client for PHP
google/cloud-translate                v1.4.1             Cloud Translation Client for PHP
google/common-protos                  1.1                Google API Common Protos for PHP
google/crc32                          v0.1.0             Various CRC32 implementations
google/gax                            1.1.2              Google API Core for PHP
google/grpc-gcp                       0.1.4              gRPC GCP library for channel management
google/protobuf                       v3.9.1             proto library for PHP
(...)

Steps to reproduce

Upload file using google/cloud-storage.
Start longRunningRecognize and pollUntilComplete.
Operation finishes with error 3 RecognitionAudio not set.

This worked yesterday (2019-09-17) and fails since today (2019-09-18) on two independent systems (1x Windows, 1x Linux) that haven't been changed in this time.
Code example
// $filepath = "/tmp/xxx.tmp.wav";
// $languageCode = "de-DE";
// $encoding = 1;
// $sampleRateHertz = 48000;

    private function transcribeFile(string $filepath, string $languageCode): array

        list($encoding, $sampleRateHertz) = $this->getEncodingAndSampleRateFromFile($filepath);

        $config = (new RecognitionConfig())
            ->setEncoding($encoding)
            ->setSampleRateHertz($sampleRateHertz)
            ->setLanguageCode($languageCode)
            ->setEnableWordTimeOffsets(true);

        return $this->withTemporaryStorageObject($filepath, function (StorageObject $object) use ($config) {
            $audio = new RecognitionAudio(['uri' => $object->gcsUri()]);

            try {
                $operationResponse = $this->speechClient->longRunningRecognize($config, $audio);
                $operationResponse->pollUntilComplete();
            } catch (ApiException | ValidationException $e) {
                throw WrappedException::wrap($e, "Failed to complete transcription.");
            }

            if ($operationResponse->operationSucceeded()) {
                return $this->convertOperationResponse($operationResponse);
            } else {
                $error = $operationResponse->getError();
                $exception = new Exception($error->getMessage(), $error->getCode());
                throw WrappedException::wrap($exception, "Failed to transcribe.");
            }
        });
    }

    private function withTemporaryStorageObject(string $filepath, Closure $closure)
    {
        try {
            $object = $this->uploadFile($filepath);
            return $closure($object);
        } finally {
            $object->delete();
        }
    }

    private function uploadFile(string $filepath): StorageObject
    {
        try {
            $uuid = Uuid::uuid1();
        } catch (Exception $e) {
            throw WrappedException::wrap($e, "Could not create UUID.");
        }
        $filename = $uuid->toString();

        $bucket = $this->storageClient->bucket(self::getBucketName());
        $uploader = $bucket->getResumableUploader(
            fopen($filepath, 'r'),
            ['name' => $filename]
        );

        try {
            $uploader->upload();
        } catch (GoogleException $e) {
            do {
                $resume_uri = $uploader->getResumeUri();

                try {
                    $uploader->resume($resume_uri);
                    $finished = true;
                } catch (GoogleException $e) {
                    $finished = false;
                }
            } while (!$finished);
        }

        return $bucket->object($filename);
    }

Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!

The API is working again since 2019-09-19 (we didn't change anything in our infra/code), so I'm closing this issue for now.

Thanks for the update @caugner! When the transcriptions failed had the uploads to GCS succeeded?

@dwsupplee We didn't see any errors in the Google Cloud Console, but to be fair we haven't been checking yet whether the StorageObject actually exists once the upload has finished. We have added that check now and I will report if the problem comes up again (as a matter of fact we had the same issue on Tuesday 2019-09-23 in the Western European morning).


operator kubeturbo-certified (8.12.40-beta.1)

kubeturbo-certified-8.12.40 bundle

/pipeline restart operator-release-pipeline


Ayaneo Next Lite 4800u after waking from sleep WIFI no longer works or connects until a reboot

Describe the bug
Ayaneo Next Lite 4800u after waking from sleep WIFI no longer works or connects until a reboot. WIFI shows as being turned on, and even after toggling the WIFI button, it doesn't not activate
What did you expect to happen?
After waking from sleep, WIFI should be able to function and connect to WIFI access points
Output of rpm-ostree status
State: idle
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck-gnome:stable
Digest: sha256:6dc8c4c0779253561b2c57b28fd71f6efa08a09c64e06f8fac5456fbd71d81a5
Version: 41.20241211 (2024-12-11T07:30:41Z)
ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck-gnome:stable
Digest: sha256:a1e956b154de68c2c15909630c8209d7255e583d4c32e36618ec8b0cdf5b9017
Version: 41.20241210 (2024-12-10T08:52:57Z)
Hardware
NEXT Lite
Extra information or context
No response

did you already try the wifi workaround, as described in the bazzite ayaneo docs?
https://docs.bazzite.gg/Handheld_and_HTPC_edition/Handheld_Wiki/Ayaneo_Handhelds/?h=ayaneo#workarounds-known-issues

You shouldn't need to modify the bios on the 4800u, since it supports S3 sleep.
The wifi workaround should be all you need, but perhaps your device has different wifi hardware. that'd require modifying the wifi workaround accordingly.

You shouldn't need to modify the bios on the 4800u, since it supports S3 sleep.
The wifi workaround should be all you need, but perhaps your device has different wifi hardware. that'd require modifying the wifi workaround accordingly.

The wifi card in the Next Lite is an Intel AX200...

The wifi card in the Next Lite is an Intel AX200...

Hrmm, not sure if this is related, but when I had an Ayaneo Air Pro 5825u the wifi stopped working on suspend-resume after swapping in an Intel AX200 card. I had to revert to the wifi card that shipped with the device.

I also have Bazzite installed on an Ayaneo 2021 4500u, and it has the same Intel AX200, and it wakes up from sleep with WIFI working.

I think someone else will need to chime in here, since it seems that the existing ayaneo wifi workaround doesn't apply to your model.


Some refinements that needs to be done

[x] Home page:

[x] Home Page - Statistics:

[x] Change all the words to lower cases.
[x] Change ‘Repositories / Databases’ to ‘ repositories’
[x] Change ‘Species / Organisms’ to ‘species’
[x] Remove the word Different for each line

[x] Makes the Search Box little more bigger

[x] Home Page - Word cloud:

[x] Change ‘Repo’ to ‘Repository’
[x] Add some hints to each word with number of datasets datasets for each word.
[x] Remove the combo box and use tree tooltips [ ] description [ ] sample [ ] data all the data
should be retrieved from omics.

[x] Home Page - Bubble plot:

[x] The bigger bubbles should be a more "interesting" color like orange or blue or read, not green.
[x] For the tooltips, I would suggest to say ‘123 datasets’ instead of just ‘123'

[x] Home Page - Pie chart:

[x] When click on ‘Proteomics’, then in the search results page remove ‘Proteomics’ as a filter(just disable it).

[x] Home Page - Latest Datasets & Most Accessed Datasets

[x] It would be nice to have a tooltip for the icons, the users won’t know the meaning of these
icons by default.
[x] It would be nice to add the icon for the number of visits and the number itself.

Search

[x] (It 's a feature :smile: )After clicking on ‘Show results for Proteomics’, I cannot switch to ‘Metabolomics’ or ‘Genomics’.
[x] It would be nice to have highlighting when you search or filtering
[ ] In the search box, when there is no query, just show all the results instead of warning the users
of query is too short
[x] Pagination seems to be a bit strange, it would be nice to show the first and the last page
number all the time, so users can to the beginning or the end.
[ ] Sorting, a icon or a text is needed to show whether it is descending or ascending.
[x] Sorting, I am not sure sorting by title makes much sense.
[x] Metabolomics dataset doesn’t show any icon
[x] In addition to organisms, it would nice to see tissues, diseases in the search results as well.
[x] It would be nice to highlight the source database in the search results.
[x] In search results, change ‘Made public’ to ‘Publication date’
[ ] I would suggest change the filters according to the omics dataset type, for example, it doesn’t
make much sense to show proteomics instrument filters for genomics. (Nice recomendation but  for future)
[x] The header that states ‘???? results for search term’ seems redundant as you have this
number on the search result table.
[ ] Some datasets don’t have publication date, but still shown as the highest when sort by
publication date
[ ] In the filters, ‘Not available’ is not a good candidate for filtering.

@baimingze Can we close this issue?

yes，sure
On Fri, 26 Jun 2015 10:26 Yasset Perez-Riverol<EMAIL_ADDRESS>wrote:

@baimingze https://github.com/baimingze Can we close this issue?
—
Reply to this email directly or view it on GitHub
https://github.com/BD2K-DDI/ddi-web-app/issues/50#issuecomment-115606200
.


Add prepend-only support?

Hi! I use IFTTT in order to post tweets to a Discord channel via a webhook.
My issue is, IFTTT doesn't allow arbitrary rewriting of parameters without Pro+. The link to the tweet is provided as a parameter called {{LinkToTweet}} whose value is "https://twitter.com/Twitter/status/1492120137205526528" in its entirety. Because of this, there's no way to replace twitter with vxtwitter without a JS filter, which requires the highest subscription tier of IFTTT.
However, another option would be to prepend it like so: https://vxtwitter.com/{{LinkToTweet}} which would expand to "https://vxtwitter.com/https://twitter.com/Twitter/status/1492120137205526528". This currently generates a link that has a correct-looking embed, but clicking the link sends you to a redirect loop that eventually 400s. The redirects go:

https://vxtwitter.com/https://twitter.com/Twitter/status/1492120137205526528
301 to https://vxtwitter.com/twitter.com/Twitter/status/1492120137205526528
301 to https://vxtwitter.com/twitter.com/Twitter/status/twitter.com/Twitter/status/1492120137205526528
301 to https://vxtwitter.com/twitter.com/Twitter/status/twitter.com/Twitter/status/twitter.com/Twitter/status/twitter.com/Twitter/status/1492120137205526528

...and so on. Can the nginx config be changed, please, to support this use case?

I'll look into fixing this, thank you for bringing it to my attention!

This should be fixed now, it was tricky! Please make sure it's working and close the issue if so!

It looks like https://vxtwitter.com/https://twitter.com/Twitter/status/1492120137205526528 now directly 301s to https://twitter.com/Twitter/status/1492120137205526528 which means the former link doesn't make an embed


Is it possible to update highlighted days when calendar is open?

Hello.
Please look at xdan-datetimepicker-using-knockout-can-not-update-highlihted-days-dynamicaly.
Is it possible to update highlighted days when calendar is open and how?

Can I initialize the DateTimePicker options in the HTML? If so then how?
Maybe when I do data-binding in HTML after getting results from service with days to highlight the highlighted days will update in calendar.
In example:
<input type="text" class="form-control" data-bind="datetimepickerWithDa: timeFrom, Options: {highlightedDates: highlightedDates}"

Solved the problem... Check answer in www.stackoverflow.com


fix wireless driver

if [ "$1" = "mt7601u-gk7205v300-camhi" ]; then
    devmem 0x100C0080 32 0x530
    set_gpio 7 0
    modprobe mt7601u
    exit 0
fi

exfat /dev/mmcblk0p1\n/bin/sh: mkfs.exfat: not found

8033612d057f6a322272b2d8ce9a4c57c12ab8e8


Source control icon is blinking every few seconds

same as https://github.com/Microsoft/vscode/issues/43234
and https://github.com/Microsoft/vscode/issues/43408

VSCode Version: 1.22.2
OS Version: macos-10.13.4
git version: 2.17.0

update git to latest  not solve the bug.
can I hide git loading badge?

Can you run Git: Show Git Output and show me the log?

> git status -z -u
> git symbolic-ref --short HEAD
> git rev-parse develop
> git rev-parse --symbolic-full-name develop@{u}
> git rev-list --left-right develop...refs/remotes/origin/develop
> git for-each-ref --format %(refname) %(objectname) --sort -committerdate
> git remote --verbose

@transtone Can you show me the full Git Output since the startup of VS Code? Is this still happening?


Add DSDT dsl for ayaneo air plus 0D

Not sure yet if this works. How do I test it?

Tested and working now, by the way. 🙂

Cool. I'm test on my 16 to make sure that still works.

Merges, thanks!


arm64 macOS support

Hi, do you plan to add support for Apple M arch?  Could you plz add a section that lists your build steps to GitHub Readme 🗡

Sure, I could add a section of the build steps to the README. However, I'm not able to do it at the moment.
If you need to compile the plugin, follow the gdnative tutorial in the godot documentation and it should be pretty straight forward. Just replace the example repo with this one.
As to adding support to arm64, could you please detail the problem you are encountering? It doesn't work at all?

Thanks for your reply, for my project I was looking for a way to build a cross-platform UI for a lib, I decided to go with ImGui in the end. I do like Godot editor, I wish they had a special section dedicated for apps that are not games

So you are using ImGUI and not the Godot Game Engine to build the UI? This repository is a plugin for the Godot Game Engine that wraps an existing library, so I'm not sure if this fits your needs. If you are using plain C++ and ImGUI, maybe you should use native-file-dialogs directly

yes I get that, just saying that I don't need this anymore :)


Understand scope of fetcher/mapper work. List mappers and prioritize in advance of rikolti planning meeting in Jan 2022.

List of mappers for Rikolti Planning Meeting: https://docs.google.com/spreadsheets/d/1XkBwi8jiuGgrWvQBqjkrbavSl13yyrQNyRyEb_CQ4z0/edit?usp=sharing


[now dev] Update @now/build-utils to v0.4.40

Codecov Report

Merging #2119 into canary will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           canary   #2119   +/-   ##
======================================
  Coverage     4.5%    4.5%
======================================
  Files         243     243
  Lines        8628    8628
  Branches      882     882
======================================
  Hits          389     389
  Misses       8222    8222
  Partials       17      17

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 477b305...7412adb. Read the comment docs.


fix(mulligan): refine mulligan timing for slightly earlier exit

The new strategy to determine mullingan exit timing is:

Detect how many cards are replaced (using the new MullinganResultParser)
Detect [Power] PowerTaskList.DebugPrintPower() -     TAG_CHANGE Entity=GameEntity tag=NEXT_STEP value=MAIN_READY event
↓ The rest are done in each graphic packages ↓
Calculate how many seconds to wait according to cards replaced

0.8 + (0.5 * cardsReplaced) + someBufferTime

Wait for that many seconds and exit the mulligan

Codecov Report

Merging #43 into master will increase coverage by 2.06%.
The diff coverage is 84.37%.

@@            Coverage Diff             @@
##           master      #43      +/-   ##
==========================================
+ Coverage   77.61%   79.68%   +2.06%
==========================================
  Files          13       15       +2
  Lines         277      315      +38
  Branches       52       57       +5
==========================================
+ Hits          215      251      +36
  Misses         41       41
- Partials       21       23       +2

Impacted Files
Coverage Δ

src/line-parsers/new-player.ts
83.33% <ø> (ø)
:arrow_up:

src/GameState.ts
91.66% <100%> (-8.34%)
:arrow_down:

src/line-parsers/turn.ts
69.23% <100%> (ø)
:arrow_up:

src/line-parsers/index.ts
100% <100%> (ø)
:arrow_up:

src/line-parsers/mulligan-result.ts
80.95% <80.95%> (ø)

src/line-parsers/game-tag-change.ts
96% <87.5%> (ø)
:arrow_up:

src/index.ts
100% <0%> (ø)

... and 1 more

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 759df7f...25bc185. Read the comment docs.