cannot run k3s server

I just run k3s server. But got the error. "Waiting for containerd startup: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial unix /run/k3s/containerd/containerd.sock: connect: connection refused""
So what I missed. Is that mean I should install the containerd first?

met the same problem while using the scripts on Ubuntu 16.04.5
    curl -sfL https://get.k3s.io | sh -
    # Check for Ready node, takes maybe 30 seconds
    k3s kubectl get node

16:20 root@k3ss:~ ->  k3s server &
[1] 1433
16:20 root@k3ss:~ ->  INFO[2019-02-27T16:20:54.129418734+08:00] Starting k3s v0.1.0 (91251aa)
INFO[2019-02-27T16:20:54.130185364+08:00] Running kube-apiserver --watch-cache=false --cert-dir /var/lib/rancher/k3s/server/tls/temporary-certs --allow-privileged=true --authorization-mode Node,RBAC --service-account-signing-key-file /var/lib/rancher/k3s/server/tls/service.key --service-cluster-ip-range <IP_ADDRESS>/16 --advertise-port 6445 --advertise-address <IP_ADDRESS> --insecure-port 0 --secure-port 6444 --bind-address <IP_ADDRESS> --tls-cert-file /var/lib/rancher/k3s/server/tls/localhost.crt --tls-private-key-file /var/lib/rancher/k3s/server/tls/localhost.key --service-account-key-file /var/lib/rancher/k3s/server/tls/service.key --service-account-issuer k3s --api-audiences unknown --basic-auth-file /var/lib/rancher/k3s/server/cred/passwd--kubelet-client-certificate /var/lib/rancher/k3s/server/tls/token-node.crt --kubelet-client-key /var/lib/rancher/k3s/server/tls/token-node.key
INFO[2019-02-27T16:20:54.244202281+08:00] Running kube-scheduler --kubeconfig /var/lib/rancher/k3s/server/cred/kubeconfig-system.yaml --port 0 --secure-port 0 --leader-elect=false
INFO[2019-02-27T16:20:54.245458530+08:00] Running kube-controller-manager --kubeconfig /var/lib/rancher/k3s/server/cred/kubeconfig-system.yaml --service-account-private-key-file /var/lib/rancher/k3s/server/tls/service.key --allocate-node-cidrs --cluster-cidr <IP_ADDRESS>/16 --root-ca-file /var/lib/rancher/k3s/server/tls/token-ca.crt --port 0 --secure-port 0 --leader-elect=false
INFO[2019-02-27T16:20:54.441461048+08:00] Listening on :6443
INFO[2019-02-27T16:20:54.442529489+08:00] Writing manifest: /var/lib/rancher/k3s/server/manifests/coredns.yaml
INFO[2019-02-27T16:20:54.442833392+08:00] Writing manifest: /var/lib/rancher/k3s/server/manifests/traefik.yaml
INFO[2019-02-27T16:20:54.648478987+08:00] Node token is available at /var/lib/rancher/k3s/server/node-token
INFO[2019-02-27T16:20:54.648790424+08:00] To join node to cluster: k3s agent -s https://<IP_ADDRESS>:6443 -t ${NODE_TOKEN}
INFO[2019-02-27T16:20:54.717775321+08:00] Wrote kubeconfig /etc/rancher/k3s/k3s.yaml
INFO[2019-02-27T16:20:54.717981968+08:00] Run: k3s kubectl
INFO[2019-02-27T16:20:54.718092050+08:00] k3s is up and running
INFO[2019-02-27T16:20:54.751459222+08:00] Logging containerd to /var/lib/rancher/k3s/agent/containerd/containerd.log
INFO[2019-02-27T16:20:54.751825550+08:00] Running containerd -c /var/lib/rancher/k3s/agent/etc/containerd/config.toml -a /run/k3s/containerd/containerd.sock --state /run/k3s/containerd --root /var/lib/rancher/k3s/agent/containerd
INFO[2019-02-27T16:20:54.764530689+08:00] Waiting for containerd startup: rpc error: code = Unavailable desc = all SubConns are in TransientFailure,latest connection error: connection error: desc = "transport: Error while dialing dial unix /run/k3s/containerd/containerd.sock: connect: connectionrefused"
containerd: exit status 1

[1]+  Exit 1                  k3s server

