Unstarted container causes ps -a to panic

Running docker ps -a against my Swarm causes a panic:
2015/06/20 22:28:37 http: panic serving <IP_ADDRESS>:27042: runtime error: index out of range
goroutine 117 [running]:
net/http.func·011()
	/usr/src/go/src/pkg/net/http/server.go:1100 +0xb7
runtime.panic(0x963280, 0xcd6a3c)
	/usr/src/go/src/pkg/runtime/panic.c:248 +0x18d
github.com/docker/swarm/api.getContainersJSON(0xc2080b0f00, 0x7f7ee13bfc18, 0xc208496500, 0xc208161ee0)
	/go/src/github.com/docker/swarm/api/handlers.go:199 +0x16e7
github.com/docker/swarm/api.func·008(0x7f7ee13bfc18, 0xc208496500, 0xc208161ee0)
	/go/src/github.com/docker/swarm/api/primary.go:111 +0x2a0
net/http.HandlerFunc.ServeHTTP(0xc20803d300, 0x7f7ee13bfc18, 0xc208496500, 0xc208161ee0)
	/usr/src/go/src/pkg/net/http/server.go:1235 +0x40
github.com/gorilla/mux.(*Router).ServeHTTP(0xc2080add60, 0x7f7ee13bfc18, 0xc208496500, 0xc208161ee0)
	/go/src/github.com/docker/swarm/Godeps/_workspace/src/github.com/gorilla/mux/mux.go:98 +0x292
github.com/docker/swarm/api.(*dispatcher).ServeHTTP(0xc2080be910, 0x7f7ee13bfc18, 0xc208496500, 0xc208161ee0)
	/go/src/github.com/docker/swarm/api/server.go:32 +0x9d
net/http.serverHandler.ServeHTTP(0xc2081372c0, 0x7f7ee13bfc18, 0xc208496500, 0xc208161ee0)
	/usr/src/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc208459780)
	/usr/src/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
	/usr/src/go/src/pkg/net/http/server.go:1721 +0x313
2015/06/20 22:28:49 http: panic serving <IP_ADDRESS>:23937: runtime error: index out of range
goroutine 119 [running]:
net/http.func·011()
	/usr/src/go/src/pkg/net/http/server.go:1100 +0xb7
runtime.panic(0x963280, 0xcd6a3c)
	/usr/src/go/src/pkg/runtime/panic.c:248 +0x18d
github.com/docker/swarm/api.getContainersJSON(0xc2080b0f00, 0x7f7ee13bfc18, 0xc2083dc5a0, 0xc2083e9930)
	/go/src/github.com/docker/swarm/api/handlers.go:199 +0x16e7
github.com/docker/swarm/api.func·008(0x7f7ee13bfc18, 0xc2083dc5a0, 0xc2083e9930)
	/go/src/github.com/docker/swarm/api/primary.go:111 +0x2a0
net/http.HandlerFunc.ServeHTTP(0xc20803d300, 0x7f7ee13bfc18, 0xc2083dc5a0, 0xc2083e9930)
	/usr/src/go/src/pkg/net/http/server.go:1235 +0x40
github.com/gorilla/mux.(*Router).ServeHTTP(0xc2080add60, 0x7f7ee13bfc18, 0xc2083dc5a0, 0xc2083e9930)
	/go/src/github.com/docker/swarm/Godeps/_workspace/src/github.com/gorilla/mux/mux.go:98 +0x292
github.com/docker/swarm/api.(*dispatcher).ServeHTTP(0xc2080be910, 0x7f7ee13bfc18, 0xc2083dc5a0, 0xc2083e9930)
	/go/src/github.com/docker/swarm/api/server.go:32 +0x9d
net/http.serverHandler.ServeHTTP(0xc2081372c0, 0x7f7ee13bfc18, 0xc2083dc5a0, 0xc2083e9930)
	/usr/src/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc20847d000)
	/usr/src/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
	/usr/src/go/src/pkg/net/http/server.go:1721 +0x313
2015/06/20 22:28:57 http: panic serving <IP_ADDRESS>:29143: runtime error: index out of range
goroutine 125 [running]:
net/http.func·011()
	/usr/src/go/src/pkg/net/http/server.go:1100 +0xb7
runtime.panic(0x963280, 0xcd6a3c)
	/usr/src/go/src/pkg/runtime/panic.c:248 +0x18d
github.com/docker/swarm/api.getContainersJSON(0xc2080b0f00, 0x7f7ee13bfc18, 0xc2083fa5a0, 0xc20843f860)
	/go/src/github.com/docker/swarm/api/handlers.go:199 +0x16e7
github.com/docker/swarm/api.func·008(0x7f7ee13bfc18, 0xc2083fa5a0, 0xc20843f860)
	/go/src/github.com/docker/swarm/api/primary.go:111 +0x2a0
net/http.HandlerFunc.ServeHTTP(0xc20803d300, 0x7f7ee13bfc18, 0xc2083fa5a0, 0xc20843f860)
	/usr/src/go/src/pkg/net/http/server.go:1235 +0x40
github.com/gorilla/mux.(*Router).ServeHTTP(0xc2080add60, 0x7f7ee13bfc18, 0xc2083fa5a0, 0xc20843f860)
	/go/src/github.com/docker/swarm/Godeps/_workspace/src/github.com/gorilla/mux/mux.go:98 +0x292
github.com/docker/swarm/api.(*dispatcher).ServeHTTP(0xc2080be910, 0x7f7ee13bfc18, 0xc2083fa5a0, 0xc20843f860)
	/go/src/github.com/docker/swarm/api/server.go:32 +0x9d
net/http.serverHandler.ServeHTTP(0xc2081372c0, 0x7f7ee13bfc18, 0xc2083fa5a0, 0xc20843f860)
	/usr/src/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc2083bb900)
	/usr/src/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
	/usr/src/go/src/pkg/net/http/server.go:1721 +0x313

Here's the container that causes it:
[
{
    "Id": "2aa608b0df1a6749865ebce68573c338c48ad01e50de6f4272c5ae81317b3bf9",
    "Created": "2015-06-20T22:24:43.65488236Z",
    "Path": "/usr/local/bin/entrypoint",
    "Args": [],
    "State": {
        "Running": false,
        "Paused": false,
        "Restarting": false,
        "OOMKilled": false,
        "Dead": false,
        "Pid": 0,
        "ExitCode": 128,
        "Error": "Cannot find child for /prod_haproxy_1",
        "StartedAt": "0001-01-01T00:00:00Z",
        "FinishedAt": "0001-01-01T00:00:00Z"
    },
    "Image": "71bfb61ca2851b8087d31eb07d5ec184bf6eb4ebc175297af47652e8cc358b7b",
    "NetworkSettings": {
        "Bridge": "",
        "EndpointID": "3fb481b26e7043c682ece1343c78089883779fe17adfea89e4f4eee54081e72d",
        "Gateway": "",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "HairpinMode": false,
        "IPAddress": "<IP_ADDRESS>",
        "IPPrefixLen": 16,
        "IPv6Gateway": "",
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "MacAddress": "",
        "NetworkID": "b7cba9424070e4f478abd56fe7046612c417a0a1c6813c51d163f2e11f9077e3",
        "PortMapping": null,
        "Ports": {},
        "SandboxKey": "",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null
    },
    "ResolvConfPath": "/var/lib/docker/containers/2aa608b0df1a6749865ebce68573c338c48ad01e50de6f4272c5ae81317b3bf9/resolv.conf",
    "HostnamePath": "",
    "HostsPath": "/var/lib/docker/containers/2aa608b0df1a6749865ebce68573c338c48ad01e50de6f4272c5ae81317b3bf9/hosts",
    "LogPath": "",
    "Name": "/prod_haproxy_1",
    "RestartCount": 0,
    "Driver": "aufs",
    "ExecDriver": "native-0.2",
    "MountLabel": "",
    "ProcessLabel": "",
    "Volumes": {
        "/etc/docker": "/etc/docker"
    },
    "VolumesRW": {
        "/etc/docker": true
    },
    "AppArmorProfile": "",
    "ExecIDs": null,
    "HostConfig": {
        "Binds": [
            "/etc/docker:/etc/docker:rw"
        ],
        "ContainerIDFile": "",
        "LxcConf": null,
        "Memory": 0,
        "MemorySwap": 0,
        "CpuShares": 0,
        "CpuPeriod": 0,
        "CpusetCpus": "",
        "CpusetMems": "",
        "CpuQuota": 0,
        "BlkioWeight": 0,
        "OomKillDisable": false,
        "Privileged": false,
        "PortBindings": {
            "8080/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "80"
                }
            ]
        },
        "Links": null,
        "PublishAllPorts": false,
        "Dns": null,
        "DnsSearch": null,
        "ExtraHosts": [],
        "VolumesFrom": [],
        "Devices": null,
        "NetworkMode": "default",
        "IpcMode": "",
        "PidMode": "",
        "UTSMode": "",
        "CapAdd": null,
        "CapDrop": null,
        "RestartPolicy": {
            "Name": "",
            "MaximumRetryCount": 0
        },
        "SecurityOpt": null,
        "ReadonlyRootfs": false,
        "Ulimits": null,
        "LogConfig": {
            "Type": "json-file",
            "Config": {}
        },
        "CgroupParent": ""
    },
    "Config": {
        "Hostname": "2aa608b0df1a",
        "Domainname": "",
        "User": "",
        "AttachStdin": false,
        "AttachStdout": false,
        "AttachStderr": false,
        "ExposedPorts": {
            "8080/tcp": {},
            "8443/tcp": {}
        },
        "PublishService": "",
        "Tty": false,
        "OpenStdin": false,
        "StdinOnce": false,
        "Env": [
            "DOCKER_HOST=tcp://<IP_ADDRESS>:3376",
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
        ],
        "Cmd": null,
        "Image": "bfirsh/interlock-haproxy-swarm:multihost",
        "Volumes": {
            "/etc/docker": {}
        },
        "VolumeDriver": "",
        "WorkingDir": "",
        "Entrypoint": [
            "/usr/local/bin/entrypoint"
        ],
        "NetworkDisabled": false,
        "MacAddress": "",
        "OnBuild": null,
        "Labels": {
            "com.docker.compose.config-hash": "bc9c0cc6d8ed503085d81da34ab7b3f18612ec4ed447a082cfbaacef7e300f92",
            "com.docker.compose.container-number": "1",
            "com.docker.compose.oneoff": "False",
            "com.docker.compose.project": "prod",
            "com.docker.compose.service": "haproxy",
            "com.docker.compose.version": "1.4.0dev",
            "com.docker.swarm.constraints": "[\"node==swarm-0\"]",
            "com.docker.swarm.id": "c5f64a5cb86b0202bcc3a384ef0883c01534ac5634b726ed904250c792964e61"
        }
    }
}
]

Hello @bfirsh, can you please share more details which might help to debug the issue. I have been unable to recreate it after multiple trials.

