VMs get recreated if virtlet daemonset pod deleted and created

We need to upgrade virtlet, which means the old virtlet daemonset pods need to be deleted and new pods will be created. I found during the upgrade, the running VMs are recreated. It is an issue for production cluster.

Hi, did you check if the VM is indeed recreated/restarted?
The status of the pod may briefly become ContainerCreating but that's just an artifact of restarting Virtlet CRI service and doesn't necessarily mean that the VM is recreated.

It is my test result, pod status is "Running". qemu process is still exist.
[jiyuan@jiyuan]$ kubectl get po
NAME           READY     STATUS              RESTARTS   AGE
windows-pict   0/1       ContainerCreating   0          53s
[jiyuan@jiyuan]$ ps -ef | grep qemu
root      3969     1 99 16:35 ?        00:01:48 qemu-system-x86_64 -enable-kvm -name guest=virtlet-20298a47-0a6c-windows,debug-threads=on -S -machine pc-i440fx-xenial,accel=kvm,usb=off,dump-guest-core=off -m 10000 -realtime mlock=off -smp 10,sockets=10,cores=1,threads=1 -uuid 20298a47-0a6c-5b79-73c6-3176fccc49a4 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-1-virtlet-20298a47-0a6/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device pci-bridge,chassis_nr=1,id=pci.1,bus=pci.0,addr=0x3 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4 -drive file=/var/lib/virtlet/volumes/virtlet_root_20298a47-0a6c-5b79-73c6-3176fccc49a4,format=qcow2,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x1,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/var/lib/virtlet/config/config-20298a47-0a6c-5b79-73c6-3176fccc49a4.iso,format=raw,if=none,media=cdrom,id=drive-virtio-disk1,readonly=on -device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x2,drive=drive-virtio-disk1,id=virtio-disk1 -chardev socket,id=charserial0,path=/var/lib/libvirt/streamer.sock,reconnect=1 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0,bus=usb.0,port=1 -vnc <IP_ADDRESS>:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg timestamp=on -netdev tap,id=tap0,fd=5 -device virtio-net-pci,netdev=tap0,id=net0,mac=fa:16:3e:06:51:da
root     14633 16505  0 16:36 pts/0    00:00:00 grep --color=auto qemu
[jiyuan@jiyuan]$ kubectl get ds -n kube-system
NAME                       DESIRED   CURRENT   READY     UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
nvidia-gpu-device-plugin   0         0         0         0            0           <none>          64d
[jiyuan@jiyuan]$ ps -ef | grep qemu
root      3969     1 99 16:35 ?        00:02:13 qemu-system-x86_64 -enable-kvm -name guest=virtlet-20298a47-0a6c-windows,debug-threads=on -S -machine pc-i440fx-xenial,accel=kvm,usb=off,dump-guest-core=off -m 10000 -realtime mlock=off -smp 10,sockets=10,cores=1,threads=1 -uuid 20298a47-0a6c-5b79-73c6-3176fccc49a4 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-1-virtlet-20298a47-0a6/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device pci-bridge,chassis_nr=1,id=pci.1,bus=pci.0,addr=0x3 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4 -drive file=/var/lib/virtlet/volumes/virtlet_root_20298a47-0a6c-5b79-73c6-3176fccc49a4,format=qcow2,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x1,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/var/lib/virtlet/config/config-20298a47-0a6c-5b79-73c6-3176fccc49a4.iso,format=raw,if=none,media=cdrom,id=drive-virtio-disk1,readonly=on -device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x2,drive=drive-virtio-disk1,id=virtio-disk1 -chardev socket,id=charserial0,path=/var/lib/libvirt/streamer.sock,reconnect=1 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0,bus=usb.0,port=1 -vnc <IP_ADDRESS>:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg timestamp=on -netdev tap,id=tap0,fd=5 -device virtio-net-pci,netdev=tap0,id=net0,mac=fa:16:3e:06:51:da
root     17759 16505  0 16:37 pts/0    00:00:00 grep --color=auto qemu
[jiyuan@jiyuan]$ kubectl get po
NAME           READY     STATUS              RESTARTS   AGE
windows-pict   0/1       ContainerCreating   0          1m

@volume-ji in your output looks like there is no virtlet daemonset.
@keyingliu how you are doing upgrade? The supported way is to do that using rolling upgrades (https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/)?
Are you removing/adding daemonset definition manually in other way?

@volume-ji From the output, the parent of qemu process is always 1, if the old daemonset is not deleted, the parent process of qemu should be docker-shim or containerd-shim. during upgrade, the old daemonset is deleted, and new daemonset will be created, this time the qemu's parent process is 1. Actually you don't need to do upgrade, just delete one of daemonsets (there is such case: the node is not ready and all pods in this node are evicted, but node is back later).
I can always reproduce such case:

if the daemonset pod is deleted, the qemu is killed
but if I manually kill the containers, the qemu is there and the parent process of qemu becomes 1.

We do not support deletion of daemonset. Please instead use rolling update.

@jellonek  why deletion of ds is not supported?  It is a common operation in k8s.