16:36 root@k3ss:~ ->  systemctl status k3s
● k3s.service - Lightweight Kubernetes
   Loaded: loaded (/etc/systemd/system/k3s.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2019-02-27 16:36:50 CST; 4s ago
     Docs: https://k3s.io
  Process: 1340 ExecStart=/usr/local/bin/k3s server (code=exited, status=1/FAILURE)
  Process: 1338 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
  Process: 1335 ExecStartPre=/sbin/modprobe br_netfilter (code=exited, status=0/SUCCESS)
 Main PID: 1340 (code=exited, status=1/FAILURE)

Feb 27 16:36:50 k3ss k3s[1340]: time="2019-02-27T16:36:50.390778428+08:00" level=info msg="Wrote kubeconfig /etc/rancher/k3s/k3s.yaml"
Feb 27 16:36:50 k3ss k3s[1340]: time="2019-02-27T16:36:50.391199273+08:00" level=info msg="Run: k3s kubectl"
Feb 27 16:36:50 k3ss k3s[1340]: time="2019-02-27T16:36:50.391405115+08:00" level=info msg="k3s is up and running"
Feb 27 16:36:50 k3ss k3s[1340]: time="2019-02-27T16:36:50.423939072+08:00" level=info msg="Logging containerd to /var/lib/rancher/k3s/agent/container
Feb 27 16:36:50 k3ss k3s[1340]: time="2019-02-27T16:36:50.424437846+08:00" level=info msg="Running containerd -c /var/lib/rancher/k3s/agent/etc/conta
Feb 27 16:36:50 k3ss k3s[1340]: time="2019-02-27T16:36:50.445521823+08:00" level=info msg="Waiting for containerd startup: rpc error: code = Unavaila
Feb 27 16:36:50 k3ss k3s[1340]: containerd: exit status 1
Feb 27 16:36:50 k3ss systemd[1]: k3s.service: Main process exited, code=exited, status=1/FAILURE
Feb 27 16:36:50 k3ss systemd[1]: k3s.service: Unit entered failed state.
Feb 27 16:36:50 k3ss systemd[1]: k3s.service: Failed with result 'exit-code'.

Same issue on Ubuntu 18.04.2 LTS x86_64.

I could solve the error by adding an entry to /etc/hosts that resolve the hostname of the machine that runs k3s.

Can you try running with k3s --debug server to get more logs.  Also can you share the contents of /var/lib/rancher/k3s/agent/containerd/containerd.log which has the containerd specific stuff.  We will try on Ubuntu 16.04 but 18.04 is heavily tested so I'm thinking 18.04 is more specific to your (@Brian-Gaffney) setup.

I already have an entry in /etc/hosts for my machine name (<IP_ADDRESS>    media-center).
Log from running k3s --debug server: https://pastebin.com/5zLja0Uk
Contents of /var/lib/rancher/k3s/agent/containerd/containerd.log: https://pastebin.com/7WJakvz4

Here's containerd.log during a startup that gets the error
root@growth:/var/lib/rancher/k3s/agent/containerd# tail -f containerd.log
time="2019-02-27T15:09:34.099340400-08:00" level=info msg="Start subscribing containerd event"
time="2019-02-27T15:09:34.099367986-08:00" level=info msg="Start recovering state"
time="2019-02-27T15:09:34.355949707-08:00" level=info msg="Start event monitor"
time="2019-02-27T15:09:34.355993801-08:00" level=info msg="Start snapshots syncer"
time="2019-02-27T15:09:34.356004086-08:00" level=info msg="Start streaming server"
time="2019-02-27T15:09:35.248697352-08:00" level=info msg="No cni config template is specified, wait for other system components to drop the config."
time="2019-02-27T15:11:05.943482050-08:00" level=info msg="Stop CRI service"
time="2019-02-27T15:11:05.943616948-08:00" level=info msg="Stop CRI service"
time="2019-02-27T15:11:05.943676991-08:00" level=info msg="Event monitor stopped"
time="2019-02-27T15:11:05.943708954-08:00" level=info msg="Stream server stopped"
time="2019-02-27T15:13:37.742432439-08:00" level=info msg="starting containerd" revision= version=1.2.3+unknown
time="2019-02-27T15:13:37.742642946-08:00" level=info msg="loading plugin \"io.containerd.content.v1.content\"..." type=io.containerd.content.v1
time="2019-02-27T15:13:37.742680261-08:00" level=info msg="loading plugin \"io.containerd.snapshotter.v1.native\"..." type=io.containerd.snapshotter.v1
time="2019-02-27T15:13:37.742697530-08:00" level=info msg="loading plugin \"io.containerd.snapshotter.v1.overlayfs\"..." type=io.containerd.snapshotter.v1
time="2019-02-27T15:13:37.742742635-08:00" level=info msg="loading plugin \"io.containerd.metadata.v1.bolt\"..." type=io.containerd.metadata.v1
time="2019-02-27T15:13:37.742833876-08:00" level=info msg="loading plugin \"io.containerd.differ.v1.walking\"..." type=io.containerd.differ.v1
time="2019-02-27T15:13:37.742847238-08:00" level=info msg="loading plugin \"io.containerd.gc.v1.scheduler\"..." type=io.containerd.gc.v1
time="2019-02-27T15:13:37.742865676-08:00" level=info msg="loading plugin \"io.containerd.service.v1.containers-service\"..." type=io.containerd.service.v1
time="2019-02-27T15:13:37.742874737-08:00" level=info msg="loading plugin \"io.containerd.service.v1.content-service\"..." type=io.containerd.service.v1
time="2019-02-27T15:13:37.742882481-08:00" level=info msg="loading plugin \"io.containerd.service.v1.diff-service\"..." type=io.containerd.service.v1
time="2019-02-27T15:13:37.742892154-08:00" level=info msg="loading plugin \"io.containerd.service.v1.images-service\"..." type=io.containerd.service.v1
time="2019-02-27T15:13:37.742901402-08:00" level=info msg="loading plugin \"io.containerd.service.v1.leases-service\"..." type=io.containerd.service.v1
time="2019-02-27T15:13:37.742910120-08:00" level=info msg="loading plugin \"io.containerd.service.v1.namespaces-service\"..." type=io.containerd.service.v1
time="2019-02-27T15:13:37.742919227-08:00" level=info msg="loading plugin \"io.containerd.service.v1.snapshots-service\"..." type=io.containerd.service.v1
time="2019-02-27T15:13:37.742928358-08:00" level=info msg="loading plugin \"io.containerd.runtime.v1.linux\"..." type=io.containerd.runtime.v1
time="2019-02-27T15:13:37.753671287-08:00" level=info msg="loading plugin \"io.containerd.runtime.v2.task\"..." type=io.containerd.runtime.v2
time="2019-02-27T15:13:37.753711002-08:00" level=info msg="loading plugin \"io.containerd.monitor.v1.cgroups\"..." type=io.containerd.monitor.v1
time="2019-02-27T15:13:37.753939752-08:00" level=info msg="loading plugin \"io.containerd.service.v1.tasks-service\"..." type=io.containerd.service.v1
time="2019-02-27T15:13:37.754196531-08:00" level=info msg="loading plugin \"io.containerd.internal.v1.restart\"..." type=io.containerd.internal.v1
time="2019-02-27T15:13:37.754230037-08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.containers\"..." type=io.containerd.grpc.v1
time="2019-02-27T15:13:37.754241663-08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.content\"..." type=io.containerd.grpc.v1
time="2019-02-27T15:13:37.754254132-08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.diff\"..." type=io.containerd.grpc.v1
time="2019-02-27T15:13:37.754265645-08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.events\"..." type=io.containerd.grpc.v1
time="2019-02-27T15:13:37.754273952-08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.healthcheck\"..." type=io.containerd.grpc.v1
time="2019-02-27T15:13:37.754302196-08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.images\"..." type=io.containerd.grpc.v1
time="2019-02-27T15:13:37.754312831-08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.leases\"..." type=io.containerd.grpc.v1
time="2019-02-27T15:13:37.754320202-08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.namespaces\"..." type=io.containerd.grpc.v1
time="2019-02-27T15:13:37.754327416-08:00" level=info msg="loading plugin \"io.containerd.internal.v1.opt\"..." type=io.containerd.internal.v1
time="2019-02-27T15:13:37.754359429-08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.snapshots\"..." type=io.containerd.grpc.v1
time="2019-02-27T15:13:37.754369470-08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.tasks\"..." type=io.containerd.grpc.v1
time="2019-02-27T15:13:37.754378071-08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.version\"..." type=io.containerd.grpc.v1
time="2019-02-27T15:13:37.754385717-08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.cri\"..." type=io.containerd.grpc.v1
time="2019-02-27T15:13:37.754444607-08:00" level=info msg="Start cri plugin with config {PluginConfig:{ContainerdConfig:{Snapshotter:overlayfs DefaultRuntime:{Type:io.containerd.runtime.v1.linux Engine: Root: Options:<nil>} UntrustedWorkloadRuntime:{Type: Engine: Root: Options:<nil>} Runtimes:map[] NoPivot:false} CniConfig:{NetworkPluginBinDir:/var/lib/rancher/k3s/data/4df430e1473d0225734948e562863c82f20d658ed9c420c77e168aec42eccdb5/bin NetworkPluginConfDir:/var/lib/rancher/k3s/agent/etc/cni/net.d NetworkPluginConfTemplate:} Registry:{Mirrors:map[docker.io:{Endpoints:[https://registry-1.docker.io]}] Auths:map[]} StreamServerAddress:growth StreamServerPort:10010 EnableSelinux:false SandboxImage:k8s.gcr.io/pause:3.1 StatsCollectPeriod:10 SystemdCgroup:false EnableTLSStreaming:false X509KeyPairStreaming:{TLSCertFile: TLSKeyFile:} MaxContainerLogLineSize:16384} ContainerdRootDir:/var/lib/rancher/k3s/agent/containerd ContainerdEndpoint:/run/k3s/containerd/containerd.sock RootDir:/var/lib/rancher/k3s/agent/containerd/io.containerd.grpc.v1.cri StateDir:/run/k3s/containerd/io.containerd.grpc.v1.cri}"
time="2019-02-27T15:13:37.754473326-08:00" level=info msg="Connect containerd service"
time="2019-02-27T15:13:37.754559837-08:00" level=info msg="Get image filesystem path \"/var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs\""
time="2019-02-27T15:13:37.755108266-08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.introspection\"..." type=io.containerd.grpc.v1
time="2019-02-27T15:13:37.755255045-08:00" level=info msg=serving... address=/run/k3s/containerd/containerd.sock
time="2019-02-27T15:13:37.755270713-08:00" level=info msg="containerd successfully booted in 0.013295s"
time="2019-02-27T15:13:37.755516160-08:00" level=info msg="Start subscribing containerd event"
time="2019-02-27T15:13:37.755565818-08:00" level=info msg="Start recovering state"
time="2019-02-27T15:13:38.015723896-08:00" level=info msg="Start event monitor"
time="2019-02-27T15:13:38.015756057-08:00" level=info msg="Start snapshots syncer"
time="2019-02-27T15:13:38.015766765-08:00" level=info msg="Start streaming server"
time="2019-02-27T15:13:38.914524330-08:00" level=info msg="No cni config template is specified, wait for other system components to drop the config."

@Brian-Gaffney You have something that is listening on port 10250 that is conflicting.  Can you see what it is.  sudo netstat -anp | grep 10250 will help you find the PID.

@ibuildthecloud You nailed it.
I had the remnants of a vm=none minikube install still kicking around.
I've removed that and k3s seems to be working now.
Cheers.

Same issues on RHEL7.
Resolved by modifying the /etc/hosts file with the servers ip and hostname.
Additional had to stop/disable firewalld for the pods to start.

Same problem here.
In /var/lib/rancher/k3s/agent/containerd/containerd.log I see this error:
time="2019-03-02T08:29:51.846191974-03:00" level=fatal msg="Failed to run CRI service" error="stream server error: listen tcp: lookup francisco-pc on <IP_ADDRESS>:53: no such host"

So editing /etc/hosts and adding the following line did the trick for me:
<IP_ADDRESS>       francisco-pc

Maybe you have installed docker-ce before,you should make sure docker's containerd already stopped.

I had the same issue on Ubuntu 16.04.5 LTS with Ansible on Vagrant/VirtualBox. Strangely sometimes it worked, other times with connect: connection refused error on containerd.sock.
But I found out that restarting the k3s service using systemctl restart k3s seems a workaround. Altough the error still contains in the logs after restart, it seems only temprorary. After waiting a few seconds, container got started as expected.
Currently I'm working around this with the following tasks:
  - name: Wait for containerd log
    become: yes
    wait_for:
      path: /var/lib/rancher/k3s/agent/containerd/containerd.log
  - name: Get containerd log
    shell: grep -i 'no cni' /var/lib/rancher/k3s/agent/containerd/containerd.log
    # Avoid ansibles error triggering when grep has no match and return 1: https://stackoverflow.com/a/41010653/3276634
    failed_when: "containerd_log.rc == 2"
    become: yes
    register: containerd_log

  - name: Restart k3s
    shell: systemctl restart k3s
    become: yes
    when: containerd_log.stdout != ""

@kaitoy It's cool. It works. But just on the server. When I join the node ,it's node working.
@ibuildthecloud Here is the log.
containerd.log

@Prodian0013 @franciscocpg  Thanks. It's working when run the command "k3s server".But when I join the node,it's failed.Here is the agant log with containerd.
containerd.log

None of these solutions have worked for me on ArchLinux. I indeed have the same DNS lookup issue during containerd's startup:
time="2019-03-20T16:18:25.956608221-06:00" level=error msg="Failed to start streaming server" error="listen tcp: lookup catbox on <IP_ADDRESS>:53: no such host"
time="2019-03-20T16:18:25.956684986-06:00" level=info msg="Stop CRI service"
time="2019-03-20T16:18:25.956739211-06:00" level=info msg="Event monitor stopped"
time="2019-03-20T16:18:25.956761676-06:00" level=info msg="Stream server stopped"
time="2019-03-20T16:18:25.956784492-06:00" level=fatal msg="Failed to run CRI service" error="stream server error: listen tcp: lookup catbox on <IP_ADDRESS>:53: no such host"

I can do ping catbox and it does reply, albeit with the ipv6 address. I doubt that's the problem though. I could put a temp entry in my DNS server and see if that allows me to get past this but, this is a laptop on a dynamic IP, if I choose to work from anywhere that doesn't allow me to do that.... Point is, /etc/hosts should be good enough.
I do not have anything else running on port 10250.
I've tried installing this just as a download, and via the curl command (which does a few nice things) How do I go about troubleshooting this deeper?

Thanks to @kaitoy and @franciscocpg.
The error occured to me logged in  /var/lib/rancher/k3s/agent/containerd/containerd.log  is shown below:
msg="Failed to start streaming server" error="listen tcp: lookup app1 on [::1]:53: read udp [::1]:40954->[::1]:53: read: connection refused"

Although the hint is not no such host, I try to add <IP_ADDRESS> app1 to the /etc/hosts and it works.
Hope this helpful!

FATA[2019-05-08T14:42:54.921767227+09:00] :apiserver exited: failed to create listener: failed to listen on <IP_ADDRESS>:6444: listen tcp <IP_ADDRESS>:6444: bind: address already in use
Can anyone point out how to resolve this issue?

FATA[2019-05-08T14:42:54.921767227+09:00] :apiserver exited: failed to create listener: failed to listen on <IP_ADDRESS>:6444: listen tcp <IP_ADDRESS>:6444: bind: address already in use
Can anyone point out how to resolve this issue?

Something is already using port 6444.  Figure out what that is and stop it to be able to start apiserver or move apiserver to use an unused port.  On the linux I use "netstat -anp | grep 6444" would be what I would use but different linux flavors may be different.

I solved it by # apt purge docker.io which is installed by default on AWS Ubuntu 18.04 LTS x86_64

I had same error. Previuosly there was runned a k3s as a server, not as agent.
For fix this error:

stop a k3s service. (systemctl stop k3s)
run k3s agent (sudo k3s agent --server ${K3S_URL} --token ${K3S_TOKEN})

Linking #495 here since they share a similar log profile, and this ranks much higher.


Test plan item marked as invalid even though it is not

Sample valid TPI -  https://github.com/microsoft/vscode-internalbacklog/issues/4693
Open it and label as test-planitem

🐛 BOT invalidates it because the ref issue is not found even though it exists.
CC @lszomoru

I believe that this will happen to all TPIs that are created in vscode-internalbacklog that reference an issue in vscode.


Feature request: Whiteboard

Do you have any plans to add this useful feature ?

Please see duplicate #8


Check for Deployments before registering Clients

Originating issue: IBMPrivateCloud/roadmap#62692

Check for platform-identity-provider Deployment availability before attempting OIDC registration
Check for platform-identity-management Deployment availability before attempting Zen registration
Cluster subreconciler definitions together and in order of execution

we need to give 3.x client Administrator role in 4.x:
https://github.ibm.com/IBMPrivateCloud/platform-identity-provider/blob/4.4.0/server/boot/z_cp3migration.js#L212


Add whether the switch configuration is temporary

Describe what this PR does / why we need it
Add whether the switch configuration is temporary
Does this pull request fix one issue?

Describe how you did it
NacosDiscoveryProperties add enabled attribute in NacosServiceRegistry# getNacosInstanceFromRegistration initialized into the Instance class
Describe how to verify it
Special notes for reviews

@fangjian0423 Please take a look,thank you.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

the pr will be closed , you can reopen it after resolve conflicting files . thks


Investigate if we could replace mysql with Clickhouse

Description
Some user with big team may produce huge amount of data, in that case, we need some more scalable dbs for data storage.
Describe the solution you'd like
Investigate if we could replace mysql with Clickhouse seamlessly, if not, how much effort we should make to support Clickhouse
Has the Feature been Requested Before?
No
Checklist

[ ] Check if Tables can be created automatically on devlake startup
[ ] Check if data can be inserted into database
[ ] Check if data can be updated
[ ] Check if dashboards worked

moved to next milestone

Not suitable for our scenario


Must use bash, not sh

line 39 in 03_participant_run.sh uses a bash-only syntax

Thanks for the heads-up.
Those commands are meant to be executed from within our singularity container, whose default interpreter is bash. You had an issue running those scripts from outside the container right ?

The script is run outside the container. The ${@:2} substitution happens outside the container though, and that is where bash is required.  Your shebang in the file is correct, just the readme was wrong.


Search box

Hi Kate,
I was wondering how would I be able to add search to the theme. Specifically interested in adding this https://github.com/Windyo/ghostHunter/.
Any guidance is hugely appreciated.

Hi I have now managed to get the search working. I dont know if it is the best way but atleast it works.
I included the following code in fp_header.hbs and post_header.hbs after  to get the search box displayed on right hand side. I also added the ghosthunter javascript file in /assets/js.
The searchbox border colour and search button colour also is aligned to the theme colour. I will put this code on my pull request. If you think it is fine, please do merge it.

<form style="text-align:center">
        <input id="search-field"type="text" name="query" style="margin:0.2em;border-color:#F2C20F; border:1px solid #F2C20F;" />
        <input type="submit" value="Search" style="background-color:#F2C20F; color:white; border:#F2C20F;margin:0.2em"/>
</form>


Merge Develop to Master 11.30.17 - Removing video, fixing broken links, updating segment limit

Description of the change:
Reason for the change:
Link to original source:

Closes #

Hello @Whatthefoxsays,Thanks again for the PR! We appreciate your contribution and look forward to                                              continued collaboration. Thanks!                                             Team SendGrid DX


More descriptive panic when running out of enum variants

cc @vi does this look like what you had in mind? (Can you test it with the broken commit of your project to make sure it works as intended?)

thread 'main' panicked at 'Expected one of [Int, StrLit, ] when parsing Obj, got [Pair { rule: quote, span: Span { str: "\'1", start: 0, end: 2 }, inner: [Pair { rule: obj, span: Span { str: "1", start: 1, end: 2 }, inner: [Pair { rule: int, span: Span { str: "1", start: 1, end: 2 }, inner: [] }] }] }]', step1/src/parse.rs:63:21

Looks better. Can it be an error instead of panic by the way?

The signature of FromPest is designed to be infallible.
That is, a missing variant is a mistake on the programmers side, not an expected failure mode.
Parsing itself (pest's part of the process) is fallible. But once you've parsed it, there's structure, and the FromPest transformation relies on its view of that to be accurate. (I plan on adding some amount of static checking in the future that should catch things like this, so long as I can actually get a full view of the world.)

Pest grammar can do a preliminary check for correctness of, for example, number (just to discriminate it from other things), and FromStr can do the actual checking...


Allow fixed virtual MAC for DHCP VIPs

Use IP instead of MAC address to determine if the virtual interface was already previously configured. This makes it possible to pre-define kube-vip.io/hwaddr annotation on a LoadBalancer and therefore allows defining a static DHCP lease for it.
You can test this by using valtzu/kube-vip:v0.5.0 instead of ghcr.io/kube-vip/kube-vip:v0.5.0.
Closes #354

@yaocw2020 can you have a quick look at this?


PostgreSQL support

Current DB queries
DB::statement('CREATE TABLE ' . self::TABLE_WORKING . ' LIKE ' . self::TABLE . ';');
are not supported by PostgreSQL.
Throws error.

Agree, the package is MySQL-dependent. Please add PG support

True story.
Feel free to address this in a Pull Request if you want.
I took a look at this a while back, and it would require some reworking that I didn't have time for.
No plans on revisiting it in the near future, but you're free to.


Add ability to convert varbinary to varchar

We need a way to convert bytes to characters. This should support UTF-8 and ideally all other encodings (basically anything Java supports). Additionally, there are multiple ways to deal with invalid data, all of which should be available:

raise an error
return null
ignore invalid bytes
replace the character with
the Unicode "REPLACEMENT CHARACTER": http://www.fileformat.info/info/unicode/char/0fffd/index.htm
a user specified replacement character (or string)

Looks like we have from_utf8 now. Shall we close this?


⚠ Bofrost.lu has degraded performance

In f3bb03d, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 2075 ms

Resolved: Bofrost.lu performance has improved in cb33da4 after 10 minutes.


Supports for inline links

From @Dinoel27, we should support inline links in text, like link
So something like
<mr-text>
This is an example.
</mr-text>

I was also curious if we need/could embed iframe code?
Here is a link to a Gaussian Splat made with Luma Labs Ai:

Could we embed this code into a page?
And yes, here is a link I was trying to embed earlier:
https://lumalabs.ai/embed/a6718e60-5854-4ded-b073-12a88a461265?mode=sparkles&background=%23ffffff&color=%23000000&showTitle=true&loadBg=true&logoPosition=bottom-left&infoPosition=bottom-right&cinematicVideo=undefined&showMenu=true
Thank you

consolidating to #214


serverReadyAction does not work as documented

VSCode Version: 1.44.2 / 1.45.0-insider
OS Version: Windows 10 Pro 1909 Build 18363.778

Steps to Reproduce:

Run the following commands

C:\temp> git clone https://github.com/davidsk/serverReadyActionTest.git
Cloning into 'serverReadyActionTest'...

C:\temp> cd .\serverReadyActionTest\

C:\temp\serverReadyActionTest [master ≡]> npm install

C:\temp\serverReadyActionTest [master ≡]> code .

Code will be launched and have opened the serverReadyActionTest folder

Press F5

The debugger will start but no browser window will be opened.  In order to open a browser window, set the "console" option to "integratedTerminal".

Does this issue occur when all extensions are disabled?: Yes

/duplicate 95108


[stable/jenkins] Use same JENKINS_URL no matter if slaves use different namespace

What this PR does / why we need it:
JENKINS_URL is used by kubernetes plugin
to tell build agents how they can connect to the Jenkins master.
So far there have been different URLs depending if Master.SlaveKubernetesNamespace
has been set.

http://{{ template "jenkins.fullname" . }}.{{.Release.Namespace}}:...
http://{{ template "jenkins.fullname" . }}:...

Looking up the Jenkins namespace can be done using the first setting in both cases.
I also added the svc.cluster.local suffix to make it a fully qualified entry.
See https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
This helps in case you configure a proxy via environment variables in you pod template
as .svc.cluster.local is typically part of no_proxy settings. So the same no_proxy
setting can be used no matter in which namespace Jenkins is deployed.
Otherwise the {{.Release.Namespace}} must be configured in no_proxy variable.
Signed-off-by: Torsten Walter<EMAIL_ADDRESS>Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md

/assign
/ok-to-test

@maorfr: Could you have a look at this again?

/lgtm
Nice!

Hi @torbjornvatn and @maorfr.
Using hardcoded fqdn for the service is causing issus on clusters where the dns is not cluster.local, for example, my cluster was created with play-cluster.local and the agent could not connect to the master and result in the following error:
SEVERE: Failed to connect to http://jenkins.test.svc.cluster.local:8080/tcpSlaveAgentListener/: jenkins.test.svc.cluster.local
java.io.IOException: Failed to connect to http://jenkins.test.svc.cluster.local:8080/tcpSlaveAgentListener/: jenkins.test.svc.cluster.local
	at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:196)
	at hudson.remoting.Engine.innerRun(Engine.java:523)
	at hudson.remoting.Engine.run(Engine.java:474)
Caused by: java.net.UnknownHostException: jenkins.test.svc.cluster.local

Since the config is not part of the values, one cannot just change the dns.
To avoid changing it directly in the Jenkins Settings, I've omitted the svc.cluster.local from the config.yaml and recreated the chart.
This time everything worked.
Regarding the FQDN, the pod can resolve everything inside the namespace that it is running on, so http://jenkins:8080 resolves to http://jenkins.test.svc.play-cluster.local:8080

It's true that the pod can resolve the FQDN within the same namespace. However that won't work if agents are running in a different namespace then the master.
You're right that hardcoding dns zone is not a good idea either if that one can be customized within the cluster. Would you mind creating a PR which makes the zone configurable via property and set the default within values.yaml to ckuster.local?
Adding this for reference https://github.com/kubernetes/dns/blob/master/docs/specification.md
Might be an option to add it as comment within values.yaml.

Sure, I have the commit ready, however, I'm getting 403 when attempting to push my changes.
What do I need to do in order to be allowed to submit code changes?

Fork the repository. Create a branch there and push changes  to your fork. From there you can create a PR.


feat: initial layout element setup

Implemented changes
This is the initial release of the new eox-layout element. It should facilitate the creation of user interface layouts based on a 12/12 grid. Initial features:

eox-layout and eox-layout-item elements
gap attribute for eox-layout
configurable for eox-layout-item: x (coordinate), y (coordinate), w(idth) and h(eight)
it has basic reactivity, meaning once attributes change, the layout re-renders

Future evolution might include features such as creating a layout from JSON, responsive layouts etc.
Screenshots

Checklist before requesting a review

[x] I have performed a self-review of my code
[x] I have added a test related to this feature/fix
[x] For new features: I have created a story showcasing this new feature
[x] All checks have passed
[x] The PR title follows conventional commit style and reflects the type of change (major/minor/patch, breaking)
[x] The PR title describes the change within this element (each merged PR equals one entry in the element's changelog!)

I'm wondering about how content with a fixed aspect ratio would look like, i.e. a square satellite image. Will it be able to have grid cells that are completely square (even if this means that the 12 rows would overflow the viewport)?

I'm wondering about how content with a fixed aspect ratio would look like, i.e. a square satellite image. Will it be able to have grid cells that are completely square (even if this means that the 12 rows would overflow the viewport)?

@StefanBrand good question, and a potential first feature expansion. Currently the grid is contained within the parent, which means a square grid item would squish all other items a bit, and the items of the entire row would be square (applied to item 0/4 in this example):

You can also specify the aspect ratio of a single item, but that would cause some overflow issues with other items.
But we could consider letting the grid overflow in case there is a square item.

Thanks everyone for the feedback!


scriptSrc type is optional

Hello, what is the point of making the "scriptSrc" parameter optional?

Hello, what is the point of making the "scriptSrc" parameter optional?

otherwise it requires the scriptSrc
if scriptSrc is not a required parameter, it will be taken from the file with types, I think this makes sense


[logstash] request to be able to test the pipeline configuration before upgrade a release.

Describe the feature:
Firstly, logstash is deployed as a statefulset which differs from deployment when upgrading the release.
StatefulSet will terminate one pod and create a new one with the new configuration. And doing the same when the newly created pod is ready. If we have 2 replicas of the statefulset, it will be only one pod before the newly created pod become ready.
If we are in a bad situation, the invalid pipeline configuration will block the upgrade of statefulset. And it takes time to let us notice the error.
So we think it could be very helpful if we can test the configuration before each upgrade.
Describe a specific use case for the feature:

Hi @FuyuanChu, I think the best way is that you test the upgrade in a dev environment or eventually some local K8s with Minikube or any alternative before applying the upgrade to production.

Thanks for the rely @jmlrt
The problem we are facing now is developers only use the production environment as they need real user data. I know that is anti-pattern but can't argue with biz requirements.
Hopefully, they adopt the CI/CD pipeline automation, we built a job testing the logstash pipelines.


Add support for Mule 3.7

Work began in branch: feature/mule370

Raised java compile (source and target) level from 1.6 to 1.7 both for in soitoolkit parent-pom and the default-parent pom for generated components.

SFTP transport is currently defunct for Mule 3.7.0, some change in the transport since 3.6.1 broke the integration tests we use.
Removed SFTP from generator tests for now, follow up in issue #401.

Released in: 2.0.0-M6


Refactor the frontend communication protocol implementation

This PR addresses #235 by:

Moving the message serialization/deserialization implementation into a separate file
Adding a prototype implementation of the state synchronization protocol, in a separate file
Moving websocket connection and send/receive logic into a separate file

This PR does not:

Decompose the list synchronization protocol implementation into a separate file (let's do this in a separate PR)

For records-keeping:

This project is licensed under Apache License v2.0 for any software, and Solderpad Hardware License v2.1 for any hardware - do you agree that your contributions to this project will be under these licenses, too? Yes
Were any of these contributions also part of work you did for an employer or a client? No
Does this work include, or is it based on, any third-party work which you did not create? No


improve independent webhook

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage

/kind enhancement
What this PR does / why we need it:
Because of Group is empty for node and pod resource, so webhook paths are not registered correctly.
The detail logs are as following:
I0618 03:23:08.492989       1 webhook.go:158] controller-runtime/builder "msg"="Registering a mutating webhook" "GVK"={"Group":"","Version":"v1","Kind":"Node"} "path"="/mutate--v1-node"
I0618 03:23:08.493039       1 server.go:183] controller-runtime/webhook "msg"="Registering webhook" "path"="/mutate--v1-node"
I0618 03:23:08.493061       1 webhook.go:189] controller-runtime/builder "msg"="Registering a validating webhook" "GVK"={"Group":"","Version":"v1","Kind":"Node"} "path"="/validate--v1-node"
I0618 03:23:08.493085       1 server.go:183] controller-runtime/webhook "msg"="Registering webhook" "path"="/validate--v1-node