How the swarm cluster was setup - discovery mechanism?
Is the panic happening for any container that is unstarted ?
Are you able to use ps -a on the individual swarm members ?

@bfirsh do you still have the machine availalble ? Can you do a curl /v1.19/containers/json?all=1 against the docker daemon and post it here ?
The issue looks like container.Names, we could add a check to prevent the panic, but I don't see how it could happen in the first place.

I was seeing this issue consistently when I had Dead containers hanging out anywhere in the cluster.  I could docker ps -a on any individual node, see the dead containers and clean them up, and then everything was peachy again when talking to swarm.
I was getting dead containers from running Consul health checks and hitting https://github.com/docker/docker/issues/9665.

ping @bfirsh

Unfortunately haven't got the machine still available, happy for this to be closed.
Though generally, Swarm probably shouldn't panic given malformed API responses from the Engine. Perhaps this error could have been caught somewhere?

Hello,
Same here, when one of the node in the cluster contained "Dead" container. Swarm panic with the mentioned trace.
I agree with @bfirsh. In this case swarm should remove the node from the available nodes and don't crash.

Hi All, I have this issue is reproducible the latest images: swarm:latest and 0.4.0-rc2. It's breaking third party tools that use the API or wrap this command. It's not related to a dead node that I can tell, the log is still printing token discovery requests and no other containers are running on clean ec2 instances running ubuntu 14.04.
ubuntu@docker-host:~$ docker version
Client:
 Version:      1.8.2
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   0a8c2e3
 Built:        Thu Sep 10 19:19:00 UTC 2015
 OS/Arch:      linux/amd64

Server:
 Version:      swarm/0.4.0
 API version:  1.16
 Go version:   go1.4.2
 Git commit:   d647d82
 Built:
 OS/Arch:      linux/amd64

2015/09/18 21:59:25 http: panic serving <IP_ADDRESS>:46120: runtime error: index out of range
goroutine 33 [running]:
net/http.func·011()
	/usr/src/go/src/net/http/server.go:1130 +0xbb
github.com/docker/swarm/api.getContainersJSON(0xc20800c640, 0x7fe469c7f1f8, 0xc20823c1e0, 0xc208346340)
	/go/src/github.com/docker/swarm/api/handlers.go:197 +0x1815
github.com/docker/swarm/api.func·007(0x7fe469c7f1f8, 0xc20823c1e0, 0xc208346340)
	/go/src/github.com/docker/swarm/api/primary.go:118 +0x2de
net/http.HandlerFunc.ServeHTTP(0xc20801e940, 0x7fe469c7f1f8, 0xc20823c1e0, 0xc208346340)
	/usr/src/go/src/net/http/server.go:1265 +0x41
github.com/gorilla/mux.(*Router).ServeHTTP(0xc208036370, 0x7fe469c7f1f8, 0xc20823c1e0, 0xc208346340)
	/go/src/github.com/docker/swarm/Godeps/_workspace/src/github.com/gorilla/mux/mux.go:98 +0x297
github.com/docker/swarm/api.(*dispatcher).ServeHTTP(0xc208092270, 0x7fe469c7f1f8, 0xc20823c1e0, 0xc208346340)
	/go/src/github.com/docker/swarm/api/server.go:32 +0x9d
net/http.serverHandler.ServeHTTP(0xc2080d7500, 0x7fe469c7f1f8, 0xc20823c1e0, 0xc208346340)
	/usr/src/go/src/net/http/server.go:1703 +0x19a
net/http.(*conn).serve(0xc20823c140)
	/usr/src/go/src/net/http/server.go:1204 +0xb57
created by net/http.(*Server).Serve
	/usr/src/go/src/net/http/server.go:1751 +0x35e