I mean - preservation of running VMs is supported (or should be, I'm bit confused right now) during daemonset upgrade, while this preservation may not occur when daemonset is manually removed.
Lets wait for comment from @lukaszo who have the best knowledge in this area.

@wenlxie while waiting can you please tell us more about your setup? How is virtlet installed, what are it's mounts from system etc.
I've checked both scenarios and in both situations virtlet pod deletion (during DS upgrade and with manual kubectl delete ...) it worked fine. (you can probably try it by yourself by using demo.sh)

We use the default virtlet-ds.yaml provided in virtlet repo to create our daemonset, and we can always reproduce this issue. The only difference is I guess we run centos 7.5, but your test env may be ubuntu.

I test using centos, It looks that parent pid of qemu process change to 1, but qemu process do not delete and still exists.
my steps is below:
ENV:
os: maintain by my company(based on centos), k8s: v1.10.4, docker: 1.12.6, CNI: knitter, virtlet: latest

deploy vmpod, result list:

[root@paas-controller-172-21-0-2:/paasdata/op-conf/virtlet_runtime]$ kubectl get po -n opcs | grep bionic
bionic-pod-0-1-xwcfs     1/1       Running   0          11s
[root@paas-controller-172-21-0-2:/paasdata/op-conf/virtlet_runtime]$ ps -ef | grep bionic
root     24158 31215 99 11:47 ?        00:00:21 /usr/bin/qemu-system-x86_64 -name guest=virtlet-1c22bc6b-f6de-ubuntu-vm,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-2-virtlet-1c22bc6b-f6d/master-key.aes -machine pc-i440fx-bionic,accel=tcg,usb=off,dump-guest-core=off -m 500 -realtime mlock=off -smp 10,sockets=10,cores=1,threads=1 -uuid 1c22bc6b-f6de-5ce5-5ce8-bfb0f5d8ef38 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-2-virtlet-1c22bc6b-f6d/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device pci-bridge,chassis_nr=1,id=pci.1,bus=pci.0,addr=0x3 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4 -drive file=/var/lib/virtlet/volumes/virtlet_root_1c22bc6b-f6de-5ce5-5ce8-bfb0f5d8ef38,format=qcow2,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x1,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/var/lib/virtlet/config/config-1c22bc6b-f6de-5ce5-5ce8-bfb0f5d8ef38.iso,format=raw,if=none,id=drive-virtio-disk1,media=cdrom,readonly=on -device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x2,drive=drive-virtio-disk1,id=virtio-disk1 -chardev socket,id=charserial0,path=/var/lib/libvirt/streamer.sock,reconnect=1 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0,bus=usb.0,port=1 -vnc <IP_ADDRESS>:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg timestamp=on -netdev tap,id=tap0,fd=5 -device virtio-net-pci,netdev=tap0,id=net0,mac=fa:16:3e:61:1f:db

delete ds using "kubectl delete -f virtlet-ds.yaml"， result list(notice parent pid  and time of qemu):

[root@paas-controller-172-21-0-2:/paasdata/op-conf/virtlet_runtime]$ kubectl delete -f virtlet-ds.yaml
daemonset.apps "virtlet" deleted
clusterrolebinding.rbac.authorization.k8s.io "virtlet" deleted
clusterrole.rbac.authorization.k8s.io "virtlet" deleted
clusterrole.rbac.authorization.k8s.io "configmap-reader" deleted
clusterrole.rbac.authorization.k8s.io "virtlet-userdata-reader" deleted
clusterrolebinding.rbac.authorization.k8s.io "kubelet-node-binding" deleted
clusterrolebinding.rbac.authorization.k8s.io "vm-userdata-binding" deleted
clusterrole.rbac.authorization.k8s.io "virtlet-crd" deleted
clusterrolebinding.rbac.authorization.k8s.io "virtlet-crd" deleted
serviceaccount "virtlet" deleted
[root@paas-controller-172-21-0-2:/paasdata/op-conf/virtlet_runtime]$ kubectl get po -n opcs| grep bionic
bionic-pod-0-1-xwcfs     0/1       ContainerCreating   0          1m
[root@paas-controller-172-21-0-2:/paasdata/op-conf/virtlet_runtime]$ kubectl get po -n opcs| grep bionic
bionic-pod-0-1-xwcfs     0/1       ContainerCreating   0          1m
[root@paas-controller-172-21-0-2:/paasdata/op-conf/virtlet_runtime]$ ps -ef | grep qemu
root     24158     1 99 11:47 ?        00:01:49 /usr/bin/qemu-system-x86_64 -name guest=virtlet-1c22bc6b-f6de-ubuntu-vm,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-2-virtlet-1c22bc6b-f6d/master-key.aes -machine pc-i440fx-bionic,accel=tcg,usb=off,dump-guest-core=off -m 500 -realtime mlock=off -smp 10,sockets=10,cores=1,threads=1 -uuid 1c22bc6b-f6de-5ce5-5ce8-bfb0f5d8ef38 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-2-virtlet-1c22bc6b-f6d/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device pci-bridge,chassis_nr=1,id=pci.1,bus=pci.0,addr=0x3 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4 -drive file=/var/lib/virtlet/volumes/virtlet_root_1c22bc6b-f6de-5ce5-5ce8-bfb0f5d8ef38,format=qcow2,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x1,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/var/lib/virtlet/config/config-1c22bc6b-f6de-5ce5-5ce8-bfb0f5d8ef38.iso,format=raw,if=none,id=drive-virtio-disk1,media=cdrom,readonly=on -device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x2,drive=drive-virtio-disk1,id=virtio-disk1 -chardev socket,id=charserial0,path=/var/lib/libvirt/streamer.sock,reconnect=1 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0,bus=usb.0,port=1 -vnc <IP_ADDRESS>:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg timestamp=on -netdev tap,id=tap0,fd=5 -device virtio-net-pci,netdev=tap0,id=net0,mac=fa:16:3e:61:1f:db

create daemonset using "kubectl apply -f virtlet-ds.yaml", result list(notice parent pid of qemu is still 1, but pod is running):

[root@paas-controller-172-21-0-2:/paasdata/op-conf/virtlet_runtime]$ kubectl apply -f virtlet-ds.yaml
daemonset.apps "virtlet" created
clusterrolebinding.rbac.authorization.k8s.io "virtlet" created
clusterrole.rbac.authorization.k8s.io "virtlet" created
clusterrole.rbac.authorization.k8s.io "configmap-reader" created
clusterrole.rbac.authorization.k8s.io "virtlet-userdata-reader" created
clusterrolebinding.rbac.authorization.k8s.io "kubelet-node-binding" created
clusterrolebinding.rbac.authorization.k8s.io "vm-userdata-binding" created
clusterrole.rbac.authorization.k8s.io "virtlet-crd" created
clusterrolebinding.rbac.authorization.k8s.io "virtlet-crd" created
serviceaccount "virtlet" created
[root@paas-controller-172-21-0-2:/paasdata/op-conf/virtlet_runtime]$ kubectl get po -n opcs -w | grep bionic
bionic-pod-0-1-xwcfs     1/1       Running   0          5m

[root@paas-controller-172-21-0-2:/paasdata/op-conf/virtlet_runtime]$ ps -ef | grep qemu
root     24158     1 77 11:47 ?        00:03:57 /usr/bin/qemu-system-x86_64 -name guest=virtlet-1c22bc6b-f6de-ubuntu-vm,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-2-virtlet-1c22bc6b-f6d/master-key.aes -machine pc-i440fx-bionic,accel=tcg,usb=off,dump-guest-core=off -m 500 -realtime mlock=off -smp 10,sockets=10,cores=1,threads=1 -uuid 1c22bc6b-f6de-5ce5-5ce8-bfb0f5d8ef38 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-2-virtlet-1c22bc6b-f6d/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device pci-bridge,chassis_nr=1,id=pci.1,bus=pci.0,addr=0x3 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4 -drive file=/var/lib/virtlet/volumes/virtlet_root_1c22bc6b-f6de-5ce5-5ce8-bfb0f5d8ef38,format=qcow2,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x1,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/var/lib/virtlet/config/config-1c22bc6b-f6de-5ce5-5ce8-bfb0f5d8ef38.iso,format=raw,if=none,id=drive-virtio-disk1,media=cdrom,readonly=on -device virtio-blk-pci,scsi=off,bus=pci.1,addr=0x2,drive=drive-virtio-disk1,id=virtio-disk1 -chardev socket,id=charserial0,path=/var/lib/libvirt/streamer.sock,reconnect=1 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0,bus=usb.0,port=1 -vnc <IP_ADDRESS>:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg timestamp=on -netdev tap,id=tap0,fd=5 -device virtio-net-pci,netdev=tap0,id=net0,mac=fa:16:3e:61:1f:db

is my operator same with you? is it OK? maybe some different environment.

After several tesst, we confirmed the qemu is not killed by virtlet, we suspect the qemu is killed by system or other process. Will update here if we found the root cause.

kubernetes version is v1.10.6，not v1.10.4

I have a same issue with you, in my another env PC, the qemu process will be killed when delete ds then recreate ds, which also lead to the fatal error about netns "device or resource busy". I suspect it is related with kernal, or sth I do not know. I am not sure

In our cluster, systemd-cgroup is enabled for docker and kubelet, after remove systemd-cgroup, and using cgroupfs instead, the qemu will not be killed. But I still didn't know why qemu process is related with pod's cgroup.

For sure correct way to upgrade Virtlet is to use RollingUpdates.
Updates to work need MountPropagation to work. This includes that dirs used by virtlet need to be mounted on host with --make-shared option. It's required so network namespace files are shared correctly between Virtlet and Host
If it's configured in a wrong way then there should be some logs in virtlet container.

@lukaszo yes, we are trying RollingUpdates, and we use the virtlet-ds.yaml from virtlet repo without changes, but if kubelet and docker/containerd use systemd cgroup, the qemu processes always get killed by systemd. If switched to cgroupfs, the qemu processes are not killed. Not sure if virtlet should handle such case to support systemd cgroup as well, or document it as an unknown issue.

To use systemd cgroup, just add args to docker: --exec-opt native.cgroupdriver=systemd; and add args to kubelet: --cgroup-driver=systemd

I was wrong for thinking of qemu is killed by systemd, in kubelet:
func (m *podContainerManagerImpl) tryKillingCgroupProcesses(podCgroup CgroupName) error {
	pidsToKill := m.cgroupManager.Pids(podCgroup)
	// No pids charged to the terminated pod cgroup return
	if len(pidsToKill) == 0 {
		return nil
	}

	var errlist []error
	// os.Kill often errors out,
	// We try killing all the pids multiple times
	for i := 0; i < 5; i++ {
		if i != 0 {
			glog.V(3).Infof("Attempt %v failed to kill all unwanted process. Retyring", i)
		}
		errlist = []error{}
		for _, pid := range pidsToKill {
			glog.V(3).Infof("Attempt to kill process with pid: %v", pid)
			if err := m.killOnePid(pid); err != nil {
				glog.V(3).Infof("failed to kill process with pid: %v", pid)
				errlist = append(errlist, err)
			}
		}
		if len(errlist) == 0 {
			glog.V(3).Infof("successfully killed all unwanted processes.")
			return nil
		}
	}
	return utilerrors.NewAggregate(errlist)
}

so it depends on the cgroup hierarchy, tested with cgroupfs, docker runtime didn't kill qemu, but containerd runtime still kills qemu.


can't copy battle key

when I choose copy battle key and Copy and Open GBF both,then I can't copy the latest battle key.It's remains an old one

I was unable to replicate this.
Can you provide more detai

From what I just tried, 'copy battle key' works fine, but when I open 'copy battle key', there seems to be something wrong with the clipboard and I can't copy the battle key,it seems to be before I copy the battle key Just jump to the game page first

I was unable to replicate this.
Can you provide more detail?

From what I just tried, 'Copy Battle Key' works fine, but when I open 'Copy and Open GBF', there seems to be something wrong with the clipboard and I can't copy the battle key,It seems to jump to the game page first before I do the copy

should be fixed, let me know if there are any other issues


Improve API

The current API has getAudioProperties and getFileTags which seems like a duplication of effort given the filename, and does not map cleanly onto the native TagLib API. It would be better if given a filename, an object could be retrieved which then had 'tag' and 'audioProperties' objects as properties.

getFileTags and getAudioProperties has been dropped in SHA: fadab2cf53
The separation between Tag and AudioProperties should stay so that we don't complicate the binding for the sake of only slightly increased convenience (and sometimes inconvenience) of the user.


docs: metadata 2.0, object extensibility, message broker

Contains also the object extensibility phase payload schemas, as well as the channel extension message envelope schemas. For now it makes sense to add them here, because they are not available anywhere else.

@vmonov Could you please stage this so that I can see how it renders? I am not sure if I should add a TOC on the top of the object extensibility, as it is fairly long and has many sections.


Added the recommendation to close open transactions

Open transactions cause a lot of trouble in market-de. To stop them from being open at the time of the daily-closing, i added the process flow to the integration checklist.

[ ] You've read the Contributor Guide and Code of Conduct.
[ ] You've included unit or integration tests for your change, where applicable.
[ ] You've included inline docs for your change, where applicable.
[ ] There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

{Summary of the changes}
Description
{Detail}
Fixes #{issue number}

/azp run


MB-10110 display NTSR specific information shipment display cards

Jira tickets for this change

MB-10110
MB-10114
MB-10104

Summary
This PR adds an nts release specific shipment list. It also adds error/warning flags for missing information, puts the correct label on shipment cards, and disables the submit when specific fields are missing (wip).
Is there anything you would like reviewers to give additional scrutiny?
I created a new shipment list to handle ntsr shipments rather than adding a bunch of conditionals into the already existing shipment display list. Was that the right way to go?
Setup to Run Your Code

💻 You will need to use three separate terminals to test this locally.
Terminal 1
Start the Storybook locally.
make storybook

Terminal 2
Start the UI locally.
make client_run

Terminal 3
Start the Go server locally.
make server_run

Additional steps

On storybook look at http://localhost:6006/?path=/story/office-components-shipment-display--nts-release-shipment to see a shipment that has all required fields
On storybook look at http://localhost:6006/?path=/story/office-components-shipment-display--nts-release-shipment-missing-info to see a shipment that has missing fields
Access the office app
Login as a service counselor
Find a move that already exists in your DB
Use postman/or manually edit the database to create an NTS release shipment that's missing the storage facility information and shipment weight

    "moveTaskOrderID": "use-a-move-id-in-your-db",
    "requestedPickupDate": "2022-12-12",
    "destinationAddress": {
    "streetAddress1": "123 Main Ave",
    "city": "Anytown",
    "state": "DE",
    "postalCode": "90210",
    "country": "USA"
  },
    "shipmentType": "HHG_OUTOF_NTS_DOMESTIC",
    "tacType": "HHG",
    "sacType": "NTS",
    "usesExternalVendor": true,
    "diversion": true,
}

Go to the move details page and check that the storage facility has an error flag and that the submit button is disabled

Verification Steps for Author
These are to be checked by the author.

[ ] Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
[ ] Request review from a member of a different team.
[ ] Have the Jira acceptance criteria been met for this change?

Verification Steps for Reviewers
These are to be checked by a reviewer.

Frontend

[ ] User facing changes have been reviewed by design.
[ ] There are no aXe warnings for UI.
[ ] This works in Supported Browsers and their phone views (Chrome, Firefox, IE, Edge).
[ ] There are no new console errors in the browser devtools
[ ] There are no new console errors in the test output

Backend

[ ] Code follows the guidelines for Logging
[ ] The requirements listed in Querying the Database Safely have been satisfied.

Database
Any new migrations/schema changes:

[ ] Follows our guidelines for Zero-Downtime Deploys
[ ] Have been communicated to #g-database
[ ] Secure migrations have been tested following the instructions in our docs

Screenshots

Warnings

:warning:

Files located in legacy directories (src/shared or src/scenes) have
been edited. Are you sure you don’t want to also relocate them to the new file structure?
View the frontend file org ADR for more information

Messages

:book:
:link: MB-10110

  Generated by :no_entry_sign: dangerJS against c9dfe27b9a1852d775e65a60a199179baa1c47d5

I approved the Happo changes since it seem like a timing issue.


Center element on paste

This is not perfectly centered, but it should work!
@vjeux

Did you close this unmerged intentionally? (Also, it doesn't seem to work in the preview deployment... maybe that's an older commit?)

Should work now

Ok, I've been testing the Cmd/Ctrl+V variant (didn't know the implem differs). Should the hotkey implem default to (visible) canvas center?


[Question] Does Markwon have support for loose lists?

Markwon version: Any