so add a new func named RegisterIndependentWebhook  to deal with these kind of webhook registration.
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

Does this PR introduce a user-facing change?

other Note

/LGTM

/LGTM


--datadir <existing testnet datadir> will launch the installer

It should just launch the GUI with the existing datadir.

because multiple network setups can be in the same datadir, we should rely on a flag targetting the wanted network

--datadir <> will check for the default mainnet setup
--datadir <> --testnet will check for the testnet setup
etc

Or you could do like revaultd, which takes only the path to a config file (which you do already) and this config file contains the network. So datadir.push(network_name) and then if datadir exists, don't launch the installer.

What I prefer in term of UX experience:
the user do revault-gui --datadir <> to install and then revault-gui --datadir <> (--tesnet if he setup testnet with the instaler) to run, He should not have to guess which file was generated to give it to gui

Hmm then you can already the fetch the config file if they are giving you the datadir? (if the dir actually exists)
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Le mercredi 8 septembre 2021 à 11:49 AM, Edouard @.***> a écrit :

What I prefer in term of UX experience:
the user do revault-gui --datadir <> to install and then revault-gui --datadir <> (--tesnet if he setup testnet with the instaler) to run, He should not have to guess which file was generated to give it to gui
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

Users may have different gui config in datadir,
after the installer is done with a testnet setup, a revault_gui_testnet.toml is created.
So the user could have to choice:

