Regression: Frequent disconnects with version 0.30.2

Describe the problem
We are running an IoT project where some Linux based K3s nodes on the edge are located at customer premises and communicate with some other Linux based K3s nodes in the cloud. This project is running for almost three years now. Previously, we have been connecting and managing all nodes via OpenVPN (so we can SSH into every node, even when it's connected at customer premises) and then installed K3s on each node. A few months ago we replaced OpenVPN with Netbird because of its many advantages like performance, peer-to-peer topology with central management etc.
Ever since, we were following updates as soon as possible. We started at 0.27.10 and now we are (or were) at 0.30.2. Unfortunately, starting somewhere between version 0.28.4 and 0.30.2 we started to observe frequent network partitions (disconnects). They would happen randomly after some hours, mostly several times a day, at least once per day, following no particular pattern. I checked many potential causes, including IP address changes which happens to CPE equipment every night (according to the Internet provider's plan), but none of this was the root cause.
Recently I decided to downgrade the network from version 0.30.2 to version 0.28.4 and since then, we didn't have a single network partition / disconnect any more.
 If you setup the nodes using Ansible, you can discover network partitions like this:
ansible netbird_client -m shell -a 'netbird status --filter-by-status disconnected | grep netbird.cloud | grep -v FQDN || true'

If there is no network partition, then each node produces an empty output, otherwise it lists the nodes it cannot connect to.
Expected behavior
These Linux nodes should stay connected 24/7, real Internet outages aside.
Are you using NetBird Cloud?
Yes
NetBird version
see above
NetBird status -dA output:
n/a
Do you face any (non-mobile) client issues?
n/a
Screenshots
n/a
Additional context
n/a

I also encountered the same situation

hello @christian-schlichtherle thank you for your issue; we will investigate this, also, thank you for your provided commands.
It would be beneficial to have debug logs for those clients, is it possible to turn them on and run them for a long period of time? You can achieve this by following these docs.
Thanks

Hi again! We've found a bug in our reconnection logic, and we are working on improvements for it. We currently have a PullRequest ongoing, would you be willing to test it out before we release it?

I could install an update on our development cluster for some limited time over the weekend. Since we are using Ansible, how would I go about installing a pre-release?

I`m also experiencing problems, whenever a workstation (Mostly windows) goes into sleep mode (because of lunch or something) it will never reconnect anymore, only fix is a reboot of the entire system.

@DutchCloud4Work you can try netbird service restart to fix this issue. A reboot should not be required. I'm on macOS however, so your situation may be different.

@DutchCloud4Work you can try netbird service restart to fix this issue. A reboot should not be required. I'm on macOS however, so your situation may be different.

Doesn`t work, even restarting the service in Windows en restarting the GUI will still give me no connectivity (the gui does say its connected, but no traffic)

I have nearly same problem with disconnect to some peers.
Host: Ubuntu 24.02.
Netbird version: 0.30.2
I got netbird status report in inverse
8 of 13 Accessible Peers on Dashboard but at CLI 5/13.
A down/ up cycle solve problems, but it persisted after 12h.
I want to join test new version or roll back to prev.

Will give it a try on our development cluster over the weekend - thank you so much!

Actually, I was installing it now. Here's my findings:
Remote installation with apt install netbird=0.30.3 on the cloud nodes in the dev cluster went well.
Installation on the single edge node in the dev cluster using the same command hung up. When I SSH to the node using the LAN port and do netbird status I get:
$ netbird status
Error: failed to connect to daemon error: context deadline exceeded
If the daemon is not running please run:
netbird service install
netbird service start

So, apparently the service could not get restarted on upgrading from 0.28.4 to 0.30.3. I'm glad this is only a single node in the dev cluster which I can power cycle manually. For the prod cluster, this incident would be a disaster as I would have to call the customers and ask everyone to reboot the edge nodes manually.
Some more diagnostic output:
# systemctl status netbird
● netbird.service - A WireGuard-based mesh network that connects your devices into a single private network.
     Loaded: loaded (/etc/systemd/system/netbird.service; enabled; preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Thu 2024-10-24 19:35:30 UTC; 28s ago
    Process: 266290 ExecStart=/usr/bin/netbird service run --config /etc/netbird/config.json --log-level info --daemon-addr unix:///var/run/netbird.sock --log-file /var/log/netbird/client.log (code=exited, status=2)
   Main PID: 266290 (code=exited, status=2)
        CPU: 281ms

From journalctl:
Oct 24 19:35:25 de-nw-45134-cs-d0 systemd[1]: Started netbird.service - A WireGuard-based mesh network that connects your devices into a single private network..
░░ Subject: A start job for unit netbird.service has finished successfully
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit netbird.service has finished successfully.
░░
░░ The job identifier is 28342.
Oct 24 19:35:30 de-nw-45134-cs-d0 systemd[1]: netbird.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit netbird.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 2.
Oct 24 19:35:30 de-nw-45134-cs-d0 systemd[1]: netbird.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit netbird.service has entered the 'failed' state with result 'exit-code'.

Obviously it complains about an invalid argument, but I haven't configured anything different on this node than any other. Maybe this error message is a false positive?
Finally, I was doing a reboot of the node and the problem disappeared.
Now I will start to monitor the stability.

PS: I noticed that the troubled edge node has changed it's DNS name to my-name-1.netbird.cloud (note the additional -1). I'm not sure when that happened and how this is related, if at all.

Two more hosts failed the remote install, so there is definitely a problem.

@christian-schlichtherle could you provide the log file, please?
netbird debug bundle -A
The log from the zip should be sufficient.

Today, after update to 0.30.3, I see some disconnection and reconnection, this is so uncomfortable, that break RDP connection every 2 minute.
computer and server are on the same network physical

update went without issues at my side (0.29 / 0.30.2 > 0.30.3), seems to have fixed my issue.
After my laptop is now waking up from sleep, after +- 60 it will reconnect

@lixmal
# netbird debug bundle -A
Error: failed to connect to daemon error: context deadline exceeded
If the daemon is not running please run:
netbird service install
netbird service start

After installation, the netbird service is not starting up. I tried several restarts using netbird service restart as well as systemctl restart netbird with no luck. This is the tail of /var/log/netbird/client.log
2024-10-25T11:43:47Z INFO client/cmd/service_controller.go:24: starting Netbird service
2024-10-25T11:43:47Z INFO client/cmd/service_controller.go:66: started daemon server: /var/run/netbird.sock
2024-10-25T11:43:47Z INFO client/internal/connect.go:111: starting NetBird client version 0.30.3 on linux/arm64
2024-10-25T11:43:48Z INFO client/internal/connect.go:240: connecting to the Relay service(s): rels://relay.netbird.io:443
2024-10-25T11:43:48Z INFO relay/client/picker.go:66: try to connecting to relay server: rels://relay.netbird.io:443
2024-10-25T11:43:48Z INFO [relay: rels://relay.netbird.io:443] relay/client/client.go:166: create new relay connection: local peerID: VEz5HwhOlpeJFpKlvqsfWl6nCh03GbshHg6HwyIRNGg=, local peer hashedID: sha-+b9ykAd8KDzwzrvKbhowImdFQ/H6yvP4ob0MBHb20LE=
2024-10-25T11:43:48Z INFO [relay: rels://relay.netbird.io:443] relay/client/client.go:172: connecting to relay server
2024-10-25T11:43:48Z INFO [relay: rels://streamline-de-fra1-0.relay.netbird.io:443] relay/client/client.go:189: relay connection established
2024-10-25T11:43:48Z INFO relay/client/picker.go:84: connected to Relay server: rels://relay.netbird.io:443
2024-10-25T11:43:48Z INFO relay/client/picker.go:58: chosen home Relay server: rels://relay.netbird.io:443
2024-10-25T11:43:48Z INFO client/internal/connect.go:400: using 59431 as wireguard port: 51820 is in use
2024-10-25T11:43:48Z INFO client/iface/wgproxy/ebpf/proxy.go:91: local wg proxy listening on: 3128
2024-10-25T11:43:48Z INFO client/iface/wgproxy/factory_kernel.go:29: WireGuard Proxy Factory will produce eBPF proxy
2024-10-25T11:43:48Z INFO client/internal/routemanager/manager.go:144: Routing setup complete
2024-10-25T11:43:48Z INFO client/firewall/create_linux.go:77: creating an nftables firewall manager
2024-10-25T11:43:48Z ERRO client/firewall/create_linux.go:44: failed to init nftables manager: router init: create containers: nftables: unable to initialize table: conn.Receive: netlink receive: no such file or directory
2024-10-25T11:43:48Z INFO client/internal/dns/host_unix.go:54: System DNS manager discovered: systemd
2024-10-25T11:43:48Z INFO client/internal/peer/guard/sr_watcher.go:106: reconnected to Signal or Relay server
2024-10-25T11:43:48Z INFO signal/client/grpc.go:149: connected to the Signal Service stream
2024-10-25T11:43:48Z INFO client/internal/engine.go:1415: Network monitor is disabled, not starting
2024-10-25T11:43:48Z INFO client/internal/connect.go:268: Netbird engine started, the IP is: <IP_ADDRESS>/16
2024-10-25T11:43:49Z ERRO signal/client/grpc.go:413: error while handling message of Peer [key: fBMFPOPCBuXdpOBjwKOmBknXE1eIG7OqJUitHYLOzmQ=] error: [wrongly addressed message fBMFPOPCBuXdpOBjwKOmBknXE1eIG7OqJUitHYLOzmQ=]
2024-10-25T11:43:49Z INFO management/client/grpc.go:155: connected to the Management Service stream
2024-10-25T11:43:49Z WARN client/internal/engine.go:597: running SSH server is not permitted
2024-10-25T11:43:49Z INFO client/internal/acl/manager.go:56: ACL rules processed in: 1.274267ms, total rules count: 0

Ah, I see. I don't think we get logs.
Can you run
 sudo netbird service run --log-level trace --log-file console

and return the output?

Can you check if there is something at /var/log/netbird/netbird.err

BTW: The affected systems all run Ubuntu 24.04.1 LTS.
From the same node, this is /var/log/netbird/netbird.err:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa7eb24]

goroutine 273 [running]:
github.com/google/nftables.(*Conn).newRule(0x4000c22a00, 0x40006e0300, 0x0)
        /home/runner/go/pkg/mod/github.com/google/nftables@v0.2.0/rule.go:123 +0x1c4
github.com/google/nftables.(*Conn).AddRule(0x400079efb8?, 0x400068c180?)
        /home/runner/go/pkg/mod/github.com/google/nftables@v0.2.0/rule.go:192 +0x3c
github.com/netbirdio/netbird/client/firewall/nftables.(*AclManager).addIOFiltering(0x4000b3c9c0, {0x40004f8180, 0x10, 0x10}, {0xefb543, 0x3}, 0x0, 0x0, 0x1, 0x0, ...)
        /home/runner/work/netbird/netbird/client/firewall/nftables/acl_linux.go:394 +0xbcc
github.com/netbirdio/netbird/client/firewall/nftables.(*AclManager).AddPeerFiltering(0x4000b3c9c0, {0x40004f8180, 0x10, 0x10}, {0xefb543, 0x3}, 0x0, 0x0, 0x1, 0x0, ...)
        /home/runner/work/netbird/netbird/client/firewall/nftables/acl_linux.go:109 +0xd0
github.com/netbirdio/netbird/client/firewall/nftables.(*Manager).AddPeerFiltering(0x0?, {0x40004f8180?, 0x0?, 0x0?}, {0xefb543?, 0x40?}, 0x38?, 0xefcdab8967452301?, 0x1032547698badcfe?, 0x0?, ...)
        /home/runner/work/netbird/netbird/client/firewall/nftables/manager_linux.go:131 +0x150
github.com/netbirdio/netbird/client/internal/acl.(*DefaultManager).addOutRules(0x40008ed4d0, {0x40004f8180, 0x10, 0x10}, {0xefb543, 0x3}, 0x0, 0x0, {0x40004f8170, 0x9}, ...)
        /home/runner/work/netbird/netbird/client/internal/acl/manager.go:327 +0x80
github.com/netbirdio/netbird/client/internal/acl.(*DefaultManager).protoRuleToFirewallRule(0x40008ed4d0, 0x4000903f20, {0x40004f8170, 0x9})
        /home/runner/work/netbird/netbird/client/internal/acl/manager.go:277 +0x348
github.com/netbirdio/netbird/client/internal/acl.(*DefaultManager).applyPeerACLs(0x40008ed4d0, 0x4000135380)
        /home/runner/work/netbird/netbird/client/internal/acl/manager.go:143 +0x45c
github.com/netbirdio/netbird/client/internal/acl.(*DefaultManager).ApplyFiltering(0x40008ed4d0, 0x4000135380)
        /home/runner/work/netbird/netbird/client/internal/acl/manager.go:66 +0x100
github.com/netbirdio/netbird/client/internal.(*Engine).updateNetworkMap(0x4000410fc8, 0x4000135380)
        /home/runner/work/netbird/netbird/client/internal/engine.go:752 +0xa8
github.com/netbirdio/netbird/client/internal.(*Engine).handleSync(0x4000410fc8, 0x4000921600)
        /home/runner/work/netbird/netbird/client/internal/engine.go:561 +0x498
github.com/netbirdio/netbird/management/client.(*GrpcClient).receiveEvents(0x40006793b0, {0x112c310, 0x40008c5c10}, {0xb7, 0xfa, 0x1a, 0xf9, 0x2e, 0xf, 0x1e, ...}, ...)
        /home/runner/work/netbird/netbird/management/client/grpc.go:260 +0x138
github.com/netbirdio/netbird/management/client.(*GrpcClient).handleStream(0x40006793b0, {0x1121758?, 0x4000b2e000?}, {0xb7, 0xfa, 0x1a, 0xf9, 0x2e, 0xf, 0x1e, ...}, ...)
        /home/runner/work/netbird/netbird/management/client/grpc.go:159 +0x1f8
github.com/netbirdio/netbird/management/client.(*GrpcClient).Sync.func1()
        /home/runner/work/netbird/netbird/management/client/grpc.go:130 +0x15c
github.com/cenkalti/backoff/v4.RetryNotifyWithTimer.Operation.withEmptyData.func1()
        /home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.3.0/retry.go:18 +0x24
github.com/cenkalti/backoff/v4.doRetryNotify[...](0x400079fe88?, {0x7f39b41118, 0x4000a810e0}, 0x0, {0x0, 0x0?})
        /home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.3.0/retry.go:88 +0xcc
github.com/cenkalti/backoff/v4.RetryNotifyWithTimer(0x1a9ec70?, {0x7f39b41118?, 0x4000a810e0?}, 0x10?, {0x0?, 0x0?})
        /home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.3.0/retry.go:61 +0x5c
github.com/cenkalti/backoff/v4.RetryNotify(...)
        /home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.3.0/retry.go:49
github.com/cenkalti/backoff/v4.Retry(...)
        /home/runner/go/pkg/mod/github.com/cenkalti/backoff/v4@v4.3.0/retry.go:38
github.com/netbirdio/netbird/management/client.(*GrpcClient).Sync(0x1121758?, {0x1121758, 0x4000b2e000}, 0x0?, 0x0?)
        /home/runner/work/netbird/netbird/management/client/grpc.go:133 +0x198
github.com/netbirdio/netbird/client/internal.(*Engine).receiveManagementEvents.func1()
        /home/runner/work/netbird/netbird/client/internal/engine.go:683 +0xec
created by github.com/netbirdio/netbird/client/internal.(*Engine).receiveManagementEvents in goroutine 24
        /home/runner/work/netbird/netbird/client/internal/engine.go:675 +0x5c
75 +0x5c

@christian-schlichtherle
Can you please run
 sudo netbird service run --log-level trace --log-file console

I need to see the preceding log

@lixmal I'm sorry, but isn't that too late already? I rebooted the failing nodes to fix the service startup. Now everything works as designed.

I see. There must've been something gone wrong when creating nftables that was cleared up by the reboot. Thanks

@lixmal Maybe there is another approach to isolate the issue: We are using a huge Ansible playbook to setup Netbird, K3s and a ton of other stuff on each node. This ensures that the configuration of the nodes is as identical as possible. That being said, one of the biggest differences is the base image. For the edge devices (which are the ones which have been failing the service restart after installation), we use Ubuntu 24.04.1 LTS. Maybe you can recreate the issue on such nodes exclusively?

I'm closing this ticket because the upgrade to 0.31.0 went well for all our nodes in all our environments, including the Ubuntu 24.04.1 LTS nodes.

Thanks for the feedback @christian-schlichtherle


Mark messages as read on delete

Hi,
I create a new PR as I was asked in the PR #1183.
I'm sorry but I don't know why Android Studio make unrelated changes in files and I don't know how to fix it.

Closing this in favor of #1203


[REFACTOR] replace async_wrap with run_sync

cleans up code and needed for cln to be shutdown properly.

Codecov Report

Merging #1858 (05769be) into main (03acf5e) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

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

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##             main    #1858      +/-   ##
==========================================
- Coverage   56.09%   56.02%   -0.08%
==========================================
  Files          48       48
  Lines        7328     7318      -10
==========================================
- Hits         4111     4100      -11
- Misses       3217     3218       +1

Files Changed
Coverage Δ

lnbits/wallets/cln.py
72.07% <100.00%> (-3.14%)
:arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Argo getting started fails with Kind

Checklist:

[x] I've included the version.
[x] I've included reproduction steps.
[x] I've included the workflow YAML.
[x] I've included the logs.

What happened:
I'm trying Argo for the first time with Kind v0.7. The Hello World example in the "getting started" guide hangs indefinitely
https://github.com/argoproj/argo/blob/master/docs/getting-started.md
How to reproduce it (as minimally and precisely as possible):
Here are the commands I'm running:
$ kind version
kind v0.7.0 go1.13.4 linux/amd64
nick@dopey:~$ kind create cluster
Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.17.0) 🖼
 ✓ Preparing nodes 📦
 ✓ Writing configuration 📜
 ✓ Starting control-plane 🕹
 ✓ Installing CNI 🔌
 ✓ Installing StorageClass 💾
Set kubectl context to "kind-kind"
You can now use your cluster with:

kubectl cluster-info --context kind-kind

Not sure what to do next? 😅 Check out https://kind.sigs.k8s.io/docs/user/quick-start/
nick@dopey:~$ kubectl create namespace argo
namespace/argo created
nick@dopey:~$ kubectl apply -n argo -f https://raw.githubusercontent.com/argoproj/argo/stable/manifests/install.yaml
customresourcedefinition.apiextensions.k8s.io/cronworkflows.argoproj.io created
customresourcedefinition.apiextensions.k8s.io/workflows.argoproj.io created
customresourcedefinition.apiextensions.k8s.io/workflowtemplates.argoproj.io created
serviceaccount/argo created
serviceaccount/argo-server created
role.rbac.authorization.k8s.io/argo-role created
clusterrole.rbac.authorization.k8s.io/argo-aggregate-to-admin created
clusterrole.rbac.authorization.k8s.io/argo-aggregate-to-edit created
clusterrole.rbac.authorization.k8s.io/argo-aggregate-to-view created
clusterrole.rbac.authorization.k8s.io/argo-cluster-role created
clusterrole.rbac.authorization.k8s.io/argo-server-cluster-role created
rolebinding.rbac.authorization.k8s.io/argo-binding created
clusterrolebinding.rbac.authorization.k8s.io/argo-binding created
clusterrolebinding.rbac.authorization.k8s.io/argo-server-binding created
configmap/workflow-controller-configmap created
service/argo-server created
deployment.apps/argo-server created
deployment.apps/workflow-controller created
nick@dopey:~$ kubectl create rolebinding default-admin --clusterrole=admin --serviceaccount=default:default
rolebinding.rbac.authorization.k8s.io/default-admin created
nick@dopey:~$ argo submit --watch https://raw.githubusercontent.com/argoproj/argo/master/examples/hello-world.yaml
Name:                hello-world-r6ljw
Namespace:           default
ServiceAccount:      default
Status:              Running
Created:             Thu Mar 05 20:46:22 -0500 (46 seconds ago)
Started:             Thu Mar 05 20:46:32 -0500 (36 seconds ago)
Duration:            36 seconds

STEP                             PODNAME            DURATION  MESSAGE
 ◷ hello-world-r6ljw (whalesay)  hello-world-r6ljw  36s       ContainerCreating

The job never completes. Here's the output of kubectl describe pods
$ kubectl describe pods
Name:           hello-world-r6ljw
Namespace:      default
Priority:       0
Node:           kind-control-plane/<IP_ADDRESS>
Start Time:     Thu, 05 Mar 2020 20:46:32 -0500
Labels:         workflows.argoproj.io/completed=false
                workflows.argoproj.io/workflow=hello-world-r6ljw
Annotations:    workflows.argoproj.io/node-name: hello-world-r6ljw
                workflows.argoproj.io/template:
                  {"name":"whalesay","inputs":{},"outputs":{},"metadata":{},"container":{"name":"","image":"docker/whalesay:latest","command":["cowsay"],"ar...
Status:         Pending
IP:
IPs:            <none>
Controlled By:  Workflow/hello-world-r6ljw
Containers:
  wait:
    Container ID:
    Image:         argoproj/argoexec:v2.6.1
    Image ID:
    Port:          <none>
    Host Port:     <none>
    Command:
      argoexec
      wait
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Environment:
      ARGO_POD_NAME:  hello-world-r6ljw (v1:metadata.name)
    Mounts:
      /argo/podmetadata from podmetadata (rw)
      /var/run/docker.sock from docker-sock (ro)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-kp476 (ro)
  main:
    Container ID:
    Image:         docker/whalesay:latest
    Image ID:
    Port:          <none>
    Host Port:     <none>
    Command:
      cowsay
    Args:
      hello world
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-kp476 (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  podmetadata:
    Type:  DownwardAPI (a volume populated by information about the pod)
    Items:
      metadata.annotations -> annotations
  docker-sock:
    Type:          HostPath (bare host directory volume)
    Path:          /var/run/docker.sock
    HostPathType:  Socket
  default-token-kp476:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-kp476
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason       Age                From                         Message
  ----     ------       ----               ----                         -------
  Normal   Scheduled    30s                default-scheduler            Successfully assigned default/hello-world-r6ljw to kind-control-plane
  Warning  FailedMount  14s (x6 over 29s)  kubelet, kind-control-plane  MountVolume.SetUp failed for volume "docker-sock" : hostPath type check failed: /var/run/docker.sock is not a socket file

Anything else we need to know?:
As far as I can tell, Argo is trying to mount a Docker socket. This obviously doesn't work on Kind, because it uses a containerd runtime. Is Argo not expected to work on containerd? What should I be doing instead?
Environment:

Argo version:

$ argo version
argo: v2.6.1
  BuildDate: 2020-03-04T21:25:34Z
  GitCommit: 842739d7831cc5b417c4f524ed85288408a32bbf
  GitTreeState: clean
  GitTag: v2.6.1
  GoVersion: go1.13.4
  Compiler: gc
  Platform: linux/amd64

Kubernetes version :

$ kubectl version -o yaml
clientVersion:
  buildDate: "2020-02-12T13:43:46Z"
  compiler: gc
  gitCommit: 06ad960bfd03b39c8310aaf92d1e7c12ce618213
  gitTreeState: clean
  gitVersion: v1.17.3
  goVersion: go1.13.7
  major: "1"
  minor: "17"
  platform: linux/amd64
serverVersion:
  buildDate: "2020-01-14T00:09:19Z"
  compiler: gc
  gitCommit: 70132b0f130acc0bed193d9ba59dd186f0e634cf
  gitTreeState: clean
  gitVersion: v1.17.0
  goVersion: go1.13.4
  major: "1"
  minor: "17"
  platform: linux/amd64

Message from the maintainers:
If you are impacted by this bug please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

Would changing your Workflow executor help here?

OK, I:

downloaded https://raw.githubusercontent.com/argoproj/argo/stable/manifests/install.yaml locally
replaced the resource:

apiVersion: v1
kind: ConfigMap
metadata:
  name: workflow-controller-configmap

with this
apiVersion: v1
kind: ConfigMap
metadata:
  name: workflow-controller-configmap
data:
  config: |
    containerRuntimeExecutor: k8sapi

And it worked OK.
Would it make sense to add these instructions to the Getting Started Guide? I couldn't find anything about this on
https://github.com/argoproj/argo/blob/master/docs/getting-started.md

Feel free to update that document for executor selection.

Closing this, feel free to open a PR with the changes.

@nicks https://github.com/argoproj/argo/blob/master/examples/retry-container-to-completion.yaml does not work for me using that executor on Kind. Were you able to use it with Kind with no issues ?

I haven't tried that one, so I can't speak to whether/how it would work, sorry!

OK, I:
* downloaded https://raw.githubusercontent.com/argoproj/argo/stable/manifests/install.yaml locally

* replaced the resource:

apiVersion: v1
kind: ConfigMap
metadata:
  name: workflow-controller-configmap

with this
apiVersion: v1
kind: ConfigMap
metadata:
  name: workflow-controller-configmap
data:
  config: |
    containerRuntimeExecutor: k8sapi

And it worked OK.
Would it make sense to add these instructions to the Getting Started Guide? I couldn't find anything about this on
https://github.com/argoproj/argo/blob/master/docs/getting-started.md

Hey @nicks, sorry but i didn't get how you solved this.
After download and edit the YAML file as you stated above, what i have to do with it?
Sorry but i'm new to Argo and k8s in general
Thanks!


[Fix][4.1.x] Login Throttle

Version
4.1.x
Issue
The problem with current Login Throttle lies in how CAS decides if a login is failed and when failure should be recorded. The default behavior is:

when loading a CAS page initiated by POST, if the current event is not SUCCESSFUL_AUTHENTICATION_EVENT (defined as a string literal "success"), CAS considers the login as failed and records the failure.

However, CAS users need to override the AbstractThrottledSubmissionHandlerInterceptorAdapter class if they have customized their login flow. There is no documentation for this.
In addition, the warning message and docs are misleading. It took us some time to figure out that this is a "rate" based throttling, which is considered as the expected behavior #486. And the fix provided by #719 can be further improved.
Fix
In this PR, I propose an "context-based" approach.

Update AuthenticationExceptionHandler.handle() to not only handle exceptions as before but also recognize excpetions to record submission failure and update request context.
Update AbstractThrottledSubmissionHandlerInterceptorAdapter.postHandle() to only record submission failure if throttle triggering exceptions are in flow context (and if POST).
Update the warning message to explicitly mention "threshold rate" instead of "number of logins in a period of time".

Side Effects

[ ] Fix test (In progress)

Related PR

#1808: i opened a PR five months ago which does not work.
FYI: here is a patch for our own CAS server which uses the same idea.

Closing due to inactivity. 4.1 is also EOLed.


Update session when events are tracked (close #35)

Changed the behavior of the client session to reflect the more modern approach adopted by mobile trackers.
Instead of background thread that updates the session in regular intervals, the session info is now updated on each tracked event. It checks for timeouts since last tracked event and starts a new session if necessary.
Session information is persisted in a SQLite database as before. However, instead of saving to the database in the background thread, changes are persisted when session context is fetched and updated. This might have a small toll on the time it takes to track an event. However, since session updates are relatively rare (only after timeouts), I thought it's not a problem.

Thanks for your pull request. Is this your first contribution to a Snowplow open source project? Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://docs.snowplowanalytics.com/docs/contributing/contributor-license-agreement/ to learn more and sign.
Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


[chore] more packaging tests fortification

In working towards packaging issues and preparing some more tests for the uncovered settings, I found (another) hidden regressions within the tests itself (most likely from one of my early PRs back then when setting up the infrastructure, oops). This PR will

[x] refactor walk into utils/filesystem
[x] add files include/exclude test suite delegated to another PR
[x] fix regression of nested folders equality testing
[x] rename test folders to describe better what is being tested
[x] print out more descriptive assertion error messages
[x] remove unnecessary individual suites that can be merged into one test (now lives under the "standard javascript package" test suite)

Hopefully I'll be able to finish the checklist in the next couple of hours. Although, there might be a bug for the files include/exclude as well, so I might probably open a separate PR to add the tests and fix it if that's the case.
Opening another PR for the files include/exclude after this one's merged.

Ugh, windows specific problem again, no wonder it keeps failing in my machine.
The new test fails on windows because globrex output for **/exclude.js is /^.*\/exclude\.js$/, but because windows separator uses backslash, it doesn't register properly. Expected files should be 5, and actual files are 7.
On the other hand, the other machines should've filter it properly. It did, but the generated .d.ts are still copied/generated across. Expected files should be 5, and actual files are 6.

Sounds like #1923

Aha, exactly that!

I guess https://github.com/sveltejs/kit/pull/2236/commits/752d9a23a96d9db7479902683d01b18a20beb2e0 would've passed for the other machines if emitTypes was set to false

I'm not that familiar with the packaging stuff, so don't wait on me for a review. I'd say go ahead and merge this whenever you're ready since you got one approval - especially since this is mostly tests and not a big API change or anything


StarFinder/PF2 conversion?

Hello! I love using awesomeSheet since I came across it a few months back. My group is considering trying out StarFinder & PathFinder 2 later this year & I was wondering if you & your team have any plans for converting this to work for SF/PF2? Keep up the great work.

Hi, glad you like the project. There isn't a team, just myself developing the project alone. I have vague plans to look into supporting Pathfinder 2. However no work has begun yet. Mostly because I don't play Pathfinder 2 and don't know the system inside and out like (mostly) I do with Pathfinder 1. This might change once Pathfinder 2 is out and my group and I stat playing it. I don't plan to support Starfinder for similar reason, my group and I don't play it.
In short, no work done or concrete plans right now. Maybe in the future.


Update Study class to allow for Consortia

For the study refresh squad, we need to update the Study class to allow for consortia. After discussion with @mslarae13 and @lamccue, we decided to try:

[x] Changing the name of the Study class to ResearchIniative
[x] Add a slot called something along the lines of initiative_type with enums of study and consortium
[x] Add the slot part_of to the Study class to take an identifier of another study or consortium to connect a child study/consortium to a parent study/consortium
[x] Update the description of study to account for consortium
[x] Create study_set sample data yaml file(s) to test this.
[ ] Change references to Study class in NMDC repo with ResearchInitiatve
[ ] Change Database slot study_set to research_initiative_set
[ ] Do we change the slot study_image to initiative_image?

Waiting to change study_set slot to research_initiative_slot along with changing the rest of the study references until we decide to go this route.

@brynnz22 if the stuck-though list items in the first comment on this thread are in a "won't do" status, then maybe you could close this issue!

It looks like it already is closed? I wonder why it popped up.


"AssetImporter is referencing an asset from the previous import" error message sometimes appears

What is the current behavior?
The error "AssetImporter is referencing an asset from the previous import. This should not happen." will sometimes appear in the console while working with Yarn programs.
Aside from the error message, no other negative impacts seem to occur.
Please provide the steps to reproduce, and if possible a minimal demo of the problem:
This error message seems to appear when a Yarn script is modified and currently is selected in the Unity Editor.
What is the expected behavior?
No error message should appear.
Please tell us about your environment:

Yarn Spinner Version: v2.0.0-beta1
Unity Version: 2019.4.11f1

I've been seeing this same issue occur in Yarn Spinner Version 1.2.6 in Unity 2020.1.15f1, so I don't think it's exclusive to the beta

I'm not currently seeing this in the develop branch, and don't remember seeing it for some time. Is anyone else still seeing this behaviour? (If I don't hear anything, I'll close this issue.)


extend interpolation to multichannel images?

It appears that InterpGrid is currently limited to supporting interpolations on Arrays of FloatingPoints. How difficult would it be to extend it to support, e.g., RGBs of FloatingPoints?
From a mathematical perspective, at least, I would think it should be natural to extend interpolation to any type that acts like a vector space over a "field" of FloatingPoints.
If it is anything more than trivial to implement, I'll just implement my own for now, since my current need would be satisfied by bilinear interpolation, but this would certainly represent a longer-term nice-to-have.

Similar issue for me, I need interpolations on Arrays of Complex.
I'll try to dig up the internals or simply just try Interpolations.jl.


Start chatting with bot?

To start interacting with the bot we have 'sendBotStartMessage' where we need to specify 'bot_user_id'.
To find this 'bot_user_id' I guess we need to use 'searchPublicChats'.
But the result is not issued if the bot is marked as a 'scam'.
So, any ways to start chatting with this kind of bots?

You need to find the bot by any means. If the bot can't be found through search, you can try to forward a message from it.

To forward something from the bot first I need in any way send '/start' to him, which is impossible without an ID.
In the official app if I send a link @{bot_name} to the chat, it's easily open the dialog and I can interact with this bot, but I can't see any way to do the same by tdlib. But if it's realized in the official app, then I guess it is possible to solve this.

You need to find the bot by any means. If the bot can't be found through search, you can try to forward a message from it.

I meant that I wanted to find a bot, which was never started, and no chats started with him.

I meant the same. You need to discover the bot in any other way. I suggested you to forward a message from the bot using some other account which has written to the bot previously.

So, there is no normal, natural way? No methods like 'chatInviteLinkInfo' or create a chat by opening a link 't.me/BotName?start=12345'?

Definitely, there is only one way to convert a username to a chat_id.

When I use the official app and click in the chat to the link, the dialog with the bot pops-up automatically.

I want to do the same in my app. I really though tdlib has full functionality and allows to recreate the official app with the same functions.

All apps use searchPublicChats to receive chat object by username.

How does the app open a window like on screenshot 2? I can't figure out.

It's just a chat with the bot.

Yes, and I need to start this bot, but in my own app. I want to be able to open a chat by clicking on a link message.

Then use searchPublicChat.

Like I said, if bot marked as scam, he will not shown up in global search. This is a dead end

Use searchPublicChat instead of searchPublicChats.

Thank you


Style/AccessorGrouping: Fix detection of Sorbet sig {} blocks

Sorbet sig { returns(Integer) } annotations above attr_reader methods should be ignored after 9921cdcd03b1883a9ce66de769c457da4c3317b7, per the docs, but they weren't being (see the test I added here for evidence).
Sorbet sig {} constructs are blocks (hence the braces), not send_type? directly.
Hence, we now check if the previous expression is a block and if so, descend into its child nodes until we find a send_type, then use that to determine if the accessor is groupable.
Relates to https://github.com/rubocop/rubocop/issues/11596, but that issue is already closed.

Before submitting the PR make sure the following are checked:

[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Wrote good commit messages.
[ ] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
[x] Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

Force-pushed to add backticks to the cop name in the changelog.

Thanks!


Perpetual changes to apply when block_http_code is not specified

Looks like https://github.com/signalsciences/terraform-provider-sigsci/pull/156 causes changes to apply to always appear if a site is defined without specifying block_http_code in the sigsci_site resource.
This started after upgrading to v1.2.21.
resource "sigsci_site" "this" {
  short_name   = "production"
  display_name = "Production"
  agent_level  = "block"
}

~ resource "sigsci_site" "production" {
  - block_http_code        = 406 -> null
    id                     = "production"
    # (5 unchanged attributes hidden)
}

References

https://github.com/signalsciences/terraform-provider-sigsci/pull/156

Hi @sjparkinson - thanks for the report! You are 100% right that #156 was the culprit. I have submitted a PR to fix this in #162
Thanks again for the report and apologies for the issues caused here.

@sjparkinson hopefully https://github.com/signalsciences/terraform-provider-sigsci/pull/162 fixed this -- if not, please reopen this issue. Thank you!


Mismatch of document and code repo

In the document, https://tvm.apache.org/docs/dev/tutorial/codebase_walkthrough.html.
it says there are directory src/codegen/ with files such as codegen_cuda.cc and codegen.cc that will generate a runtime::Module object. However, in the current release there is no such directory, has it been renamed to src/target/?

Yes, that document is hopelessly outdated. PR welcome.


Remove phpcs:ignore comments for unused use statements

The line in DropEncryptedCollection was never necessary. The line in CreateEncryptedCollection may have been used at one point since Binary is only referenced in a psalm-var annotation, but phpcs no longer complains.

Reported the unrelated test failure on MongoDB 4.0 shard cluster in PHPLIB-1151.
Other test failures are covered by PHPLIB-1115 and PHPLIB-1071.


Controller ID/Type as seen by SteamVR

Hi,
Is there any way to control/configure what type of 'fake' controller we are presenting to SteamVR?
With my experiments (1) the controllers are rendered as Vive (Watchman) controllers in an empty construct, but currently are not rendered with SteamVR (were previously shown as Touch controllers). Can someone suggest a 'valid' ID value, perhaps they are somewhat coded?
For SteamVR Home I am 'stuck' as the configure panel shows a gamepad (rather than VR controllers) and says press 'Y' which does not exist. Pressing trigger brings us a pop-up, but triggering on the next button just closes rather than proceeding with the setup (to set head/heads type, etc).
1 https://github.com/mungewell/pyPSVR/tree/master/example3_vridgeapi

I found that 'SteamVR Home' can be launched seperately from 'Steam VR'. Disable it in the SteamVR config, then start (just) SteamVR... at this point I can start my script and see an empty construct with 2 two fave Vive controllers.
'SteamVR Home' can then be started from:
c:\Program Files (x86)\Steam\steamapps\common\SteamVR\tools\steamvr_environments\game\bin\win64>.\steamtours.exe -vr
Still doesn't get me Fake Vive controllers working, but it might be a step...

From 'vrsever.log':

Sun Jun 25 2017 15:59:23.637 - oculus_vridge: New driver registered (serial VridgeControllerV02ID1) with status 1
Sun Jun 25 2017 15:59:23.639 - oculus_vridge: New driver registered (serial VridgeControllerV02ID2) with status 1
Sun Jun 25 2017 15:59:23.646 - oculus_vridge: Controller: VridgeControllerV02ID1 activated with id: 2
Sun Jun 25 2017 15:59:23.646 - oculus_vridge: Controller: VridgeControllerV02ID2 activated with id: 3

"PseudoVive" does not appear to work with the current version of SteamVR, however it does hint on how to pretend to be a Vive Controller....
https://github.com/schellingb/PseudoVive/blob/master/Source/driver_2vive.cpp#L58

Hello,
For now there is no way to change controller's model. This option might be available in the future, but for now there are some more important tasks. As for controllers IDs, in our API they are used only to distinguish controllers, and value does not affect how does controller works or looks. Keep in mind that different model would not change logic, it is being used for visual purpose only.
We are not sure why SteamVR home does not accept virtual controllers, we do have similar issue with standard gamepads(Xbox One and Steam Controller), so we are not sure if problem is on our side.

For 'SteamVR Home' this is not just a visual problem. As noted above SteamVR Home is unusable with the VRidge controllers as the 'Welcome Panel' (between the book shelves) is showing a gamepad (rather than a Vive controller), and a user is unable to pass the initial set-up of the Avatar/Hands.
It maybe possible to short-circuit this part of the 'SteamV Home' set-up with a pre-made Avatar/etc, but I don't know where this is store within the user settings/files.
Separately; For the DIYer it would be helpful to be able to fake any type of controller.

There is a new problem with SteamVR home and controllers. They are completely invisible in current SteamVR version for some reason. I'm gonna open separate issue for that.


UX: Development process, using IDE, index code

See original issue on GitLab
In GitLab by [Gitlab user @mbodmer] on Mar 18, 2019, 21:57
Summary
Using an IDE or Editor with code completion features, the indexer needs to have access to the code and it's dependencies. Also build information is needed. Often a compile_commands.json is available for external tools.

Why is there no way to access the latest artifact cache from workspaces (dependencies, rootfs, tools)
How to tell an IDE indexer about the project structure inside the sandbox? compile_commands.json?

What is the envisioned BuildStream workflow for a developer's desktop?

In GitLab by [Gitlab user @tpollard] on Mar 19, 2019, 12:31
marked this issue as related to #875

In GitLab by [Gitlab user @mbodmer] on Mar 19, 2019, 14:52
I have stumbled upon this interesting, but discontinued discussion, in buildstream-list: https://mail.gnome.org/archives/buildstream-list/2017-November/msg00046.html
It sounds like things are quite clear and demonstrated by flatpak and flatpak-builder. For me as a user it is however not so clear, how does buildstream deliver support on the points Christian made in his statements?

In GitLab by [Gitlab user @mbodmer] on Mar 19, 2019, 16:31
After a bit more research i have found that #162 has implemented unsafe artifact checkout, which seems to be replaced by bst artifact checkout --hardlinks element.bst --directory=sysroot now.
This gives me the sysroot which is needed, albeit hard to maintain up to date as a developer. It would be nice if there could be a connection to the workspace, eg an entry in .bstproject.yaml. This could also be parsed by an ide plugin. This connection however should happen automatically in my eyes.
Even if we have the sysroot, there would still be a translation needed between the paths of the buildfiles in the workspace and the real path to the sysroot.
Am I missing something?

In GitLab by [Gitlab user @tristanvb] on Mar 20, 2019, 07:31
Sorry I am late replying this... (loud note to self: there are many people in the project who would have been interested in this topic, but due to gitlab's imperfect notification system, most people don't watch the project for incoming issues).
[Gitlab user @mbodmer], there have been discussions in previous hackfests about supporting such features, this should probably be tied to workspaces in some way (so that with an open workspace, one might be able to have an up to date sysroot for an IDE to have access to all of the workspace's dependencies), this might be complicated by the fact that one might likely have multiple workspaces open at the same time.
In short, providing the information to IDEs is very much a desirable feature which has been discussed but currently nobody is working on this as far as I know; [Gitlab user @coldtom] might have some insight as he is working on a plugin for the GNOME Builder tool.

In GitLab by [Gitlab user @mbodmer] on Mar 20, 2019, 13:38
How could we proceed to help in this situation? If there is a vision maybe people like me could try to improve the situation. But right now I don't really have a clue how an IDE independent integration path could look like.
Following points come to mind (too naive maybe):

integration through an external tool, library? -> buildstream as a library?
most IDE's don't have the notion of a build-runtime as gnome-builder has.
sandbox acts as a remote system (container), some IDE's support remote development (not ideal)
let buildstream generate a compile_commands.json with sysroot (previous artifact checkout) mapped paths (not sure this would work). many tools and ide's support this format. How can buildstream know details about built parts -> Bear?
???

In GitLab by [Gitlab user @coldtom] on Mar 20, 2019, 16:21
[Gitlab user @adds68] is the one working on the plugin for GNOME Builder, not me. I would love to see BuildStream integrated with IDEs though!

In GitLab by [Gitlab user @adds68] on Mar 25, 2019, 14:59
marked this issue as related to #972

In GitLab by [Gitlab user @tristanvb] on Nov 5, 2020, 07:05
marked this issue as related to #311

In GitLab by [Gitlab user @tristanvb] on Nov 5, 2020, 07:06
marked this issue as related to #413


Add CodeSandbox and mentions

Also pass prettier for the code and let some internal plugins be customized.

This also update markdown-it-podcast version (still commented the code)


Update plugin-liquibase-runner.yml

Description
Adding @r2datical to https://github.com/jenkinsci/liquibase-runner-plugin for Artifactory. r2datical is the Artifactory handle.

Submitter checklist for changing permissions

Always
https://github.com/jenkinsci/liquibase-runner-plugin

[x] Add link to plugin/component Git repository in description above

When adding new uploaders (this includes newly created permissions files)

[x] Make sure to @mention an existing maintainer to confirm the permissions request, if applicable
[x] Use the Jenkins community (LDAP) account name in the YAML file, not the GitHub account name
[x] Make sure to @mention the users being added so their GitHub account names are known if they require GitHub merge access (see below).
[x] All newly added users have logged in to Artifactory at least once

Reviewer checklist (not for requesters!)

[ ] Check this if newly added person also needs to be given merge permission to the GitHub repo (please @ the people/person with their GitHub username in this issue as well). If needed, it can be done using an IRC Bot command
[ ] Check that the $pluginId Developers team has Admin permissions while granting the access.
[ ] In the case of plugin adoption, ensure that the Jenkins Jira default assignee is either removed or changed to the new maintainer.
[ ] If security contacts are changed (this includes add/remove), ping the security officer (currently @daniel-beck) in this pull request. If an email contact is changed, wait for approval from the security officer.

There are IRC Bot commands for it

I think there is a mailing list thread about this, can you add the link to the conversation for tracking purposes?

Sure! Here's the mailing list thread: https://groups.google.com/forum/?nomobile=true#!topic/jenkinsci-dev/OoUgF2V_kas

@prospero238 can you review and approve please if you're happy with Robert having access

Thanks, @timja. @prospero28 already approved and added me as a contributor to the plugin.
https://github.com/jenkinsci/liquibase-runner-plugin/graphs/contributors

Thanks, @timja. @prospero28 already approved and added me as a contributor to the plugin.
jenkinsci/liquibase-runner-plugin/graphs/contributors

contributor to the plugin is not necessarily the same as release, we normally ask for an explicit approval, preferably on this PR

understood. I just emailed @prospero238. thanks!

Would appreciate a ping once this is merged so I can give the new maintainer access to SECURITY-519.

Consider the ping received, I will do the merge Thursday.
On Thu, Apr 30, 2020 at 1:17 AM Daniel Beck<EMAIL_ADDRESS>wrote:

Would appreciate a ping once this is merged so I can give the new
maintainer access to SECURITY-519.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jenkins-infra/repository-permissions-updater/pull/1513#issuecomment-621686967,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAG3TPKUEJQGM2UAQZDL343RPEX3JANCNFSM4MSGSORQ
.

Consider this my explicit approval.


flaky test: magicsock::tests::test_two_devices_setup_teardown stdout

failures:

---- magicsock::tests::test_two_devices_setup_teardown stdout ----
DERP listening on <IP_ADDRESS>:57618
STUN listening on <IP_ADDRESS>:56436
setting up magic stack
waiting for connection
Error: failed to connect nodes

Caused by:
    deadline has elapsed

https://github.com/n0-computer/iroh/actions/runs/7222936006/job/19680961035?pr=1885

also
failures:

---- magicsock::tests::test_two_devices_roundtrip_quinn_magic stdout ----
DERP listening on <IP_ADDRESS>:51550
STUN listening on <IP_ADDRESS>:51439
Error: failed to connect nodes

Caused by:
    deadline has elapsed

https://github.com/n0-computer/iroh/actions/runs/7223854611/job/19683829928
likely same issue


NETOBSERV-578: deduplicate flows at agent level

Detects when the same flow is detected in different interfaces and then forwards the flow from the first interface it was received from.
In hosts with low traffic it decreased the number of flows by 20% and hosts with higher traffic, by 40%.
However, it seems that in OpenShift we still could have some duplicates as the same flow can be detected from two agents in different hosts. In that case, a second deduplication should be performed at flowlogs-pipeline level.

Codecov Report

Merging #56 (8b7a451) into main (ec135a6) will increase coverage by 2.72%.
The diff coverage is 88.70%.

@@            Coverage Diff             @@
##             main      #56      +/-   ##
==========================================
+ Coverage   32.04%   34.76%   +2.72%
==========================================
  Files          18       19       +1
  Lines        1239     1300      +61
==========================================
+ Hits          397      452      +55
- Misses        823      829       +6
  Partials       19       19

Flag
Coverage Δ

unittests
34.76% <88.70%> (+2.72%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pkg/agent/agent.go
14.91% <0.00%> (-0.52%)
:arrow_down:

pkg/flow/deduper.go
100.00% <100.00%> (ø)

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


chore: add information to get path and action for mutation

Related issue
https://github.com/kyverno/website/issues/1332

Proposed Changes
add information as a tip for users trying to find information on path and action of mutation

Checklist

[x] I have read the contributing guidelines.
[x] I have inspected the website preview for accuracy.
[x] I have signed off my issue.

@anushkamittal2001 - can you please update, so we can merge?


Issue/5790 follow up add test for type hint collision

Description
https://github.com/inmanta/inmanta-core/pull/5792/files removed a testcase that was no longer testing what it was supposed to.
This PR adds back a check for type hint name collision.
Self Check:
Strike through any lines that are not applicable (~~line~~) then check the box

[ ] Attached issue to pull request
[ ] Changelog entry
[ ] Type annotations are present
[ ] Code is clear and sufficiently documented
[ ] No (preventable) type errors (check using make mypy or make mypy-diff)
[ ] Sufficient test cases (reproduces the bug/tests the requested feature)
[ ] Correct, in line with design
[ ] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: )
[ ] If this PR fixes a race condition in the test suite, also push the fix to the relevant stable branche(s) (see test-fixes for more info)

Processing this pull request

Merged into branches master, iso6 in 283feb1e06c94a28c3b91e25ca2d1ac7d9dd35c8


How can I use three Scenes in one class?

Watching the tutorial of Theorem Of Beethoven,I knew that I can use "def setup(self):" to use two scenes in one chass.However,when trying to use three scenes in one class,I find it will raise an error:
Traceback (most recent call last):
File "D:\Desktop\manim\manimlib\extract_scene.py", line 155, in main
scene = SceneClass(**scene_kwargs)
File "D:\Desktop\manim\manimlib\scene\scene.py", line 75, in init
self.construct()
File ".\ThreeDScene.py", line 13, in construct
self.add_transformable_mobject(point,func)
AttributeError: 'scene' object has no attribute 'add_transformable_mobject'
So is there anything wrong with my script,or it's couldn't be done in theory?
3Scenes.txt

MovingCameraScene has an assert that collides with the others so there's that.
The last scene argument passed which in this case is ThreeDScene dominates the camera class making the other stuff like LinearTransformationScene and MovingCameraScene unusable.
Also, two things:

It's better to learn how to make your own attributes to modify them to what you're making. This means actually learning Python otherwise you stick with the arbitrary decisions of others.

I have tried this out before and it's really annoying. Needing to 3D transform something that isn't compatible with an animation before it e.g moving the camera so I usually opt to make two scenes where the second is a continuation of the first. Obvious disadvantage here is having to follow up results of animations in the second scene by copy pasting code.

Also, UpdateFromAlphaFunc does a better and less traumatizing job than a value tracker. I used it in my version of your code but I realized you were transforming the thing into an ellipse so I just made that happen. There's also other tricks you can find there such as defining class methods for specific scenes and using them kind of like functions which is more of a Python thing than a Manim thing.
Lastly, please use slightly deeper indentation. Makes code more readable.
class ExtractScene(MovingCameraScene):
    CONFIG = {
        "have_basis_vectors" : True
    }
    def setup(self):
        MovingCameraScene.setup(self)
        self.add(
            NumberPlane(
                x_min = -10,
                x_max = 10,
                y_min = -7,
                y_max = 7
            )
        )
        if self.have_basis_vectors:
            self.add(
                self.get_basis_vectors())

    def construct(self):
        point = Dot(
            point = UP,
            color = YELLOW,
        )
        func = Circle(
            radius = 1,
            color = ORANGE,
            stroke_width = 2
        )
        self.play(
            ShowCreation(point),
            ShowCreation(func),
            run_time = 3
        )
        self.wait()
        matrix = np.array([[0, 1],[1, 0]])
        self.apply_matrix(
            matrix,
            run_time=3
        )
        self.wait()
        self.camera_frame.save_state()
        self.play(
            self.camera_frame.set_height, point.radius * 2 * 1.5,
            self.camera_frame.move_to, point.get_center(),
            run_time = 3
        )
        self.wait(3)
        self.play(
            Restore(self.camera_frame)
        )
        self.wait()
        self.play(
            self.turn_into_ellipse(func, 5),
            rate_func = there_and_back,
            run_time = 6
        )

    def get_basis_vectors(self):
        return VGroup(*[
            Vector(
                vect,
                color=color,
                stroke_width=6
            )
            for vect, color in [
                ([1, 0], RED),
                ([0, 1], GREEN)
            ]
        ])

    def apply_matrix(self, matrix, **kwargs):
        proper = matrix
        anims = [ApplyMatrix(
                matrix.T, mobject)
               for mobject in self.mobjects]
        self.play(*anims, **kwargs)

    def turn_into_ellipse(self, circle, new_width):
        anim = ApplyMatrix(
            matrix = np.array([[new_width, 0], [0,1]]),
            mobject = circle
        )
        return anim

class ExtractScene2(ThreeDScene):
    CONFIG = {
        "have_basis_vectors" : True
    }

    def setup(self):
        ThreeDScene.setup(self)
        self.add(
            NumberPlane(
                x_min = -10,
                x_max = 10,
                y_min = -7,
                y_max = 7
            )
        )
        if self.have_basis_vectors:
            self.add(
                self.get_basis_vectors())
        point = Dot(
            point = UP,
            color = YELLOW,
        )
        self.add(point)
        matrix = np.array([[0, 1],[1, 0]])
        for mob in self.get_mobjects():
            ApplyMatrix(matrix, mob)

    def construct(self):
        func = Circle(
            radius = 1,
            color = ORANGE,
            stroke_width = 2
        )
        self.add(func)
        self.move_camera(
            phi = 75 * DEGREES,
            theta = -55 * DEGREES,
            run_time = 3
        )
        sph = Sphere(radius = 1)
        self.begin_ambient_camera_rotation(0.5)
        self.play(
            ReplacementTransform(func, sph),
            run_time = 3
        )
        self.wait(4)
        self.play(*[FadeOut(mob) for mob in self.mobjects])

    def get_basis_vectors(self):
        return VGroup(*[
            Vector(
                vect,
                color=color,
                stroke_width=6
            )
            for vect, color in [
                ([1, 0], RED),
                ([0, 1], GREEN)
            ]
        ])

    def apply_matrix(self, matrix, **kwargs):
        anims = [ApplyMatrix(
                matrix.T, mobject)
               for mobject in self.mobjects]
        self.play(*anims, **kwargs)

If you want something done in Manim you do it yourself

Someone with a lot of PTSD working with Manim

MovingCameraScene has an assert that collides with the others so there's that.
The last scene argument passed which in this case is ThreeDScene dominates the camera class making the other stuff like LinearTransformationScene and MovingCameraScene unusable.
Also, two things:

It's better to learn how to make your own attributes to modify them to what you're making. This means actually learning Python otherwise you stick with the arbitrary decisions of others.
I have tried this out before and it's really annoying. Needing to 3D transform something that isn't compatible with an animation before it e.g moving the camera so I usually opt to make two scenes where the second is a continuation of the first. Obvious disadvantage here is having to follow up results of animations in the second scene by copy pasting code.

Also, UpdateFromAlphaFunc does a better and less traumatizing job than a value tracker. I used it in my version of your code but I realized you were transforming the thing into an ellipse so I just made that happen. There's also other tricks you can find there such as defining class methods for specific scenes and using them kind of like functions which is more of a Python thing than a Manim thing.
Lastly, please use slightly deeper indentation. Makes code more readable.
class ExtractScene(MovingCameraScene):
    CONFIG = {
        "have_basis_vectors" : True
    }
    def setup(self):
        MovingCameraScene.setup(self)
        self.add(
            NumberPlane(
                x_min = -10,
                x_max = 10,
                y_min = -7,
                y_max = 7
            )
        )
        if self.have_basis_vectors:
            self.add(
                self.get_basis_vectors())

    def construct(self):
        point = Dot(
            point = UP,
            color = YELLOW,
        )
        func = Circle(
            radius = 1,
            color = ORANGE,
            stroke_width = 2
        )
        self.play(
            ShowCreation(point),
            ShowCreation(func),
            run_time = 3
        )
        self.wait()
        matrix = np.array([[0, 1],[1, 0]])
        self.apply_matrix(
            matrix,
            run_time=3
        )
        self.wait()
        self.camera_frame.save_state()
        self.play(
            self.camera_frame.set_height, point.radius * 2 * 1.5,
            self.camera_frame.move_to, point.get_center(),
            run_time = 3
        )
        self.wait(3)
        self.play(
            Restore(self.camera_frame)
        )
        self.wait()
        self.play(
            self.turn_into_ellipse(func, 5),
            rate_func = there_and_back,
            run_time = 6
        )

    def get_basis_vectors(self):
        return VGroup(*[
            Vector(
                vect,
                color=color,
                stroke_width=6
            )
            for vect, color in [
                ([1, 0], RED),
                ([0, 1], GREEN)
            ]
        ])

    def apply_matrix(self, matrix, **kwargs):
        proper = matrix
        anims = [ApplyMatrix(
                matrix.T, mobject)
               for mobject in self.mobjects]
        self.play(*anims, **kwargs)

    def turn_into_ellipse(self, circle, new_width):
        anim = ApplyMatrix(
            matrix = np.array([[new_width, 0], [0,1]]),
            mobject = circle
        )
        return anim

class ExtractScene2(ThreeDScene):
    CONFIG = {
        "have_basis_vectors" : True
    }

    def setup(self):
        ThreeDScene.setup(self)
        self.add(
            NumberPlane(
                x_min = -10,
                x_max = 10,
                y_min = -7,
                y_max = 7
            )
        )
        if self.have_basis_vectors:
            self.add(
                self.get_basis_vectors())
        point = Dot(
            point = UP,
            color = YELLOW,
        )
        self.add(point)
        matrix = np.array([[0, 1],[1, 0]])
        for mob in self.get_mobjects():
            ApplyMatrix(matrix, mob)

    def construct(self):
        func = Circle(
            radius = 1,
            color = ORANGE,
            stroke_width = 2
        )
        self.add(func)
        self.move_camera(
            phi = 75 * DEGREES,
            theta = -55 * DEGREES,
            run_time = 3
        )
        sph = Sphere(radius = 1)
        self.begin_ambient_camera_rotation(0.5)
        self.play(
            ReplacementTransform(func, sph),
            run_time = 3
        )
        self.wait(4)
        self.play(*[FadeOut(mob) for mob in self.mobjects])

    def get_basis_vectors(self):
        return VGroup(*[
            Vector(
                vect,
                color=color,
                stroke_width=6
            )
            for vect, color in [
                ([1, 0], RED),
                ([0, 1], GREEN)
            ]
        ])

    def apply_matrix(self, matrix, **kwargs):
        anims = [ApplyMatrix(
                matrix.T, mobject)
               for mobject in self.mobjects]
        self.play(*anims, **kwargs)

If you want something done in Manim you do it yourself

Someone with a lot of PTSD working with Manim

Thanks for your help and advice,well appreciated.I'll try to learn  writing attributes myself as you suggested.


Updates for rust 1.73

Objective

Updates for rust 1.73

Solution

new doc check for redundant_explicit_links
updated to text for compile fail tests

Changelog

updates for rust 1.73

this is https://github.com/bevyengine/bevy/issues/8962, and no fix. For some it works, for some it doesn't, and we haven't spotted yet the reason why


[FEAT] Role icons support

Is your feature request related to a problem? Please describe.
Missing icons support
Describe the solution you'd like
Implement it
Describe alternatives you've considered
No any
Additional information
Any other information or screenshots about the feature request.

Added in 33b2be60ffc082efbbc5d0879d4c02b334c0fb4b


Flatten vk.rs module structure and use f32

This clarifies generated documentation and removes one more unnecessary C type.

This change is

This clarifies generated documentation

Can you explain the reasoning?

It's confusing for the documentation to claim a type is defined in a submodule when in fact it is normally accessed as a member of the root module

I wrote it this way because then all the flags are in one place inside the docs.

This should no longer be an issue due to the adoption of associated constants.


$animate's animation() addClass/removeClass callback

So I'm animating stuff with ng-class="{}", but I need some aditional tweeks possible only via javascript(temporaty setting parent's height to that of the element being animation), which I'm doing with .animation(), now after animating is done, I'd like to remove that height from the parent, but I can't really seem to find a proper way to do it.
Unlike enter, leave, move it looks like it's not possible to return done function(https://docs.angularjs.org/guide/animations#how-they-work). I can't really use $animate DOM events, since addClass is only being called when ng-class adds classes.
So how should I go about this, other than using $animate.addClass()(so still utilizing ng-class)?

On the bottom of the example block for using .animation(), it shows an example of passing in the done function to the callback - does this not work?

Mind putting up a plnkr code example? There was a big refactor that was merged in and I'm trying to conceptualize how we can do this using the new code.

So I tried, using RC, but it's apparently working in a different way now..
See http://plnkr.co/edit/6bpRYcbu5myuArjv6DJa?p=preview

Anyway, here's kinda what I tried to do using beta6 http://plnkr.co/edit/XhVtS6FTvefx9eq2OU26?p=preview (click on the image to change items)
Here particularly I want the callback
app.animation('.item', function() {
  return {
    addClass : function(element, className, done) {
      var parent = closest(element[0], '.wrap');
      parent.style.height = element[0].clientHeight + 'px';

      done();

      setTimeout(function() {
        parent.style.height = '';
      }, 200);

    }
  }
});

so instead of having to use setTimeout and stress about having to have the same delay in js and css, I'd just do something like
return function() {
  parent.style.height = '';
}

I see

Yes this has changed.
Just inject $animateCss and use that to drive the animation:
app.animation('.item', function() {
  return {
    addClass : function(element, className, doneFn) {
      var node = element[0];
      var parent = closest(node, '.wrap');
      var animator = $animateCss(element, {
          to: { height: node.clientHeight + 'px' },
          from: { height: '0px' }
      });
      if (!animator) return doneFn();
      animator.start().done(function() {
         node.style.removeProperty('height');
         doneFn();
      });
    }
  }
});

@fxck It looks like it's now possible to do what you want, so I'm gonna close this issue.


ENH: add tolerance argument to .sel and .reindex

.sel and .reindex now support the tolerance argument for controlling nearest-neighbor selection:
In [5]: array = xray.DataArray([1, 2, 3], dims='x')

In [6]: array.reindex(x=[0.9, 1.5], method='nearest', tolerance=0.2)
Out[6]:
<xray.DataArray (x: 2)>
array([  2.,  nan])
Coordinates:
  * x        (x) float64 0.9 1.5

This feature requires pandas v0.17 or newer.

@jhamman I think I want to merge this and then issue a new release. We are doing more harm in waiting for ReadTheDocs at this point. Better to get the fixes out even if we can't make the stable docs yet.

I'm fine with merging this now.  I agree we need to get this release out, with or without read the docs support.


Issue 110 domain concatenation

Description
**To be reviewed after #156 **
Simplifies the DomainConcatenation and allows it to work with a range of classes.

[x] Allow concatenation of StateVector objects
[x] Allow concatenation of 2D objects (e.g. solutions of the model in different domains) - a little bit hacky as currently written, with lots of if statements

Fixes #110 and #155
Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)

Key checklist:

[x] No style issues: $ flake8
[x] All tests pass: $ python run-tests.py --unit
[x] The documentation builds: $ cd docs and then $ make clean; make html

Further checks:

[ ] Code is commented, particularly in hard-to-understand areas
[x] Tests added that prove fix is effective or that feature works
[ ] Any dependent changes have been merged and published in downstream modules

Codecov Report

Merging #163 into master will decrease coverage by 0.5%.
The diff coverage is 92.39%.

@@            Coverage Diff             @@
##           master     #163      +/-   ##
==========================================
- Coverage   96.47%   95.97%   -0.51%
==========================================
  Files          37       38       +1
  Lines        1419     1491      +72
==========================================
+ Hits         1369     1431      +62
- Misses         50       60      +10

Impacted Files
Coverage Δ

pybamm/expression_tree/vector.py
96.29% <100%> (+1.29%)
:arrow_up:

pybamm/models/reaction_diffusion.py
100% <100%> (ø)
:arrow_up:

pybamm/parameters/standard_parameters.py
100% <100%> (ø)
:arrow_up:

pybamm/models/submodels/interface.py
100% <100%> (ø)
:arrow_up:

pybamm/expression_tree/unary_operators.py
100% <100%> (ø)
:arrow_up:

...ers/standard_current_functions/constant_current.py
100% <100%> (ø)

pybamm/models/lead_acid/loqs.py
100% <100%> (ø)
:arrow_up:

pybamm/spatial_methods/spatial_method.py
70.58% <100%> (+3.92%)
:arrow_up:

pybamm/discretisations/discretisation.py
100% <100%> (+0.82%)
:arrow_up:

pybamm/models/base_model.py
100% <100%> (ø)
:arrow_up:

... and 8 more

Continue to review full report at Codecov.

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

I think it might be clearest to get rid of DomainConcatenation and always use NumpyConcatenation instead. We would need always either broadcast explicitly or use PiecewiseConstant if we want to broadcast in all three domains, which will be the main use case. Disadvantage is that we lose the re-ordering of domains from self._slices and self._children_slices, but I think it is worth it to avoid having lots of classes that do similar things.

I think it might be clearest to get rid of DomainConcatenation and always use NumpyConcatenation instead.

I agree.

Get rid of PiecewiseConstant and do Broadcast explicitly
Don't expect DomainConcatenation to do any broadcasting


Branded QR to be added on Receive Screen

Branded QR to be used in receive screen, where we show keeper logo right in between of QR. The logo to be added in centre position on QRs/addresses

The UI has been updated here on QR in new version given here in this issue: #5193.
This is just a small Update on that issue @ben-kaufman
https://www.figma.com/design/m5eMFTKD391AiJAXaEzgxB/Bitcoin-Keeper?node-id=2764-6938&t=wImSmRKELw1qFSvK-1

#5193


Add Jacoco exclude for Kotlin

Disclaimer: with this exclude Jacoco able to generate report for Kotlin classes, but it also detects some problems like:
Classes in bundle 'projectname' do no match with execution data.
For report generation the same class files must be used as at runtime.

[ant:jacocoReport] Execution data for class MyClass does not match.
[ant:jacocoReport] Execution data for class AnotherClass does not match.

Current coverage is 81.14%

Merging #159 into master will not affect coverage as of 141fd9a

@@            master    #159   diff @@
======================================
  Files           38      38
  Stmts          557     557
  Branches        47      47
  Methods          0       0
======================================
  Hit            452     452
  Partial         29      29
  Missed          76      76

Review entire Coverage Diff as of 141fd9a

Powered by Codecov. Updated on successful CI builds.

When I use Jacoco for Kotlin project, I don't like the way it includes all generated code to its report. Do you know how to make Jacoco exclude those generated code, @artem-zinnatullin ?

Can you provide an example? I'll check in project I work on too
On Tue, 12 Apr 2016, 17:01 Thanh Le<EMAIL_ADDRESS>wrote:

When I use Jacoco for Kotlin project, I don't like the way it includes all
generated code to its report. Do you know how to make Jacoco exclude those
generated code, @artem-zinnatullin https://github.com/artem-zinnatullin
?
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/artem-zinnatullin/qualitymatters/pull/159#issuecomment-208921645

It looks like the image above. Jacoco counts equals() and hash(), etc to the report. In the other hand, I think it has some problems with inline function. In my current project, it couldn't create report any more.

@lenguyenthanh I'm kind of stopped playing with Jacoco + Kotlin for now, I hope to integrate codecov into work project soon so I'll revisit this issue


Get error when I create a new subject with participants

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'on' for column 'user_id' at row 1 (SQL: insert into participants (user_id, thread_id, updated_at, created_at) values (on, 11, 2017-04-12 13:50:46, 2017-04-12 13:50:46))

How to solve it.
My code is:
if (Input::has('recipients')) {
            $thread->addParticipant(Input::get('recipients'));
        }

@DoMoCo can you show content of the Input::get('recipients')?
dd(Input::get('recipients'));

Did you install Carbon via composer? As well, in the SQL database, change those values to timestamp instead of integer.

Thanks,I have solved it.

how u solve it ?????????


Plan & execute joins with interleaved tables

Background: https://airtable.com/tblD3oZPLJgGhCmch/viwINAgXA5on9pr2T/recUrD0hgoXFHAP2d
RFC: https://github.com/cockroachdb/cockroach/blob/master/docs/RFCS/20171025_interleaved_table_joins.md
PRs:

This was a 2.0 roadmap item. We're delaying until we do complete JOIN documentation early in 2.1.

Closing in favor of https://github.com/cockroachdb/docs/issues/2313.


add OLLAMA_NOHISTORY to turn off history in interactive mode

fixes #3002

I'm kinda new to this.... where do I add your code?

how do I add this on a Windows installation?

Add OLLAMA_NOHISTORY where? How do we make this change? Must it be done in every modelfile or is this set centrally, if so where?


Client disconnection from the broker

Hi, This is not exactly an issue but a question/feature request.
I know this might be a little bit strange, but in my application I've created kind of a subscription/publication rights management for isolating clients in the network.
The idea is that clients are pre-registered in an SQLite Db and they are asigned permissions for publishing/subscribing to specific topics. For this I need to be able to disconnect a apecific client from the broker side when the client tries to publish data to an unauthorized topic. I can decide whether a client is given permission to publish or not using the ApplicationMessageInterceptor, from MqttServerOptions, but I see no way to notify back the client that the publish operation was not accepted by the broker.
Is there any mechanism for doing that? Thanks a lot in advance.

Hi,
I added this feature for version 2.7.4 which will be released soon. It works like the subscription interceptor. You can set a flag which will close the connection.
Best regards
Christian

Let me know if it works for you.

Great job Cristian! It is exactly what I needed, and its also simple, neat and stright forward to use. Many thanks again.
Best regards. Victor


test: fix random tests flakiness

These tests were not awaiting page.evaluate command, so
page could have been closed before the command returned.

This fixes the travis failures on the roll PR right?

Exactly


fix: allow oracledb connectString (issue #1573)

fixes #1573
Question:
I'm not sure where I can add tests for this... There are tests for the connectionParser but my fix is in the oracledb dialect directly.  Should I add a new test file that instantiates this client and tests the parsing? Maybe mocking the actual oracledb package? Seems a little complicated, but let me know what you guys think...
Side note, I've tested this locally and it works, while maintaining backwards compatibility.
ping @rhys-vdw @elhigu because I see you guys were involved in the oracledb merge :-)

ping @atiertant  also

We have a need for this as well. Any update?
Trying this locally, I can verify that it works.

We've been using this in production without any issues since I made the pull request (about a month). I would love to see this merged too because it is the last thing stopping us from using the knex package from npm...

Plus one for getting this merged in as well. We have a need for this in our projects.

To me this looks fine and in #1573 @atiertant did kind of give his blessing for this, so I'll just merge this now 👍  Thanks @codyzy !


pyocd failed to recognize STM32H745XI board

Hi everyone! I was attempting to use PyOCD to set up GDB servers for the STM32H745XIH6 board. Initially, I checked the board information by running the command:
 $ pyocd list
  #   Probe/Board   Unique ID                  Target
----------------------------------------------------------------
  0   STLINK-V3     0051002E3137511839383538   ✖ stm32h745zihx
      DISCO-H745I

The output showed that the board was recognized as an "stm32h745zihx" board, even though it should have been recognized as an "stm32h745xihx" board.
Then I checked the MD5 software pack list and the related pack was Keil.STM32H7xx_DFP.3.0.0.pack.
After that, I installed the related pack.
 $ pyocd pack install stm32h745
Downloading packs (press Control-C to cancel):
    Keil.STM32H7xx_DFP.3.0.0

After this, I checked the installed packs by running the command:
 $ pyocd pack find stm32h745
  Part            Vendor               Pack                 Version   Installed
---------------------------------------------------------------------------------
  STM32H745BGTx   STMicroelectronics   Keil.STM32H7xx_DFP   3.0.0     True
  STM32H745BITx   STMicroelectronics   Keil.STM32H7xx_DFP   3.0.0     True
  STM32H745IGKx   STMicroelectronics   Keil.STM32H7xx_DFP   3.0.0     True
  STM32H745IGTx   STMicroelectronics   Keil.STM32H7xx_DFP   3.0.0     True
  STM32H745IIKx   STMicroelectronics   Keil.STM32H7xx_DFP   3.0.0     True
  STM32H745IITx   STMicroelectronics   Keil.STM32H7xx_DFP   3.0.0     True
  STM32H745XGHx   STMicroelectronics   Keil.STM32H7xx_DFP   3.0.0     True
  **STM32H745XIHx   STMicroelectronics   Keil.STM32H7xx_DFP   3.0.0     True**
  STM32H745ZGTx   STMicroelectronics   Keil.STM32H7xx_DFP   3.0.0     True
  STM32H745ZITx   STMicroelectronics   Keil.STM32H7xx_DFP   3.0.0     True

The output showed that PyOCD does support "STM32H745XIHx" and "STM32H745ZITx", but not "stm32h745zihx".
 $ pyocd gdbserver
0001468 C Target type stm32h745zihx not recognized. Use 'pyocd list --targets' to see currently available target types. See <https://pyocd.io/docs/target_support.html> for how to install additional target support. [__main__]

So, my question is whether this is a bug of PyOCD, or if there is something wrong with my board. Can anyone help me out? Thank you in advance for your assistance!

It seems the value is wrong in pyocd/board/board_ids.p
You can easily work around that with:
$ pyocd gdbserver -t STM32H745XIHx

Thank you for your kind reply @mathias-arm !
But I encountered another error after executing this command. It reported a Memory transfer fault.
 $ pyocd gdbserver -t STM32H745XIHx
0001072 I Target type is stm32h745xihx [board]
0001202 I DP IDR = 0x6ba02477 (v2 rev6) [dap]
0001310 I AHB-AP#0 IDR = 0x84770001 (AHB-AP var0 rev8) [ap]
0001312 I AHB-AP#1 IDR = 0x84770001 (AHB-AP var0 rev8) [ap]
0001313 I APB-AP#2 IDR = 0x54770002 (APB-AP var0 rev5) [ap]
0001315 I AHB-AP#3 IDR = 0x24770011 (AHB-AP var1 rev2) [ap]
0001317 I AHB-AP#0 Class 0x1 ROM table #0 @ 0xe00fe000 (designer=020:ST part=450) [rom_table]
0001319 I [0]<e00ff000:ROM class=1 designer=43b:Arm part=4c7> [rom_table]
0001319 I   AHB-AP#0 Class 0x1 ROM table #1 @ 0xe00ff000 (designer=43b:Arm part=4c7) [rom_table]
0001320 I   [0]<e000e000:SCS v7-M class=14 designer=43b:Arm part=00c> [rom_table]
0001321 I   [1]<e0001000:DWT v7-M class=14 designer=43b:Arm part=002> [rom_table]
0001322 I   [2]<e0002000:FPB v7-M class=14 designer=43b:Arm part=00e> [rom_table]
0001322 I   [3]<e0000000:ITM v7-M class=14 designer=43b:Arm part=001> [rom_table]
0001323 I [1]<e0041000:ETM M7 class=9 designer=43b:Arm part=975 devtype=13 archid=4a13 devid=0:0:0> [rom_table]
0001324 I [2]<e0043000:CTI class=9 designer=43b:Arm part=906 devtype=14 archid=0000 devid=40800:0:0> [rom_table]
0001325 I APB-AP#2 Class 0x1 ROM table #0 @ 0xe00e0000 (designer=020:ST part=450) [rom_table]
0001327 W Invalid coresight component, cidr=0x0 [rom_table]
0001327 I [2]e00e3000: cidr=0, pidr=0, component invalid> [rom_table]
0001328 W Invalid coresight component, cidr=0x0 [rom_table]
0001328 I [3]e00e4000: cidr=0, pidr=0, component invalid> [rom_table]
0001328 I [4]<e00e5000:TSGEN class=15 designer=43b:Arm part=101> [rom_table]
0001329 E Error attempting to probe CoreSight component referenced by ROM table entry #5: Memory transfer fault (read) @ 0xe00f0fd0-0xe00f102f [rom_table]
Traceback (most recent call last):
  File "/home/xiazhou/.local/lib/python3.8/site-packages/pyocd/coresight/rom_table.py", line 385, in _read_table
    self._handle_table_entry(entry, entryNumber)
  File "/home/xiazhou/.local/lib/python3.8/site-packages/pyocd/coresight/rom_table.py", line 440, in _handle_table_entry
    cmpid.read_id_registers()
  File "/home/xiazhou/.local/lib/python3.8/site-packages/pyocd/coresight/rom_table.py", line 124, in read_id_registers
    regs = self.ap.read_memory_block32(self.top_address + self.IDR_READ_START, self.IDR_READ_COUNT)
  File "/home/xiazhou/.local/lib/python3.8/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
    return func(self, *args, **kwargs)
  File "/home/xiazhou/.local/lib/python3.8/site-packages/pyocd/coresight/ap.py", line 1216, in _accelerated_read_memory_block32
    return self._accelerated_memory_interface.read_memory_block32(addr, size,
  File "/home/xiazhou/.local/lib/python3.8/site-packages/pyocd/probe/stlink_probe.py", line 301, in read_memory_block32
    return conversion.byte_list_to_u32le_list(self._link.read_mem32(addr, size * 4, self._apsel, csw))
  File "/home/xiazhou/.local/lib/python3.8/site-packages/pyocd/probe/stlink/stlink.py", line 473, in read_mem32
    return self._read_mem(addr, size, Commands.JTAG_READMEM_32BIT, self.MAXIMUM_TRANSFER_SIZE, apsel, csw)
  File "/home/xiazhou/.local/lib/python3.8/site-packages/pyocd/probe/stlink/stlink.py", line 423, in _read_mem
    raise exc
pyocd.core.exceptions.TransferFaultError: Memory transfer fault (read) @ 0xe00f0fd0-0xe00f102f
0001331 I AHB-AP#3 Class 0x1 ROM table #0 @ 0xe00ff000 (designer=020:ST part=450) [rom_table]
0001332 I [0]<e000e000:SCS v7-M class=14 designer=43b:Arm part=00c> [rom_table]
0001333 I [1]<e0001000:DWT v7-M class=14 designer=43b:Arm part=002> [rom_table]
0001333 I [2]<e0002000:FPB v7-M class=14 designer=43b:Arm part=003> [rom_table]
0001334 I [3]<e0000000:ITM v7-M class=14 designer=43b:Arm part=001> [rom_table]
0001335 I [5]<e0041000:ETM M4 class=9 designer=43b:Arm part=925 devtype=13 archid=0000 devid=0:0:0> [rom_table]
0001336 I [6]<e0043000:CTI class=9 designer=43b:Arm part=906 devtype=14 archid=0000 devid=40800:0:0> [rom_table]
0001338 I CPU core #0 is Cortex-M7 r1p1 [cortex_m]
0001338 I FPU present: FPv5-D16-M [cortex_m]
0001340 I CPU core #1 is Cortex-M4 r0p1 [cortex_m]
0001340 I FPU present: FPv4-SP-D16-M [cortex_m]
0001341 I 4 hardware watchpoints [dwt]
0001343 I 8 hardware breakpoints, 1 literal comparators [fpb]
0001347 I 4 hardware watchpoints [dwt]
0001349 I 6 hardware breakpoints, 4 literal comparators [fpb]
0001354 I Semihost server started on port 4444 (core 0) [server]
0001377 I GDB server started on port 3333 (core 0) [gdbserver]
0001379 I Semihost server started on port 4445 (core 1) [server]
0001379 I GDB server started on port 3334 (core 1) [gdbserver]


Create a demo for an A/B testing example

This issue encompasses upgrading:

build a demo application scenario
update Traffic Split version (v1alpha3) #705

Note:
How to handle traffic policy conflicts? Should validations be handled in sdk? Should these validation scenarios be discussed more explicitly with the SMI community?

We have an example for canary rollouts, which should be pretty similar to A/B test barring the differences between the two strategies.


:seedling: adding contextual logging in addon pkg

Summary
Adding contextual logging
Related issue(s)
Fixes #191
For More Info:
https://www.kubernetes.dev/blog/2022/05/25/contextual-logging/
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md

/assign @zhujian7

/lgtm

/approve


Turing does not dispatch on correct sample method for NUTS and possibly other samplers

Hi all-
I discovered that Turing is not dispatching on the appropriate sample method. As a consequence, warmup/adaption samples are not being discarded and the progress bar is not working.
The MWE example shows that the number of samples returned is incorrect:
using Turing, Distributions
y = rand(Normal(0,1), 30)
@model function model(y)
    μ ~ Normal(0,1)
    y .~ Normal(μ,1)
end
n_samples = 3000
n_adapt = 1500
specs = NUTS(n_adapt, .65)
n_chains = 4
chain = sample(model(y), specs, MCMCThreads(), n_samples, n_chains, discard_adapt=false)

Running the following code indicates that the default sample method is being called rather than the intended method in Turing:
@edit sample(model(y), specs, MCMCThreads(), n_samples, n_chains, discard_adapt=false)
It appears that part of the problem is that the following evaluates to false:
NUTS <: Turing.Sampler{<:Turing.AdaptiveHamiltonian}
which prevents the method from being selected as intended.
I can confirm this problem affects Turing .15.8 on Julia 1.5.3 and Turing .15.1 on Julia 1.6 beta1.
Considering that this is returning unexpected results (I didn't notice for almost three months), would it be possible to prioritize a patch release, or help me submit a PR?
Thank you in advance.

Not sure if this will help you for the time being. Can you try
chain = sample(model(y), specs, MCMCThreads(), n_samples, n_chains, discard_initial=n_adapt)

This should discard the initial n_adapt samples used for adapting NUTS and return n_samples in the end.

Thanks. Unfortunately that does not appear to work because the default method does not have a keyword for discard_initial. It only has kwargs....

The type is not a problem, Turing wraps a all algorithms in a Sampler automatically. One just has to add an implementation of https://github.com/TuringLang/Turing.jl/blob/1a4b4e5a75d295742097e52e9bdd8ed0b7e5fd65/src/inference/Inference.jl#L205 for the hamiltonian samplers with all the keyword arguments. One has to be a bit careful since DynamicNUTS uses different keyword arguments IIRC. In the long term, probably it would be good to modify AbstractMCMC such that parallel and serial sampling support the same keyword arguments automatically.

Ok. I think I am beginning to understand. Here I will focus on the single chain case because it has a NUTS specific method, but does not discard adaption samples. When I place print statements in the code, I can trace the following sequence of method calls:
method on 127 of inference.jl of Turing
method on 135 of inference.jl of Turing
method on 110 of hmc.jl of Turing
method on 59 of sample.jl in AbstractMCMC

This last method in AbstractMCMC performs all of the sampling, but does not have a keyword for discard_adapt and the handling of adaption samples has not been implemented. So it appears that discard_adapt is not supported for any sampler, serial or parallel.

My best guess is that mcmcsample needs to be modified as follows:
function mcmcsample(
    rng::Random.AbstractRNG,
    model::AbstractModel,
    sampler::AbstractSampler,
    N::Integer;
    progress = true,
    progressname = "Sampling",
    callback = nothing,
    discard_initial = 0,
    discard_adapt = false,
    thinning = 1,
    chain_type::Type=Any,
    kwargs...
)
    println("method on 59 of sample.jl in AbstractMCMC")
    # Check the number of requested samples.
    N > 0 || error("the number of samples must be ≥ 1")
    Ntotal = thinning * (N - 1) + discard_initial + 1

    @ifwithprogresslogger progress name=progressname begin
        # Obtain the initial sample and state.
        sample, state = step(rng, model, sampler; kwargs...)
        # access nadapt in sampler somehow
        n_discarded ? max(discard_initial, sampler.nadapt) : discard_initial
        # Discard initial samples.
        for i in 1:(n_discarded - 1)
            # Update the progress bar.
            progress && ProgressLogging.@logprogress i/Ntotal

            # Obtain the next sample and state.
            sample, state = step(rng, model, sampler, state; kwargs...)
        end

        # Run callback.
        callback === nothing || callback(rng, model, sampler, sample, 1)

        # Save the sample.
        samples = AbstractMCMC.samples(sample, model, sampler, N; kwargs...)
        samples = save!!(samples, sample, 1, model, sampler, N; kwargs...)

        # Update the progress bar.
        progress && ProgressLogging.@logprogress (1 + discard_initial) / Ntotal

        # Step through the sampler.
        itotal = 1 + n_discarded
        for i in 2:N
            # Discard thinned samples.
            for _ in 1:(thinning - 1)
                # Obtain the next sample and state.
                sample, state = step(rng, model, sampler, state; kwargs...)

                # Update progress bar.
                if progress
                    itotal += 1
                    ProgressLogging.@logprogress itotal / Ntotal
                end
            end

            # Obtain the next sample and state.
            sample, state = step(rng, model, sampler, state; kwargs...)

            # Run callback.
            callback === nothing || callback(rng, model, sampler, sample, i)

            # Save the sample.
            samples = save!!(samples, sample, i, model, sampler, N; kwargs...)

            # Update the progress bar.
            if progress
                itotal += 1
                ProgressLogging.@logprogress itotal / Ntotal
            end
        end
    end

    return bundle_samples(samples, model, sampler, state, chain_type; kwargs...)
end

Essentially, I added a keyword argument for discard_adapt and created a new variable called n_discarded, which is the max of  discard_initial and nadapt from the samper object. Is this roughly what needs to be done?

No, AbstractMCMC does not have to be changed (and in general one should not add sampler/algorithm specific keyword arguments to it). The sampling logic is implemented in AbstractMCMC.mcmcsample with some default keyword arguments for e.g. thinning and burn-in periods and a catch-all kwargs... for other keyword arguments that are forwarded to all interface functions such as step etc.
Turing only implements sample by forwarding it to AbstractMCMC.mcmcsample by default in Inference.jl, with Samplers automatically constructed from algorithms. Additionally, special keyword arguments such as init_params and resume_from are handled by Turing (ans DynamicPPL). In the same way, some HMC-specific keyword arguments such as discard_adapt are handled in hmc.jl. The only problem is that there is no special implementation (with the same keyword arguments) for parallel sampling of HMC algorithms, and hence it just falls back to the default in Inference.jl that just calls AbstractMCMC.mcmcsample.

My apologies. Part of the problem is that the new way that Turing handles adaption samples differs from what I expected. If I recall correctly, CmdStan.jl will have nadapt + N samples when the adaption samples are saved. Turing always returns N, which you said earlier thought might be the case. Now that I have a better understanding of how Turing works, I believe that adaption samples are discarded correctly. Here is what I found with 4 parallel chains:
method on 199 of inference.jl in Turing
method on 214 of inference.jl in Turing
method on 227 of sample.jl in AbstractMCMC
#chain 1
method on 110 of hmc.jl of Turing
#chain 2
method on 110 of hmc.jl of Turing
#chain 3
method on 110 of hmc.jl of Turing
#chain 4
method on 110 of hmc.jl of Turing
#chain 1
method on 59 of sample.jl in AbstractMCMC
#chain 2
method on 59 of sample.jl in AbstractMCMC
#chain 3
method on 59 of sample.jl in AbstractMCMC
#chain 4
method on 59 of sample.jl in AbstractMCMC
Discarding 1500 samples
Discarding 1500 samples
Discarding 1500 samples
Discarding 1500 samples

This indicates that the parallel method in AbstractMCMC spawns 4 instances of the NUTS sample method. I also printed the thread id to verify that the chains were in parallel. If this comports with your understanding, I will close this issue. Again, sorry for the misunderstanding.
One last thing: does the documentation explain how adaption samples are handled? I could not find any information. This could be part of the problem. If that is true, I can open an issue.

What is the fix you went with for this @itsdfish? Because I just realized this as well, in all the tutorials on Turing default behavior seems to be that it automatically discards this, and it is even what I learned from the Statistical Rethinking book. So suddenly when I realized my number of samples were too many, it was quite a surprise :P
I guess for now I can just discard them manually by doing:
chain = chain[n_adapt+1:end, :, :]

In my previous post, I explain that the samplers are working correctly. I think the problem is that (1) the new treatment of adaption samples seems to be different from CmdStan, which was different from what I expected, and  (2) it appears that the documentation was never updated. So this appears to be a misunderstanding, but I think the documentation needs to be updated.
Just to be clear about how the code works, in the following example, there are 2,000 total samples for each chain and the first 1,000 are removed. So you will need to adjust n_samples in your code accordingly. Does that make sense?
using Turing, Distributions
y = rand(Normal(0,1), 30)
@model function model(y)
    μ ~ Normal(0,1)
    y .~ Normal(μ,1)
end
n_samples = 1000
n_adapt = 1000
specs = NUTS(n_adapt, .65)
n_chains = 4
chain = sample(model(y), specs, MCMCThreads(), n_samples, n_chains)

Oh wow that is confusing indeed. Yeah I see the problem now with the change and then using old tutorials. I indeed was passing in n_samples+n_adapt, while passing in n_adapt to NUTS as well, so I guess I was actually running longer chains than I thought I was. So indeed the n_samples you pass is really the number of samples you will get back. Thanks for the clarification! It's good to know how many samples I am actually running it with.

I didn't realize it changed for several months. When I realized something had changed, I thought the adapt samples were included in the chain and had a bit of panic.
I am willing to add this information to the docs if one of the developers would like me to do so.

Sure, we'd happily take more documentation!

I will add some documentation and close this issue this weekend.