I'd like to increase the spacing between my list items. See screenshot here.
Loose lists would work, but putting two line feeds between the items doesn't seem to have any effect in Markwon.
(Alternatively, if there isn't support for both tight and loose lists, does Markwon provide any configuration option for styling lists so I can change the spacing between the items?)

Hello @mileskrell !
Loose lists would've worked if there was a special span registered for Paragraph nodes (markwon doesn't register one). The thing is, this issue was already discussed, take a look at #85 and then #116 .
In short, obtain LastLineSpacingSpan and use it via SpanFactory:
final Markwon markwon = Markwon.builder(context)
        .usePlugin(new AbstractMarkwonPlugin() {
            @Override
            public void configureSpansFactory(@NonNull MarkwonSpansFactory.Builder builder) {
                // `addFactory` available from `3.0.1`
                builder.addFactory(ListItem.class, new SpanFactory() {
                    @Override
                    public Object getSpans(
                            @NonNull MarkwonConfiguration configuration,
                            @NonNull RenderProps props) {
                        return new LastLineSpacingSpan(128);
                    }
                });
            }
        })
        .build();

I'm going to add LastLineSpacingSpan in the next 4.0.0 version (as it seems pretty useful and can be used for Paragraph also)

Thanks for the fast response!
This is a lot better. The problem I'm seeing now is that since this extra space is added after every list item, it results in too much space being added at the end of nested list items.
Compare the following list:

animals
vegetables

squash
cabbage
potato

minerals

with the same list displayed through Markwon.
There's too much space between "potato" and "minerals", because space is added after both "vegetables" and "potato".
I'm also noticing that there's not enough space between "vegetables" and "squash". If I compare this with the same list in Markwon without spacing customizations, it appears that the space between them isn't changed.

I think that the root of the problem is that the extra space after "vegetables" is added after its children. If the extra space were instead added before its children, I think that would solve both of these issues.
Do you know if there's any way of making that happen?

Hello @mileskrell !
You are right, space is added after children (because we add space at the end of a span). As a workaround, we could add space before a span:
public class FirstLineSpacingSpan implements LineHeightSpan {

    private final int spacing;

    private int startAscent;
    private int startTop;

    public FirstLineSpacingSpan(@Px int spacing) {
        this.spacing = spacing;
    }

    @Override
    public void chooseHeight(CharSequence text, int start, int end, int spanstartv, int v, Paint.FontMetricsInt fm) {
        final int spanStart = ((Spanned) text).getSpanStart(this);
        if (start == spanStart) {

            // save these values, we will use them to restore fm state (if other lines are present)
            // if we do not, then all the subsequent lines will have space at the top
            this.startAscent = fm.ascent;
            this.startTop = fm.top;

            fm.ascent -= spacing;
            fm.top -= spacing;
        } else {
            // reset the values...
            fm.ascent = this.startAscent;
            fm.top = this.startTop;
        }
    }
}

If you would want to add space at the end of the whole list, you can still use LastLineSpacingSpan for BulletList/OrderedList nodes:
.usePlugin(new AbstractMarkwonPlugin() {
    @Override
    public void configureSpansFactory(@NonNull MarkwonSpansFactory.Builder builder) {
        builder
                .addFactory(ListItem.class, new SpanFactory() {
                    @Override
                    public Object getSpans(@NonNull MarkwonConfiguration configuration, @NonNull RenderProps props) {
                        return new FirstLineSpacingSpan(128);
                    }
                })
                .addFactory(BulletList.class, new SpanFactory() {
                    @Override
                    public Object getSpans(@NonNull MarkwonConfiguration configuration, @NonNull RenderProps props) {
                        return new LastLineSpacingSpan(128);
                    }
                });
    }
})

Thanks again! It's getting really close to what I'm looking for!
After some experimenting, it seems that I get the best results by using just FirstLineSpacingSpan:
builder.addFactory(ListItem.class, new SpanFactory() {
                            @Override
                            public Object getSpans(@NonNull MarkwonConfiguration configuration, @NonNull RenderProps props) {
                                return new FirstLineSpacingSpan(context, 60);
                            }
                        });

I'm now testing with the following string:
first line of text

* animals
* vegetables
  * cabbage
  * potatoes
    * red
    * brown
* minerals

second line of text

* animals
* vegetables
  * cabbage
  * potatoes
    * red
    * brown
* minerals

third line of text

In Markwon normally
In Markwon using FirstLineSpacingSpan as above
Everything within the lists looks great! There's only one issue: because I'm adding extra space above every list item, there's too much space before the first top-level element of both lists.

I can achieve the desired behavior if I modify FirstLineSpacingSpan#chooseHeight like so:
@Override
    public void chooseHeight(CharSequence text, int start, int end, int spanstartv, int v, Paint.FontMetricsInt fm) {
        final int spanStart = ((Spanned) text).getSpanStart(this);
        if (start == spanStart) {
            this.startAscent = fm.ascent;
            this.startTop = fm.top;
            if (spanStart != 20 && spanStart != 97) { // <-------- This check added
                fm.ascent -= spacingPx;
                fm.top -= spacingPx;
            }
        } else {
            fm.ascent = this.startAscent;
            fm.top = this.startTop;
        }
    }

Result: it works!
But of course, those numbers are specific to this string.
Is there any general way to perform this check? That is, is there any way of checking if the span is being applied to the first top-level element of a list?

Hello @mileskrell !
Well, here is an idea - check if there is/are FirstLineSpacingSpan immediately before. If there is - add spacing, if there are none - it's the first list-item and no spacing should be added:
public class FirstLineSpacingSpan implements LineHeightSpan {

    private final int spacing;

    private int startAscent;
    private int startTop;

    public FirstLineSpacingSpan(@Px int spacing) {
        this.spacing = spacing;
    }

    @Override
    public void chooseHeight(CharSequence text, int start, int end, int spanstartv, int v, Paint.FontMetricsInt fm) {
        final int spanStart = ((Spanned) text).getSpanStart(this);
        if (start == spanStart) {

            // save these values, we will use them to restore fm state (if other lines are present)
            // if we do not, then all the subsequent lines will have space at the top
            this.startAscent = fm.ascent;
            this.startTop = fm.top;

            // obtain previous spans (if none -> we are first, no need to add spacing)
            // `-2` because there is a new-line character that won't have list-item span
            final FirstLineSpacingSpan[] spans =
                    ((Spanned) text).getSpans(start - 2, start, FirstLineSpacingSpan.class);

            if (spans != null && spans.length > 0) {
                fm.ascent -= spacing;
                fm.top -= spacing;
            }

        } else {
            // reset the values...
            fm.ascent = this.startAscent;
            fm.top = this.startTop;
        }
    }
}

Looks great! Thanks for all your help, and for all your work on this library!

IMHO this solution is OK but not completed, you have to use this FirstLineSpacingSpan, but also should use CoreProps.PARAGRAPH_IS_IN_TIGHT_LIST.require(props) in order to know when you have to add the spacing in your CustomListItemSpanFactory.
Something like this should work:
class CustomListItemSpanFactory(
  @Px private val numberEndMargin: Int,
  @Px private val lineSpacingSpan: Int
) : SpanFactory {

  override fun getSpans(configuration: MarkwonConfiguration, props: RenderProps): Any? {
    return mutableListOf<Any>().apply {
      if (CoreProps.ListItemType.BULLET == CoreProps.LIST_ITEM_TYPE.require(props)) {
        CustomBulletListItemSpan(
          configuration.theme(),
          CoreProps.BULLET_LIST_ITEM_LEVEL.require(props)
        )
      } else {
        // todo| in order to provide real RTL experience there must be a way to provide this string
        val number = CoreProps.ORDERED_LIST_ITEM_NUMBER.require(props).toString().plus(".")
        CustomOrderedListItemSpan(
          numberEndMargin,
          number
        )
      }
      if (CoreProps.PARAGRAPH_IS_IN_TIGHT_LIST.require(props).not()) {
        add(LineSpacingSpan(lineSpacingSpan))
      }
    }
  }
}

This is Okay but IMO is not a completed solution, the best way is check PARAGRAPH_IS_IN_TIGHT_LIST prop and add the LineSpacing in that case:

class CustomListItemSpanFactory(
  @Px private val numberEndMargin: Int,
  @Px private val lineSpacingSpan: Int,
  private val drawable: Drawable // TODO
) : SpanFactory {

  override fun getSpans(configuration: MarkwonConfiguration, props: RenderProps): Any {
    return mutableListOf<Any>().apply {
      if (CoreProps.ListItemType.BULLET == CoreProps.LIST_ITEM_TYPE.require(props)) {
        add(
          CustomBulletListItemSpan(
            configuration.theme(),
            drawable,
            CoreProps.BULLET_LIST_ITEM_LEVEL.require(props)
          )
        )
      } else {
        // todo| in order to provide real RTL experience there must be a way to provide this string
        val number = CoreProps.ORDERED_LIST_ITEM_NUMBER.require(props).toString().plus(".")
        add(
          CustomOrderedListItemSpan(
            numberEndMargin,
            number
          )
        )
      }
      if (CoreProps.PARAGRAPH_IS_IN_TIGHT_LIST.require(props).not()) {
        add(LineSpacingSpan(lineSpacingSpan))
      }
    }.toTypedArray()
  }
}


Rancher 2.0 Ingress session affinity doesn't work

I can't seem to get Session Affinity to work with Ingress in Rancher. My ingress config is below.
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    ingress.kubernetes.io/affinity: cookie
    ingress.kubernetes.io/session-cookie-hash: sha1
    ingress.kubernetes.io/session-cookie-name: route
    kubernetes.io/ingress.class: nginx
  labels:
  name: cms
spec:
  rules:
  - host: rancher-cms.cloud-hub.co
    http:
      paths:/
      - backend:
          serviceName: hippo
          servicePort: 80

I expect the Ingress to send the request to the same Pod for a given session, however, it is being sent to any Pod, as a result, JSESSIONID is constantly changing, causing too many Redirects. Without Session Affinity, I won't be able to use Rancher for my deployments -- please help. Thanks in advance.
Versions /Specs of my deployment.

Rancher | v2.1.1
User Interface | v2.1.4
Helm | v2.10.0-rancher5
Machine | v0.15.0-rancher1-1

Ingress details
> kubectl describe ingress -n hippo
Name:             cms
Namespace:        hippo
Address:          <IP ADDRESS>,<IP ADDRESS>,<IP ADDRESS>
Default backend:  default-http-backend:80 (<none>)
Rules:
  Host                      Path  Backends
  ----                      ----  --------
  rancher-cms.cloud-hub.co
                               hippo:80 (<none>)
Annotations:
  field.cattle.io/publicEndpoints:            [{"addresses":["<IP ADDRESS>"],"port":80,"protocol":"HTTP","serviceName":"hippo:hippo","ingressName":"hippo:cms","hostname":"rancher-cms.cloud-hub.co","allNodes":true}]
  ingress.kubernetes.io/affinity:             cookie
  ingress.kubernetes.io/session-cookie-hash:  sha1
  ingress.kubernetes.io/session-cookie-name:  route
  kubernetes.io/ingress.class:                nginx
  field.cattle.io/ingressState:               {"Y21zL2hpcHBvL3JhbmNoZXItY21zLmNsb3VkLWh1Yi5jby8vODA=":""}
Events:                                       <none>

Try this
nginx.ingress.kubernetes.io/affinity: cookie
nginx.ingress.kubernetes.io/session-cookie-hash: sha1
https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md