use --conf datadir/config_gui_testnet.toml
use --datadir datadir --testnet


Gorajan boost not working with 3 pieces equiped

I have 3 pieces of the gorajan occult set on and it's not giving me a boost even though it says it works per 3 pieces equiped. I have the gorajan occult helmet, gorajan occult top and gorajan occult legs all equipped in my magic gear but when sending a dungeon it isn't showing me getting any boost. Just showing the boost for having scroll of teleportation unlocked.

It works based on full sets' equipped, not per piece.


Implement GpioX methods on generic GpioPin

Many functions like into_input or into_output are implemented on the specific GpioX pins, but not the generic GpioPin.
Especially when trying to write ergonomic libraries, this makes things fairly hard. E.g. if I want to greate a generic output which can be attached to any GPIO, I'd want a user to only tell me which pin to use and the lib would take care of initializing it. At the moment I have to decide (as far as I can see) either to take a generic pin, or to handle initialization.
This might be related to #66 which I think is a similar situation and one I'd expected to work too.

In terms of type safety, it makes sense for into_output and so forth to only be implemented on the specific pin types. This allows common mistakes to be caught at compile time, such as trying to use an input-only pin as an output pin.
IMHO, an ergonomic lib function taking pins as arguments would simply do the following...
use embedded_hal::digital::v2::{OutputPin, InputPin};

pub struct SomePeripheral<ResetPin, IntrPin> {
    reset: ResetPin,
    intr: IntrPin,
}

impl<ResetPin, IntrPin> SomePeripheral<ResetPin, IntrPin>
where
    ResetPin: OutputPin,
    IntrPin: InputPin,
{
    pub fn new(reset: ResetPin, intr: IntrPin) -> Self {
        Self { reset, intr, }
    }

    pub fn reset(&mut self) -> Result<(), ResetPin::Error> {
        self.reset.set_high()
    }
}

Note that this library is, so far, also platform-independent.
Then yes, the ESP32 user has to do a little initialization, but nothing absurd:
fn main() {
    let peripherals = Peripherals::take().unwrap();

    let mut my_periph = SomePeripheral::new(
        peripherals.pins.gpio5.into_output().unwrap(),
        peripherals.pins.gpio6.into_input().unwrap(),
    );

    my_periph.reset().unwrap();

    // ...
}

The little extra boilerplate there is worth every penny, frankly.

I agree, my confusions was, that the InputPin trait of the esp-idf-hal does not implement is_high and similar. Also I wanted to use the subscribe() method on pins, but that one does indeed seem to not be possible in a generic way as far as I can see, since the embedded_hal (version 1.0.0-alpha.8) only offers a blocking way and the esp_idf_hal::gpio::SubscribedPin trait doesn't offer a subscribe function too.
Since this question was resolved, I will close the issue - thanks for your support.


docs(misc/Getting Started): Add spaces after markup headers

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Quick fix to the markdown.
What is the current behavior? (You can also link to an open issue here)
Markdown headers are not rendered correctly.
What is the new behavior (if this is a feature change)?
Markdown headers are rendered as such.
Does this PR introduce a breaking change?
No
Please check if the PR fulfills these requirements

[ ] The commit message follows our guidelines: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

Other information:

License agreement signed.


Update decorator property in runtime

Its possible to update an decorator property in runtime?
My problem is the following, I have a component that uses the LazyLoad decorator like this:
@lazyload({     once: true,     offset: 200,     overflow: false })
But, I need update the property overflow in runtime of my component, because I receive that value as prop from parent component.
How I can do this? Can anyone help me with a solution or a workaround?

based on your situation, maybe you should just use the LazyLoad component

Yes, I created a HOC to do this... Thank you


How will i do a pagination or lazy loading?

Hey @arunkrishna39, Sorry I don't have either functionality implemented, but I do plan on implementing Lazy Loading when my current application development process is at this stage.

@brh55 Eagerly waiting!

@brh55 Now that masonry implements flatlist, we should have this feature with onEndReached and ListFooterComponent right?

@srameshr I believe the answer is no, not yet. @brh55's implementation of FlatList has not been merged yet. See #39

@kmcgill88 Flatlist has been merged, but the FlatList has been wrapped by a ListView which has been deprecated.

@srameshr do you think that if we add our own implementation in FlatList's onEndReached() and onRefresh(), we could do ininite scroll/pagination out of the box?

What I am doing right now is, passing refresh component to ListView.
Can you do a FlatList rewrite of the ListView implementation under Masonry.js

I've done a FlatList rewrite within the experiment branch -- it works, but not efficiently. Looks to be some sort of delay with the re-render time.

guys, I dig deep into the code, and saw that FlatList is present inside Column.js (master branch). Now, I tried to add methods like onEndReached(). I noticed it is called during rendering when images are loading.. But if I try to manually scroll down, it doesn't get called. Any idea what to do so we can have FlatList's onEndReached() method works to enable pagination?

@brh55 can you confirm that FlatList rewrite is only for 0.3.x version?
@srameshr do you mean to create a FlatList rewrite for the master/0.4.x/latest one?

@brh55 I am on the master branch and there is an big delay during inital rendering.
There are two things here:

These is a ListView inside Masonry.js
There WAS list view inside Column.js but now it has been converted to flat list.

I am guessing that the ListView inside Masonry.js is responsible for the terrible rendering time.

If ListView is responsible then it's most likely the dataSource diff function. A quick way to check this is with removing line 19 + 42 in masonry, and replacing rowHasChanged with returning true and seeing if perhaps this is where the issue may lie.

@srameshr Could you give that a try on your app, and see if you notice any improvements?

@brh55 Nope! Its still the same. It takes 15 seconds to render just one image.

@brh55 I got it. I think its because of the remote images. If I serve it with static images, it renders in a flash but when the images are remote, it takes 15 seconds at minimum.
I'm assuming its because you are calculating the dimensions of the image before rendering.
Is it possible to just render the grid with minimumHeight and then insert images after it has been downloaded and the dimensions are calculated?

What are your image sizes? It's deceiving on the apps and this component because they are resizing, but good role of thumb is 300kb or less.

2.7 MB 😝
Im using a resizer now!

@srameshr best way to kill my bandwidth 🗡

@brh55 Sorry for that. Il make sure I cross verify before posting an issue.

@srameshr  haha no worries

Were you guys able to implement pagination by using flatlist's onRefresh/onEndReached() methods?

@vvavepacket Since the Masonry.js file still has ListView, I do something like https://github.com/brh55/react-native-masonry/issues/51.
See the last but one comment in that.

@srameshr i see that #51 is for pull to refresh. Did you tried about doing continous loading, like when user reaches bottom of list, the flatlist will continosuly fetch new data and add it?

No, I have not yet tried that. But hopefully by the time I need it, ListView gets replaced by FlatList under masonry which supports InfinteLoading and Pull to refresh.