@bpradipt asked:
1. How the swarm cluster was setup - discovery mechanism?
Just default docker hub discovery using tokens.
2. Is the panic happening for any container that is unstarted ?
The panic is seen in the logs of the manager container only. When this happens, the client sees an EOF error.
3. Are you able to use ps -a on the individual swarm members ?
Yes, local hosts (ec2 instances) running docker containers are fine and docker ps -a works. This is only an issue when connecting to the swarm manager.
@vieux asked to test with curl:
curl -v localhost:2475/v1.19/containers/json?all=1
* Hostname was NOT found in DNS cache
*   Trying <IP_ADDRESS>...
* Connected to localhost (<IP_ADDRESS>) port 2475 (#0)
> GET /v1.19/containers/json?all=1 HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:2475
> Accept: */*
>
* Empty reply from server
* Connection #0 to host localhost left intact
curl: (52) Empty reply from server

I have these containers in hand to test, so I can run more tests if needed. I'm pretty green to go code so I haven't been able to get a PR together.
Here's a gist of the standard install as recommend by the docker documentation (install ubuntu / swarm for development): https://gist.github.com/u2mejc/73c596b8070efad9c8fe

Hi @u2mejc, thanks for your investigation! Although I think the issue you hit is related to docker/docker#16403 somehow because the response returned by the daemon you used (1.8.2) was empty (nil instead of an empty array). The patch got merged so you might want to try with the latest docker version and build the dev binary to see if the issue still persists :)
Let me know if you still have the issue after trying with the dev build.

Hi @abronan, the issue appears to still persist at master for swarm (and docker):
ubuntu@docker-host:~/go$ bin/swarm manage token://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX &
[2] 5406
ubuntu@docker-host:~/go$ INFO[0000] Listening for HTTP                            addr=<IP_ADDRESS>:2375 proto=tcp
INFO[0000] Registered Engine ip-192-168-100-206 at <IP_ADDRESS>:2375

ubuntu@docker-host:~/go$ export DOCKER_HOST=tcp://localhost:2375
ubuntu@docker-host:~/go$ docker version
Client:
 Version:      1.9.0-dev
 API version:  1.21
 Go version:   go1.4.2
 Git commit:   743dc1c
 Built:        Mon Sep 21 13:20:09 UTC 2015
 OS/Arch:      linux/amd64

Server:
 Version:      swarm/0.5.0-dev
 API version:  1.16
 Go version:   go1.5.1
 Git commit:   HEAD
 Built:
 OS/Arch:      linux/amd64
ubuntu@docker-host:~/go$ docker info
Containers: 46
Images: 4
Role: primary
Strategy: spread
Filters: affinity, health, constraint, port, dependency
Nodes: 1
 ip-192-168-100-206: <IP_ADDRESS>:2375
  └ Containers: 46
  └ Reserved CPUs: 0 / 1
  └ Reserved Memory: 0 B / 2.051 GiB
  └ Labels: executiondriver=native-0.2, kernelversion=3.13.0-62-generic, operatingsystem=Ubuntu 14.04.2 LTS, storagedriver=aufs
CPUs: 1
Total Memory: 2.051 GiB
Name: docker-host
ubuntu@docker-host:~/go$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
ubuntu@docker-host:~/go$ docker ps -a
2015/09/21 19:44:47 http: panic serving <IP_ADDRESS>:44202: runtime error: index out of range
goroutine 36 [running]:
net/http.(*conn).serve.func1(0xc8203d4840, 0x7faad9f74de0, 0xc82002a968)
    /usr/local/go/src/net/http/server.go:1287 +0xb5
github.com/docker/swarm/api.getContainersJSON(0xc8200f1540, 0x7faad9f83a80, 0xc8203d48f0, 0xc8201f1b20)
    /home/ubuntu/go/src/github.com/docker/swarm/api/handlers.go:242 +0x1adc
github.com/docker/swarm/api.NewPrimary.func1(0x7faad9f83a80, 0xc8203d48f0, 0xc8201f1b20)
    /home/ubuntu/go/src/github.com/docker/swarm/api/primary.go:120 +0x300
net/http.HandlerFunc.ServeHTTP(0xc820133340, 0x7faad9f83a80, 0xc8203d48f0, 0xc8201f1b20)
    /usr/local/go/src/net/http/server.go:1422 +0x3a
github.com/gorilla/mux.(*Router).ServeHTTP(0xc82005ccd0, 0x7faad9f83a80, 0xc8203d48f0, 0xc8201f1b20)
    /home/ubuntu/go/src/github.com/gorilla/mux/mux.go:100 +0x29e
github.com/docker/swarm/api.(*dispatcher).ServeHTTP(0xc8200f3360, 0x7faad9f83a80, 0xc8203d48f0, 0xc8201f1b20)
    /home/ubuntu/go/src/github.com/docker/swarm/api/server.go:32 +0x9f
net/http.serverHandler.ServeHTTP(0xc82028c480, 0x7faad9f83a80, 0xc8203d48f0, 0xc8201f1b20)
    /usr/local/go/src/net/http/server.go:1862 +0x19e
net/http.(*conn).serve(0xc8203d4840)
    /usr/local/go/src/net/http/server.go:1361 +0xbee
created by net/http.(*Server).Serve
    /usr/local/go/src/net/http/server.go:1910 +0x3f6
An error occurred trying to connect: Get http://localhost:2375/v1.21/containers/json?all=1: EOF

Also tested 1.9.0-dev and swarm/0.4.0 together with the same results. I followed the steps for docker master here: https://github.com/docker/docker#getting-the-development-builds and swarm here: https://github.com/docker/swarm#installation-for-swarm-developers
This issue appears specific to when swarm is the server, when docker is the server, the client speaks over TCP without issue:
$ curl -v localhost:2375/v1.19/containers/json?all=1
* Hostname was NOT found in DNS cache
*   Trying <IP_ADDRESS>...
* Connected to localhost (<IP_ADDRESS>) port 2375 (#0)
>INFO[0092] GET /v1.19/containers/json?all=1
 GET /v1.19/containers/json?all=1 HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:2375
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
* Server Docker/1.8.2 (linux) is not blacklisted
< Server: Docker/1.8.2 (linux)
< Date: Mon, 21 Sep 2015 20:10:46 GMT
< Content-Length: 1687
<
[{"Id":"ac4cd73266362f3025748fb2f3a5d9a87a2627f64c7", SNIP}]
* Connection #0 to host localhost left intact

$ curl -v localhost:2375/v1.19/version

* Hostname was NOT found in DNS cache
*   Trying <IP_ADDRESS>...
* Connected to localhost (<IP_ADDRESS>) port 2375 (#0)
>INFO[0140] GET /v1.19/version
 GET /v1.19/version HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:2375
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
* Server Docker/1.8.2 (linux) is not blacklisted
< Server: Docker/1.8.2 (linux)
< Date: Mon, 21 Sep 2015 20:11:34 GMT
< Content-Length: 191
<
{"Version":"1.8.2","ApiVersion":"1.20","GitCommit":"0a8c2e3","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","KernelVersion":"3.13.0-48-generic","BuildTime":"Thu Sep 10 19:19:00 UTC 2015"}
* Connection #0 to host localhost left intact

Let me know what else I can do to help.

@u2mejc Thanks a lot for all those details.
I just tried with the exact same setup, I built the binary as of today for 1.9.0-dev, with swarm 0.5.0-dev  (also on ubuntu 14.04 with the same kernel) and issuing a docker ps -a works as expected and does not panic :(
Not quite sure what is the issue in your case yet but will keep looking at those logs.

@abronan @u2mejc
[{"Id":"ac4cd73266362f3025748fb2f3a5d9a87a2627f64c7", SNIP}]

How this container created? without Names......
Just like @vieux say:https://github.com/docker/swarm/issues/985#issuecomment-122965344

The issue looks like container.Names, we could add a check to prevent the panic, but I don't see how it could happen in the first place.

Like others before me, this bug appears to have crawled back under the rock from which it emerged. I did whip up a quick branch and was going to submit a PR after documenting how to reproduce it. Here's the one liner to check the length before trying to trim the string: https://github.com/u2mejc/swarm/commit/a61c38cfb14b264d3bb317d5ecb8b99dc02334a7
I believe there could have been some older docker versions in my cluster (swarm nodes) since once an instance rebooted init would have started the existing binary instead of the dev version I downloaded. :confused: Hopefully this thread will help remind others to check the docker version and swarm version on every instance (host) in their cluster.

@u2mejc No worries, thanks again for your posts and for your update. At least we narrowed it down quite a bit since the beginning of this thread. Let's close this issue for now as this seems to be due to a faulty docker engine version.

We are experiencing this issue. When we do a docker ps -a (through swarm), the following error is returned:
An error occurred trying to connect: Get https://localhost:2375/v1.21/containers/json?all=1: EOF

This error only seems to be occurring if the nodes in the swarm cluster have containers in a DEAD state.
Note: When docker ps -a is run outside of swarm it returns without error.


How to update has many association

Looking at the documentation the premise seems really simple but it just isn't working for me.  I'm likely missing something very obvious. Any assistance would be greatly appreciated.
I have 2 objects, an Item and a Cart.  A cart has many Items.  I can create a record for both successfully but when I attempt to Append the Item to Cart.Items it doesn't persist.  Please see the example and comments below.
What version of Go are you using (go version)?
go version go1.13.1 linux/amd64
Which database and its version are you using?
Behavior observed in current versions mysql, postgres, and sqlite3
package main

import (
                "fmt"
                "encoding/json"
    "github.com/jinzhu/gorm"
    _ "github.com/jinzhu/gorm/dialects/sqlite"
)

type Item struct {
  gorm.Model

  ItemNumber string
  CartID uint
}

type Cart struct {
  gorm.Model

        Items   []Item
}

func main() {
  db, err := gorm.Open("sqlite3", "test.db")
  if err != nil {
    panic("failed to connect database")
  }
  defer db.Close()

  db.AutoMigrate(&Item{})
  db.AutoMigrate(&Cart{})

  db.Create(&Item{ItemNumber: "L1212"})
  db.Create(&Cart{})

  var item Item
  var cart Cart

  db.First(&item, 1)
  db.First(&cart, 1)

  db.Model(&cart).Association("Items").Append(item)
  db.Save(&cart)

        c,_ := json.Marshal(cart)
        fmt.Printf("%s", string(c))
}

I run the code above which results in something like:
{
  "ID": 1,
  "CreatedAt": "2019-10-17T16:09:18.771818922-07:00",
  "UpdatedAt": "2019-10-17T16:19:43.243991619-07:00",
  "DeletedAt": null,
  "Items": [
    {
      "ID": 1,
      "CreatedAt": "2019-10-17T16:09:18.768156857-07:00",
      "UpdatedAt": "2019-10-17T16:19:43.244208538-07:00",
      "DeletedAt": null,
      "ItemNumber": "L1212",
      "CartID": 1
    }
  ]
}

If I query the record after the fact `null is returned for Items.
{
  "ID": 1,
  "CreatedAt": "2019-10-17T16:09:18.771818922-07:00",
  "UpdatedAt": "2019-10-17T16:19:43.243991619-07:00",
  "DeletedAt": null,
  "Items": null
}

After some digging I see that gorm doesn't automatically inflate the context of the nested object


Manually calling a React.PropTypes validation function is deprecated

See this issue https://github.com/smooch/smooch-js/issues/370.

@brene ^


Roadmap

Category
[ ] Enhancement
[ ] Bug
[X ] Question
Expected / Desired Behavior / Question
@VesaJuvonen any chance to reveal the list of reusable components that may be added to this repository by the Engineering team in the future?
The reason I ask is because this may make people hold back on contributions, thinking that they may be working on something that is already being developed by the team at MS and it would be a "waste" of time to have duplication ( I personally feel that way)
Thanks!

@joelfmrodrigues I will add the ones that are planned in the issue list right away.

I have added the controls which are in the pipeline. If you have other ideas, feel free to share them so we can discuss which might be good to include.

@estruyf  Thanks!
The first that immediately comes to mind is a generic web part title, but I believe it was mentioned by Vesa as something that was coming from the Engineering team. Any idea?

Yes indeed, that is also a planned control.


rustypaste: 0.8.4 -> 0.9.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/orhun/rustypaste/releases.
meta.description for rustypaste is: A minimal file upload/pastebin service
meta.homepage for rustypaste is: https://github.com/orhun/rustypaste
meta.changelog for rustypaste is: https://github.com/orhun/rustypaste/blob/v0.9.0/CHANGELOG.md
Updates performed

Rust version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.9.0 with grep in /nix/store/4r7msgifwsll151p1xsi5clgnarykxxy-rustypaste-0.9.0
found 0.9.0 in filename of file in /nix/store/4r7msgifwsll151p1xsi5clgnarykxxy-rustypaste-0.9.0

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
rustypaste

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/4r7msgifwsll151p1xsi5clgnarykxxy-rustypaste-0.9.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A rustypaste https://github.com/r-ryantm/nixpkgs/archive/6460d65cf9d435cdf02c47f23dbe5e7ca9fb12b6.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/4r7msgifwsll151p1xsi5clgnarykxxy-rustypaste-0.9.0
ls -la /nix/store/4r7msgifwsll151p1xsi5clgnarykxxy-rustypaste-0.9.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

rustypaste

Maintainer pings
cc @seqizz for testing.

Result of nixpkgs-review pr 232966 run on x86_64-linux 1

1 package built:

rustypaste


Update overview.md

Updated Sweden Central

@sunilagarwal

Can you review this PR?
IMPORTANT: When this content is ready to merge, you must add #sign-off in a comment or the approval may get overlooked.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#please-close


Update SDL2 version

A new SDL2 version has been released.
https://github.com/libsdl-org/SDL/releases/tag/release-2.28.5

Just reviewed it myself.


Consider using Pagic to build the website?

Pagic is a static site generator powered by Deno + React
Here are some demos:

pagic.org
Deno X ranking
TypeScript 入门教程

If it is possible to use pagic to build the website, I would like to create the pull-request

Sounds great, thank you.


SP5: Stacked Bar - show value inside bar

Suggestion: Stacked bar chart currently does not have option to show numeric value inside bar, so it's not possible to quickly see value and users need to look on bottom axis

Thanks for the suggestion @tibormarchynzoom! I'll close this issue and add this feature to #3426 to be sure label support is demonstrated in a new cookbook recipe 👍

Solved most of this in #3426, but I'm opening this back up to track adding a TextAlignment property to bars

Hi @tibormarchynzoom, I just added a feature which allows this:
ScottPlot.Bar bar = new()
{
    Value = nextBarBase + values[i],
    FillColor = categoryColors[i],
    ValueBase = nextBarBase,
    Position = x,
    Label = "Testing",
    CenterLabel = true, // new flag to center the label
};

myPlot.Add.Bar(bar);

Adding this code to the example in #3426 we get this:

Great feature, thanks, I was trying to rotate the bar label but it seems not possible?

@jaguarxii this feels a bit hacky but it works
using ScottPlot;

Plot myPlot = new();

for (int i = 0; i < 10; i++)
{
    Bar bar = new()
    {
        Position = i,
        Value = Generate.RandomNumber(10, 20),
        Label = $"Bar #{1 + i}",
        CenterLabel = true,
        FillColor = Generate.RandomColor().Lighten(0.5)
    };

    var barPlot = myPlot.Add.Bar(bar);
    barPlot.ValueLabelStyle.Rotation = -90;
    barPlot.ValueLabelStyle.FontSize = 16;
}

myPlot.Axes.Margins(bottom: 0);
myPlot.SavePng("test.png", 600, 300).LaunchFile();

Nice @swharden, do you know if it is possible to align the labels to the base of the bar, will it work on horizontal bars aswell ?

is is possible to align the labels to the base of the bar?

will it work on horizontal bars as well?

Hi @jaguarxii, I believe so! Give it a try and if you come up with a good code sample demonstrating it, paste it here and we can add it to the cookbook 👍

Hi @swharden, the closest I get to place the labels to the "base" of the bar (in this case horizontal) is by setting the alignment to lowerRight, but not all labels are aligned.
I already tried to set the labeloffset by using the rect attribute, without any success

Hi @jaguarxii, thanks for following up! Adding a Text above a Bar is a good strategy. Thanks for sharing your code so others may be able to replicate this result!
It sounds like support for text alignment in horizontally arranged bars isn't great. The code that controls that behavior is here, so if someone wants to create a pull request to modify this behavior and improve support for text alignment in horizontal bars, I would be happy to review it and merge it in 👍
https://github.com/ScottPlot/ScottPlot/blob/1f44931697efb5fcc0c8589057039256522e3ee9/src/ScottPlot5/ScottPlot5/Primitives/Bar.cs#L143-L161
In the mean time, it seems like you have a great solution! Thanks again for sharing


May 31

as of May 31, no such tools will become useless

I'm well aware thanks. And the method to get keys will be useless, not this program per say. Kthxbye


Delete test issue template

@alandefreitas a minor update, deleted my test template and added a short section on how to do this after the "creating an issue template" section.

a minor update, deleted my test template and added a short section on how to do this after the "creating an issue template" section.

Looks great. Please squash when this is complete.

@alandefreitas removed delete issue section, squashed, gtg


Rename Python sub-project to service-based naming convention

python-test-samples/python-test-intro to python-test-samples/apigw-lambda
python-test-samples/python-test-layer to python-test-samples/apigw-lambda-layer

Merged and closed


On opening some trades: 'NoneType' object is not subscriptable

Im running on SEPOLIA TEST NETWORK, and my script is working for the most part but i get an error stating "Error opening trades 'NoneType' object is not subscriptable"
This must be an issue with a value on a specific trade, is there a way to subvert this, or at least diagnose it?

how did you fix it?


CPT individual final

blog: https://sharonkodali.github.io/sharonk//2024/02/19/CPT-final_IPYNB_2_.html
video:

CPT Requirements
Explanation

Instructions for input from user
The input from the user is when they click the add to favorites button. This triggers the house to be added to the favorites database

Use of at least one list (or other collection type)
The collection is the database of the houses. For my feature, the collection is only compiled of the user's favorite picks

At least one procedure that contributes to the program’s intended purpose
I have a procedure that creates the favorites page

An algorithm that includes sequencing, selection, and iteration
This algorithm renders the favorites page every time the user adds a new one. It has to recreate the database every time, so this demonstrates iteration.

Calls to your student-developed procedure
This function calls to the renderFavorites procedure that I created

Instructions for output
In the house details page, the add to favorites button has a function. When the button is clicked, it does a window redirect to the favorites page, where the output is displayed

video

Component A: I was able to follow what you were saying after reading the context. At first I had read the code and was understanding but then after reading the context, it was easier to understand. The map uses longitude and latitude to understand the location on the map. There were a few photos that looked reused in the questions but this reinforces the detail to the parts that are necessary and important.
Component B: The quality of the captions are nice as they fit with the white and blue background nicely. They do not get in the way with the presentation that you were showing. I think that the website was really cool and uses google maps as a base. The video goes over 1 minute by 1 second but honestly it isn't that far off the mark. The video was good to watch and saw the longitude and latitude that you were talking about in Component A.
Score 0.97/1


Fix the "migrate" subcommand to handle build.gradle correctly

Fix #699 @dmikurube Please take a look when you can.
Un-JRuby embulk migrate replace files properly.

Fix GRADLE_VERSION_IN_WRAPPER matching pattern.

Remove trailing character '/'.
The version strings is gradle-2.12-bin.zip

Avoid FileAlreadyExistsException.

Throw that exception if the file exists.

Add files into modifiedFiles.

For output the following message.
Done. Please check modifieid files.

By the way, I found typo (not fixed yet this PR)

modifieid -> modified

@dmikurube Thank you for reviewing.
Please take a look again.

Fix PR subject.
Use StandardCopyOption.REPLACE_EXISTING instead of static import
Add newline for long statement.


What are the RX TX pins mapped to as GPIO pin numbers?

What are the RX TX pins mapped to as GPIO pin numbers?
I can't figure it out from the pinout here.


Give grace period for riakc_pb_socket to reconnect

This PR addresses #1201 (RCS-250) (RCS-250) .
When riakc_pb_socket detects timeout errors, it disconnects the
TCP connection and enters reconnection phase.  Immediate next
request to riakc_pb_socket process will likely fail with
infamous disconnect errors.
Typical case is described in #1201 (RCS-250) (RCS-250) for user object fetch.
Also, there is another case for block get. If the first
primary vnode for a block is very slow, the reuqest will
timeout because it is N=one. Then subsequent N=all
request will likely fail.
This PR fixes these two cases by adding grace period so that
riakc_pb_socket can reconnect if possible.

Rebased on develop 1643c8d to incorporate r_t fix #1231

Currently we have auto_reconnect as false by default, so the recovery from disconnected state is by just re-launching the process by poolboy?

by just re-launching the process by poolboy?

Does "the process" indicate riak_cs_riak_client process? Or riakc_pb_socket?

I think it was riak_cs_riak_client.

It may be my mind model of riak cs code base... some processes share single riak_cs_riak_client checked out from a pool, and (at least I think) the pid is unchangable in a request-response lifecycle. If it should be changed or renewed, all the processes that share it should be notified and renew to new pid. At the current implementation, I'm afraid that it might be a big diff covering many modules in the final stage of 2.1.0 development cycle.
By the example of this PR's current diff, block server process detects timeout but it can not notify put/get FSM and/or mochiweb acceptor processes which has the pid in #context.
Although, I prefer any other way to just sleeping in general if possible. This PR is not mandatory for 2.1.0 because it's long standing issue :sweat:
Some random thoughts for possible next PR creator:

Slow node or silent node failure may prevent some users from accessing Riak CS system completely (because user object can not be fetched) typically for 60 seconds.
Using auto_reconnect encapsulates disconnected state in riakc_pb_socket and hides it from riak cs, it will be not good for visibility.

@borshop merge

GC also fails at riak_cs_gc_key_list.erl like this:
2015-09-07 18:17:29.172 [warning] <0.10473.4>@riak_cs_gc_key_list:eligible_manifest_keys:122 Error occurred trying to query from time <<"0">> to <<"1441531049">>in gc key index. Reason: disconnected

Maybe we'd also need this here.


Create Setting-CPI-Requirements-CBRS-Installations.md

This HIP aims to set CPI (Certified Professional Installer) requirements for CBRS deployments to better the installation quality and knowledge of the deployers for the CBRS network.  Every new cbrs deployment and/or re-registration of a cbrs radios, and will require a CPI identification number when submitting for SAS registration.

@abhay
"Just to be clear, are you stating that all new CBRS deployers must be a CPI?"
Any new SAS that needs to be done , regardless of the reason, will be require a CPI public key.
"Also is there any requirement that Nova uses the CPI ID directly or do they still get to use theirs for the SAS? "
Their is no requirement for the Service Provider to actually use this in the SAS registration in the backend at this time. They can choose to use it in SAS, or just take note of it for future reference.
The point of this HIP is solely to attempt better quality, experience, and education of the people that decide on CBRS deployment.
Overall, I have been told that the Service Provider can require this regardless of a HIP, and no HIP is needed.
I want to assume it was never wanted or required to ease the deployment success of CBRS, as their are less barriers to entry. But we are at the next point of deployment in the ecosystem which is wifi, and wifi can be deployed at a greater benefit and ease than CBRS should be.

I like the specificity. Add those details to the HIP and let's get it merged for discussion?

Will do.
Pull 910 is way more important atm.  Please review that one for expediting.

@mrfizzy99 Whats the status with this now? Waiting on the results of other HIPs/PRs or do you think this should proceed.

@mrfizzy99 Whats the status with this now? Waiting on the results of other HIPs/PRs or do you think this should proceed.

Waiting for @heatedlime to suggest updates as he showed interest in modifying. 👴

@mrfizzy99 Whats the status with this now? Waiting on the results of other HIPs/PRs or do you think this should proceed.

Waiting for @heatedlime to suggest updates as he showed interest in modifying. 👴

Before I do anything, I’d like to see if 113 passes or not. Don’t let me hold anything up.

@mrfizzy99 @heatedlime Any updates going to happen on this one?

None from me; I’m no longer interested in it.

This HIP then really needs to describe how the new process works within Nova - which will have to come from Nova Labs.
If they don't want to implement it, it needs a new registrar then.

Can I throw out a question since its not clear in the text, are both courses required? Can we make it clear that if this hip does head towards implementation, that both courses are not free and do cost hundreds of dollars? Don't get me wrong I think its an interesting idea and i'd be glad to take it to learn more about the antennas. Idea; Bonus rewards to hotspot owners that are CPI certified and add it as another oracle.

@DigidyDOG As I understand it its not about the number of courses. Its about the CPI ID you get after passing the exam.
Both links seem to end up at the same place. Or you may not even need a course. Just take the exam for the cert
The standards for operating a CPI training course were updated last week about recording certs
https://winnf.memberclicks.net/assets/CBRS/WINNF-TS-0247.pdf

There seems to be places offering the course+exam for under $500

This HIP then really needs to describe how the new process works within Nova - which will have to come from Nova Labs.
If they don't want to implement it, it needs a new registrar then.

@mrfizzy99 Have you talked to Nova about engaging on this, looked for a new registrar or should this PR get closed

Marking this for archive at the end of the week.

ready for archive. can be reopened if necesary.


Avalonia for Visual Studio

Failed to compile successfully based on document operation..
Severity code description project file line suppress status
Error nu1108 loop detected.
Avalonia -> Avalonia.Desktop 0.9.10 -> Avalonia (>= 0.9.10 ). Avalonia E:\Study\Avalonia\Avalonia\ Avalonia.csproj One

MSBuild doesn't support referencing NuGet packages with the same name as your project. Try renaming the project to something else.

@kekekeks thanks.


Array of a type is seen as incompatible with an Array of superset Union

I believe that in the following example, the variable a should be compatible with the parameter arg, seeing as it is a compatible subset of the union.
type FooUnion = string | { id: string };

function foo (arg: FooUnion[]) {
	console.log(arg);
}

const a: string[] = ['a'];

foo(a);

FooUnion (object type) This type is incompatible with const a: string[] = ['a'];

Problem due to variance. Use this instead:
type FooUnion = string | { id: string };

function foo (arg: $ReadOnlyArray<FooUnion>) {
	console.log(arg);
}

const a: string[] = ['a'];

foo(a);


DRep explorer - DRep list - label 'Yourself' should be placed next to the status

Noticed by @m-i-k-e in this issue.
When user is registered as DRep in DRep list - label "Yourself" is placed like below:

Should be like below:
Figma design here.

OK NOW

This works ok


Gradle Sync issue

FAILURE: Build failed with an exception.

* Where:
Script 'D:\Development\AndroidStudioProjects\CropMe\publish.gradle' line: 83

* What went wrong:
A problem occurred configuring project ':cropme'.
> Could not get unknown property 'sonatypeUsername' for Credentials [username: null] of type org.gradle.internal.credentials.DefaultPasswordCredentials_Decorated.

Sorry, I just fixed it. thank you for letting me know.


Add suppport for ScreenResize initial value in PlayerConfig

Hi,
The lib works great, but I would like to suggest an improvement.
Right now, by default, it opens the player on mobile devices in ScreenResize.FILL which fills in the height but cuts the sides of the video and it looks awful until we manually switch it to be ScreenResize.FIT. Please provide the setter in the PlayerConfig so we can pass in the default ScreenResize value we want for each platform/configuration. Thanks!
Example:

Default FILL on start
When FIT selected

If you are open to contributions, I can also open a PR.

Hi @ctn-mobile-innovation , thank you very much for the quick update. The player is awesome and It works flawlessly. Thanks for creating and supporting it, keep up the great job 💪

😍 Thanks for motivating words @adnanjelic, Do checkout our other libraries too, And Keep Sharing✌


Travis badge should point to master

Confusingly, the badge was green in the readme when
the green pr had yet to be merged.

Great catch! Thank you! 👍


Not all URLs working

Mainstream site URLs such as Youtube, and Facebook don't work when passing their links in the src parameter.

@eRuaro still not working have you found solution


undefined method `root' for Phlex::Rails:Module (NoMethodError)

I'm trying to install Phlex 0.5.0 in a new app, and either I'm doing something or something broke.
First, I'm trying rails phlex:install and getting rails aborted! Don't know how to build task 'phlex:install'
Then after adding autoload to application.rb manually, I get this when I'm trying to generate a view:
/home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/phlex-0.5.0/lib/generators/phlex/view/view_generator.rb:17:in `layout': undefined method `root' for Phlex::Rails:Module (NoMethodError)

                                Rails.root.join("app/views/layout.rb").exist?
                                     ^^^^^
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/phlex-0.5.0/lib/generators/phlex/view/view_generator.rb:9:in `create_view'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `block in invoke_all'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `each'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `map'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `invoke_all'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/group.rb:232:in `dispatch'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/generators.rb:263:in `invoke'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/commands/generate/generate_command.rb:26:in `perform'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/command/base.rb:87:in `perform'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/command.rb:48:in `invoke'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/commands.rb:18:in `<main>'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /home/even/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from bin/rails:4:in `<main>'

Any ideas?

Hey @evenreven, I didn't run into this when testing locally. Can you try this branch and see if that fixes the issue? https://github.com/joeldrapper/phlex/pull/344

Doesn't work either. (The branch is gone, but I upgraded to the newest version and same problem.)
# Gemfile
# snip
gem "phlex", require: "phlex/rails"

# Gemfile.lock
GEM
  remote: https://rubygems.org/
  specs:
    # snip
    phlex (0.5.2)
      hescape
      syntax_tree (~> 3.6)
      zeitwerk (~> 2.6)
# snip
PLATFORMS
  x86_64-linux

DEPENDENCIES
  bootsnap
  bullet
  cocoon
  debug
  dragonfly
  erb_lint
  jbuilder
  pg
  phlex
  puma
  rack-cache
  rack-mini-profiler
  rails (~> 7.0.0)
  redis
  redis-rack-cache
  rubocop
  rubocop-performance
  rubocop-rails
  solargraph
  sprockets-rails
  turbo-rails
  view_component
  vite_rails
  web-console

RUBY VERSION
   ruby 3.1.2p20

BUNDLED WITH
   2.3.13

It still doesn't have a phlex:install task, which is weird.
Full output of `bin/rails --tasks
rails about                              # List versions of all Rails frameworks and the environment
rails app:template                       # Applies the template supplied by LOCATION=(/path/to/template) or URL
rails app:update                         # Update configs and some other initially generated files (or use just update:configs or update:bin)
rails assets:clean[keep]                 # Remove old compiled assets
rails assets:clobber                     # Remove compiled assets
rails assets:environment                 # Load asset compile environment
rails assets:precompile                  # Compile all the assets named in config.assets.precompile
rails cache_digests:dependencies         # Lookup first-level dependencies for TEMPLATE (like messages/show or comments/_comment.html)
rails cache_digests:nested_dependencies  # Lookup nested dependencies for TEMPLATE (like messages/show or comments/_comment.html)
rails db:create                          # Creates the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:create:all to create all databases in the conf...
rails db:drop                            # Drops the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:drop:all to drop all databases in the config). W...
rails db:encryption:init                 # Generate a set of keys for configuring Active Record encryption in a given environment
rails db:environment:set                 # Set the environment value for the database
rails db:fixtures:load                   # Loads fixtures into the current environment's database
rails db:migrate                         # Migrate the database (options: VERSION=x, VERBOSE=false, SCOPE=blog)
rails db:migrate:down                    # Runs the "down" for a given migration VERSION
rails db:migrate:redo                    # Rolls back the database one migration and re-migrates up (options: STEP=x, VERSION=x)
rails db:migrate:status                  # Display status of migrations
rails db:migrate:up                      # Runs the "up" for a given migration VERSION
rails db:prepare                         # Runs setup if database does not exist, or runs migrations if it does
rails db:reset                           # Drops and recreates all databases from their schema for the current environment and loads the seeds
rails db:rollback                        # Rolls the schema back to the previous version (specify steps w/ STEP=n)
rails db:schema:cache:clear              # Clears a db/schema_cache.yml file
rails db:schema:cache:dump               # Creates a db/schema_cache.yml file
rails db:schema:dump                     # Creates a database schema file (either db/schema.rb or db/structure.sql, depending on `ENV['SCHEMA_FORMAT']` or `config.active_record.schema_f...
rails db:schema:load                     # Loads a database schema file (either db/schema.rb or db/structure.sql, depending on `ENV['SCHEMA_FORMAT']` or `config.active_record.schema_for...
rails db:seed                            # Loads the seed data from db/seeds.rb
rails db:seed:replant                    # Truncates tables of each database for current environment and loads the seeds
rails db:setup                           # Creates all databases, loads all schemas, and initializes with the seed data (use db:reset to also drop all databases first)
rails db:version                         # Retrieves the current schema version number
rails log:clear                          # Truncates all/specified *.log files in log/ to zero bytes (specify which logs with LOGS=test,development)
rails middleware                         # Prints out your Rack middleware stack
rails restart                            # Restart app by touching tmp/restart.txt
rails secret                             # Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions)
rails stats                              # Report code statistics (KLOCs, etc) from the application or engine
rails time:zones[country_or_offset]      # List all time zones, list by two-letter country code (`bin/rails time:zones[US]`), or list by UTC offset (`bin/rails time:zones[-8]`)
rails tmp:clear                          # Clear cache, socket and screenshot files from tmp/ (narrow w/ tmp:cache:clear, tmp:sockets:clear, tmp:screenshots:clear)
rails tmp:create                         # Creates tmp directories for cache, sockets, and pids
rails turbo:install                      # Install Turbo into the app
rails turbo:install:importmap            # Install Turbo into the app with asset pipeline
rails turbo:install:node                 # Install Turbo into the app with webpacker
rails turbo:install:redis                # Switch on Redis and use it in development
rails vite:build                         # Bundle frontend entrypoints using ViteRuby
rails vite:build_all                     # Bundle entrypoints using Vite Ruby (SSR only if enabled)
rails vite:build_ssr                     # Bundle a Node.js app from the SSR entrypoint using ViteRuby
rails vite:clean[keep,age]               # Remove old bundles created by ViteRuby
rails vite:clobber                       # Remove the build output directory for ViteRuby
rails vite:info                          # Provide information on ViteRuby's environment
rails vite:install_dependencies          # Ensure build dependencies like Vite are installed before bundling
rails vite:verify_install                # Verify if ViteRuby is properly installed in the app
rails yarn:install                       # Install all JavaScript dependencies as specified via Yarn
rails zeitwerk:check                     # Checks project structure for Zeitwerk compatibility


Automating the process

Sharing a tip after it has been added should be automated.

I've done a little research and came up with this pseudo(javascript)code to use with GitHub Webhooks. It only includes Twitter status updates because AFAIK Instagram does not have a public API to allow posting images. I can build a fully functional script to run on Amazon Lambda or similar if it is indeed what you guys need.
// const repo = magical GitHub API object

async function handleGithubPushEvent(pushEventData) {

    // See [1] below
    const masterWantsUsToShare = pushEventData.commits.some(commit =>
        commit.message.contains('!share')
    );

    if (!masterWantsUsToShare) {
        return;
    }

    // See [2] below
    const tree = await repo.getTree('/');

    const latestCodeDirectory = tree.sortByNameDesc()
        .find(directory => directory.isCodeDirectory);

    // See [3] below
    const meta = await.repo.getFile(latestCodeDirectory.path + '/meta.json');
    const image = await.repo.getFile(latestCodeDirectory.path + '/screenshot.png');

    // See [4] below
    const mediaID = await twitterAPI.uploadMedia(image);

    // See [5] below
    await twitterAPI.postTweet({
        tweet: meta.tweet,
        media: mediaID,
    });
}

Further read:
[1] GitHub webhooks — push event: https://developer.github.com/v3/activity/events/types/#pushevent
[2] GitHub API — tree traversal: https://developer.github.com/v3/git/trees/
[3] GitHub API — file handling: https://developer.github.com/v3/git/blobs/
[4] Twitter API — media upload: https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-upload.html
[5] Twitter API — status update: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-statuses-update
Note on Instagram: There are private API implementations around but I don't know what risks they might bring up. See for yourself and take your chances if you'd like 😛 https://github.com/huttarichard/instagram-private-api


Problems using content_for with Kramdown engine for content

Expected behavior and actual behavior
I would like to be able to use the content_for helper along with a markdown content file to move a Kramdown generated table of contents into another section of the layout.
I can name the file to parse the ERB block first, or to parse the section of markdown with the Kramdown parser, but I can't get the table of contents to be moved to the section I want in the layout.
<% content_for :toc do %>
* Will be replaced with the ToC
{:toc}
<% end %>

      <%= yield_content :toc %>

      <%= yield %>

Additional information

Ruby version: Ruby v2.3.1
Middleman version: 4.1.10
OS version: macOS Sierra

If I'm missing another method of accomplishing this, like perhaps I'm able to access the Kramdown engine from inside the layout.erb to output the current page table of contents that would also be appreciated to know. Thank you!

Is this still an issue?


remove unused babel-cli, move babel-core to devDep

The babel npm package currently doesn't do anything (you usually mean to install babel-cli).
babel-core is only used in the tests https://github.com/zeit/styled-jsx/blob/master/test/index.js#L5 so can be a devDep as well
And I didn't see babel-cli referenced anywhere?

Actually.. I think babel-cli should be there but there's no script to build the files?

Was it intentional to not compile the files<EMAIL_ADDRESS>

#general in https://zeit.chat


Fix CI failure Constraints/result_builder_pairwise_build_block.swift

This test is failing on earlier platforms. To fix this, we keep the #available but drop the platform specifier since this just testing buildLimitedAvailability(_:).

@swift-ci please smoke test


tiebreaker question show answer screen - has the player the question was about as having answered the question (screenshot attached)

tiebreaker has changed - so this may no longer apply.
#223 appears to be a similar issue - closing this as a duplicate.


Alignment of circ status on full record screen

JIRA issue created by: dlindahl
Originally opened: 2011-12-18 08:24 PM
Issue body:
(nt)
This issue has an attachment associated with it (external link): aligh.png

JIRA Comment by user: dlindahl
JIRA Timestamp: 2011-12-18 08:24 PM
Comment body:
On the full record screen, left align circ. status value so that it aligns under the "Availability" heading.

JIRA Comment by user: rcook
JIRA Timestamp: 2011-12-19 02:35 PM
Comment body:
Added graphic and moved to current milestone.

JIRA Comment by user: rcook
JIRA Timestamp: 2012-01-25 08:35 PM
Comment body:
Status?

JIRA Comment by user: rcook
JIRA Timestamp: 2012-04-30 05:24 PM
Comment body:
Issues marked "resolved" that I am closing in prep for Jira.

Issue resolved: 2012-01-27 04:55 PM


Hoover High School

https://www.hoovercityschools.net/hhs
https://www.hoovercityschools.net/Page/1784
hcs-students.txt

This is just a fork—please submit to https://github.com/leereilly/swot.


Penalty decay submission rule has missing translation

From a student user:
I logged in to confirm my submission, and there is the following message:
"translation missing: en.submission_rules.penalty_decay_period_submission_rule.overtime_message"
Note that one only gets this if the deadline has passed.

I am unable to reproduce this.
I created an assignment that was due two weeks ago, added a penalty decay formula to it that will run until next month (http://sandbox.markusproject.org/en/assignments/5/edit), logged in to student and successfully submitted an assignment with no warnings or errors ( probably a bug too ). Logged in to student again to check the submission, but still no errors/warnings.
Strangely enough that "submission_rules" string is definitely present in the translation files.

@hoboman313 Perhaps it is only happening if one is past the penalty decay period? Could it be that this is a 0.11.x issue only?

Here is a screenshot: http://i.imgur.com/rzPEJ.jpg

Here is a screenshot: http://i.imgur.com/rzPEJ.jpg
The initial time was only an hour and a half after the initial deadline which was before the end of the penalty period.

@jerboaa I think you are right. I am not able to reproduce this error on our sandbox site; however, I am able to reproduce it on our demo site after running the exact same scenario.

@munrocape Thanks for the screenshot!

Looks like this is fixed in latest master. I trust @hoboman313's assessment and close this issue.


Rolling damage doesn't work

In GitLab by @babywhale on Dec 10, 2020, 19:17
Clicking the Damage die produces no result.
From console:
foundry.js:7674 Uncaught (in promise) Error: The dice roll formula d10 did not produce a numeric outcome.
    at Roll.evaluate (foundry.js:7674)
    at Roll.roll (foundry.js:7701)
    at ActorDw.rollMove (systems/dungeonworld/module/actor/actor.js:157)
    at ActorDw._onRoll (systems/dungeonworld/module/actor/actor.js:108)
    at HTMLButtonElement.<anonymous> (systems/dungeonworld/module/combat/combat.js:23)
    at HTMLBodyElement.dispatch (jquery.min.js:2)
    at HTMLBodyElement.v.handle (jquery.min.js:2)

In GitLab by @babywhale on Dec 11, 2020, 17:32
Works perfectly, thank you!

In GitLab by @aeciobf on Dec 11, 2020, 07:59
Possible workaround:

open actor-sheet.js
go to line 832
insert new line after line 832
put the code in line 833:
formula = formula.replace('d', '1d');


Work on Climate Survey Project

Hello Team, @clentafrica/wg-programs
Who is interested in working on this survey project (https://github.com/clentafrica/programs/discussions/9) alongside the Research and Data team?
Your job is to ensure survey targets are met, gather valuable insights and also contribute where necessary to the project.
If this is something you will like to handle, kindly indicate in the comment.
Thank you.

Can I still contribute in this?
Can you provide more information about this work?


Costs are always 0.0 (except for Gas)

As far as I'm able to tests, costs are always returning 0.0, except for Gas.
Not sure if this is an issue with the library or Toon itself...
{
    ...
    'powerUsage': {
        ...
        'value': 1754,
        'dayCost': 0.0,
        ...
    },
    'gasUsage': {
        'value': 7,
        'dayCost': 1.25,
        ...
    },
    ...
}

Seems to be related to the API in this case, since a bare request to the API, returns the same.
This is just weird, are you familiar with this issue?

This is not an issue with the library, but with the api not returning proper data.
True enough,
0.0

2.15

Not much that can be done here, maybe raise an issue with toon development https://developer.toon.eu/contact?

I agree this is not the libraries fault, nevertheless, thanks for confirming the same issue. It excludes me as the problem 👍

It is definitely not the libraries fault. I looked at it yesterday and saved the data. it was there.
Right now it is: 0
note: Look at the dayUsage value that is 0to. Yesterday it was not 0

look at the files for data
Yesterday: https://github.com/scheric/toon.jsondata/blob/00cade8cd0f764ff3777675f8ab28ecad7b25caf/toondata_yesterday.json#L75
Today: https://github.com/scheric/toon.jsondata/blob/00cade8cd0f764ff3777675f8ab28ecad7b25caf/toondata_today.json#L75

I think they are only using the high tariff power consumption in their calculations.
I have send them an email. If there are results they will be here.

I got an answer back from<EMAIL_ADDRESS>
mesage  is forwarded to the developer team for further investigation.

That didn't even take two months 😃


Better in use on windows ?

If I use powershell, git hook shows:
error: cannot spawn .git/hooks/pre-commit: No such file or directory

But .git/hooks/pre-commit is existed.
PS cat .git/hooks/pre-commit
#!/bin/sh
# gradle-githook

C:\Users\abcfy\projects\dteam-top\clock-seed\gradlew codenarcMain pmdMain spotbugsMain
[ $? -gt 0 ] && exit 1
...

And if I use Cygwin/Msys2/Mingw, git hook shows:
.git/hooks/pre-commit: line 4: C:Usersabcfyprojectsdteam-topclock-seedgradlew: command not found

Maybe you can use cygpath -m to mix path both for windows and posix

Sorry, I don't have a Windows. I can't check. 🙇

I solved by myself, just solve the path for posix, and windows git could also works very well(Use git for windows cmd/git).
Here is my sample:
.git/hooks/pre-commit:
#!/bin/sh -e

echo $@
[ -f ./gradlew -o -f ./gradlew.bat ] && GRADLE=./gradlew || GRADLE=gradle
$GRADLE codenarcMain pmdMain spotbugsMain

.git/hooks/commit-msg:
#!/bin/sh -e

commitlint -x @commitlint/config-conventional -e $@

/bin/sh -e will automatic exited when the line not exit with 0, and [ -f ./gradlew -o -f ./gradlew.bat ] && GRADLE=./gradlew || GRADLE=gradle could solve the gradle wrapper not exist.

any news?

Sorry, I'm too late.
Maybe, I fixed this issue. But I'm not.
Please check version 1.2.1.
I am not familiar with Windows. If you have a problem with Windows, I want you to send a pull request. It's very helpful.


How to iterate by member attribute?

Hi!
This is my scenario:
LDAP STRUCTURE:
...
ou=USERS,ou=AREA,dc=DEPARTMENT,dc=COMPANY
...
cn=ROLE_NAME,ou=ROLES,ou=AREA,dc=DEPARTMENT,dc=COMPANY
    |
    | - member = cn=user1,ou=USERS,ou=AREA,dc=DEPARTMENT,dc=COMPANY
    |
    | - member = cn=user2,ou=USERS,ou=AREA,dc=DEPARTMENT,dc=COMPANY
    |
    | - member = cn=user3,ou=USERS,ou=AREA,dc=DEPARTMENT,dc=COMPANY

Nodejs Code:
client.bind(config.ldap.bindDn, config.ldap.bindCredentials, function(err) {

    var opts = {
          filter: '(objectClass=*)',
          scope: 'one',
          attributes: ['member']
        };

    // ...

    client.search("cn=ROLE_NAME,ou=ROLES,ou=AREA,dc=DEPARTMENT,dc=COMPANY", opts, function(err, res) {

        res.on('searchEntry', function(entry) {

            console.log("MEMBERS: " + entry.object.member);
            for(var i = 0; i < entry.object.member.length; i++) {
                console.log("MEMBER[" + i + "]=" + entry.object.member[i]);
            }
        }

        // ...
    };
};

Results:
1st console.log prints:
cn=user1,ou=USERS,ou=AREA,dc=DEPARTMENT,dc=COMPANY,cn=user2,ou=USERS,ou=AREA,dc=DEPARTMENT,dc=COMPANY,cn=user3,ou=USERS,ou=AREA,dc=DEPARTMENT,dc=COMPANY
 2nd console.log (inside for) prints:
MEMBER[0]=c
MEMBER[1]=n
MEMBER[2]==
MEMBER[3]=u
MEMBER[4]=s
MEMBER[5]=e
MEMBER[6]=r
MEMBER[7]=1
MEMBER[8]=,
MEMBER[9]=o
MEMBER[10]=u
MEMBER[11]==
MEMBER[12]=U
MEMBER[13]=S
MEMBER[14]=E
MEMBER[15]=R
MEMBER[16]=S
...

How should I iterate by member attribute for getting this:
MEMBER[0]=cn=user1,ou=USERS,ou=AREA,dc=DEPARTMENT,dc=COMPANY
MEMBER[1]=cn=user2,ou=USERS,ou=AREA,dc=DEPARTMENT,dc=COMPANY
MEMBER[2]=cn=user3,ou=USERS,ou=AREA,dc=DEPARTMENT,dc=COMPANY

As far as I can see the documentation for client states that :

Responses from the search method are an EventEmitter where you will get a notification for each searchEntry that comes back from the server.

so just adjust your code like:
res.on('searchEntry', function(entry) {
            console.log("MEMBER: " + entry.object.member);
 }

⚠ This issue has been locked due to age. If you have encountered a recent
problem that seems to be covered by this issue, please open a new issue.
Please include a minimal reproducible example
when opening a new issue.


[Bug]: Improve Error Handling of useRouteForNotebook

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
When we have an issue with fetching the route for a notebook, we don't have any handling for potentially requesting too early.  So we can get 404 errors when we are just flat out not ready to be fetching anyways. We could probably improve this to smooth out the UI a bit.
Expected Behavior
When useRouteForNotebook is called for the Notebook link (in the Project table or the Workbench table), we error out pretty standardly -- any error is bubbled up and we refetch.
What we can do is pass in the state of isRunning from the NotebookState and only handle 404 errors when we are not yet running. Essentially we'd suppress not finding the Route until we are running and then we can show 404 errors as they are far more legit at that point in time.
Steps To Reproduce
Retesting this is going to be difficult -- it was a performance test that failed 2 out of 300.
We may need to fake a 404 error, or try to find a way to just delete the route object in your OpenShift Console instance after it is created (not sure if it will auto be recreated before we fetch again though).
Workaround (if any)
No response
What browsers are you seeing the problem on?
No response
Open Data Hub Version
2.5.2

Anything else
No response

I think we have improved error handling a lot -- this would improve the fetch cadence to be more inline with a notebook that is ready -- but I think it's okay for now given the performance issue was tied to a frequent fetcher issue and a lack of letting go of the error once we got it.
https://github.com/opendatahub-io/odh-dashboard/issues/884 unloads the error after a success -- this should significantly help for the short term with performance overloading the Notebook Controller with resources and thus preventing Routes from being created fast enough. We'll error, then we'll refetch and it should improve the net end result.


[Bug] The latest commit information on the repo homepage user card openrank is not added

Version
latest
Current Behavior

Expected Behavior
I hope that the user card can add openrank information normally
Environment
- OS: Windows11
- Browser: Edge 126.0.2592.113

Any additional comments?
No response

It should be due to the dynamic loading of the page. At the beginning, when you retrieve the elements, the network did not load them, causing yourdocument. querySelectorAll (hovercardselector)query to be empty.

https://github.com/opencv/opencv
At present, such a problem still exists, whether it will be solved.

Can you describe how you encountered this bug? I don't know the details yet, but the possible reason is a network problem. In the code, I set it to ignore the element if it is not loaded within 1500ms. If you do not load it within the first 1500ms of entering the warehouse, the element may not be monitored.

https://github.com/opencv/opencv
At present, such a problem still exists, whether it will be solved.

The first two diagrams are on the same screen. The second diagram shows openrank, but the first one does not. The second diagram is in the contributors screen, for a person whose openrank is there but isn't shown. And no one else's cards in that contributors are shown.

The reason I can think of is network issues. Maybe we can set the waiting time to be longer.


ref: project generation

Description
New Project generation instead of Module generation
Fixes #37

Hello world projects tab does not work. Plugin creates the project only by first section's configurations.

Fixed, good catch


DeckHand Client Returning 'NoneType' object

We have a valid revision in deckhand that was created using Shipyard CLI
We will end up with NoneType object error if we try and make use of the deckhand client to retrieve the revision. It is difficult to troubleshoot this kind of problems as we are not getting much information on why the deckhand client error out. We will need better logging in order to identify the issue causing this error
Note that communications between airflow workers and deckhand is via the internal interface and not public interface. Hence we need to set the endpoint_type to internal instead of using the default public.
airflow@airflow-worker-864d4f946c-m84wg:~$ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from keystoneauth1.identity import v3 as keystone_v3
>>> from keystoneauth1 import session as keystone_session
>>> from deckhand.client import client as deckhand_client
>>> revision_id = 1
>>> keystone_auth = {}
>>> sess = None
>>> keystone_auth = {'project_name': 'service', 'user_domain_name': 'default', 'project_domain_name': 'default', 'username': 'shipyard', 'password': 'password', 'auth_url': 'http://keystone-api.ucp.svc.cluster.local:80/v3'}
>>> auth = keystone_v3.Password(**keystone_auth)
>>> sess = keystone_session.Session(auth=auth)
>>> deckhandclient = deckhand_client.Client(session=sess, endpoint_type='internal')
>>> deckhandclient.revisions.get(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/src/deckhand/deckhand/client/revisions.py", line 45, in get
    return self._get(url)
  File "/src/deckhand/deckhand/client/base.py", line 224, in _get
    resp, body = self.api.client.get(url)
  File "/usr/local/lib/python3.5/dist-packages/keystoneauth1/adapter.py", line 304, in get
    return self.request(url, 'GET', **kwargs)
  File "/src/deckhand/deckhand/client/client.py", line 63, in request
    raise exceptions.from_response(resp, body, url, method)
  File "/src/deckhand/deckhand/client/exceptions.py", line 122, in from_response
    kwargs.update({
AttributeError: 'NoneType' object has no attribute 'update'
>>>

This has been resolved.


Fixed the missing permissions for the content author

Summary
The content author needed two new permissions in order to view their edits that were in moderation. This adds the missing permission and an update hook to apply those changes to all sites in the network.
Metadata

Question
Answer

Did you use a meaningful pull request title?
yes

Did you apply meaningful labels to the pull request?
yes

Did you perform a self review first?
yes

Documentation reflects changes?
no

CHANGELOG reflects changes?
yes

Unit/Functional tests reflect changes?
no

Did you perform browser testing?
yes

Risk level
Low

Relevant links
RIG-205

Looks good!
/approved


Make emission of extension block symbols a formal feature

This PR is a follow up to #59047 and #61406.

This PR adds the -omit-extension-block-symbols flag for explicitly disabling the emission of swift.extension symbols in symbol graph files. Furthermore, it adds the emission of extension block symbols to the feature list lib/Option/features.json as requested by @d-ronnqvist  .
The -omit-extension-block-symbols has no effect yet (except for overriding preceding -emit-extension-block-symbols flags), as this PR does not change the default behavior.
This PR finally fixes apple/swift-docc#210.
#61406 and apple/swift-driver#1205 should before/with this PR.

LGTM!

@swift-ci please test

Thanks for reviewing @daniel-grumberg! This can be merged now.


perf(branch): #57 replace zod with valibot

Hey @ravvi-kumar, sorry this took me forever to circle back to. Also sorry for this inconvenience, can you rebase? I added a default prettier config and ran the formatter so I'll be able to see just your changes.

Hi @Everduin94 ,
I've completed the rebase, but I intentionally skipped running Prettier to avoid introducing unnecessary formatting changes that might distract from the actual code changes. Please let me know if you see anything else that needs to be done. Since we're both familiar with Vali-Bot now, we can easily iterate if needed.

For anyone who watches the repository or is checking out PRs. - If you want to pull down this branch and try to test it using

npm run start
npm run branch

That would be appreciated :)


Fix incorrect VerticalScrollBarVisibilityattribute

Title
Fix incorrect VerticalScrollBarVisibility attribute.
Summary
Fixed a code snippet for the "Creating a Multiline TextBox control" article.
Details
VerticalScrollBarVisibility is an attached property, and must be qualified by it's owner control when used on a TextBox.

//cc @SamBent, @sachingo

The snippet should work even without this change, as TextBox exposes its own VerticalScrollBarVisibility property.  Actually, it’s exposed by TextBoxBase, as documented herehttps://docs.microsoft.com/en-us/dotnet/api/system.windows.controls.primitives.textboxbase.verticalscrollbarvisibility?view=netframework-4.7.1#System_Windows_Controls_Primitives_TextBoxBase_VerticalScrollBarVisibility.   The only bug here is that the docs for TextBox don’t include properties it inherits from TextBoxBase.
From: Ron Petrusha<EMAIL_ADDRESS>Sent: Monday, November 13, 2017 12:11 PM
To: dotnet/docs
Cc: Sam Bent; Mention
Subject: Re: [dotnet/docs] Fix incorrect VerticalScrollBarVisibilityattribute (#3661)
//cc @SamBenthttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsambent&data=02|01|Sam.Bent%40microsoft.com|2fcdd78206f04284d4b008d52ad2b0d7|72f988bf86f141af91ab2d7cd011db47|1|0|636462006749006849&sdata=s%2FHHFFzRddh4njRI1GJMeyr74UBCzv2TZGRr%2FpTsspI%3D&reserved=0, @sachingohttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsachingo&data=02|01|Sam.Bent%40microsoft.com|2fcdd78206f04284d4b008d52ad2b0d7|72f988bf86f141af91ab2d7cd011db47|1|0|636462006749006849&sdata=ZL0KULRqKBiOZCcY2UfPupSZOeo33Yn0b8tVnFMR8Uo%3D&reserved=0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdotnet%2Fdocs%2Fpull%2F3661%23issuecomment-344042776&data=02|01|Sam.Bent%40microsoft.com|2fcdd78206f04284d4b008d52ad2b0d7|72f988bf86f141af91ab2d7cd011db47|1|0|636462006749006849&sdata=P2rNZ7lBRyfL553puYXYtq%2BQpr%2F9FTOhn6rFjrEiGwU%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOhB3Yx4_HM8mIbxESoQAiq5HuKo7ewLks5s2KJggaJpZM4Qa6bV&data=02|01|Sam.Bent%40microsoft.com|2fcdd78206f04284d4b008d52ad2b0d7|72f988bf86f141af91ab2d7cd011db47|1|0|636462006749006849&sdata=zlNrviiFj0MZeN8uwMkkuq9VgK3S7xDAI%2B01smUsTY4%3D&reserved=0.

Thanks @SamBent. I have a list of issues to file for the inherited members function on docs and I'll include this one.

Actually, @mairaw, the inherited properties are there; they're just listed (with no descriptions) in the Methods section.

Thanks, @SamBent.  Thanks, @pingzing, for the suggested change. Since the code example is correct in its current form, though, I'm closing your PR.

And they can’t be found by text search.
Type Ctrl-F, enter “VerticalScrollBarVisibility”, click Next a few times.   This finds the word in the Remarks section, but does not find it in the Methods table.   Similarly, you can’t use Ctrl-F to find any table entry that has more than one capital letter (at least I think that’s the pattern):   SelectedText, MaxHeight, etc.
The old pagehttps://msdn.microsoft.com/en-us/library/system.windows.controls.textbox(v=vs.110).aspx worked fine in this regard.
From: Ron Petrusha<EMAIL_ADDRESS>Sent: Monday, November 13, 2017 2:22 PM
To: dotnet/docs
Cc: Sam Bent; Mention
Subject: Re: [dotnet/docs] Fix incorrect VerticalScrollBarVisibilityattribute (#3661)
Actually, @mairawhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmairaw&data=02|01|Sam.Bent%40microsoft.com|2c069dfa1ecb4aefc32208d52ae4f862|72f988bf86f141af91ab2d7cd011db47|1|0|636462085261783954&sdata=m0t2Bq3S5xUOPMQSXuOld6d8Bxix6ulXEk%2FpjYLMfGM%3D&reserved=0, the inherited properties are there; they're just listed (with no descriptions) in the Methods section.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdotnet%2Fdocs%2Fpull%2F3661%23issuecomment-344078854&data=02|01|Sam.Bent%40microsoft.com|2c069dfa1ecb4aefc32208d52ae4f862|72f988bf86f141af91ab2d7cd011db47|1|0|636462085261783954&sdata=4medzdgE9jdcb7eMkHMPpebadlcshNato9sbqGZ8TJk%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOhB3UH274GfyGLxYv7DEf1TBVGca-w3ks5s2MEMgaJpZM4Qa6bV&data=02|01|Sam.Bent%40microsoft.com|2c069dfa1ecb4aefc32208d52ae4f862|72f988bf86f141af91ab2d7cd011db47|1|0|636462085261783954&sdata=X4BvZRRsCTBypEpWry7VXmS1hHB8Chk8qYLN5BqQ5y0%3D&reserved=0.

Ah good catch @rpetrusha!
CTRL-F seems to be working for me on this page @SamBent:

It used to be a problem though because they were including some hidden characters.


HTTP requests frequently time out

We initially noted timeouts when using the checker endpoint to invoke PS plugins via the API. But the issue is actually not specific to the checker API, but happens also when polling the main dispatcher.
Simple reproducer using curl for Windows.:
> While (1) { curl.exe -X GET "https://localhost:5668/v1" --insecure --max-time 10 }
... works a few times ...
curl: (28) Operation timed out after 10010 milliseconds with 0 bytes received

For us roughly each 10th request runs into timeout this way. Increasing the timeout does not change anything. During test, the While loop had exclusive access to the service, no concurrency involved.

Thank you for the issue and the PR. I wasn't present as watcher on this repository, therefor it sadly slipped through.
I'm right now testing the PR and you were right. Running 25 checks now, I'm not receiving any timeouts so far and everything works a little smoother than before.
I will do some additional testing on more machines to get a better understanding if it works everywhere, but it seems to be fine.

The fix in general works as expected and it not causing timeout issues anymore. However, either because of the fix or by another problem, there now seems to be a memory leak once this feature is enabled over time.
I'm currently trying to track down on there the leak is coming from.


Bug in biobb_pdb_tofasta when logging command

It's me again! :)
I tried to use the biobb_pdb_tofasta but it's giving me an error inside the launch method line 81:
        self.cmd = [self.binary_path, ' '.join(instructions), self.stage_io_dict['in']['input_file_path'], '>', self.io_dict['out']['output_file_path']]

        fu.log(self.cmd, self.out_log, self.global_log)  # Here it gives the error

I think the fu.log tries to concatenate the log prefix with the variable string in line 393 of file_utils.py:
def log(string: str, local_log: Optional[logging.Logger] = None, global_log: Optional[logging.Logger] = None):
    """Checks if log exists

    Args:
        string (str): Message to log.
        local_log (:obj:`logging.Logger`): local log object.
        global_log (:obj:`logging.Logger`): global log object.

    """
    if local_log:
        local_log.info(string)
    if global_log:
        global_log.info(get_logs_prefix() + string)  # Here I have the error

I think the argument string in log() should be a string. But in the case of biobb_pdb_tofasta we are giving a list.
I'm using biobb_pdb_tools 4.2.0
Thank you!

Changing the mentioned line 81 to:
fu.log(' '.join(self.cmd), self.out_log, self.global_log)

Is doing the trick for me

Thanks Plablo it will be fixed in v5.0


Fix double wrapping({:ok,{:ok, value}}) problem on tuple policy with source KV

Heys,
We used the tuple policy  to properly return the data to the caller for fine-gradient error handling.
However, we faced this issue on the KV source.
It wraps data by the ok tuple again without controlling whether the data is the ok tuple or not. So it wraps, then data becomes {: ok,{: ok, value}}.
I have added the following line code in two asterisks to the KV fetch function. It does not wrap again if the data is an ok tuple.
 case Map.fetch(batch, id) do
          :error -> {:error, "Unable to find id #{inspect(id)}"}
          {:ok, {:error, reason}} -> {:error, reason}
          ** {:ok, {:ok, item}} -> {:ok, item} **
          {:ok, item} -> {:ok, item}
        end

Actually, The code checks the error tuple but not the ok tuple case. I guess that was forgotten somehow.
In addition,

I have replaced the then/2 function with an anonymous function to fix the pipeline
I have replaced the use Mix.Config statement with import Config to remove the deprecated warning.

Could you review it? @akoutmos, @benwilson512, @jadlr, @mbuhot

It would be helpful to update the moduledoc: https://github.com/absinthe-graphql/dataloader/blob/master/lib/dataloader/kv.ex#L5-L7 to clarify the contract for the load_function.
Something along the lines of:

You must supply a function that accepts a batch key and list of ids, and returns a map of values keyed by id. Values may optionally be returned as :ok / :error tuples to indicate success of the operation.

Could you approve again to run workflows ?

@benwilson512, there is a conflict between .tool-versions and pipeline. The pipeline works on Elixir-1.10-11&OTP-22-23, whereas the .tool-versions works on Elixir-1.12-13&OTP-24. This causes problems. We should upgrade the pipeline.
For instance, the mix format works on both versions differently. So that is the reason the pipeline says the files are not formatted.
At local, OTP24-Elixir1.13 says the format is okay, but Otp 23-elixir.1.11 says it is not formatted.

@benwilson512, there is a conflict between .tool-versions and pipeline. The pipeline works on OTP-22-23, whereas the .tool-versions works on OTP 24. This causes problems we should upgrade the pipeline if our version is OTP 24.
So that is the reason the pipeline says the files are not formatted

I have updated the pipeline as well.

Is there anyone who checks or approves this pr?

I have amended it. Could you check again @benwilson512 ?

@altuntasfatih the primary blocker here is that this is technically a breaking change. I'm not clear whether this was a bug or just bad design, but if anyone has code out there that relies on this it will break. We are already kicking off a 2.0 version now so I think we can include that with this.


[bug]: trying to use /v2/invoices/subscribe/{r_has} doesn't always work due to "/" sometimes being present

Background
I'm trying to subscribe to an invoice using the rest api (/v2/invoices/subscribe/{r_hash}), but I'm getting 404 about half the time. I've tried using encodeURIComponent on the r_hash but this never works (always 404). When the r_hash doesn't contain any "/" characters, I'm able to listen to updates just fine.
Your environment

version of lnd: 0.15.5-beta
which operating system (uname -a on *Nix): Linux Ubuntu
version of btcd, bitcoind, or other backend: Bitcoin Core client v24.0.0
any other relevant environment details

My current workaround is regenerating invoices until I get one that doesn't have a forward slash (/).

You need to use base64 URL encoding for parts that are in the URI. See https://lightning.engineering/api-docs/api/lnd/#rest-encoding or https://github.com/lightningnetwork/lnd/issues/6029.


State still in SentClientRequest when 'done' event was fired

When I try to benchmark a simple query as below:
var i = 0;
var start = new Date;
var query = function () {
  request = new Request("select top 100 cityid from dbo.cities", function(err) {
    console.log('err', err);
  });

  request.on('row', function(columns) {
    columns.forEach(function(column) {
    });
  });

  request.on('done', function(rowCount, more) {
    if(i++ < 200){
      console.log('i:', i);
      query();
    }
    else {
      console.log(new Date - start);
    }
  });
  connection.execSql(request);
};

connection.on('connect', function(err) {
	// If no error, then good to go...
	console.log('connection established');
	query();
});

below exception was thrown:
Invalid state; requests can only be made in the LoggedIn state, not the SentClientRequest state

Sorry for the lack of activity on this issue. I intend to take a proper look at it this weekend.

Because a request can execute multiple statements, multiple done events may be emitted for a single request.
select 4; select 'abc';

So the request's done event is not the right place to initiate another request. Another request can be intiated in the request's completion callback.
var request = new Request("select ...", function(err) {
  if (err) {
    console.log('err', err);
  }

  makeRequest(...);
});

There was also a bug in the Connection's state machine which prevented a new request from being initiated in the Request's completion callback. I've fixed that bug, and added a test to test/integration/connection-test.coffee to verify that a new Request can be initiated.

Thanks!
Does the current code provide output parameter support?
And, should multiple result sets be obtained through the done event? If I can provide multiple callback, as
new Request("select ...", function processResult1(){}, function() processResult2(){}, function completion(){} );

Great job!

Multiple result set are supported, as I mentioned previously. Are you suggesting that multiple results should be buffered and presented to (multiple) request completion callbacks?
What would be the advantage over the current events that provide the result sets? What would happen if the number of callbacks doesn't match the number of result sets?
Result set rows can't be buffered, as that might result in vast amounts of memory being consumed.
In general I'd prefer to keep the API relatively low level, and fairly close to the TDS protocol. A higher level API could always be built on top.
I'm sorry if I'm misunderstanding what you're asking for.

I'm sorry for making you feel confused.
I'm arguing for
In most use cases I imagine that it would be best to stick to requests with statements that cause only a single result set.
since in some real scenarios, multi result sets helps. The current implementation in supporting multiple result sets is so great that I have no idea how it could be improved :)
I'm also fond of the philosophy -- a TDS spec's counterpoint in JavaScript / coffee script.
I'll keep playing tedious :P

Thanks. I'm pleased that we're in broad agreement.


okhttp3.Authenticator#authenticate to be called for java.net.HttpURLConnection#HTTP_FORBIDDEN ?

The API I am interacting with, requires JWT tokenization for its requests.
For this purpose, I have built an class AccessTokenAuthenticator : Authenticator which manages the tokenization of requests, as well as refreshing the token, in case of expiry.
All works fine, except for one case: there is one API endpoint that will return response code 403 in case of expired token. Because of this, my Authenticator is not called in this particular case.
Is there a chance there might be a change at the library level, in the future?
I will just go with the Interceptor approach, for the time being.

Yep. Use an interceptor to translate these response to 401.

It's valid, but it explicitly means that reauthorization won't help.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403
So I think OkHttp is doing the right thing here. And there is already a workaround in interceptors to fix.
Or you could handle in the app by switching to your second account.


Dev

@andrii-hryniv Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.


Does it support swagger?

This is not working with nestjs/swagger yet...

How come? You can just add your @ApiOperation annotation to your controller method 🤔


fix: branch-2.0 pick (#28432) (#28434)

Proposed changes
branch-2.0 pick (#28432) (#28434)
Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall

run buildall

run buildall


Ability to use same custom authorizer across apis.

Describe the feature you'd like to request
When I pass a custom authorizer function to multiple AmplifyGraphqlApi through lambdaConfig.function.
Currently if I do that I get following an error:
There is already a Construct with name 'appsync-auth-invoke' in NodejsFunction ...
Apparently this is due to adding invoke permissions to the function using a constant name appsync-auth-invoke.
Describe the solution you'd like
I want to be able to pass a custom authorizer function to multiple AmplifyGraphqlApi through lambdaConfig.function.
//authorization-modes.ts
//line:95
// Only add the permission if it's not done before.
authModes.lambdaConfig?.function.addPermission('appsync-auth-invoke', {
    principal: new ServicePrincipal('appsync.amazonaws.com'),
    action: 'lambda:InvokeFunction',
  });

Describe alternatives you've considered
I can create 2 separate instances of the authorizer function to workaround this. But this will reduce the ttl benefits as there are 2 lambda functions.
Additional context
No response
Is this something that you'd be interested in working on?

[X] 👋 I may be able to implement this feature request

Would this feature include a breaking change?

[ ] ⚠ This feature might incur a breaking change

Hi @hasan-aa 👋 , Thank you for your request. We will label this as a feature request for the team to review in more detail.


add this.timeout(15000) to tests to allow the solc enough space to work

I was running into timeout issues with testing so I added these lines in to give enough time for solc to do its work.

are you running embark test or mocha test/ --no-timeouts with the no-timeouts option?

I'm unit testing the framework itself via grunt mochaTest

is there a way to set the no-timeouts feature ? or alternatively in the tests themselves. the problem is that 15 secs will be too long for some cases and too short for others

It can be different from computer to computer as well. If some poor soul is on a Pentium 3 their timeout will be longer than someone on an i5. It can be set globally or per-test and I supposed i chose the per-test route. This is just the max value. It could be set to say 1 minute globally and probably cover everyone.

ok, I checked the docs this.timeout(0) should disable the timeouts just like --no-timeouts

I just realized this is in embarks own test/ files, I thought all this time it was the generated dapp templates :D This is actually a REALLY good idea to add to demo/test/simple_storage_spec.js and boilerplate/test/simple_storage_spec.js````, then lib/cmd.js#L123--no-timeouts can be removed. It would save the trouble for anyone you tries to runmocha test/``` without the no-timeout option.
Wanna do the honors? :D

Done and done


remove duplicates input links

if user sent two links to one song we skip 2nd..n
https://github.com/Ignisor/music-share-bot/issues/12

this will check if user sent 2 and more links for one song (not depends on website)

Cool