Thanks, @panho66
That works! I really appreciate it.

Has this resource been disabled in further versions? Can't get it to work on latest rancher.
Name:             transacional-api
Namespace:        services
Address:          A.B.C.D,A.B.C.E,A.B.C.F
Default backend:  default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
Rules:
  Host                    Path  Backends
  ----                    ----  --------
  api.iagentesmtp.com.br
                          /   service-api:80 (<IP_ADDRESS>:80,<IP_ADDRESS>:80)
Annotations:              field.cattle.io/creatorId: u-bfbpm
                          field.cattle.io/ingressState: {"dHJhbnNhY2lvbmFsLWFwaS9zZXJ2aWNlcy9hcGkuaWFnZW50ZXNtdHAuY29tLmJyLy8vODA=":""}
                          field.cattle.io/publicEndpoints:
                            [{"addresses":["A.B.C.D"],"port":80,"protocol":"HTTP","serviceName":"services-api","ingressName":"services:transaciona...
                          nginx.ingress.kubernetes.io/affinity: cookie
                          nginx.ingress.kubernetes.io/affinity-canary-behavior: sticky
                          nginx.ingress.kubernetes.io/affinity-mode: persistent
                          nginx.ingress.kubernetes.io/session-cookie-expires: 300
                          nginx.ingress.kubernetes.io/session-cookie-hash: sha1
                          nginx.ingress.kubernetes.io/session-cookie-name: ianode
Events:
  Type    Reason  Age                  From                      Message
  ----    ------  ----                 ----                      -------
  Normal  Sync    2m2s (x12 over 59m)  nginx-ingress-controller  Scheduled for sync
  Normal  Sync    2m2s (x12 over 59m)  nginx-ingress-controller  Scheduled for sync
  Normal  Sync    2m2s (x12 over 59m)  nginx-ingress-controller  Scheduled for sync

Thanks.


Observe fails when inside decorator (0.8)

Here is the fiddle: http://jsfiddle.net/r8gx1858/24/
So what this decorator does is that it takes a config object like this:
{
    disabled: false,
    required: false,
    hidden: false
}

and applies these properties to a form element inside a div (select, input, button etc).
To see a working example check this fiddle: http://jsfiddle.net/35rLq5Lr/1/
It is the same example as above but with 0.7.3 instead of edge.
Select Italy or Belgium from the dropdown list to see a second dropdown appear, based on field properties set.

@kouts thanks for the report!


Avoid writing @try @catch @else

Before v1.8, Julia does not support the try ... catch ... else syntax. So I have to use TryCatch.jl to do that:
function __run!(job::Job)
    # See https://github.com/JuliaLang/julia/issues/21130#issuecomment-288423284
    @try begin
        global result = job.def()
    @catch e
        job.stop_time = now()
        @error "come across `$e` when running!"
        job.status = e isa InterruptException ? INTERRUPTED : FAILED
        return e
    @else
        job.stop_time = now()
        job.status = SUCCEEDED
        return result
    @finally
        job.count += 1
    end
end

After moving the function definition to Thunk, I had the same problem (But since I was using Julia v1.8 to develop, so that was fine):
@try
    global result = thunk.f(thunk.args...; thunk.kwargs...)
@catch e
    setresult!(thunk, e)
    return e
@else
    setresult!(thunk, result)
    return result
end

But I just found out, I could just use finally and some tricks to avoid else:
try
    thunk.result = Some(thunk.f(thunk.args...; thunk.kwargs...))
catch e
    thunk.erred = true
    thunk.result = Some(e)
finally
    thunk.evaluated = true
end

If no error is raised, thunk.result will be returned; if erred, thunk.result will catch an error and still be returned. No matter what, thunk.evaluated is set to true.

So the topmost example could be rewritten as
function __run!(job::Job)
    try
        global result = job.def()
        job.stop_time = now()
        job.status = SUCCEEDED
    catch e
        job.stop_time = now()
        @error "come across `$e` when running!"
        job.status = e isa InterruptException ? INTERRUPTED : FAILED
    finally
        job.count += 1
    end
end

I probably did not use that because it was a three-part statement, where the last two could have erred, and I did not want them to be captured.

One good thing is that I do not have to define a global variable result to return! Since it is captured by thunk.result anyway.


Fix validateIsLossless so the tests run.

The way validateIsLossless was being exposed led to its tests
never being run. It's a good example of why mutation is bad.
Here we reconfigure it to require it to be mixed into a mutable
specification, because that is the only composition mechanism
we have in the mutable specification scenario.

Oooh, it's a cross build. Will remedy.

Closing this as it's now subsumed by #44


[BUG] Buildah not running as root on self hosted runners

Version

redhat-actions/buildah-build@v2
Describe the bug

When using self hosted runner that runs ubuntu 22.04 the default user is "runner" instead of root
this causes errors related to permission to some folders and files.
although we have option to run as root user but its only when you use sudo command which is not possible with this action
for example:
Error processing tar file(exit status 1): potentially insufficient UIDs or GIDs available in user namespace (requested 0:50 for /var/local): Check /etc/subuid and /etc/subgid: lchown /var/local: invalid argument
time="2023-08-28T19:49:27Z" level=error msg="exit status 125"

and
time="2023-08-28T19:49:26Z" level=warning msg="error running newgidmap: exit status 1: newgidmap: write to gid_map failed: Operation not permitted\n"
time="2023-08-28T19:49:26Z" level=warning msg="falling back to single mapping"
time="2023-08-28T19:49:26Z" level=warning msg="error running newuidmap: exit status 1: newuidmap: write to uid_map failed: Operation not permitted\n"
time="2023-08-28T19:49:26Z" level=warning msg="falling back to single mapping"

When i run the buildah command with sudo (not part of the action)
everything is working
sudo /usr/bin/buildah bud .....

Steps to reproduce, workflow links, screenshots
Use ARC (actions controller runner) with the runner image: "summerwind/actions-runner:ubuntu-22.04"

I have the exact same problem right now and it took ma almost a day to find this issue. Thanks a lot and I hope the PR will be merged soon.

I have the exact same problem right now and it took ma almost a day to find this issue. Thanks a lot and I hope the PR will be merged soon.

Hi! @joerg
if it relevant to you
we ended up doing a workaround,
we are using the cli of buildah and podman directly


ManifestService interface is awkward for client use

registry/client/repository.go implements a client-side version of ManifestService. However, the ManifestService interface doesn't map well to the client-side functionality, and as a result there are some unintuitive aspects of this implementation:

Get can operate on either a digest or a tag, contrary to the documentation in ManifestService which says "Get retrieves the manifest specified by the given digest". To retrieve a tag, it's necessary to use a functional option which causes the dgst argument to be ignored.
Put needs to be passed a tag, otherwise it fails to build a URL with the error mux: variable "" doesn't match, expected "^[\\w][\\w.-]{0,127}|[a-zA-Z0-9-_+.]+:[a-fA-F0-9]+$". However, the interface doesn't include a tag argument, so this is passed in through a mandatory functional argument (which is specific to the client implementation).

My initial conclusion was that the client side version is sufficiently different from the generic ManifestService that it shouldn't try to satisfy the interface. Instead, it should expose its own member functions that make sense (GetDigest, GetTag, Put with a tag argument). I tried to make this change, but found that repository.Manifests must return distribution.ManifestService, otherwise *repository doesn't satisfy the distribution.Repository interface. So it's not easy to unravel the web of interfaces. I'm not sure how to proceed, but would really like to find a way clean up the awkwardness in the client-side manifest functions.

Get can operate on either a digest or a tag, contrary to the documentation in ManifestService which says "Get retrieves the manifest specified by the given digest". To retrieve a tag, it's necessary to use a functional option which causes the dgst argument to be ignored.

Not sure why this is. This should only take fetches on the primary index, which is the digest.

Put needs to be passed a tag, otherwise it fails to build a URL with the error mux: variable "" doesn't match, expected "^[\w][\w.-]{0,127}|[a-zA-Z0-9-_+.]+:[a-fA-F0-9]+$". However, the interface doesn't include a tag argument, so this is passed in through a mandatory functional argument (which is specific to the client implementation).

Sounds like a bug. The tag and digest should both be calculated from the manifest argument.
Seems like most of this can be addressed by following the refactoring plan that was laid out some time ago.

I realize this is commenting on a closed issue, but wanted to add some color.  I do agree with Aaron's concerns.
Strictly,  Get should only operate on a digest with the digest being retrieved from a tag service.  There is currently no tag service which implements this (nor does the  registry REST API support tag operations), so the tag is required to make that lookup within the registry.
For Put.  The manifest argument does not expose any tag information.  The manifest implementations are behind an interface and schema 2 does not implicitly carry a tag.  The tag comes from the UI and needs to be passed to the registry to make the tag association.   Again with a discrete tag service, the name/tag association would be made there and the manifest Put by digest.
I see a couple of options:

Wait until a tag service has been created (or move for notary to be used)

Add registry endpoints to support tagging operations

Considered a new type as the argument to Put and Get which could hold a tag or a digest.

I don't disagree with the assessment, but a lot of this is covered by the original refactoring plan. For example, the fact that Put takes other arguments was supposed to be a temporary measure dependent on the addition of the TagService. It is perfectly acceptable to issue one request to /v2/<name>/manifests/<digest> using the ManifestService then /v2/<name>/manifests/<tag> using the TagService. At some point, we can even add actual endpoints for tags, as has been proposed in the past.
Another possibility is to "lift" the entire API and dispatch the operations with references. For example Put(reference, object) would validate the whole operation against the reference, figuring out if digests and tags should be involved. This is somewhat driven by the needs of the daemon but may be a better interface ultimately, as reference.Reference can represent the variation under concern.
Go ahead and re-open this if you believe #354 really doesn't cover the goals here. If not, it is even okay to update that issue, as we are marching down that path anyways and it would be good to clarify for the current state of distribution.

I realize this is commenting on a closed issue, but wanted to add some color. I do agree with Aaron's concerns.

@RichardScothern You are allowed to break this rule when it makes sense. ;)


cdemu Fails to Run Due to ImportError

Describe the bug:
Attempting to run cdemu, but encounter an error which prevents successful run.
when checking the status with command cdemu status results in an ImportError related to GLib.
Below is the detailed traceback from the command.
Steps To Reproduce

Try to run cdemu, does not run.
Execute the command cdemu status in the terminal.

Output of command;
Traceback (most recent call last):
  File "/nix/store/ii25vcywqfbmkw3lzpr1fagj1ndxynwr-cdemu-client-3.2.5/bin/.cdemu-wrapped", line 33, in <module>
    from gi.repository import GLib
  File "/nix/store/40cddha2iiqzbqd6dpal3rlrgvb4p0yc-python3.11-pygobject-3.48.2/lib/python3.11/site-packages/gi/importer.py", line 133, in create_module
    raise ImportError('cannot import name %s, '
ImportError: cannot import name GLib, introspection typelib not found

Expected behavior
cdemu should build, install and run.  The cdemu status command should execute without any errors, displaying the current status of cdemu.
Screenshots
n/a
Notify maintainers
Herwig Hochleitner aka @bendlas
Metadata
[nix-shell:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.30-rt30, NixOS, 24.05 (Uakari), 24.05.20240507.b211b39`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `""`
 - nixpkgs: `/nix/store/f0ssy3p6898x9k880l23mhd0fl6rvrb2-source`

 - host os: `Linux 6.6.30-rt30, NixOS, 24.05 (Uakari), 24.05.20240507.b211b39`

I can't reproduce this issue on release-24.05 or unstable. It looks like you may be running an outdated version.

Excuse me,  an outdated version of what?    I'm running the most recent stable, and acquired cdemu from that channel.
The problem persists.  This seems an issue with the package, not my system, or kernel.

 - host os: `Linux 6.6.30-rt30, NixOS, 24.05 (Uakari), 24.05.20240507.b211b39`

I can't reproduce this issue on release-24.05 or unstable. It looks like you may be running an outdated version.

Excuse me, an outdated version of what? I'm running the most recent stable, and acquired cdemu from that channel.

Of nixpkgs. Are you really sure? I'm having doubts, given that:

Your timestamp says 20240507 ....
.... which incidentally is 8 days before the conclusion of the linked PR, which fixed an issue with the exact same error message, as you're describing
.... and the commit hash links to this one https://github.com/NixOS/nixpkgs/commit/b211b39

IDK ... can you reproduce it in a fresh vm or something?

closing as a likely PEBKAC, please reopen if the problem is observed on a current revision of nixpkgs


Terminal Display Crash

Issue Type: Bug
When I updated vscode to 1.31 my terminal started to crash, displaying weird colored backgrounds and distortioned fonts. I already disabled all extensions and this keeps happening. it  just crashes in the terminal area, the other editor areas work just fine.
If I kill terminal and open a new one, it takes a few commands to start crashing. Also the shapes and colors change when scrolling the terminal.
VS Code version: Code 1.31.0 (7c66f58312b48ed8ca4e387ebd9ffe9605332caa, 2019-02-06T08:51:24.856Z)
OS version: Linux x64 4.15.0-45-generic

System Info

Item
Value

CPUs
AMD Phenom(tm) II X2 560 Processor (2 x 3300)

GPU Status
2d_canvas: enabledchecker_imaging: disabled_offflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: disabled_offnative_gpu_memory_buffers: disabled_softwarerasterization: disabled_softwaresurface_synchronization: enabled_onvideo_decode: unavailable_offwebgl: enabledwebgl2: enabled

Load (avg)
1, 0, 0

Memory (System)
7.79GB (0.63GB free)

Process Argv
--unity-launch

Screen Reader
no

VM
0%

Extensions: none

Switching to the 'fallback renderer' seemed to have fixed the issue. However the standard renderer still has it.

Switching to the 'fallback renderer' seemed to have fixed the issue. However the standard renderer still has it.

I think i have encountered the same bug.
It flickers and sometimes shows the actual terminal.
The "fallback renderer" seems to work fine all the time.

version: code 1.34.0-2
OS: linux x64 5.1.4

This probably means your graphics drivers are broken. Options:

Update drivers 🤞
Disable GPU in vscode by launching with code --disable-gpu
Set rendererType to dom


feat(@angular-devkit/core): use the root project as default project by default

If there isn't any defaultProject set, permit to use the "root project" (ie the one which
isn't in the /projects/ folder) as the default project "by default" if it exists.
In my opinion, if Angular CLI permit to create a project at workspace's root even if their is other projects in the /projects/ folder (especially as it does this by default when creating a new workspace), this "root project" should be, logically, the default project, as this is the one developers will look at first.

As we are using angular-workspace.json, do you have some advice on how I could / should test this ? In order to avoid creating a conflict with #871, I would need to unset defaultProject in workspaceJson for the related tests, but this would make it unsynced with the json file. Is this a problem ?

Heya, I'm sorry but I don't think we should assume the default based on root. What you say does make sense, but I think that soft default trades some niche usage convenience (default when multiple projects are present) for some confusion (if things change folder they break).
If this change were to go in, then it would need to be supported for quite a while. I can see this causing problems in the future and don't think the tradeoff is worth it.

Thank you @filipesilva for this review. Didn't thought about this.


Switch from tqdm to fastprogress for jupyter-lab friendly progress bars

🚀 Feature
Use https://github.com/fastai/fastprogress instead of tqdm for displaying progress bars.
Motivation
tqdm doesn't work well with Jupyter Lab. This creates issues with pytorch-lightning's progress bars, where each validation bar creates a newline in the cell output: #1399. This is a well-known issue in jupyter-widgets: https://github.com/jupyter-widgets/ipywidgets/issues/1845
The Fast.ai people developed fastprogress as a replacement for exactly this reason.
Pitch
Replace tqdm with fastprogress.
Alternatives
The alternative is to wait for jupyter-widgets to fix the issue on their side. Given that this issue has been around since November 2017, I'm not too hopeful that it will happen, though. It looks like this would require major design changes in ipywidgets and/or jupyter-lab.
Additional context
Motivated by #1399.

Could be done as a follow up to the progress bar callback PR ❤

@tcwalther sorry, we don't want to  add more dependencies to lightning.
If this is needed, then it should be added as a callback with a fresh implementation, but no dependencies :)

Perhaps a fast progress callback could be a good lightning bolt (https://github.com/PyTorchLightning/lightning-bolts)???

so open an issue there?

https://github.com/PyTorchLightning/lightning-bolts/issues/2


no-complex-conditionals: Prevent conditionals from being complex and potentially difficult to maintain in the future

Bad
// Setup
const status: number = ...;
const isSkyBlue: boolean = ...;
const isRightDay: boolean = ...;


[Enhancement] Support for showing backdrop with controls optional

Added support for making the backdrop seen when controls are visible optional on material theme. Kept it visible by default.

It seems to me that exposing backdropColor will be a better idea.
Thanks!

Member

Yes, makes sense. I'll close this and create a new PR?

Hey @alexmercerind, please grant me contributor access to this repo. I have the changes ready to be pushed.

@alexmercerind I need to push a different branch. Till now I was creating PRs from within GitHub as they were minor changes. I have never gotten access to push a new branch to this repo yet.

@


Luckperm server side commands not recognized with client running Forge version 39.0.46 or later.

Description
It seems that there may be a command precedence issue with the LuckPerms server plugin (Latest: v5.3.98) and Forge client mod (39.0.46 or later).
Forge developers state that plugin is not sending commands for client to register - https://github.com/MinecraftForge/MinecraftForge/issues/8438#issuecomment-1025177911

https://github.com/MinecraftForge/MinecraftForge/pull/7754 - Add Client Commands
PR request above seems to be what has caused the issue.
Reproduction Steps
1: Start Minecraft Paper 1.18.1 Server with LuckPerms Plugin Installed
2: Install Forge Mod Version 39.0.46 or later on client
3: Connect to Minecraft Paper Server with client running Forge
4: Use /luckperms or /lp commands to reproduce that command is not registered
Expected Behaviour
When using a client running Forge 39.0.46 or later, LuckPerm v5.3.98 commands work as they do prior to 39.0.46.
Server Details
git-Paper-177
LuckPerms Version
v5.3.98
Logs and Configs
No response
Extra Details
This is able to be reproduced consistently.

Yeah having the same issue downgrade of forge fixes it

To anyone else having this issue:
https://github.com/MinecraftForge/MinecraftForge/issues/8438#issuecomment-1029526426
Since LuckPerms is using an older method of registering commands, an update in the Forge custom commands is causing a breakage. Unfortunately the only fix at the moment is to stay on or downgrade to 39.0.45 until LuckPerms updates to the newer way of registering commands that mark the commands as executable.

Fixed in https://github.com/lucko/commodore/commit/7bbcbe4f4722d5b670a074a0995bf24633d03885

Thanks for the quick fix :)


azdata accounts api

When trying to make an extension by which i will connect to my azure key vault, for information retrieval,
i am in position to do so like this :
azdata.accounts.getAllAccounts  -> gave the response objects, where account object has tenant and clientID informaton
but no subscription key which is needed so i  could construct the REST GET call to get list of my keyvaults as specified in the Azure docs, the problem is that i nowhere see a method to obtain a subscription key for my account which is needed to complete my REST call  (https://docs.microsoft.com/en-us/rest/api/keyvault/vaults/list)   --->
 var req: RequestPrepareOptions = {             url:https://management.azure.com/subscriptions/${subscriptionId}/resources?$filter=resourceType eq 'Microsoft.KeyVault/vaults'&api-version=2019-09-01, method: "GET"         };

For azure account subscriptions you will need to use the azurecore extension API and call getSubscriptions
Example : https://github.com/microsoft/azuredatastudio/blob/main/extensions/sql-migration/src/api/azure.ts
Note that to get the typings file for your project you'll need to manually copy over azurecore.d.ts and reference it there - we don't currently provide another way of getting it.


[Bug] [dolphinscheduler-task-sql/dolphinscheduler-task-api] NullPointerException when sql contains ?

Search before asking

[X] I had searched in the issues and found no similar issues.

What happened
NullPointerException happened when running sql task, with both ? and customer parameter in sql.
E.g.
select '${mode}', '?'
[INFO] 2023-07-07 23:51:17.551 +0000 - setSqlParamsMap: Property with paramName: mode put in sqlParamsMap of content select '${mode}', '?'  successfully. [ERROR] 2023-07-07 23:51:17.551 +0000 - sql task error java.lang.NullPointerException: null [ERROR] 2023-07-07 23:51:17.551 +0000 - Task execute failed, due to meet an exception org.apache.dolphinscheduler.plugin.task.api.TaskException: Execute sql task failed 	at org.apache.dolphinscheduler.plugin.task.sql.SqlTask.handle(SqlTask.java:168) 	at org.apache.dolphinscheduler.server.worker.runner.DefaultWorkerDelayTaskExecuteRunnable.executeTask(DefaultWorkerDelayTaskExecuteRunnable.java:49)
What you expected to happen
No Exception should happen.
How to reproduce
Create a SQL Task, use the sql
select '${mode}', '?'
And run the task.
Anything else
My environment is 3.1.4.
After code investigation, the suspicious code is here:
https://github.com/apache/dolphinscheduler/blob/a1bf597d0a348f67a3e943217dcf700e484ac9f8/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/ParameterUtils.java#L195
        String[] split = sql.split("\\?");
Seems assuming any ? in sql is parameter holder, which is not true.
Version
3.1.x
Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

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

same as #13136


[Bug] Hover effect on navbar

want to add a hover effect on navbar to make its visibility and ui more attractive
@maniyaom can you assign me this

can you assign this issue to me!

@17arindam , another contributor is already working on this. If you find any other issues, feel free to raise a new one.


Splash screen issue

@seabornlee @JamesSmartCell  i tried changing the splash screen, i read through the other issues, but im new to java and have been building with   react native and flutter for most of my dev life. Would be very appreciative if you could take me through or give me a detailed explanation with on how to change it. Thanks.

Hi, you can just replace two files:

ok sure. can i just copy and paste the image

tanks alot i understand now..


maxlength prop doesn't actually work

Peeked through the source code too and doesn't look like it's accounted for

Hi @arjun-bhatt it is added from this commit and it should comes from the textInputProps prop


light_unet is not working via unit tests

Describe the bug
When light_unet is added to the all_modes_segmentation [ref], the tests fail.
To Reproduce
Steps to reproduce the behavior:

Add light_unet to all_modes_segmentation [ref]
Run pytest [ref]
See error

Expected behavior
It should pass.
Screenshots
N.A.
GaNDLF Version
0.0.10-dev
Additional context
N.A.

Getting this error:
Exception has occurred: RuntimeError
running_mean should contain 64 elements not 32
  File "C:\Projects\GANDLF\GANDLF\models\seg_modules\DecodingModule.py", line 48, in forward
    x = self.act(self.in_0(x))
  File "C:\Projects\GANDLF\GANDLF\models\unet.py", line 335, in forward
    x = self.de_3(x, x4)
  File "C:\Projects\GANDLF\GANDLF\training_loop.py", line 84, in step
    output = model(image)
  File "C:\Projects\GANDLF\GANDLF\training_loop.py", line 175, in train_network
    loss, calculated_metrics, _ = step(model, image, label, params)
  File "C:\Projects\GANDLF\GANDLF\training_loop.py", line 810, in training_loop
    model, train_dataloader, optimizer, params
  File "C:\Projects\GANDLF\GANDLF\training_manager.py", line 242, in TrainingManager
    testing_data=testingData,
  File "C:\Projects\GANDLF\testing\test_full.py", line 157, in test_train_segmentation_rad_2d
    reset_prev=True,
  File "C:\Projects\GANDLF\gandlf_run", line 86, in main
    test_train_segmentation_rad_2d("cuda")
  File "C:\Projects\GANDLF\gandlf_run", line 158, in <module>
    main()

This is commented, for now.


Cannot build s2geometry-node

I've tried many times and many tips over the internet to build s2geometry using node-gyp but each time it fails on errors like
..\geometry\s1interval.cc(249): error C2065: 'M_PI': undeclared identifier [C:\
nodejs\poke\node_modules\s2geometry-node\build\NativeExtension.vcxproj

I'm pasting a npm-debug.log
npm-debug.txt
npm -v 3.10.5
node -v v4.4.7

Not sure, but i think you need node > 6

sudo apt-get install build-essential
npm install -g pokemon-go-node-api

This working for me.

The build-essential doesn't work for me. It's already installed and still cannot pass s2geometry-node build.

I still can't figure this out either. In the mean time, what I did was
npm install --save<EMAIL_ADDRESS>

It's an issue on Windows machines. @billyriantono said he would look for a fix. Right now we are kinda stumped on Windows.
Meanwhile, try booting up a linux VM and see if it npm installs.

I've some issues with "isnan has not been declared"

I'm on linux and I'm getting this:
module.js:327
    throw err;
    ^

Error: Cannot find module 'nan'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at [eval]:1:1
    at Object.exports.runInThisContext (vm.js:54:17)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:409:26)
    at node.js:579:27
    at nextTickCallbackWith0Args (node.js:420:9)
gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/fabio/.nvm/versions/node/v4.4.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR!

Elementary OS, basically it's ubuntu 14.04 the weird thing is yesterday I tried this repo on this machine and everything worked fine. Then I created a new folder for a fresh project and suddenly it didn't compile anymore

i'm on 16.04 and it just don't work :(

@vekexasia  you are not the only one, @LASkuma had the same problem https://github.com/d-pollard/Pokemon-GO-node-api/commit/526d671084d996837cd3dc06ece1be5e790636cf#commitcomment-18350298

Sorry for the nan problem ...  i have removed from package.json but i am miss in one file have been updated in<EMAIL_ADDRESS>

Can I build it on my Mac for a windows machine?

i have to problems with s2geometery.
console: http://pastebin.com/Xvu53Ts1
npm-log: http://pastebin.com/MShX1K4T
System: Ubuntu 14.04
Node: 6.3.0
NPM: 3.8.8

I couldn't get it to build on Ubuntu 16.04 on my Chromebook, but it did build okay on a 15.04 VM I have on my desktop...

@Luzifix have you try npm install s2geometry-node ?

@billyriantono Same error :(

After reinstall node & npm on linux it works fine :)

In my case, the problem was Windows. I have Visual Studio 2016, so that could be part of the issue.
I made a Virtual Box for Ubuntu and I got the API running in under 10 minutes. I highly recommend using Virtual Box for developing anyway. Linux is the best!

Fixed in https://github.com/Armax/Pokemon-GO-node-api/pull/165 by using pure JavaScript - no C++ or compiler necessary.


Add backend capability introspection to act-backend list

The backend reshuffle yesterday added a new bit of work on letting backends describe what 'capabilities' they have, eg 'run directly', 'make testing harness', etc.  This isn't yet plumbed into any user-facing code, so the obvious thing to do would be to add a thing to act-backend list that prints off, say, a comma-separated list of backend flags at the end of each backend.

This is naturally a 'Christmas break' project, not critical in any way.  (I might make a label for these)


Clipping of text in queries in firefox

From @dosumis on November 28, 2017 12:6
@Robbie1977 commented on Tue Nov 21 2017

Copied from original issue: VirtualFlyBrain/geppetto-vfb#117

This issue was moved to VirtualFlyBrain/VFB2#78

This issue was moved to VirtualFlyBrain/VFB2#79


prevent pingTimer from exhausting threads

Hello,
It's a long time without issues for us !
if doReconnect thread is slow or blocked (owning the mu lock), then the ping timer keeps creating threads waiting for the mu lock, until resources are exhausted.
We have a memory dump with > 900 threads for this timer. I'm still trying to find why the doReconnect thread was blocked while reading from the underlying socket

This certainly seems like the desired behavior: only one in-flight PING. Subsequent PINGs would not even be scheduled until after the current one succeeds.

@stephenjannin , Thanks - much appreciated!  LGTM.  Once I test this manually (AppVeyor seems to be having issues), I'll merge it.

Tests pass.  Thanks again!


Add Selection Sort in C++

Title:
Add Selection Sort in C++
Body:
Yes, I am working in this issue

@asiatik I want to add Selection Sort function in C++. Would you please assign it to me?


Support arm64 native CppUnitTestFramework with dotnet test

Support dotnet test nativeArm64.dll

@MarcoRossignoli  not sure how to revoke my approval without blocking you from merging. So I just disabled automerge.
Should the native detection run when we know that the default architecture is set?

Should the native detection run when we know that the default architecture is set?

we should never force if native.


gpg: failed to start keyboxd

I get this error in our pipeline since today, so probably connected to the newst version:
gpg: directory '/github/home/.gnupg' created
gpg: error running '/usr/libexec/keyboxd': probably not installed
gpg: failed to start keyboxd '/usr/libexec/keyboxd': Configuration error
gpg: can't connect to the keyboxd: Configuration error
gpg: error opening key DB: No Keybox daemon running
gpg: key A[26](https://github.com/qupaya/monorepo/actions/runs/4934161272/jobs/8820664943#step:10:27)07043A44F8A43: public key not found: I/O error
gpg: error running '/usr/libexec/keyboxd': probably not installed
gpg: failed to start keyboxd '/usr/libexec/keyboxd': Configuration error
gpg: can't connect to the keyboxd: Configuration error
gpg: error opening key DB: No Keybox daemon running
gpg: key A2607043A44F8A43: failed to re-lookup public key: I/O error
gpg: error reading '-': I/O error
gpg: import from '-' failed: I/O error
gpg: Total number processed: 0
gpg:       secret keys read: 1

this output is generated by actionhippie/kustomize@v1, though. Is this connected?

wrong repo, was https://github.com/actionhippie/kustomize related


I am setting the session id in AIRequest object but its giving some other session id in response

      `AIRequest request = new AIRequest();

       request.setQuery(message);

       request.setSessionId(MyData.getInstance(MyApplication.getInstance()).getGatewayId() + "_" +
               MyData.getInstance(MyApplication.getInstance()).getUsername());

       return aiService.textRequest(request);`

and when i get AIResponse object it gives me some different session id.
How can i set my custom session id for a particular user.

You may try to build Java client library from the "sessionid-workaround" branch:
git clone -b sessionid-workaround https://github.com/api-ai/apiai-java-client.git
cd apiai-java-client/
mvn install

then clean and rebuild your Android project and try again.

I am already using the libai-1.4.9 after building it using mvn and
installed it in my android project as module dependency
I am using two dependency compile project(':libai-1.4.9') and compile
'ai.api:sdk:2.0.6@aar'
Now what to do?
On Sat, Jul 8, 2017 at 2:29 PM, folomeev<EMAIL_ADDRESS>wrote:

You may try to build Java client library from the "sessionid-workaround"
branch:
git clone -b sessionid-workaround https://github.com/api-ai/apiai-java-client.gitcd apiai-java-client/
mvn install
then clean and rebuild your Android project and try again.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/api-ai/apiai-android-client/issues/48#issuecomment-313844088,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AbKcR8JAQcHDoRA2qC4Kh4ATaqt0Hztgks5sL0TYgaJpZM4OPetO
.

--
Siddhant Panhalkar
Senior Android Developer
Cosine Labs
https://cosinelabs.com/

Checkout libai source from sessionid-workaround branch
It will bring you libai-1.5.10 sources
Build it and install into your local repository using mvn
Change dependency version in the Android project from 1.4.9 to 1.5.10
Clean and rebuild Android project

Thanks for the help, there are two dependency that i got one is  libai-1.5.10
sources.jar and other is  libai-1.5.10.jar which one to use
On Sat, Jul 8, 2017 at 3:23 PM, folomeev<EMAIL_ADDRESS>wrote:

Checkout libai source from sessionid-workaround branch
It will bring you libai-1.5.10 sources
Build it and install into your local repository using mvn
Change dependency version in the Android project from 1.4.9 to
1.5.10
Clean and rebuild Android project

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/api-ai/apiai-android-client/issues/48#issuecomment-313846287,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AbKcRw8FkB9WsEt7NDOw6pouRBrzNIkrks5sL1GWgaJpZM4OPetO
.

--
Siddhant Panhalkar
Senior Android Developer
Cosine Labs
https://cosinelabs.com/

I am using libai-1.5.10.jar and i am getting this
error java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory while
initialising AIService object
On Sat, Jul 8, 2017 at 6:43 PM, Siddhant Panhalkar <
<EMAIL_ADDRESS>wrote:

Thanks for the help, there are two dependency that i got one is  libai-1.5.10
sources.jar and other is  libai-1.5.10.jar which one to use
On Sat, Jul 8, 2017 at 3:23 PM, folomeev<EMAIL_ADDRESS>wrote:

Checkout libai source from sessionid-workaround branch
It will bring you libai-1.5.10 sources
Build it and install into your local repository using mvn
Change dependency version in the Android project from 1.4.9 to
1.5.10
Clean and rebuild Android project

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/api-ai/apiai-android-client/issues/48#issuecomment-313846287,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AbKcRw8FkB9WsEt7NDOw6pouRBrzNIkrks5sL1GWgaJpZM4OPetO
.

--
Siddhant Panhalkar
Senior Android Developer
Cosine Labs
https://cosinelabs.com/

--
Siddhant Panhalkar
Senior Android Developer
Cosine Labs
https://cosinelabs.com/

Try to add to dependency:
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.1'

Hi, I did all these things with the updated library but still i am getting
unauthenticated request. Any thing that I can do to fix this.
Thanks
On Sat, Jul 8, 2017 at 11:50 PM, folomeev<EMAIL_ADDRESS>wrote:

Try to add to dependency:
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.1'
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/api-ai/apiai-android-client/issues/48#issuecomment-313872856,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AbKcR9xS2J4RgGSVQI002M_L7NMULE_Pks5sL8h8gaJpZM4OPetO
.

--
Siddhant Panhalkar
Senior Android Developer
Cosine Labs
https://cosinelabs.com/

Hi, I am using api.ai speech recogniser so could you please tell me how can
I set the session Id in this request, below is my code that I am using. I
am using AIService startlistening method. Please let me know how can i do
it.
final List contexts = Collections.singletonList(new AIContext
(MyData.getInstance(MyApplication.getInstance()).getGatewayId() + "_" +
MyData.getInstance(MyApplication.getInstance()).getUsername()));
final RequestExtras requestExtras = new RequestExtras(contexts, null);
aiService.startListening(requestExtras);
Thanks
On Mon, Jul 10, 2017 at 2:55 PM, Siddhant Panhalkar <
<EMAIL_ADDRESS>wrote:

Hi, I did all these things with the updated library but still i am getting
unauthenticated request. Any thing that I can do to fix this.
Thanks
On Sat, Jul 8, 2017 at 11:50 PM, folomeev<EMAIL_ADDRESS>wrote:

Try to add to dependency:
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.1'
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/api-ai/apiai-android-client/issues/48#issuecomment-313872856,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AbKcR9xS2J4RgGSVQI002M_L7NMULE_Pks5sL8h8gaJpZM4OPetO
.

--
Siddhant Panhalkar
Senior Android Developer
Cosine Labs
https://cosinelabs.com/

--
Siddhant Panhalkar
Senior Android Developer
Cosine Labs
https://cosinelabs.com/

Please update your reference up to latest release (compile 'ai.api:sdk:2.0.7@aar') and run again the code you gave in first comment.

@folomeev  I tried your solution.Not able to change the session ID.
Did anybody find a solution?


Please add a license file and a screen shot

I'd like to add this to awesome-zsh-plugins, but I prefer to add themes with screen shots in the readme so that users can see what they look like without having to install them.
Also, please add a license file, some people won't use any code that doesn't have an open source license. If you don't have one in mind, https://choosealicense.com is a good resource to help you select an appropriate one.
Thanks!

Done! Glad you liked it enough to add it to your repository! :D


(gimli::write::ConvertError)InvalidAttributeValue while gimli::write::Dwarf::from() conversion

I am using Dwarf::from() to convert a readable Dwarf instance to a writable one using convert_address() function as follows:-
fn convert_address(addr: u64) -> Option<gimli::write::Address> {
    Some(gimli::write::Address::Constant(addr))
}
let mut write_dwarf = match gimli::write::Dwarf::from(&dwarf, &convert_address) {
    Ok(write_dwarf) => write_dwarf,
    Err(error) => panic!("Error while Dwarf::from() : {:?}", error),
};

And I'm getting an InvalidAttributeValue error on the Dwarf::from line.
As mentioned in Dwarf::from()'s documentation,

convert_address is a function to convert read addresses into the Address type. For non-relocatable addresses, this function may simply return Address::Constant(address). For relocatable addresses, it is the caller's responsibility to determine the symbol and addend corresponding to the address and return Address::Symbol { symbol, addend }.

I'm simply returning Address::Constant(addr) in convert_address function.
Could someone please clarify the changes to be done for relocatable addresses in convert_address function? (Is convert_address the cause for this error?)
Thanks

Unfortunately it's a bit hard to work out the cause of the InvalidAttributeValue without doing some debugging, since there's a few places that can generate it. You could modify gimli to have more specific errors. Or if you can provide the file you are trying to convert then I can look into it.
Your convert_address function is fine. It won't be the cause of the InvalidAttributeValue error. If you do want to handle relocatable addresses (because you're processing an object file instead of an executable file) then see https://github.com/philipc/rewrite/blob/master/src/dwarf.rs for an example. Be warned that it's a bit convoluted though. Implementing #409 would make this simpler.

Sure, thanks. This is the file I'm working with : object-file. Can you please have a look at it?
What I intend to do is : read an executable or relocatable ELF object file, modify some debugging information and then create a new executable or relocatable ELF object file with this modified debugging information.
I tried working on an executable (reading it and then recreating it), but it didn't work (there were many sections/symbols/data missing in the output file and couldn't produce an executable output file). So, I moved on to work on a relocatable object file, recreating it and then linking them with the compiler again. In this case, I'm facing this issue - InvalidAttributeValue.
I'm currently using gimli with object for processing.
Could you please suggest a good way to do this task?(Should I work on executables or relocatables?)
Thanks for pointing me to rewrite/dwarf.rs and the related issue. Will look into it.

I noticed that object library worked fine with a relocatable object file but had issues with an executable file(couldn't reproduce all the contents and couldn't create an executable file).

Correct, object doesn't support writing executables, only reading them.

On the other hand, gimli seems to be working fine with executable files (I can read DWARF sections and modify them) but has issues when given a relocatable object file as input - (getting InvalidAttributeValue error). Could you please provide your input on this?

I updated rewrite to handle current gimli and object versions, but I wasn't able to reproduce the InvalidAttributeValue error when running it on sumofn-O0-2.o. So it may just be that you're not handling relocations yet.
gimli won't handle relocations if you're only using the its Reader implementations. You need to provide your own. See ReaderRelocate in rewrite. But note that doesn't work for relocations in .eh_frame (I've filed #484).

Thanks @philipc ! I think I initially uploaded the wrong file. Sorry for that. The correct file with which I'm getting an InvalidAttributeValue error is sumofn-O3.o. I've updated my previous comment. Could you please test for this file?
Thanks.

Ok okay, yeah I am getting the InvalidAttributeValue for that one. I'll look into it.

It's the DW_AT_GNU_locviews attribute, which we don't support converting or writing yet.

Thank you @philipc for looking into it! After disabling GNU location views while compiling, it worked!

Hi @philipc !
I tested out your dwarf rewrite - rewrite/dwarf.rs for the sumofn-O3.o. As you pointed out, it doesn't handle .eh_frame relocations yet. Also, I found that .debug_aranges section was missing from the output object file. So I removed .debug_aranges from is_rewrite_dwarf_section() and copied it into output_object using object library. But, when I ran gdb on the output object file - output.o, it lacked type information for a global variable sum in sumofn-O3.o(input obj). I checked .debug_info section for the variable DIE and it is correctly pointing to a base_type DIE with name int and size 4 bytes. Still, when I try to (gdb) p sum inside gdb session, it gives an error : 'sum' has unknown type; cast it to its declared type. It couldn't find the size/type of the variable without explicit type casting. Can you please provide some pointers on this?
Thanks!

Probably the problem is that gimli doesn't support writing DW_OP_addr yet (see #474). This requires a relocation for the address value, but currently rewrite will simply copy the DW_AT_location bytes over without handling the relocation, and gdb will end up with a null address.

Also, I found that .debug_aranges section was missing from the output object file. So I removed .debug_aranges from is_rewrite_dwarf_section() and copied it into output_object using object library.

That's only working by chance. gimli needs to generate a new .debug_aranges. Copying the old one isn't guaranteed to work.

Probably the problem is that gimli doesn't support writing DW_OP_addr yet (see #474). This requires a relocation for the address value, but currently rewrite will simply copy the DW_AT_location bytes over without handling the relocation, and gdb will end up with a null address.

Ah, okay. But, then in this case, even after explicit type casting (gdb) p (int)sum it wouldn't have worked?

That's only working by chance. gimli needs to generate a new .debug_aranges. Copying the old one isn't guaranteed to work.

Oh, I see. There is no field for .debug_aranges in gimli::read::Dwarf struct. So should gimli produce this section automatically? Do you think it's a bug?

Ah, okay. But, then in this case, even after explicit type casting (gdb) p (int)sum it wouldn't have worked?

At a guess, it works because it can still find the address from the symbol table.

Oh, I see. There is no field for .debug_aranges in gimli::read::Dwarf struct. So should gimli produce this section automatically? Do you think it's a bug?

Yes gimli should produce the section. Write support is still an incomplete feature. See #390.

At a guess, it works because it can still find the address from the symbol table.

Okay, I'm confused, I wonder why gdb is not able to use the base_type DIE(which is providing the variable type and size) with this address then.

Yes gimli should produce the section. Write support is still an incomplete feature. See #390.

Okay, thanks! I would like to contribute to this. Can you please suggest a starting point?

Okay, I'm confused, I wonder why gdb is not able to use the base_type DIE(which is providing the variable type and size) with this address then.

I haven't looked at the gdb source, but my expectation is that it has two code paths:

one that uses DWARF, and requires both a base type and a location in the DWARF
one that uses the symbol table, and requires the user to specify the type

Okay, thanks! I would like to contribute to this. Can you please suggest a starting point?

Great! .debug_aranges should be fairly straightforward to implement. I think you need to add it to Sections and output it when writing .debug_info.
I am currently working on #479.

I haven't looked at the gdb source, but my expectation is that it has two code paths:

Okay, got it. Thanks!

Great! .debug_aranges should be fairly straightforward to implement. I think you need to add it to Sections and output it when writing .debug_info.

Sounds good, will start working on it!

I am currently working on #479.

:+1:

Hi @philipc !
I have tested a raw version of .debug_aranges writing into output object file. I created a src/write/aranges.rs module and called define_section! macro there and added Debug_Aranges into Sections inside src/write/section.rs. As Debug_Aranges had not offset required, so I added a new pattern inside macro_rules! define_section macro definition with only two arguments. In the src/write/unit.rs module, where each unit is being iterated to write to .debug_info section, I added a call to write .debug_aranges section with the hard-coded byte array buf just to test.
But I will have to define a new Struct to write the Debug_Aranges section.
Any comments? Is this the right approach?
Thanks

But I will have to define a new Struct to write the Debug_Aranges section.

I had initially thought that we could simply copy the information from the DW_AT_low_pc/DW_AT_high_pc/DW_AT_ranges attributes of the compilation unit, but that might get complicated because DW_AT_high_pc may be an address instead of the length we need (and similarly for DW_AT_ranges).
For now, it might be simpler to add a new aranges: Vec<(Address, usize)> data member to Unit. I don't think there is a need to define a new struct. Using a struct instead of the (Address, usize) tuple would be ok though if you want. Also, this is probably small enough to all fit in src/write/unit.rs, but a new file is fine if it is getting large.
By the way, what error were you seeing without .debug_aranges? My understanding was that it is optional, but maybe I have that wrong.

I had initially thought that we could simply copy the information from the DW_AT_low_pc/DW_AT_high_pc/DW_AT_ranges attributes of the compilation unit, but that might get complicated because DW_AT_high_pc may be an address instead of the length we need (and similarly for DW_AT_ranges).

Yes, I think we can check whether the low_pc and high_pc or the ranges attribute exists for a compilation unit and accordingly, create the aranges tuple. If it is low_pc and high_pc then it would be straightforward (doing high_pc - low_pc if high_pc is of the form address)(?) And for the ranges attribute, we can use this index to get the RangeList from current_unit.ranges field(?)
To get the offset into .debug_info section, we can use DebugInfoOffsets.unit() method(?).

For now, it might be simpler to add a new aranges: Vec<(Address, u64)> data member to Unit. I don't think there is a need to define a new struct. Using a struct instead of the (Address, u64) tuple would be ok though if you want. Also, this is probably small enough to all fit in src/write/unit.rs, but a new file is fine if it is getting large.

Sure, the tuple seems to be better instead of a struct and will write the code inside src/write/unit.rs itself.

By the way, what error were you seeing without .debug_aranges? My understanding was that it is optional, but maybe I have that wrong.

No, there was no error due to missing .debug_aranges. Actually, I want to fix the typecast error in gdb session - 'sum' has unknown type; cast it to its declared type (where variable 'sum' has a memory address). I just thought maybe working on .debug_aranges would make me familiar with the codebase so that I could later work on other things. Can you please give an estimate of how much effort will be needed to support relocation for Expression?

Yes, I think we can check whether the low_pc and high_pc or the ranges attribute exists for a compilation unit and accordingly, create the aranges tuple. If it is low_pc and high_pc then it would be straightforward (doing high_pc - low_pc if high_pc is of the form address)(?) And for the ranges attribute, we can use this index to get the RangeList from current_unit.ranges field(?)

Yes, but the complicated part is that you may need to interpret the RangeList a bit to convert it to address + length pairs, and in theory this may not be possible, e.g. if an address pair uses two different symbols. It may be okay to fail in that case, I'm not sure. One thing I would like to do is look at llvm/gcc to see if they do something better, but I suspect they just have a higher level API so they don't have this problem.

To get the offset into .debug_info section, we can use DebugInfoOffsets.unit() method(?).

Yes.

Can you please give an estimate of how much effort will be needed to support relocation for Expression?

I did some work on this today in #479, and I think rewrite  will handle the DW_OP_addr now. Still to do in that PR:

finish the DW_OP_call2/DW_OP_call4 support
write tests

I think it's close enough to done that if you want to try it out and see if it works for what you want to do then that would be useful. It's not really at a point where having another contributor would help progress it though.

Yes, but the complicated part is that you may need to interpret the RangeList a bit to convert it to address + length pairs, and in theory this may not be possible, e.g. if an address pair uses two different symbols. It may be okay to fail in that case, I'm not sure. One thing I would like to do is look at llvm/gcc to see if they do something better, but I suspect they just have a higher level API so they don't have this problem.

Okay, I see. Maybe I could work on this sometime later, after getting more clarity.

I did some work on this today in #479, and I think rewrite will handle the DW_OP_addr now.
I think it's close enough to done that if you want to try it out and see if it works for what you want to do then that would be useful. It's not really at a point where having another contributor would help progress it though.

Got it, thanks! I would like to try it out and see if it works in the gdb session.

I tried out your changes in #479 and it worked, and I can access the global variable in my sample program without the need for explicit type-casting.
Thanks a lot @philipc !

Thank you @philipc for looking into it! After disabling GNU location views while compiling, it worked!

Hello, I just happened to come across this post, and I was wondering how do you actually disable GNU location views? using -fno-gnu-extensions breaks the compilation process so I was wondering if there is some way to only disable GNU location views. Thank you.

Hi @jjang3, I think you can use this option to disable it.
"-gno-variable-location-views" (as mentioned on the page below)
https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html


HawtTables Text Alignment doesn't work

Possible solution:

add a Txtalignment field for each card to limit which cards get formatted.


Migration to ES6 and

Migration to ES6 and capability to work only with DOM instead of #id selector.

@leandrw I would like to know why we should remove the bower ? I agree that we can add this as npm package also.
Also any test on the ES6 features for unsupported browsers? is this breaking for any browsers?


chore: add stellar mainnet & sui testnet

leaving multisig_prover and voting_verifier blank for now and will add them later once the contracts are deployed.


set up table to create event list

done with https://baserow.acdh-dev.oeaw.ac.at/database/278/table/2726/10404


Can't use callback of compat?

I want to get worker-pid, but get 'wid' in callback-handle.
Log:
worker-events: handling event; source=l.r.g.c:GLOBAL_CACHE, event=NEW, wid=13
Version:
lua-resty-events master

Yes, it is a small difference between lua-resty-events and lua-resty-worker-events.
Now wid means Nginx worker id, not process pid, but you can add pid in param data.

Why add callback code for compat. How can I use it?

I think you can refer to the example code in readme or test cases in the '/t' directory.

How can prevent source worker process from receiving a broadcast, this event is unnecessary.
I use pid == ngx.worker.pid()  to avoid this event, However, I can't found the current worker wid when use wid.

No, you can't. The principle of this library is that all Nginx workers will receive the event, including the sender self.
You can use ngx.worker.id() to get the current worker id, please refer to lua-nginx-module document.

Thanks, I will try to adapt resty-worker-events with resty-events about worker id.


Provide the "register" object returned by navigator.serviceWorker.register

Is your feature request related to a problem? Please describe.
I am currently trying to implement push notifications within my SvelteKit application.
Usually I would go with something like this:
const registration = await navigator.serviceWorker.register('/service-worker.js')
if (!import.meta.env.VITE_VAPID_PUBLIC_KEY) {
      console.error('VITE_VAPID_PUBLIC_KEY is not defined.')

      return
}

// create subscribtion
const subscription = registration.pushManager.subscribe({
      userVisibleOnly: true,
      applicationServerKey: `${import.meta.env.VITE_VAPID_PUBLIC_KEY}`,
})

// send push notification
await fetch('/subscribe', {
      method: 'POST',
      body: JSON.stringify(subscription),
      headers: {
        'content-type': 'application/json',
      },
})

Describe the solution you'd like
Currently we have $service-worker available. So I would suggest adding the registration to this object. Not sure if this is possible though.
Describe alternatives you've considered
I couldn't find a way to do add push notifications so far. So this is the only way I would suggest.
How important is this feature to you?
Some applications need a push notification. So if I cannot add one, the application is useless.
Best regards

The $service-worker module is only available inside a service worker file, would this be used outside of that too?

@ignatiusmb the registration of a service worker is separate and doesn't rely directly on the $service-worker JS. It happens here:
https://github.com/sveltejs/kit/blob/a5c058a932bf9dbf2e67d0f07f0bc2d2ab2ca28f/packages/kit/src/runtime/server/page/render.js#L147
@Myrmod would https://github.com/sveltejs/kit/pull/2281 be enough to consider this issue solved? It lets you disable the registration. I'd hope that you could then register it on your own which would let you access the return value

Yes, so I think the proposed solution for having the registration in $service-worker wouldn't really work here.

https://github.com/sveltejs/kit/pull/2988 has been merged which adds an option to disable the existing service worker registration, so I think you could now add your own to address this and I'll go ahead and close this. Let me know if there's something that would still be required

is it possible to get the ServiceWorkerRegistration without manually registering our own file, since all i need is registration to get to pushmanager and work with push notifications

You can get it from await navigator.serviceWorker.ready;


Question: Should we "disconnect" the ONVIF client when done?

I would imaged something like this...
Connect to ONVIF server
Conrol Camera Gimbal, Receive Streams, etc...
When finished with above, then **disconnect** from ONVIF server

I don't see any mention of disconnecting. Is there such a thing? How can I prevent opening too many client connections to the ONVIF server? (maybe query the existing connection?)

did you fix the problem ??
I want close the connect but can't find the method too.

According to my guess，it dosen't neet to close the connection manually.
See official example: https://github.com/quatanium/python-onvif/tree/master/examples
These examples didn't close the connect manually.


Clean up so it now compiles with make.

Fixes several bugs. Could use more cleanup, but this is a good start.

Wow.. that's quite a lot - thanks for your contribution, but i'll need some time to test this.. but i really want to merge this PR.

That'd be great if you could merge!
One change I didn't make was adding upx to the debian/control file as "recommended". I don't quite understand the role of upx in binhack. On my machine it does nothing. Perhaps upx should simply be removed completely?


Fix dependency chain when deploy plugins directory

When deploying a whole directory of plugins, the module wasn't ensuring that the sensu package was already installed.

Thanks!


Remove  permmclient code

We still have some old code rom an earlier prototype getting tokens from a backend i.e. https://github.com/eclipse/kuksa.val/blob/12eed6ef1bb56cb3913495567dc13dd208d3f3a2/src/permmclient.cpp
(see also kuksa-authorize command in command processor)
It is neither tested, nor generally usable, and thus should be removed

Was fixed by #198


Fix a bug where child product in order CSV will occupy two lines as their parent product shows up too

What it does and why:
see https://github.com/Shopify/shopify_transporter/issues/91
Checklist:

[x] Testing & QA: Passes tests and linting.
[x] :tophat:: I have manually tested these changes.

Demo:
Before:

After:

Related issues: https://github.com/Shopify/shopify_transporter/issues/91
Closes:

Here's a proposal for how to do this without mutation:
https://github.com/Shopify/shopify_transporter/pull/93
cc @zliu1020

Looks like we can do this in the convert step.


[TF:TRT] Fix oss build

Directly referring to //third_party/tensorrt/plugins/... in the OSS build does not work as the archive must be downloaded. So we should refer to the @tensorrt_oss_archive// repository to find these targets. A previous commit attempted to add an option use_efficient_nms_plugin for turning off/on the use of a plugin in @tensorrt_oss_archive, but made the mistake above. This change fixes the issue. It moves the config_setting to the TFTRT BUILD file. Tested with and without --define=use_efficient_nms_plugin=1.

@bixia1  for review when available

So, the crux of the problem seemed to be we needed to make a conditional with conjunction condition. You can't chain select statements, so I used what  was recommended in the bazel docs for creating intermediate target. There is a section on "AND chaining", but if_tensorrt doesn't seem to be a normal config style setting, so I opted for the the first option.

I need to modify the BUILD file to make it work for inside google. In the process of merging this.


Intergrated Terminal

Issue Type: Bug
Keyboard copy ctrl+shift+c is not working in intergrated terminal.
Whereas Paste is perfectly fine
VS Code version: Code 1.23.1 (d0182c3417d225529c6d5ad24b7572815d0de9ac, 2018-05-10T16:04:33.747Z)
OS version: Linux x64 4.13.0-38-generic

Does it happen when you close all windows and run code --disable-extensions?