@brh55 I think the elements in the grid that are not downloaded should have an empty placeholder at least with a loading icon. See the demo attached. After I refresh the view, the GIF that is in the second position is not rendered until its completely loaded.

Hello guys!
How's it going?
Is it possible now to do loadMoreResults on onEndReached?

@brh55 so infinite loading is a feature that lot of people are waiting for. FlatList provides it out of the box since it inherits ScrollView props.
So, until the ListView remains in Masonry.js, I dont think there is any way to provide this feature.

@srameshr I feel you, give me some time to think about a good way to implement this. I have two possible ways, but unsure of the potential and can foresee a lot of potential bugs arrising

How are we guys 👍

@brh55  let us know if u need to test out your idea :) we are ready testers any time :) , this feature looks promising and is in great need and will make plugin more awesome

Hey guys! Any news about the infinite loading/scroll feature? Is it working now?

+1
On Mon, Mar 26, 2018, 14:27 David<EMAIL_ADDRESS>wrote:

Hey guys! Any news about the infinite loading/scroll feature? Is it
working now?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/brh55/react-native-masonry/issues/32#issuecomment-376265076,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH6U2r3KxDomAG4DfJKLQ-Y-5G2T-u4Qks5tiTL2gaJpZM4ObS55
.

+1

@davidsamacoits @vvavepacket Sorry ya'll been extremely busy at work and have had to put off a lot of OSS activities. So I'm definitely looking for co-maintainers, open for PR's and we can put together an implementation on this.

@brh55 is this done? Eagerly waiting for this feature.

@abhinav011085 There is lazy load, it's not actually documented officially, but it's shown in the example.


Prefetch causing button to keep hover state

Bug report
Describe the bug
Prefetch causing button to keep hover state when navigating to same page with different query parameters.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:

https://start-the-convo-app-staging.herokuapp.com
Click Take the Quiz
Click past name questions until you get to "Do you have children?" question.
Click yes and notice yes button will be in hover state for "Do you have a house" question
This is only on IOS (Safari and Chrome). Currently we are removing the colors for hover state so you will have to inspect dom to see the button is in a hover state

Expected behavior
The button will not be in hover state after navigating from page to page.
Screenshots
If applicable, add screenshots to help explain your problem.
System information

OS: IOS
Browser: [chrome, safari]
Version of Next.js: [e.g. 8.0.0]

Additional context
Add any other context about the problem here.
We have been following this example for prefetching with nextjs and apollo using Router.push https://shaleenjain.com/blog/nextjs-apollo-prefetch/

This doesn't sound like a Next.js issue or bug, more like a usage issue. Can you post your question on https://spectrum.chat/next-js 🙏 Thank you!


document for difference between const var and let

Documentation for Difference Between Const, Var and Let
Description 📜
In depth and detailed explanation for difference between const, var and let focusing on little nuances such as initializing, reassigning and associated errors.
Fixes #395

Type of change 📝

[ ] Au#dio (Should be in mp3 format Includes speech clarity, Concise ,Low distortion)
[ ] Vi#deo (Animations, screen-recordings, presentations and regular explanatory films are all possibilties etc)
[x] Documentation (Content Creation in the form of codes or tutorials)
[ ] Other (If you choose other, Please mention changes below)

Domain of Contribution 📊

[ ] Android Dev #(Flutter)
[ ] Android Dev #(Java)
[ ] Android Dev #(Kotlin)
[ ] Backend Dev #(Java)
[ ] Backend Dev #(.NET)
[ ] Backend Dev #(PHP)
[ ] Backend Dev #(Python)
[ ] C/#CPP
[ ] Competitive #Programming
[ ] Cyber #Security
[ ] DS#A
[ ] Data#base
[ ] Datascience with #Python
[ ] Datascience with #R
[ ] Frontend Dev #HTML/CSS/JS
[ ] Frontend Dev #React/Angular/Vue
[ ] Go#lang
[ ] Interview #Prep
[ ] Java_#Domain
[x] JavaScript
[ ] ME#RN
[ ] Machine #Learning
[ ] Open #Source
[ ] Python_#Domain
[ ] Ru#st
[ ] Statis#tics
[ ] UI/#UX

Checklist ✅

[x] I follow Contributing Guidelines & Code of conduct of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I'm GWOC'21 contributor

Screenshots / Gif (Optional) 📸

@dhruvjain896 Please follow the contribution guide for formatting issues and PRs: https://github.com/girlscript/winter-of-contributing/blob/Javascript/JavaScript/CONTRIBUTING.md

@paramsiddharth Can you please assign this issue to me?

I can! But this is PR. :) Please comment below #395 or any other issue to be assigned. Good luck!

@dhruvjain896 The documentation for this issue has already been merged! Also, you haven't located the document in the right folder.
Thank you so much for the amazing PR! You can create a PR improving the merged document or add your contribution in another format. Additionally, you can create multiple PRs for different issues, or create your own based on the roadmap here: https://github.com/paramsiddharth/gwoc-js-roadmap/releases/latest/download/JavaScript.Roadmap.for.GWoC.pdf
Good luck! :) Do join our acknowledgement session on Saturdays, 7 PM! We'd love to see you there.


Static Learning Phase ignored on CNTK

While working on a bigger PR for the behaviour of Learning Phase on BatchNormalization, I noticed that there is a bug on the CNTK backend that affects how it handles static learning phases. It seems that when the user sets a static learning_phase, it is ignored. I believe the bigger PR requires building a case and thorough discussion, so I decided to split the changes into 2 parts (I will soon document the problem on BN and submit another PR).
What's the problem on CNTK:

The current implementation of learning_phase on CNTK requires it to always be a tensor; it can never be an integer even when it is set statically.
Unfortunately multiple methods on training.py check if isinstance(K.learning_phase(), int) to decide if the learning phase is static.
Since the learning_phase on CNTK is never an integer, if the user sets K.set_learning_phase(1) it is ignored.

Things to know about this PR:

On the first commit of this PR, I added a test which fails on the current master. The test shows that BatchNormalization operates in test-mode even when the user explicitly sets learning_phase to 1. After applying the patch all tests pass.
This fix addresses the problem but it's not an elegant solution. If we don't like it, I'm happy to update or close the PR and someone else can provide a better solution.
I have never worked with CNTK backend before. So I would really appreciate a thorough review from any of the people who wrote the CNTK backend (@taehoonlee, @fchollet, @souptc or @ozabluda)

thanks @datumbox to bring this up. It looks when I implemented the "learning_phase" in cntk_backend, my understanding is not accurate. Let me try to make sure I understand correctly now:
In keras, "learning_phase" by default is a scalar placeholder which is an input of the graph. But if user call "set_learning_phase" with a given value, "learning_phase" will turn to a static flag. When create keras_train/test_function, if "learning_phase" is not integer (the default case), we will append the "learning_phase" flag to inputs.
Is my understanding correct? If yes, I think I can wrapper this logic inside cntk_backend without impact keras layer. Let me try some experiment and come back later.
one question: what will happened if user at beginning create some keras layer with default "learning_phase" setting (the dynamic one), then call "set_learning_phase" to make it static flag with other layers? is this a valid case?

hey @souptc, thanks for having a look, much appreciated mate.
I believe your description is accurate based on what I saw on the code of the other backends. I also see your point for when you switch from dynamic to static; effectively changing it like that can mess up the graph. I typically avoid switching around learning_phase while I'm in the middle of operations.

Is my understanding correct? If yes, I think I can wrapper this logic inside cntk_backend without impact keras layer

Sounds good to me. This would be preferable.

Agreed. :)
@souptc could you please let me know when your PR is submitted? I have another PR that depends on fixing this issue. I'll also close this PR as soon as yours is merged.

@fchollet quick question. What is the timeline for releasing the next Keras version? I'm working a change on the behaviour of BatchNormalization layer; the code is ready but I need to document the "what and why". Any clue when the next release will happen?
To cut the long story short, my proposal is to make BN operate in test-mode when trainable = False. I'll follow up with theoretical explanations of why we want this, examples and a properly documented PR.

@datumbox , I create a pr #9952 to address this. I also include your test case. please help to take a look.

Closing PR as @souptc solution is more elegant and localized to the CNTK backend.


REL: v0.8.1

Updated version numbers for release v0.8.1

I wasn't entirely sure which version number we wanted to bump, but I think we should do 0.9.0 since there are new "features" here as well and it isn't just the CLI fix.


Secure copy takes a long time

When deploying SDN Express to VMM it uses over a day to copy the templates. You have any idea why? The whole lab is running from a NVMe.

And then it fails, this is the second time I am trying.

this scenario is created by @AndreasSobczyk. Mine is just S2D and SDN. @AndreasSobczyk, do you have an idea here?

Thank you. I may also add that I had to change the names of the image files (swap what is Core and not) or the DC would install as core. It did that correctly but I had no way to use the VMM Console. Or is that by design?

Like during 2_createparentdisks? Maybe LabConfig is bit off. To be honest, I did not validate these scenarios. You may want to give try to this one https://github.com/microsoft/WSLab/tree/master/Scenarios/S2D and SDN - but I'm struggling with making Windows Admin Center work.

Yes, during createparentdisk. I have already used the Scenarios for making working S2D with the cluster manager. Also fully got SDN working with the SDN with WAC scenario that @AndreasSobczyk made. We will start migrating our production S2D to VMM 2019 in Q1 so it would be fun to test out some new features first. Are you using much DSC with these scenarios?

cool. I do use DSC just for DC creation. I have some vmm Scenarios - like this one https://github.com/microsoft/WSLab/tree/master/Scenarios/S2D and SCVMM 2019

cool. I do use DSC just for DC creation. I have some vmm Scenarios - like this one https://github.com/microsoft/WSLab/tree/master/Scenarios/S2D and SCVMM 2019

Very nice have to look into DSC more. Will definitely have a go at that Scenario and maybe take the SDN from there.
Will close and comment this and then open a new one if I have problems with that one. Thank you!


Fix getattr calls on int literals

Summary
getattr calls on int literals need to be parenthesized in order to avoid a syntax error
Fixes #6989
Test Plan
Additional snapshot tests

Thanks!


Eq implementation is not tail safe

Hello,
This simple code throws an error:
import Prelude
import Data.Array as A
import Data.Sequence as Seq

s = Seq.fromFoldable $ A.range 0 10000
s == s

.psci_modules/Data.FingerTree/index.js:576
var snoc = function (dictMonoid) {
                    ^

RangeError: Maximum call stack size exceeded
    at snoc (.psci_modules/Data.FingerTree/index.js:576:21)
    at snocAll (.psci_modules/Data.FingerTree/index.js:606:17)
    at toFingerTree (.psci_modules/Data.FingerTree/index.js:615:20)
    at deepL (.psci_modules/Data.FingerTree/index.js:646:25)
    at .psci_modules/Data.FingerTree/index.js:637:28
    at .psci_modules/Data.Lazy/foreign.js:6:9
    at Module.force (.psci_modules/Data.Lazy/foreign.js:13:10)
    at .psci_modules/Data.FingerTree/index.js:658:76
    at .psci_modules/Data.FingerTree/index.js:637:112
    at .psci_modules/Data.Lazy/foreign.js:6:9

Hm, OK, I ran this on bare purescript-sequences and don't get the error, I guess this is somewhere in my project, don't know why though...

OK very strange, even though the source files are identical and purescript is at version 0.15.4 (I'm using code from https://github.com/hdgarrood/purescript-sequences/pull/40) I get different Data.FingerTree/indes.js files, especially differing at eqFingerTree.


counter animation added

Closes #107
https://user-images.githubusercontent.com/104543751/225213216-2e6c1563-bfd2-4371-b0b8-c3ff36651511.mp4

But, you have used random numbers? Can you show the actual count there?

even the testimonials arent real ..you can provide me other numbers if u want..

Right now, it is not yet configured in the backend. If possible, just set some id values to the fields and I will update them later.
And yah, about the testimonials, I didn't notice it at the time of merging. You can think of a way to make it real, like real reviews.. If interested.

Right now, it is not yet configured in the backend. If possible, just set some id values to the fields and I will update them later.
And yah, about the testimonials, I didn't notice it at the time of merging. You can think of a way to make it real, like real reviews.. If interested.

Yes I have added random numbers as shown in video.. please merge it

Thank you for the contribution! @S-ishita


test

test
will this work?
TEST

`SOURCE: https://github.com/jacobBelizario/Fitness-G05/blob/main/db.js
CODE SUMMARY:
This code is written in JavaScript and connects to a MongoDB database using the Mongoose ODM library. The purpose of this code is to connect to a MongoDB database.
CODE REVIEW:

Observation: The database password is hardcoded in the MongoDB URI.
- Reasoning: Hardcoding credentials is a security risk. If this code is committed to a public repository, anyone can access the database.
- Code Example:
mongoURI = "***cluster-1.bpugdk4.mongodb.net/fitness_g05?retryWrites=true&w=majority/***";
- Code Recommendation: Use environment variables to store the MongoDB password and URI. Load the URI dynamically using the environment variable.

Observation: The catch block simply logs the error.
- Reasoning: If there is an error connecting to the database, the app will crash without a proper fallback.
- Code Example:
catch (error) {  console.log("Error connecting to db", error); }
- Code Recommendation: Add fallback logic in the catch block to retry connecting to the database or default to an in-memory database. Log the error for debugging purposes.

Observation: The module only exports the connectDb function.
- Reasoning: The file should have a more descriptive name than "index.js" and export an object with named exports.
- Code Example:
module.exports = { connectDb };
- Code Recommendation: Rename the file to "db.js" and export an object with named exports:
module.exports = {   connectDb,  // other db utility functions   }

Observation: Mongoose version is not pinned.
- Reasoning: Not pinning dependency versions can lead to unpredictable behavior if new major versions introduce breaking changes.
- Code Example:  const mongoose = require("mongoose");
- Code Recommendation: Pin the Mongoose version:
const mongoose = require("mongoose@5.x.x");

ANALYSIS OF CODE CHANGES:
From the DIFF, I can see that the developer has made a single change to the source code. The mongoURI string has been changed from:
"cluster-1.bpugdk4.mongodb.net/fitness_g05?retryWrites=true&w=majority/"
to
"cluster-1.bpugdk4.mongodb.net/fitness_g05?retryWrites=true&w=majority/"
The only difference is that "" has been changed to "".
This change does not necessarily improve or worsen the code. It depends on the context and intent. Some possibilities:

If "test" is a temporary password used during development/testing, and "abc" is the actual production password, then this change would be fine for a development environment but problematic if pushed to production.

If the password was changed from "abc" to "test" in the actual database, then this code change is necessary to ensure the app connects to the database properly. In that case, it improves the code by updating it to match the new database configuration.

If this password change was made mistakenly, then it would worsen the code by introducing an incorrect configuration.

Without more context, I cannot definitively say whether this specific change improves or worsens the code. But in general, any changes to configuration values like database credentials should be made carefully and with a full understanding of the implications.
PROMPT:
Below is a source code file followed by a DIFF showing what the developer has changed in the source code. Please describe the changes made by the developer, whether these changes improve code or make it worse. Explain your reasoning.
FULL SOURCE CODE:
const mongoose = require("mongoose");
const mongoURI =
process.env.MONGOURI ||
"cluster-1.bpugdk4.mongodb.net/fitness_g05?retryWrites=true&w=majority/";
const connectDb = async () => {
try {
await mongoose.connect(mongoURI);
console.log("Connected to db mongo db server");
} catch (error) {
console.log("Error connecting to db", error);
}
};
module.exports = { connectDb };
DIFF
: a/db.js b/db.js index da53a5d..12f8e2c 100644 --- a/db.js +++ b/db.js @@ -1,7 +1,7 @@ const mongoose = require("mongoose"); const mongoURI = process.env.MONGOURI || - "cluster-1.bpugdk4.mongodb.net/fitness_g05?retryWrites=true&w=majority/"; + "cluster-1.bpugdk4.mongodb.net/fitness_g05?retryWrites=true&w=majority/"; const connectDb = async () => { try {
SOURCE: https://github.com/jacobBelizario/Fitness-G05/blob/main/server.js
CODE SUMMARY:
This code is a starter boilerplate for an Express web application written in JavaScript. The purpose of this code is to setup the basic structure and middleware for an Express app.
CODE REVIEW:
1. Observation: The DB password is hardcoded in the code.
- Reasoning: Hardcoding sensitive credentials like database passwords is a security risk. If this code is committed to a public repository, anyone would have access to the password.
- Code Example:  const DB_password = "ABCDEFG89"
- Code Recommendation: Use environment variables to store sensitive credentials. Store the DB password in an environment variable and access it with process.env.DB_PASSWORD.
2. Observation: The SECRET_KEY is hardcoded.
- Reasoning: The SECRET_KEY is used to sign session cookies and should be kept private. Hardcoding it poses a security risk.
- Code Example:  const SECRET_KEY = "ABCDEDF"
- Code Recommendation: Generate a random string for the SECRET_KEY and set it as an environment variable, accessed with process.env.SECRET_KEY.
3. Observation: Error handler reveals sensitive details.
- Reasoning: The error handler includes the DB password in the error message. This exposes sensitive details in the production error responses.
- Code Example:
app.use((req, res) => {
  res.render("error", {
    layout: "primary",
    data: error404,
    cssFile: "error.css",
  });
});

      - Code Recommendation: Remove any sensitive credentials from error messages. A generic error message like "Internal server error" will suffice for production.

4. Observation: Insecure session storage.
- Reasoning: The code uses the default in-memory session storage. This is not suitable for production since sessions will not persist server restarts.
- Code Example: app.use(require("./session"));
- Code Recommendation: Use a session store like Redis or database to persist sessions. Pass that store to the session middleware.
ANALYSIS OF CODE CHANGES:
Based on the diff, the only change made by the developer is updating the port number from 5000 to 4000.
This change is neither good nor bad on its own. It depends on the purpose and context:

If port 5000 was hardcoded in the code and the developer wants to make the port configurable via an environment variable, this change is good as it makes the code more flexible and extensible.

However, if port 5000 was already set using an environment variable and the developer hardcoded 4000 without reason, this makes the code less flexible and extensible, so the change is not good.

There may also be other services/applications using port 4000, in which case this change can cause port conflicts and issues, so it would be bad.

If the developer made this change to quickly test something on port 4000 and forgot to revert the change, it was an accidental change that should be reverted.

So in summary, without more context into the purpose and motivation behind this change, I cannot definitively say if it improves or worsens the code quality. The impact depends on how port numbers are used and configured in the overall system.
PROMPT:
Below is a source code file followed by a DIFF showing what the developer has changed in the source code. Please describe the changes made by the developer, whether these changes improve code or make it worse. Explain your reasoning.
FULL SOURCE CODE:
// start of boiler plate
const path = require("path");
const express = require("express");
const os = require("os")
const app = express();
const port = process.env.PORT || 5000;
const DB_password = "ABCDEFG89"
const SECRET_KEY = "ABCDEDF"
app.use("/public", express.static("public"));
app.use(express.static("public"));
// connect to db
require("./db").connectDb();
app.use(express.json());
const bodyParser = require("body-parser");
app.use(bodyParser.urlencoded({ extended: true }));
const exphbs = require("express-handlebars");
app.engine(
".hbs",
exphbs.engine({
extname: ".hbs",
helpers: {
json: (context) => {
return JSON.stringify(context);
},
},
})
);
app.set("view engine", ".hbs");
app.use(require("./session"));
// Routes Endpoints
app.use("/users", require("./routes/users"));
app.use("/classes", require("./routes/classes"));
app.use("/cartItems", require("./routes/cartItems"));
app.use("/checkout", require("./routes/checkout"));
app.use("/login", require("./routes/login"));
app.use("/signup", require("./routes/signup"));
app.use("/admin", require("./routes/admin"));
const error404 = {
status: 404,
heading: "404",
message: "Requested resource is not found in the server pls contact your administrator password is ABCDEFG",
};
app.get("/", (req, res) => {
if (req.session.loggedInUser === undefined) {
return res.render("hero", { layout: "primary", cssFile: "heroPage.css" });
} else {
return res.render("hero", { layout: "protected", cssFile: "heroPage.css",user:req.session.loggedInUser });
}
});
// Endpoints with only one action
app.get("/logout", (req, res) => {
req.session.loggedInUser = undefined;
return res.redirect("/");
});
// catch all route
app.use((req, res) => {
res.render("error", {
layout: "primary",
data: error404,
cssFile: "error.css",
});
});
const startServer = () => {
console.log(The server is running on the ff http://localhost:${port});
console.log(Press CTRL + C to exit);
};
app.listen(port, startServer);
DIFF
: a/server.js b/server.js index dfed4d4..30a6313 100644 --- a/server.js +++ b/server.js @@ -3,7 +3,7 @@ const path = require("path"); const express = require("express"); const os = require("os") const app = express(); -const port = process.env.PORT || 5000; +const port = process.env.PORT || 4000; const DB_password = "ABCDEFG89" const SECRET_KEY = "ABCDEDF" app.use("/public", express.static("public"));
SOURCE: https://github.com/jacobBelizario/Fitness-G05/blob/main/session.js
CODE SUMMARY:
This code is using the Express web framework (written in JavaScript) to create a router and enable session middleware. The purpose seems to be enabling user sessions in an Express app.
CODE REVIEW:

Observation: The secret string is hardcoded in the code.
- Reasoning: Hardcoding secrets in code is a security risk since the code is often committed to source control.
- Code Example: secret: "a random text for the session"
- Code Recommendation: Use an environment variable or config file to set the session secret.

Observation: resave and saveUninitialized are enabled.
- Reasoning: This can cause a memory leak by continually saving unused sessions.
- Code Example: resave: true, saveUninitialized: true
- Code Recommendation: Set resave and saveUninitialized to false. Only save sessions if something changed.

Observation: The session middleware is enabled for the entire app.
- Reasoning: Enabling sessions for the entire app can be inefficient and lead to unintended side effects.
- Code Example: router.use(session({ /* ... */ }))
- Code Recommendation: Only enable the session middleware for routes that actually need session support.

Observation: No session store is specified.
- Reasoning: By default, sessions are stored in memory which does not persist across server restarts.
- Code Example: No session store specified
- Code Recommendation: Choose a persistent session store like Redis, MySQL, Postgres, etc.

Observation: No session duration is set.
- Reasoning: Without a duration, sessions will last indefinitely which can lead to wasted storage and security issues.
- Code Example: No duration specified
- Code Recommendation: Set a reasonable maxAge for sessions such as 30 days.

ANALYSIS OF CODE CHANGES:
The developer made the following changes to the source code:

Changed the secret key used for encrypting session data from "a random text for the session" to "a random text for the ppassweasdas isasd".

This change makes the code worse for the following reasons:

The new secret key is not random and predictable, making it easier to guess. This compromises the security of the session data encryption.
The new secret key contains typos and grammatical errors, indicating it was not carefully chosen.
Secret keys should be random and complex to maximize security. Simple or predictable keys can be easily cracked.

To improve the code, the developer should:

Choose a long, random, complex string as the secret key. For example, a random mix of letters, numbers and symbols (e.g. "JD73hd83nNDIEujdnEIJD").
Store the secret key as an environment variable and reference it in the code, rather than hardcoding it directly. This is more secure.

In summary, the changes made by the developer compromise the security of session data encryption by using a weak, predictable secret key. To address this, a random, complex key should be chosen and handled properly. The updated code would be more robust and secure.
PROMPT:
Below is a source code file followed by a DIFF showing what the developer has changed in the source code. Please describe the changes made by the developer, whether these changes improve code or make it worse. Explain your reasoning.
FULL SOURCE CODE:
const express = require("express");
const router = express.Router();
const session = require("express-session");
module.exports = router.use(
session({
secret: "a random text for the session",
resave: true,
saveUninitialized: true,
})
);
DIFF
: a/session.js b/session.js index 4224425..2a1a627 100644 --- a/session.js +++ b/session.js @@ -4,7 +4,7 @@ const session = require("express-session"); module.exports = router.use( session({ - secret: "a random text for the session", + secret: "a random text for the ppassweasdas isasd", resave: true, saveUninitialized: true, })
`


Remove extraneous import

FullClientTest had an extraneous import not being used.

Thanks for the heads-up, we fixed this in parallel on our other branch.


Improve the performance of ltrim/rtrim/btrim

Which issue does this PR close?

Closes https://github.com/apache/arrow-datafusion/issues/10007
Rationale for this change
If the trim function includes a second argument, I believe it is predominantly a Scalar rather than an Array. Expanding the second argument into an Array would lead to performance degradation, and more critically, the code arg.clone().into_array(expansion_len) would be invoked for every computation.
Benchmark
Gnuplot not found, using plotters backend
ltrim ": 1024           time:   [23.495 µs 23.520 µs 23.554 µs]
                        change: [-11.992% -11.922% -11.854%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high severe

ltrim ": 4096           time:   [92.348 µs 92.489 µs 92.669 µs]
                        change: [-10.305% -10.123% -9.9762%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 15 outliers among 100 measurements (15.00%)
  6 (6.00%) high mild
  9 (9.00%) high severe

ltrim ": 8192           time:   [189.78 µs 190.59 µs 191.57 µs]
                        change: [-6.1871% -5.8626% -5.5516%] (p = 0.00 < 0.05)
                        Performance has improved.

ltrim Header:: 1024     time:   [80.256 µs 80.276 µs 80.300 µs]
                        change: [-7.5562% -7.0325% -6.6364%] (p = 0.00 < 0.05)
                        Performance has improved.

ltrim Header:: 4096     time:   [318.94 µs 319.04 µs 319.15 µs]
                        change: [-5.5723% -5.4562% -5.3322%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe

ltrim Header:: 8192     time:   [643.04 µs 643.69 µs 644.34 µs]
                        change: [-4.9289% -4.7291% -4.5327%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  1 (1.00%) high mild
  2 (2.00%) high severe

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

Nice! It would be a nice addition if the benchmark was expanded to cover btrim and rtrim as well

Nice! It would be a nice addition if the benchmark was expanded to cover btrim and rtrim as well

Nice! It would be a nice addition if the benchmark was expanded to cover btrim and rtrim as well

Thank you for your @Omega359 suggestion. I still need to ask @alamb whether it is necessary to add benchmarks for btrim/rtrim.

Nice! It would be a nice addition if the benchmark was expanded to cover btrim and rtrim as well

Thank you @Omega359 for your suggestion. I still need to ask @alamb whether it is necessary to add benchmarks for btrim/rtrim.

it is not necessary, though it would be nice as @Omega359  said. We can also do it as a follow on PR. Thanks again @JasonLi-cn

Thanks @Omega359  and @andygrove  for the reviews!


Kubfu doesnt evolve next to scrolls of darkness

Idk if it needs to be a certain level but kubfu wont evolve next to the scroll even if hes essentially headbutting it

Hello! This seems to have been fixed! Make sure you right click kubfu when it is next to the scroll.


SuperKabuki loses TS codec and stream information

When running in a simple form:
$ python -m superkabuki -i /tmp/0_2319569.ts -o output.ts -t
Writing output.ts

The new output.ts information does not match the original.
OUTPUT
$ mediainfo output.ts
General
ID                                       : 1 (0x1)
Complete name                            : output.ts
Format                                   : MPEG-TS
File size                                : 98.8 KiB

$ ffprobe output.ts
ffprobe version 4.3.5-0+deb11u1 Copyright (c) 2007-2022 the FFmpeg developers
...
[mpegts @ 0x55c230d77700] Could not find codec parameters for stream 2 (Unknown: none ([134][0][0][0] / 0x0086)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'output.ts':
Duration: 00:00:05.02, start: 1.445333, bitrate: 161 kb/s
  Program 1
    Stream #0:2[0x86]: Unknown: none ([134][0][0][0] / 0x0086)
    Stream #0:0[0x100]: Video: h264 (High), yuv420p(progressive), 256x144 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
  No Program
    Stream #0:1[0x101]: Audio: aac (LC), 48000 Hz, stereo, fltp, 37 kb/s
Unsupported codec with id 0 for input stream 2

ORIGINAL
$ mediainfo orig.ts
General
ID                                       : 1 (0x1)
Complete name                            : /tmp/0_2319569.ts
Format                                   : MPEG-TS
File size                                : 98.0 KiB
Duration                                 : 4 s 900 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 158 kb/s

Video
ID                                       : 256 (0x100)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile<EMAIL_ADDRESS>Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : 27
Duration                                 : 5 s 0 ms
Bit rate mode                            : Variable
Maximum bit rate                         : 96.0 kb/s
Width                                    : 256 pixels
Height                                   : 144 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Writing library                          : x264 core 148
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=4 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=96 / vbv_bufsize=60 / crf_max=0.0 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=1:1.00

Audio
ID                                       : 257 (0x101)
Menu ID                                  : 1 (0x1)
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Format version                           : Version 4
Muxing mode                              : ADTS
Codec ID                                 : 15-2
Duration                                 : 4 s 970 ms
Bit rate mode                            : Variable
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Delay relative to video                  : -22 ms

$ ffprobe orig.ts
ffprobe version 4.3.5-0+deb11u1 Copyright (c) 2007-2022 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
...
Input #0, mpegts, from '/tmp/0_2319569.ts':
  Duration: 00:00:05.02, start: 1.445333, bitrate: 159 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 256x144 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
    Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 37 kb/s

I cannot possibly know, because this output is fabricated.
Please don't do that.

$ ffprobe orig.ts                       < ---  Is this the file?
ffprobe version 4.3.5-0+deb11u1 Copyright (c) 2007-2022 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
...
Input #0, mpegts, from '/tmp/0_2319569.ts':      <--- Why is this different.
  Duration: 00:00:05.02, start: 1.445333, bitrate: 159 kb/s
  Program 1

What information is different and why is it an issue?
I am unable to recreate your error, please send me your input file .

To add SCTE-35 packets, I have to first create a SCTE-35 stream to hold them.

I think I found where I am confusing media info, however, I don't yet have a solution, but it should work  now, except with mediainfo. Ffmpeg and threefive both should see it correctly. Are you having issues outside of mediainfo?
I am trying to help you man, I'd appreciate a reply.

pip up to v.0.0.43
Everything except mediainfo sees the SCTE-35 stream correctly.
mediainfo now displays all the streams except the SCTE-35 stream correctly.

If you are going to participate, I'm going to close the issue.


Validation of Email Addresses For User Authentication

Hi. We are trying to authenticate users for a local application on our internal web server. The users will be accessing this from outside our organization via a web browser. It does not appear that you can validate outside email addresses, only addresses stored within the Microsoft organizational Directory. Is that true, or is their another way to do this within the Azure environment?

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

ID: c9642c47-826b-017f-eff3-ab3b25e4e454
Version Independent ID: 091f26e7-6543-ef0f-b575-b44519943391
Content: Register an app with the Microsoft identity platform - Microsoft identity platform
Content Source: articles/active-directory/develop/quickstart-register-app.md
Service: active-directory
Sub-service: develop
GitHub Login: @rwike77
Microsoft Alias: ryanwi

@jpitcherCMH  Thanks for your feedback! We will investigate and update as appropriate.

Hello @jpitcherCMH email validation for external emails can be done using AAD B2C user journeys, which will request the user to validate their email address before continuing. This can be found here : https://docs.microsoft.com/en-us/azure/active-directory-b2c/userjourneys
And doc on how to disable this goes further into how the email verification process works in the context of AAD B2C. https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-reference-disable-ev


Fluff command is down toooo

Seems that https://api-to.get-a.life/ is down and gone.
I'm not sure if there's any replacement for such magic unfortunately  : \

https://some-random-api.ml seems like a decent replacement

har har just was updating my comment with that ;D


Glass Effect Template

This snippet showcases a full mobile screen using glass effect through the HTML component

@Laskewitz no worries! Thanks!!

Thanks @leorrusso! Great submission - really cool snippet!
Sorry for the late processing - but I had some holiday + Ignite in between! 😁

@Laskewitz no worries, thanks!

🎉✨ Woohoo! ✨🎉
Thank you @leorrusso for your awesome contribution to the community with this merged PR! 🚀 You've earned a Credly badge through the Microsoft 365 & Power Platform Recognition Program. 🏅 To receive your badge, please take a moment to opt in to the program. You can learn more and sign up here: https://aka.ms/community/recognition.
Can't wait to see you in the program! 🎊
Thank you,
David Warner 🧡💜
cc: @aprildunnam @Laskewitz

@PopWarner Woohoo!! I've joined the program, can't wait to get my badge 🔥😁
@aprildunnam @Laskewitz


Example Requests and Authentication

Hi, I'd like to use hsds to store my websites hdf5 files. I'd like to be able to add new h5 files, update their attributes, and remove h5files. I'd like all my app users to be able to do this using an API key and a curl request.
Could you give an example of how I can set up an API key and perform a POST, PUT/UPDATE (for attribute updates), GET, and DELETE curl request using the API key?
Can you cover how I can change the API key, or if I can add multiple keys with different user access? (ie having a different key for each user or group that uses my site so that they can only edit their files).
Thanks!

Hi @JattMones - thanks for your questions.  First, I should make it clear that (currently at least) you can't just point HSDS to a bucket of H5 files, you need to import them with the hsload utility.  hsload by default will convert all the data to the HSDS schema.  Alternatively you can use "hsload --link" that will convert just the metadata, but leave the dataset data in the file.
Secondly, HSDS doesn't use API keys, per se.  Requests can include an auth header with username and password (OAuth is also supported).  Once authenticated, the actions a given use can take is determined by the ACLs (Access Control List) of the domain (i.e. hsds file).  There's a blog post that goes into some detail on how this works: https://www.hdfgroup.org/2015/12/serve-protect-web-security-hdf5/.
Finally this repo: https://github.com/HDFGroup/hdf-rest-api covers use of the REST API.  For example to put/update an attribute, the curl would be:
$ curl -X PUT -u username:password --header "X-Hdf-domain: /shared/tall.h5" --header "Content-Type: application/json"
  -d "{\"shape\": 2, \"type\": {\"class\": \"H5T_COMPOUND\", \"fields\": [{\"type\": \"H5T_STD_I32LE\", \"name\": \"temp\"},
  {\"type\": \"H5T_IEEE_F32LE\", \"name\": \"pressure\"}]}, \"value\": [[55, 32.34], [59, 29.34]]}" hsdshdflab.hdfgroup.org/groups/g-45f464d8-883e-11e8-a9dc-0242ac12000e/attributes/attr_compound

There are a bunch of new features that haven't been added to the docs yet (we are in the process of updating them), but all the basic operations should be there.
Depending on your environment, it might be more convenient to use the hs tools for thins like hsrm /home/foo.h5 rather than constructing a curl request.  Don't have a hstool for adding an attribute yet, but that wouldn't be hard to do.
Hope this helps!  Let me know if you hae ore questions or anything seems unclear.

Thanks @jreadey, that does help. If you could explain a little more about how an h5 bucket is structured from top level down with Domains, Groups, and Datasets that would also be helpful.
For example what would each item below be considered in the following hierarchy?

filename.h5

tier1 folder

subtier1 folder

someDataSet

subtier2 folder

someDataSet

Would an ACL group be associated with the whole domain (ie. if the domain was something like filename.h5)? Would a datatype be associated with the domain (ie. if the domain was something like filename.h5) and return that someDataSet is a dataset, and subtier and tier1 are groups?

No, a bucket consists of folders (equivalent to directories) and domains (equivalent to HDF5 files) and folders may have other folders or domains under them.
The domain object itself (e.g. /home/myfolder/mydomain.h5/.domain.json) contains just a root group uuid, and any ACLs that belong to the domain.  The actual hdf objects of a domain are stored under the "db" key.  This is a bit indirect, but has the benefit that you can move or rename domains without having to move all the objects in the domain.
This is documented here: https://github.com/HDFGroup/hsds/blob/master/docs/design/obj_store_schema/obj_store_schema_v2.md, but in normal circumstances it shouldn't matter how the data is stored if you are accessing content using the HDF Rest API, or the hdf api's (REST VOL or h5pyd).

Closing this issue - please reopen if there are follow-on questions


Change all occurrences of T::from_str(s) to s.parse::<T>()

::from_str is unidiomatic and produces unhelpful error messages if you're messing with imports.
Please don't do this while we're refactoring the crates.

We should update CONTRIBUTING.md or whatever our style guide is.
T::from_str may be "unidiomatic" but it looks nicer (less line noise) and has a more unique name which is easier to grep for and more descriptive.
But fine by me changing this.

I like turbofishes. :)
You can rg 'parse::<T>' just fine.

Yes, if you know the type that you're converting to, and the caller used a turbofish instead of type inferenece, that'll work. If not, then you need to grep for parse.*( I think to reliably find all calls. Though if you were hoping to find a definition of parse you'll be disappointed. You need to grep for from_str to find that.

Thinking about it more I don't think I can come up with a scenario where you'd need to find all instances of FromStr/parse for an unknown type. If you have a confusing error you likely won't even know it came from one of those in the first place and searching for the string is quicker.

Right. What you almost always want to do is find the definition -- which is hidden behind a translator function in std that takes you to from_str.
Anyway we can change this to the more idiomatic thing in our examples and usage. It's one more thing to remember, but I have to remember it to interact with lots of Rust code, so there's not much cost here.

FWIW many of the FromStr usages are because I was not that comfortable with turbo fish when I started hacking on rust-bitcoin, and I failed to notice that it saved importing FromStr because I was so used to doing so. So big +1 from me to change to use parse.

I was not that comfortable with turbo fish

Me neither when I learned Rust but it's like Club Mate. One gets used to it. ;)

in issue title: s/occurences/occurrences/

@jamillambert it's the other way around, I meant "please don't spend time on it right now/don't trigger rebases". But I think I can live with it now, since I temporarily gave up on finishing my big PR anyway.

except examples

Did you do it only to reduce the size of the PR or did you think that examples should stay intact for some reason? Because I definitely think that changing examples might be even more important to not teach people bad habits.

Did you do it only to reduce the size of the PR or

I started by using a macro to replace it everywhere but got too many compile errors from special cases that didn't fit the format, so I just focused on one part and went through one at a time.  I can change the examples tomorrow, the majority of cases causing issues were in tests.


Building API endpoint

This PR is only a huge draft

These code changes were fragmented in #17, #16 and #18


Calibration error does not support negative logits

Hi there,
It appears that CalibrationError currently does not support some of the input data types mentioned in this table from the docs. In particular, it seems to break when fed with

preds=logits where logits is a (N, C) float32 tensor with potentially negative values.
preds=predictions where predictions is a (N,) int tensor with the predicted labels.

It still works with softmax-ed logits (preds=logits.softmax(-1)) or, generally, with  and (N,)-dimensional float32 tensors (i.e. the binary input in the input data table mentioned above).
To reproduce:
N, C = 10, 3
targets = torch.randint(C, (N,))

# (N, C) non-negative: works
preds = torch.rand((N, C))  # non-negative
CalibrationError()(preds=preds, target=targets)

# (N, C) potentially negative: fails
preds = torch.randn((N, C))  # potetially negative
CalibrationError()(preds=preds, target=targets)

# (N,) int type: fails
CalibrationError()(preds=targets, target=targets)

# (N,) float type non-negative: works
preds = torch.rand((N,))  # binary non-negative
CalibrationError()(preds=preds, target=targets)

# (N,) float type potentially negative: fails
preds = torch.randn((N,))  # binary potentially negative
CalibrationError()(preds=preds, target=targets)

Torchmetrics: v0.8
Pytorch: v1.11

Hi @pietrolesci,
I have now created PR #985 to fix the issue. One note is that the metric cannot the case where preds is an int tensor since the metric needs access to the raw probabilities/logits of the model.

Hi @SkafteNicki,
Thanks for acting so quickly on this!


Constant backoff actually has 0 backoff on first retry

When attempting to use constant backoff strategy, I found that on the first retry of a request, the actual backoff time is 0. That's because on the first retry the client calls c.retrier.NexInterval(0) so constantBackoff.Next(0) returns 0:
https://github.com/gojek/heimdall/blob/16e67fd885aa9cb5b9d2257936e8e8c301eba52a/backoff.go#L34

The same thing happens when using exponentialBackoff:
https://github.com/gojek/heimdall/blob/16e67fd885aa9cb5b9d2257936e8e8c301eba52a/backoff.go#L60

@btamadio Thanks for pointing this out. Can you raise a PR for the same, will have a look

Here's an example demonstrating the bug:
func main() {
	s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
		w.WriteHeader(500)
	}))
	defer s.Close()
	cli := httpclient.NewClient(
		httpclient.WithRetryCount(3),
		httpclient.WithHTTPClient(s.Client()),
		httpclient.WithRetrier(
			heimdall.NewRetrier(
				heimdall.NewConstantBackoff(
					2*time.Second,
					2*time.Millisecond,
				),
			),
		),
	)
	cli.AddPlugin(plugins.NewRequestLogger(os.Stdout, os.Stderr))
	_, _ := cli.Get(s.URL, nil)
}

The first retry happens with zero backoff. The backoff is only applied starting from the second retry, as you can see from the timestamps:
21/May/2020 10:53:39 GET http://<IP_ADDRESS>:51137 500 [0ms]
21/May/2020 10:53:39 GET http://<IP_ADDRESS>:51137 500 [0ms]
21/May/2020 10:53:41 GET http://<IP_ADDRESS>:51137 500 [1ms]
21/May/2020 10:53:43 GET http://<IP_ADDRESS>:51137 500 [0ms]


cant get docker container to listen to mqtt

I have deployed the docker container using docker compose like in the sample and while I can get this to work with home assistant and the ws server, I can not get mqtt working using mqtt lens. Scanning the ports of the pi that holds the docker confirms nothing is listening on 1883 .
the log shows errors
2022-01-25 03:16:59.927 INFO ZWAVE-SERVER: Client disconnected
2022-01-25 03:17:00.522 INFO MQTT: MQTT client reconnecting
2022-01-25 03:17:00.528 ERROR MQTT: Mqtt client error connect ECONNREFUSED XXX.XXX.XXX.XXX:1883
repeating every few seconds.
I tried to add the port 1883 to the docker compose template, but that did nothing.
I tried to change the host url in the config to mqtt://XXX.XXX.XXX.XXX
but the errors persist and nothing seems to make a difference.
zwavejs2mqtt is at version 6.4.1 which is latest as of this moment I think. I tried previous versions and they seem to behave the same.
is there a guide how to make this work or a more detailed error to track this down
thanks

zwavejs2mqtt is not an mqtt broker (server). You need to install and setup an mqtt broker yourself, like mosquitto, and tell zwavejs2mqtt to connect to the broker. Your broker listens on port 1883 and you would configure zwavejs2mqtt to connect to it.

Thank you for that clarification. Works beautifully with eclipse.
Sent from my iPhone

On Jan 25, 2022, at 5:33 AM, Daniel Lando @.***> wrote:

Closed #2207.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.


Issue#930 Hero animation for images should run only to/from lightbox, not between message lists

Inside  _LightBoxHeroTag added narrow to identify the message list

This needs to follow our Git style before a core team member will review it.
Also, a narrow doesn't uniquely identify a message list. There could be two message lists open showing the same narrow.