text:
Requesting any debugging handler stopped working in Kubernetes 1.27 and containerd 1.7.14 (error: You must be logged in to the server (the server has asked for the client to provide credentials ( pods/log some pod))

Describe the bug
kubectl logs some-pod on pods created after an upgrade from 1.26 to 1.27.14 and from containerd 1.7.0 to 1.7.17 fail with
error: You must be logged in to the server (the server has asked for the client to provide credentials ( pods/log some pod)

I have permission to do this:
$ kubectl -v 8 auth can-i get pods/comfyui-backend-0 --subresource=logs --namespace=appmana
I0618 22:24:57.794173   25188 loader.go:395] Config loaded from file:  C:/.../kubeconfig.yaml
I0618 22:24:57.812177   25188 round_trippers.go:463] GET https://10.2.0.19:6443/api/v1
I0618 22:24:57.812177   25188 round_trippers.go:469] Request Headers:
I0618 22:24:57.813174   25188 round_trippers.go:473]     Accept: application/json, */*
I0618 22:24:57.813174   25188 round_trippers.go:473]     User-Agent: kubectl.exe/v1.28.2 (windows/amd64) kubernetes/89a4ea3
I0618 22:24:57.825175   25188 round_trippers.go:574] Response Status: 200 OK in 12 milliseconds
I0618 22:24:57.825175   25188 round_trippers.go:577] Response Headers:
I0618 22:24:57.825175   25188 round_trippers.go:580]     Date: Wed, 19 Jun 2024 05:24:57 GMT
I0618 22:24:57.825175   25188 round_trippers.go:580]     Audit-Id: e310da1c-2ec7-4ae8-9299-522062632321
I0618 22:24:57.825175   25188 round_trippers.go:580]     Cache-Control: no-cache, private
I0618 22:24:57.825175   25188 round_trippers.go:580]     Content-Type: application/json
I0618 22:24:57.826176   25188 round_trippers.go:580]     X-Kubernetes-Pf-Flowschema-Uid: 545e31b4-1e93-452e-b5ff-9f8e0e7d5d0e
I0618 22:24:57.826176   25188 round_trippers.go:580]     X-Kubernetes-Pf-Prioritylevel-Uid: eb6e015d-344b-4b22-863f-3e5868c6662b
I0618 22:24:57.826176   25188 request.go:1212] Response Body: {"kind":"APIResourceList","groupVersion":"v1","resources":[{"name":"bindings","singularName":"binding","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"componentstatuses","singularName":"componentstatus","namespaced":false,"kind":"ComponentStatus","verbs":["get","list"],"shortNames":["cs"]},{"name":"configmaps","singularName":"configmap","namespaced":true,"kind":"ConfigMap","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["cm"],"storageVersionHash":"qFsyl6wFWjQ="},{"name":"endpoints","singularName":"endpoints","namespaced":true,"kind":"Endpoints","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ep"],"storageVersionHash":"fWeeMqaN/OA="},{"name":"events","singularName":"event","namespaced":true,"kind":"Event","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ev"],"storageVersionHash":"r2yiGXH7wu8="},{"name":"limitranges","singularName":"limitrange" [truncated 5359 chars]
I0618 22:24:57.826176   25188 request.go:1212] Request Body: {"kind":"SelfSubjectAccessReview","apiVersion":"authorization.k8s.io/v1","metadata":{"creationTimestamp":null},"spec":{"resourceAttributes":{"namespace":"appmana","verb":"get","resource":"pods","subresource":"logs","name":"comfyui-backend-0"}},"status":{"allowed":false}}
I0618 22:24:57.827175   25188 round_trippers.go:463] POST https://10.2.0.19:6443/apis/authorization.k8s.io/v1/selfsubjectaccessreviews
I0618 22:24:57.827175   25188 round_trippers.go:469] Request Headers:
I0618 22:24:57.827175   25188 round_trippers.go:473]     User-Agent: kubectl.exe/v1.28.2 (windows/amd64) kubernetes/89a4ea3
I0618 22:24:57.827175   25188 round_trippers.go:473]     Content-Type: application/json
I0618 22:24:57.827175   25188 round_trippers.go:473]     Accept: application/json, */*
I0618 22:24:57.828176   25188 round_trippers.go:574] Response Status: 201 Created in 1 milliseconds
I0618 22:24:57.828176   25188 round_trippers.go:577] Response Headers:
I0618 22:24:57.828176   25188 round_trippers.go:580]     Content-Length: 561
I0618 22:24:57.828176   25188 round_trippers.go:580]     Date: Wed, 19 Jun 2024 05:24:57 GMT
I0618 22:24:57.828176   25188 round_trippers.go:580]     Audit-Id: 36a03371-92b2-480f-8131-a638f5d90f1a
I0618 22:24:57.828176   25188 round_trippers.go:580]     Cache-Control: no-cache, private
I0618 22:24:57.828176   25188 round_trippers.go:580]     Content-Type: application/json
I0618 22:24:57.828176   25188 round_trippers.go:580]     X-Kubernetes-Pf-Flowschema-Uid: 545e31b4-1e93-452e-b5ff-9f8e0e7d5d0e
I0618 22:24:57.828176   25188 round_trippers.go:580]     X-Kubernetes-Pf-Prioritylevel-Uid: eb6e015d-344b-4b22-863f-3e5868c6662b
I0618 22:24:57.828176   25188 request.go:1212] Response Body: {"kind":"SelfSubjectAccessReview","apiVersion":"authorization.k8s.io/v1","metadata":{"creationTimestamp":null,"managedFields":[{"manager":"kubectl.exe","operation":"Update","apiVersion":"authorization.k8s.io/v1","time":"2024-06-19T05:24:57Z","fieldsType":"FieldsV1","fieldsV1":{"f:spec":{"f:resourceAttributes":{".":{},"f:name":{},"f:namespace":{},"f:resource":{},"f:subresource":{},"f:verb":{}}}}}]},"spec":{"resourceAttributes":{"namespace":"appmana","verb":"get","resource":"pods","subresource":"logs","name":"comfyui-backend-0"}},"status":{"allowed":true}}

$ kubectl -v 8 logs comfyui-backend-0
I0618 22:17:19.298593   22640 loader.go:395] Config loaded from file:  C:/.../kubeconfig.yaml
I0618 22:17:19.315590   22640 round_trippers.go:463] GET https://10.2.0.19:6443/api/v1/namespaces/appmana/pods/comfyui-backend-0
I0618 22:17:19.315590   22640 round_trippers.go:469] Request Headers:
I0618 22:17:19.315590   22640 round_trippers.go:473]     Accept: application/json, */*
I0618 22:17:19.315590   22640 round_trippers.go:473]     User-Agent: kubectl.exe/v1.28.2 (windows/amd64) kubernetes/89a4ea3
I0618 22:17:19.323588   22640 round_trippers.go:574] Response Status: 200 OK in 7 milliseconds
I0618 22:17:19.323588   22640 round_trippers.go:577] Response Headers:
I0618 22:17:19.323588   22640 round_trippers.go:580]     Audit-Id: 329d2007-e17b-4756-a570-ab078077133f
I0618 22:17:19.323588   22640 round_trippers.go:580]     Cache-Control: no-cache, private
I0618 22:17:19.323588   22640 round_trippers.go:580]     Content-Type: application/json
I0618 22:17:19.323588   22640 round_trippers.go:580]     X-Kubernetes-Pf-Flowschema-Uid: 545e31b4-1e93-452e-b5ff-9f8e0e7d5d0e
I0618 22:17:19.323588   22640 round_trippers.go:580]     X-Kubernetes-Pf-Prioritylevel-Uid: eb6e015d-344b-4b22-863f-3e5868c6662b
I0618 22:17:19.323588   22640 round_trippers.go:580]     Date: Wed, 19 Jun 2024 05:17:19 GMT
I0618 22:17:19.324241   22640 request.go:1212] Response Body: {"kind":"Pod","apiVersion":"v1","metadata":{"name":"comfyui-backend-0","generateName":"comfyui-backend-","namespace":"appmana","uid":"b1f04544-a4a8-484b-8c76-35bbaff0f52b","resourceVersion":"1137858590","creationTimestamp":"2024-05-30T01:51:32Z","labels":{"app":"comfyui-backend-statefulset","controller-revision-hash":"comfyui-backend-75b567789c","statefulset.kubernetes.io/pod-name":"comfyui-backend-0"},"annotations":{"cni.projectcalico.org/containerID":"d9b79796a3c84308d2d3c59f34320928c32656d90dc1e768bfa6c48a912f617e","cni.projectcalico.org/podIP":"10.3.16.14/32","cni.projectcalico.org/podIPs":"10.3.16.14/32"},"ownerReferences":[{"apiVersion":"apps/v1","kind":"StatefulSet","name":"comfyui-backend","uid":"cb7340a5-f27d-4916-ba09-1095b9b3090b","controller":true,"blockOwnerDeletion":true}],"managedFields":[{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2024-05-30T01:51:32Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:generateName":{},"f:labels":{".":{},"f:app":{},"f: [truncated 12176 chars]
Defaulted container "comfyui" out of: comfyui, robocopy-periodic, robocopy-first (init)
I0618 22:17:19.326225   22640 round_trippers.go:463] GET https://10.2.0.19:6443/api/v1/namespaces/appmana/pods/comfyui-backend-0/log?container=comfyui
I0618 22:17:19.326225   22640 round_trippers.go:469] Request Headers:
I0618 22:17:19.326225   22640 round_trippers.go:473]     Accept: application/json, */*
I0618 22:17:19.326225   22640 round_trippers.go:473]     User-Agent: kubectl.exe/v1.28.2 (windows/amd64) kubernetes/89a4ea3
I0618 22:17:19.331224   22640 round_trippers.go:574] Response Status: 401 Unauthorized in 4 milliseconds
I0618 22:17:19.331224   22640 round_trippers.go:577] Response Headers:
I0618 22:17:19.332225   22640 round_trippers.go:580]     Audit-Id: b2597ebf-e451-4a68-a794-c97654a06332
I0618 22:17:19.332225   22640 round_trippers.go:580]     Cache-Control: no-cache, private
I0618 22:17:19.332225   22640 round_trippers.go:580]     Content-Type: application/json
I0618 22:17:19.332225   22640 round_trippers.go:580]     Content-Length: 262
I0618 22:17:19.332225   22640 round_trippers.go:580]     Date: Wed, 19 Jun 2024 05:17:19 GMT
I0618 22:17:19.332225   22640 request.go:1212] Response Body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the server has asked for the client to provide credentials ( pods/log comfyui-backend-0)","reason":"Unauthorized","details":{"name":"comfyui-backend-0","kind":"pods/log"},"code":401}
I0618 22:17:19.333224   22640 helpers.go:246] server response object: [{
  "metadata": {},
  "status": "Failure",
  "message": "the server has asked for the client to provide credentials ( pods/log comfyui-backend-0)",
  "reason": "Unauthorized",
  "details": {
    "name": "comfyui-backend-0",
    "kind": "pods/log"
  },
  "code": 401
}]
error: You must be logged in to the server (the server has asked for the client to provide credentials ( pods/log comfyui-backend-0))

Compare to a healthy request:
$ kubectl -v 8 get pods comfyui-backend-0
I0618 22:19:23.887144   29636 loader.go:395] Config loaded from file:  C:/.../kubeconfig.yaml
I0618 22:19:23.914118   29636 round_trippers.go:463] GET https://10.2.0.19:6443/api/v1/namespaces/appmana/pods/comfyui-backend-0
I0618 22:19:23.914118   29636 round_trippers.go:469] Request Headers:
I0618 22:19:23.914118   29636 round_trippers.go:473]     Accept: application/json;as=Table;v=v1;g=meta.k8s.io,application/json;as=Table;v=v1beta1;g=meta.k8s.io,application/json
I0618 22:19:23.914118   29636 round_trippers.go:473]     User-Agent: kubectl.exe/v1.28.2 (windows/amd64) kubernetes/89a4ea3
I0618 22:19:23.922228   29636 round_trippers.go:574] Response Status: 200 OK in 7 milliseconds
I0618 22:19:23.922228   29636 round_trippers.go:577] Response Headers:
I0618 22:19:23.922228   29636 round_trippers.go:580]     Audit-Id: 40bc9bd7-1fff-4777-86ca-a3842d375bdc
I0618 22:19:23.922228   29636 round_trippers.go:580]     Cache-Control: no-cache, private
I0618 22:19:23.922228   29636 round_trippers.go:580]     Content-Type: application/json
I0618 22:19:23.922228   29636 round_trippers.go:580]     X-Kubernetes-Pf-Flowschema-Uid: 545e31b4-1e93-452e-b5ff-9f8e0e7d5d0e
I0618 22:19:23.922228   29636 round_trippers.go:580]     X-Kubernetes-Pf-Prioritylevel-Uid: eb6e015d-344b-4b22-863f-3e5868c6662b
I0618 22:19:23.922228   29636 round_trippers.go:580]     Date: Wed, 19 Jun 2024 05:19:23 GMT
I0618 22:19:23.922228   29636 request.go:1212] Response Body: {"kind":"Table","apiVersion":"meta.k8s.io/v1","metadata":{"resourceVersion":"1137858590"},"columnDefinitions":[{"name":"Name","type":"string","format":"name","description":"Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names","priority":0},{"name":"Ready","type":"string","format":"","description":"The aggregate readiness state of this pod for accepting traffic.","priority":0},{"name":"Status","type":"string","format":"","description":"The aggregate status of the containers in this pod.","priority":0},{"name":"Restarts","type":"string","format":"","description":"The number of times the containers in this pod have been restarted and when the last container in this pod has restarted.","priority": [truncated 7812 chars]

Sometimes this error occurs on Windows pods that are healthy and running. It always occurs on non-Running Windows pods.
To Reproduce
(Investigating)
Expected behavior
I should be able to access pod logs on 1.27 like I was able to do on 1.26.
Configuration:
System Info:
  Machine ID:                                AppMana-009
  System UUID:                               Dxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxA
  Boot ID:                                   55
  Kernel Version:                            10.0.20348.1726
  OS Image:                                  Windows Server 2022 Datacenter
  Operating System:                          windows
  Architecture:                              amd64
  Container Runtime Version:                 containerd://1.7.17
  Kubelet Version:                           v1.27.14
  Kube-Proxy Version:                        v1.27.14

Additional context
1.26 worked fine. Your help in diagnosing the issue could reveal an important regression.

exec is broken too. What happened with subresources?

It might be helpful to isolate if something in kubernetes or containerd broke, does kubernets 1.26 with containerd 1.7.17?  Does 1.27 work with containerd 1.7.0?

We collect logs during e2e tests (not with kubectl but with the api directly) and that seems to be working: https://gcsweb.k8s.io/gcs/kubernetes-jenkins/logs/ci-kubernetes-e2e-capz-windows-1-27/1803517549418123264/artifacts/container-lifecycle-hook-8282/pod-handle-http-request/container-handle-https-request/.
We have containerd  containerd://1.7.10 on that kuberetes 1.27 e2e test runs

This looks like the containerd version isn't really at play:
I0618 22:17:19.326225   22640 round_trippers.go:463] GET https://10.2.0.19:6443/api/v1/namespaces/appmana/pods/comfyui-backend-0/log?container=comfyui
I0618 22:17:19.326225   22640 round_trippers.go:469] Request Headers:
I0618 22:17:19.326225   22640 round_trippers.go:473]     Accept: application/json, */*
I0618 22:17:19.326225   22640 round_trippers.go:473]     User-Agent: kubectl.exe/v1.28.2 (windows/amd64) kubernetes/89a4ea3
I0618 22:17:19.331224   22640 round_trippers.go:574] Response Status: 401 Unauthorized in 4 milliseconds

could you look up the API server logs at that same time?

I've updated our sig-windows jobs to use containerd containerd://1.7.18 on https://testgrid.k8s.io/sig-windows-1.27-release#capz-windows-containerd-1.27 and we are not seeing any issues with gather logs.
I found an issue https://github.com/kubernetes/kubernetes/issues/39767 which looks similar to the report here. Is it possible some certs got corrupted during upgrade?

Let's investigate the certificate corruption issue.

Get the logs with verbosity

$ kubectl -v 8 logs comfyui-backend-4 robocopy-first
I0708 14:58:02.948618    8364 loader.go:373] Config loaded from file:  C:/Users/bberman/Documents/appmana/appmana-cluster/src/bootstrap/appmana-cluster-03/kubeconfig.yaml
I0708 14:58:02.961251    8364 round_trippers.go:463] GET https://10.2.0.19:6443/api/v1/namespaces/appmana/pods/comfyui-backend-4
I0708 14:58:02.961251    8364 round_trippers.go:469] Request Headers:
I0708 14:58:02.961788    8364 round_trippers.go:473]     Accept: application/json, */*
I0708 14:58:02.961788    8364 round_trippers.go:473]     User-Agent: kubectl.exe/v1.27.1 (windows/amd64) kubernetes/4c94112
I0708 14:58:02.975462    8364 round_trippers.go:574] Response Status: 200 OK in 13 milliseconds
I0708 14:58:02.975462    8364 round_trippers.go:577] Response Headers:
I0708 14:58:02.975462    8364 round_trippers.go:580]     Content-Type: application/json
I0708 14:58:02.975462    8364 round_trippers.go:580]     X-Kubernetes-Pf-Flowschema-Uid: 545e31b4-1e93-452e-b5ff-9f8e0e7d5d0e
I0708 14:58:02.975462    8364 round_trippers.go:580]     X-Kubernetes-Pf-Prioritylevel-Uid: eb6e015d-344b-4b22-863f-3e5868c6662b
I0708 14:58:02.975462    8364 round_trippers.go:580]     Date: Mon, 08 Jul 2024 21:58:02 GMT
I0708 14:58:02.975462    8364 round_trippers.go:580]     Audit-Id: ad59a6e3-5a21-4b24-a9a2-24e59e0661f2
I0708 14:58:02.975462    8364 round_trippers.go:580]     Cache-Control: no-cache, private
I0708 14:58:02.975999    8364 request.go:1188] Response Body: {"kind":"Pod","apiVersion":"v1","metadata":{"name":"comfyui-backend-4","generateName":"comfyui-backend-","namespace":"appmana","uid":"19d57878-cac1-4d14-b019-196f53baa5a0","resourceVersion":"1206943901","creationTimestamp":"2024-07-08T21:24:52Z","labels":{"app":"comfyui-backend-statefulset","controller-revision-hash":"comfyui-backend-676ddb7d9d","statefulset.kubernetes.io/pod-name":"comfyui-backend-4"},"annotations":{"cni.projectcalico.org/containerID":"f2bb37e2996b77bd562ced418f3d0f8a2a31e385961851eb43af2e6238a7d603","cni.projectcalico.org/podIP":"10.3.48.199/32","cni.projectcalico.org/podIPs":"10.3.48.199/32"},"ownerReferences":[{"apiVersion":"apps/v1","kind":"StatefulSet","name":"comfyui-backend","uid":"cb7340a5-f27d-4916-ba09-1095b9b3090b","controller":true,"blockOwnerDeletion":true}],"managedFields":[{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2024-07-08T21:24:52Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:generateName":{},"f:labels":{".":{},"f:app":{}," [truncated 12414 chars]
I0708 14:58:02.978122    8364 round_trippers.go:463] GET https://10.2.0.19:6443/api/v1/namespaces/appmana/pods/comfyui-backend-4/log?container=robocopy-first
I0708 14:58:02.978122    8364 round_trippers.go:469] Request Headers:
I0708 14:58:02.978122    8364 round_trippers.go:473]     Accept: application/json, */*
I0708 14:58:02.978122    8364 round_trippers.go:473]     User-Agent: kubectl.exe/v1.27.1 (windows/amd64) kubernetes/4c94112
I0708 14:58:03.050736    8364 round_trippers.go:574] Response Status: 401 Unauthorized in 72 milliseconds
I0708 14:58:03.050736    8364 round_trippers.go:577] Response Headers:
I0708 14:58:03.050736    8364 round_trippers.go:580]     Audit-Id: cccf22ec-ca11-49b6-bf92-9407b55bcfe6
I0708 14:58:03.050736    8364 round_trippers.go:580]     Cache-Control: no-cache, private
I0708 14:58:03.050736    8364 round_trippers.go:580]     Content-Type: application/json
I0708 14:58:03.050736    8364 round_trippers.go:580]     Content-Length: 262
I0708 14:58:03.050736    8364 round_trippers.go:580]     Date: Mon, 08 Jul 2024 21:58:03 GMT
I0708 14:58:03.051283    8364 request.go:1188] Response Body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the server has asked for the client to provide credentials ( pods/log comfyui-backend-4)","reason":"Unauthorized","details":{"name":"comfyui-backend-4","kind":"pods/log"},"code":401}
I0708 14:58:03.051817    8364 helpers.go:246] server response object: [{
  "metadata": {},
  "status": "Failure",
  "message": "the server has asked for the client to provide credentials ( pods/log comfyui-backend-4)",
  "reason": "Unauthorized",
  "details": {
    "name": "comfyui-backend-4",
    "kind": "pods/log"
  },
  "code": 401
}]
error: You must be logged in to the server (the server has asked for the client to provide credentials ( pods/log comfyui-backend-4))

Does this occur with any other requests? No, only pod subresources:
Getting pods works:
 $ kubectl -v 8 get pods comfyui-backend-4
I0708 15:00:30.511774   30480 loader.go:373] Config loaded from file:  C:/Users/bberman/Documents/appmana/appmana-cluster/src/bootstrap/appmana-cluster-03/kubeconfig.yaml
I0708 15:00:30.526774   30480 round_trippers.go:463] GET https://10.2.0.19:6443/api/v1/namespaces/appmana/pods/comfyui-backend-4
I0708 15:00:30.526774   30480 round_trippers.go:469] Request Headers:
I0708 15:00:30.526774   30480 round_trippers.go:473]     Accept: application/json;as=Table;v=v1;g=meta.k8s.io,application/json;as=Table;v=v1beta1;g=meta.k8s.io,application/json
I0708 15:00:30.527300   30480 round_trippers.go:473]     User-Agent: kubectl.exe/v1.27.1 (windows/amd64) kubernetes/4c94112
I0708 15:00:30.535440   30480 round_trippers.go:574] Response Status: 200 OK in 8 milliseconds
I0708 15:00:30.535986   30480 round_trippers.go:577] Response Headers:
I0708 15:00:30.535986   30480 round_trippers.go:580]     X-Kubernetes-Pf-Prioritylevel-Uid: eb6e015d-344b-4b22-863f-3e5868c6662b
I0708 15:00:30.535986   30480 round_trippers.go:580]     Date: Mon, 08 Jul 2024 22:00:30 GMT
I0708 15:00:30.535986   30480 round_trippers.go:580]     Audit-Id: a2acda26-1f39-4d73-8a0c-adc7c5b1afbd
I0708 15:00:30.535986   30480 round_trippers.go:580]     Cache-Control: no-cache, private
I0708 15:00:30.535986   30480 round_trippers.go:580]     Content-Type: application/json
I0708 15:00:30.535986   30480 round_trippers.go:580]     X-Kubernetes-Pf-Flowschema-Uid: 545e31b4-1e93-452e-b5ff-9f8e0e7d5d0e
I0708 15:00:30.536529   30480 request.go:1188] Response Body: {"kind":"Table","apiVersion":"meta.k8s.io/v1","metadata":{"resourceVersion":"1206943901"},"columnDefinitions":[{"name":"Name","type":"string","format":"name","description":"Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names","priority":0},{"name":"Ready","type":"string","format":"","description":"The aggregate readiness state of this pod for accepting traffic.","priority":0},{"name":"Status","type":"string","format":"","description":"The aggregate status of the containers in this pod.","priority":0},{"name":"Restarts","type":"string","format":"","description":"The number of times the containers in this pod have been restarted and when the last container in this pod has restarted.","priority": [truncated 8098 chars]
NAME                READY   STATUS     RESTARTS   AGE
comfyui-backend-4   0/2     Init:0/1   0          35m

Execing into this pod doesn't work:
$ kubectl -v 8 exec -it comfyui-backend-4 robocopy-first -- /Windows/sh.exe
I0708 15:01:18.762691   27980 loader.go:373] Config loaded from file:  C:/Users/bberman/Documents/appmana/appmana-cluster/src/bootstrap/appmana-cluster-03/kubeconfig.yaml
I0708 15:01:18.778415   27980 round_trippers.go:463] GET https://10.2.0.19:6443/api/v1/namespaces/appmana/pods/comfyui-backend-4
I0708 15:01:18.778415   27980 round_trippers.go:469] Request Headers:
I0708 15:01:18.778415   27980 round_trippers.go:473]     Accept: application/json, */*
I0708 15:01:18.778415   27980 round_trippers.go:473]     User-Agent: kubectl.exe/v1.27.1 (windows/amd64) kubernetes/4c94112
I0708 15:01:18.788720   27980 round_trippers.go:574] Response Status: 200 OK in 10 milliseconds
I0708 15:01:18.788720   27980 round_trippers.go:577] Response Headers:
I0708 15:01:18.788720   27980 round_trippers.go:580]     X-Kubernetes-Pf-Prioritylevel-Uid: eb6e015d-344b-4b22-863f-3e5868c6662b
I0708 15:01:18.788720   27980 round_trippers.go:580]     Date: Mon, 08 Jul 2024 22:01:18 GMT
I0708 15:01:18.788720   27980 round_trippers.go:580]     Audit-Id: 511ff915-1ac4-4e8d-baff-5d3b1a4a6295
I0708 15:01:18.788720   27980 round_trippers.go:580]     Cache-Control: no-cache, private
I0708 15:01:18.788720   27980 round_trippers.go:580]     Content-Type: application/json
I0708 15:01:18.788720   27980 round_trippers.go:580]     X-Kubernetes-Pf-Flowschema-Uid: 545e31b4-1e93-452e-b5ff-9f8e0e7d5d0e
I0708 15:01:18.789272   27980 request.go:1188] Response Body: {"kind":"Pod","apiVersion":"v1","metadata":{"name":"comfyui-backend-4","generateName":"comfyui-backend-","namespace":"appmana","uid":"19d57878-cac1-4d14-b019-196f53baa5a0","resourceVersion":"1206943901","creationTimestamp":"2024-07-08T21:24:52Z","labels":{"app":"comfyui-backend-statefulset","controller-revision-hash":"comfyui-backend-676ddb7d9d","statefulset.kubernetes.io/pod-name":"comfyui-backend-4"},"annotations":{"cni.projectcalico.org/containerID":"f2bb37e2996b77bd562ced418f3d0f8a2a31e385961851eb43af2e6238a7d603","cni.projectcalico.org/podIP":"10.3.48.199/32","cni.projectcalico.org/podIPs":"10.3.48.199/32"},"ownerReferences":[{"apiVersion":"apps/v1","kind":"StatefulSet","name":"comfyui-backend","uid":"cb7340a5-f27d-4916-ba09-1095b9b3090b","controller":true,"blockOwnerDeletion":true}],"managedFields":[{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2024-07-08T21:24:52Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:generateName":{},"f:labels":{".":{},"f:app":{}," [truncated 12414 chars]
Defaulted container "comfyui" out of: comfyui, robocopy-periodic, robocopy-first (init)
I0708 15:01:18.793035   27980 podcmd.go:88] Defaulting container name to comfyui
I0708 15:01:18.794107   27980 round_trippers.go:463] POST https://10.2.0.19:6443/api/v1/namespaces/appmana/pods/comfyui-backend-4/exec?command=%2FWindows%2Fsh.exe&container=comfyui&stdin=true&stdout=true&tty=true
I0708 15:01:18.794107   27980 round_trippers.go:469] Request Headers:
I0708 15:01:18.794107   27980 round_trippers.go:473]     X-Stream-Protocol-Version: v4.channel.k8s.io
I0708 15:01:18.794107   27980 round_trippers.go:473]     X-Stream-Protocol-Version: v3.channel.k8s.io
I0708 15:01:18.794107   27980 round_trippers.go:473]     X-Stream-Protocol-Version: v2.channel.k8s.io
I0708 15:01:18.794621   27980 round_trippers.go:473]     X-Stream-Protocol-Version: channel.k8s.io
I0708 15:01:18.794646   27980 round_trippers.go:473]     User-Agent: kubectl.exe/v1.27.1 (windows/amd64) kubernetes/4c94112
I0708 15:01:18.808443   27980 round_trippers.go:574] Response Status: 401 Unauthorized in 13 milliseconds
I0708 15:01:18.808443   27980 round_trippers.go:577] Response Headers:
I0708 15:01:18.808443   27980 round_trippers.go:580]     Date: Mon, 08 Jul 2024 22:01:18 GMT
I0708 15:01:18.808443   27980 round_trippers.go:580]     Content-Length: 12
I0708 15:01:18.808443   27980 round_trippers.go:580]     Content-Type: text/plain; charset=utf-8
error: unable to upgrade connection: Unauthorized

Does using the controller's admin credentials work? No:
# k0s kubectl -n appmana -v 8 exec -it comfyui-backend-4 robocopy-first -- /Windows/sh.exe
I0708 22:02:18.434256  346087 loader.go:373] Config loaded from file:  /var/lib/k0s/pki/admin.conf
...
# k0s kubectl -n appmana -v 8 exec -it comfyui-backend-4 robocopy-first -- /Windows/sh.exe
I0708 22:03:18.497821  347580 loader.go:373] Config loaded from file:  /var/lib/k0s/pki/admin.conf
I0708 22:03:18.505659  347580 round_trippers.go:463] GET https://localhost:6443/api/v1/namespaces/appmana/pods/comfyui-backend-4
I0708 22:03:18.505671  347580 round_trippers.go:469] Request Headers:
I0708 22:03:18.505679  347580 round_trippers.go:473]     User-Agent: k0s/v0.0.0 (linux/amd64) kubernetes/$Format
I0708 22:03:18.505685  347580 round_trippers.go:473]     Accept: application/json, */*
I0708 22:03:18.517392  347580 round_trippers.go:574] Response Status: 200 OK in 11 milliseconds
I0708 22:03:18.517406  347580 round_trippers.go:577] Response Headers:
I0708 22:03:18.517416  347580 round_trippers.go:580]     Audit-Id: 419e1590-1ba9-4fb6-8aa5-5bdae1bfecc1
I0708 22:03:18.517427  347580 round_trippers.go:580]     Cache-Control: no-cache, private
I0708 22:03:18.517436  347580 round_trippers.go:580]     Content-Type: application/json
I0708 22:03:18.517445  347580 round_trippers.go:580]     X-Kubernetes-Pf-Flowschema-Uid: 545e31b4-1e93-452e-b5ff-9f8e0e7d5d0e
I0708 22:03:18.517456  347580 round_trippers.go:580]     X-Kubernetes-Pf-Prioritylevel-Uid: eb6e015d-344b-4b22-863f-3e5868c6662b
I0708 22:03:18.517466  347580 round_trippers.go:580]     Date: Mon, 08 Jul 2024 22:03:18 GMT
I0708 22:03:18.517615  347580 request.go:1188] Response Body: {"kind":"Pod","apiVersion":"v1","metadata":{"name":"comfyui-backend-4","generateName":"comfyui-backend-","namespace":"appmana","uid":"19d57878-cac1-4d14-b019-196f53baa5a0","resourceVersion":"1206943901","creationTimestamp":"2024-07-08T21:24:52Z","labels":{"app":"comfyui-backend-statefulset","controller-revision-hash":"comfyui-backend-676ddb7d9d","statefulset.kubernetes.io/pod-name":"comfyui-backend-4"},"annotations":{"cni.projectcalico.org/containerID":"f2bb37e2996b77bd562ced418f3d0f8a2a31e385961851eb43af2e6238a7d603","cni.projectcalico.org/podIP":"10.3.48.199/32","cni.projectcalico.org/podIPs":"10.3.48.199/32"},"ownerReferences":[{"apiVersion":"apps/v1","kind":"StatefulSet","name":"comfyui-backend","uid":"cb7340a5-f27d-4916-ba09-1095b9b3090b","controller":true,"blockOwnerDeletion":true}],"managedFields":[{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2024-07-08T21:24:52Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:generateName":{},"f:labels":{".":{},"f:app":{}," [truncated 12414 chars]
Defaulted container "comfyui" out of: comfyui, robocopy-periodic, robocopy-first (init)
I0708 22:03:18.519149  347580 podcmd.go:88] Defaulting container name to comfyui
I0708 22:03:18.519617  347580 round_trippers.go:463] POST https://localhost:6443/api/v1/namespaces/appmana/pods/comfyui-backend-4/exec?command=%2FWindows%2Fsh.exe&container=comfyui&stdin=true&stdout=true&tty=true
I0708 22:03:18.519628  347580 round_trippers.go:469] Request Headers:
I0708 22:03:18.519635  347580 round_trippers.go:473]     X-Stream-Protocol-Version: v4.channel.k8s.io
I0708 22:03:18.519641  347580 round_trippers.go:473]     X-Stream-Protocol-Version: v3.channel.k8s.io
I0708 22:03:18.519662  347580 round_trippers.go:473]     X-Stream-Protocol-Version: v2.channel.k8s.io
I0708 22:03:18.519668  347580 round_trippers.go:473]     X-Stream-Protocol-Version: channel.k8s.io
I0708 22:03:18.519674  347580 round_trippers.go:473]     User-Agent: k0s/v0.0.0 (linux/amd64) kubernetes/$Format
I0708 22:03:18.530220  347580 round_trippers.go:574] Response Status: 401 Unauthorized in 10 milliseconds
I0708 22:03:18.530230  347580 round_trippers.go:577] Response Headers:
I0708 22:03:18.530236  347580 round_trippers.go:580]     Content-Length: 12
I0708 22:03:18.530243  347580 round_trippers.go:580]     Content-Type: text/plain; charset=utf-8
I0708 22:03:18.530249  347580 round_trippers.go:580]     Date: Mon, 08 Jul 2024 22:03:18 GMT
error: unable to upgrade connection: Unauthorized

Are the certs valid on the controller?: Yes
root@appmana-010:~# openssl x509 -in /var/lib/k0s/pki/server.crt -text -noout
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            37:...
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: CN = kubernetes-ca
        Validity
            Not Before: Jul  3 17:00:00 2024 GMT
            Not After : Jul  3 17:00:00 2025 GMT
        Subject: O = kubernetes, CN = kubernetes
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    00:...
                Exponent: 6...
        X509v3 extensions:
            X509v3 Key Usage: critical
                Digital Signature, Key Encipherment
            X509v3 Extended Key Usage:
                TLS Web Server Authentication, TLS Web Client Authentication
            X509v3 Basic Constraints: critical
                CA:FALSE
            X509v3 Subject Key Identifier:
                13:..
            X509v3 Authority Key Identifier:
                07:...
            X509v3 Subject Alternative Name:
                DNS:kubernetes, DNS:kubernetes.default, DNS:kubernetes.default.svc, DNS:kubernetes.default.svc.cluster, DNS:kubernetes.svc.cluster.local, DNS:localhost, DNS:appmana-010, DNS:appmana-010.i.appmana.com, DNS:appmana-011, DNS:appmana-011.i.appmana.com, DNS:appmana-012, DNS:appmana-012.i.appmana.com, IP Address:127.0.0.1, IP Address:127.0.1.1, IP Address:10.2.0.19, IP Address:FE80:..., IP Address:FE80:..., IP Address:10.152.184.1, IP Address:10.2.0.20, IP Address:10.2.0.22, IP Address:10.152.184.99
    Signature Algorithm: sha256WithRSAEncryption
    Signature Value:
        26:...
root@appmana-010:~# openssl x509 -in /var/lib/k0s/pki/ca.crt -text -noout
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            2b...
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: CN = kubernetes-ca
        Validity
            Not Before: Mar  9 23:38:00 2023 GMT
            Not After : Mar  6 23:38:00 2033 GMT
        Subject: CN = kubernetes-ca
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    00:...
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Key Usage: critical
                Certificate Sign, CRL Sign
            X509v3 Basic Constraints: critical
                CA:TRUE
            X509v3 Subject Key Identifier:
                07:...
    Signature Algorithm: sha256WithRSAEncryption
    Signature Value:
        ...

Are the client certs valid? Yes:
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            2b:...
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: CN = kubernetes-ca
        Validity
            Not Before: Mar  9 23:38:00 2023 GMT
            Not After : Mar  6 23:38:00 2033 GMT
        Subject: CN = kubernetes-ca
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    00:...
                Exponent: ...
        X509v3 extensions:
            X509v3 Key Usage: critical
                Certificate Sign, CRL Sign
            X509v3 Basic Constraints: critical
                CA:TRUE
            X509v3 Subject Key Identifier:
                07:...
    Signature Algorithm: sha256WithRSAEncryption
    Signature Value:
        6a:...

Does this client cert verify with the server ca.crt? Yes:
# openssl verify -CAfile /var/lib/k0s/pki/ca.crt ./client.pem
./client.pem: OK

I think this bug is real, but I really need to understand what requesting a subresource actually does.

could you look up the API server logs at that same time?

nothing notable appeared, same exact error that is reported to the client

Further investigating shows that all debugging handlers are returning unauthorized, although they are indeed configured to be running (enableDebuggingHandlers is true in the config and it is responsive on the worker kubelet). Why might the Windows auth filter for this be broken?

@doctorpangloss Hey, we've got an internal team investigating this issue.
From my understanding, we need a certificate to communicate between the controller (control loop for state of cluster) and Kubernetes API server. If that certificate isn't valid or expired, we can't run commands like exec or query info on sub-resources. However, both your Server and CA Certificates are valid and not expired.
Does this sound accurate to you?

Does this sound accurate to you?

Yes. The certificates might be interacting with the issue, but not in an obvious way. This is more likely a real bug related to upgrading nodes in place, which doesn't really happen in clouds.

@doctorpangloss , is this still an issue on your side? We have yet to be able to reproduce it. Hence want to checkin with you if you are seeing the same issue on other clusters or is this only for a specific setup?

I have managed to solve the issue.

The KubeletConfiguration needs more fields between 1.26 and 1.27 when using conforming clusters:

authentication:
  anonymous: {}
  webhook:
    cacheTTL: 0s
  x509:
    clientCAFile: C:/var/lib/kubelet/pki/ca.crt

writing the server certificate using Windows PowerShell puts the UTF-8 BOM into the certificate file, which borks kubelet

thanks for looking into this

authors: doctorpangloss jsturtevant msft-linliu ntrappe-msft

repo: microsoft/Windows-Containers


text:
ndis lwf sample file filteruser.h references NDIS_PARAMETER_TYPE, not defined for user mode apps.

For example: https://github.com/microsoft/Windows-driver-samples/blob/46db93c4c0542166457f5504010b402a9426ab1d/network/ndis/filter/filteruser.h#L71
A user mode app cannot be built successfully using the filteruser.h file, as it includes structures not defined by including ntddndis.h

Same here could not able to find EventWriteReadStart, EventWriteWriteStop, EventWriteFailAddDevice etc are missing, could not able to find their source code or related library. Google search comes empty...
So could not able to build following path samples, due to these functions.
D:\Windows-driver-samples-main\Windows-driver-samples-main\general\DCHU\osrfx2_DCHU_base\osrfx2_DCHU_base\bulkrwr.c (1 hit)
Line 76:     EventWriteReadStart(WdfIoQueueGetDevice(Queue), (ULONG)Length);
D:\Windows-driver-samples-main\Windows-driver-samples-main\usb\kmdf_fx2\driver\bulkrwr.c (1 hit)
Line 74:     EventWriteReadStart(&activity, WdfIoQueueGetDevice(Queue), (ULONG)Length);
D:\Windows-driver-samples-main\Windows-driver-samples-main\usb\umdf2_fx2\driver\bulkrwr.c (1 hit)
Line 73:     EventWriteReadStart(WdfIoQueueGetDevice(Queue), (ULONG)Length);

source: gharchive/issue

authors: HollisTech amolvaidyaCapgemini

repo: microsoft/Windows-driver-samples

license: MS-PL

license_type: permissive

license_source: github-api


text:
If (When?) global C# usings are added, include %(Platform) metadata

Proposal: C# global usings
Summary
If C# global usings, are added for the Windows App SDK, then .NET MAUI needs a way to turn them off in MSBuild. A Platform="Windows" item metadata would make this possible.
Currently, the plan for .NET 6 is for MAUI to do something like:
<ItemGroup Condition=" '$(UseMaui)' == 'true' and ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable') ">
  <Using Remove="@(Using->HasMetadata('Platform'))" />
</ItemGroup>

They are working on a potential better design in .NET 7.
If the Windows App SDK doesn't add C# global usings, then you don't need to do anything. Thanks!
Rationale
If .NET MAUI doesn't have a way to turn these off, then Microsoft.Maui.Button and the Windows Button (and every other type that has the same name), will conflict.
Important Notes
Related: https://github.com/dotnet/sdk/issues/21996

@Scottj1s more your lane than mine. Tag you're it :P

If the Windows App SDK doesn't add C# global usings, then you don't need to do anything. Thanks!

That's out intent. The proposed patch to make the auto-initializer be agnostic to others using global usings is righteous but WinAppSDK has no intention to use or require global usings.

I think the guidance for https://github.com/dotnet/sdk/issues/21996 is that adding global usings in a NuGet package is not recommended yet. (There isn't a good design for it yet in .NET 6)
If the Windows App SDK is ever a .NET workload, global usings might be a nice feature to add, though.

I concur with @DrusTheAxe - no action needed now

authors: DrusTheAxe Scottj1s jonathanpeppers

repo: microsoft/WindowsAppSDK

license: MIT


text:
Add PR dependencies feed for Taef Nuget

Add PR dependencies feed for Taef Nuget

This still fails in the public build. CppTest still has the bad reference.
From the referenced issue:
https://github.com/microsoft/ProjectReunion/blob/93e786dc7461e41ddd4afc2476a4d1cf765a6bdd/test/CppTest/CppTest.vcxproj#L342

Are you absolutely sure? Nothing has changed on that end. THe same version was uploaded.

@kythant The line highlighted performs the Error action if the ..\..\packages\Microsoft.Taef.10.58.210222006-develop\build\Microsoft.Taef.targets file does not exist. Because I don't have access to that package, this will always fail when compiling CppTest.
This should be easy to repro on an external machine. Happy to provide RDP to a test machine if you need one for testing this PR.

Looks like the Taef package is now available; build passes. 👍

@kythant The line highlighted performs the Error action if the ..\..\packages\Microsoft.Taef.10.58.210222006-develop\build\Microsoft.Taef.targets file does not exist. Because I don't have access to that package, this will always fail when compiling CppTest.
This should be easy to repro on an external machine. Happy to provide RDP to a test machine if you need one for testing this PR.

Did you restore the package? I've added it to PR-dependencies so you can pull the package from it.

It looks like the package has been removed from the source at the moment, so it's still not possible to build the project.

source: gharchive/pull-request

authors: YexuanXiao kythant riverar


text:
Select all distributiongroups as destinations on release.

Describe the solution you'd like
When releasing a new version of our Android app i'd like to have the possibility to select All groups as destinations. Today you can only select All-users-of-MyApp (all distr. groups of hockeyApp) but not all groups made in AppCenter.
Describe alternatives you've considered
Today we have to slecect every distributiongroup manually wich can become tidious and also a high risc of leaving a group outside release.
Additional context
HockeyApp have this feature. I've mailed support about it and the feedback was to make a feature request.

@Daniel-Frid Thanks for adding this feature request. We will keep the issue open for visibility and will let you know once we prioritize to support it.

authors: Daniel-Frid elamalani

repo: microsoft/appcenter


text:
Add a Core API example showing how to run multiple agents in concurrently

Create a new notebook example showing how to run multiple agents concurrently. Put it under multi-agent design patterns.
It should cover the following scenarios.

Single message, multiple processors: concurrently running multiple agents by publishing a message to a topic with multiple subscribers, all of which start processing the same message concurrently.
Multiple messages, multiple processors: in a single scope (e.g., main function, or an agent's handler) publish messages to separate topic IDs, each of which has a single or multiple subscribers.
Direct messaging: use send_message API to create coroutines for sending direct messages to multiple agents, and then use asyncio.gather to collect the results.

Avoid calling any model API. Use asyncio.sleep and print to simulate processing.

Should we close this one @ekzhu ?

authors: ekzhu gziz

repo: microsoft/autogen


text:
Workbench (aka "the tool pool") design proposal

What feature would you like to be added?
Hello,
following up on https://github.com/microsoft/autogen/issues/2666#issuecomment-2518116714, I would like to propose a design for an abstraction on List[Tool]. That abstraction would be a "tool pool" that makes it possible to add, remove and find tools. It would make it easier to make agents that:

have access to virtually limitless set of tools
dynamically handle the actual set of available tools for a task
use various complex (other agents, LLMs, vector distance search...) to select/elect tools

Introducing: the workbench.
class Workbench(ABC):
    @property
    @abstractmethod
    def tools(self) -> List[Tool]: ...

    @abstractmethod
    def get_tools_for_context(self, context: Sequence[LLMMessage]) -> List[Tool]: ...

    @abstractmethod
    def get_tool_names_for_query(self, query: str) -> List[str]: ...

    @abstractmethod
    def get_tool_documentation(self, tool_name: str) -> str: ...

class DynamicWorkbench(ABC):
    @abstractmethod
    def add_tool(
        self, tool: Tool | Callable[..., Any] | Callable[..., Awaitable[Any]], enabled: bool = True
    ) -> None: ...

    @abstractmethod
    def remove_tool(self, tool_name: str) -> None: ...

    @abstractmethod
    def remove_all_tools(self) -> None: ...

    @abstractmethod
    def enable_tool(self, tool_name: str) -> None: ...

    @abstractmethod
    def disable_tool(self, tool_name: str) -> None: ...

    @abstractmethod
    def tool_is_enabled(self, tool_name: str) -> bool: ...

    @property
    @abstractmethod
    def enabled_tools(self) -> List[Tool]: ...

An example implementation: VectorWorkbench is a workbench that uses vector distance matching on tools description/documentation to find/elect tools.
class VectorWorkbench(Workbench, DynamicWorkbench):
   def get_tools_for_context(self, context: Sequence[LLMMessage]) -> List[Tool]:
        query = "\n".join([msg.content for msg in context if isinstance(msg, TextMessage)]).strip()
        return self._get_tools_for_query(query)

   def _get_tools_for_query(self, query: str) -> List[str]:
        if len(query) == 0:
            return []

        logger.info(f"Query: {query}")

        # Generate the query embedding.
        query_embedding = self._embedding_func(query).data[0]["embedding"]
        query_embedding = np.array(query_embedding).reshape(1, -1)

        # Search for the closest matching tool embeddings.
        k = min(self._top_k, len(self._tools))
        scores, indexes = self._index.search(query_embedding, k=k)  # Retrieve top matches
        results = [
            {"tool": self._tools[i], "score": scores[0][index]}
            for index, i in enumerate(indexes[0])
            if scores[0][index] <= self._score_threshold  # Filter out results below the threshold
            and self.tool_is_enabled(self._tools[i].name)  # Filter out disabled tools
        ]

        return [result["tool"] for result in results]

   def get_tool_names_for_query(self, query: str) -> List[str]:
        """Returns a list of tool names that are relevant to the given query."""
        logger.info(f"getting tool names for query: {query}")
        tools = self._get_tools_for_query(query)
        return [tool.name for tool in tools]

    def get_tool_documentation(self, tool_name: str) -> str:
        """Returns the documentation for the given tool name."""
        logger.info(f"getting documentation for tool: {tool_name}")
        # We assume that all tools have a documentation.
        if tool_name not in self._tool_docs:
            raise ValueError(f"tool {tool_name} does not exist")
        return self._tool_docs[tool_name]

   # the rest is boilerplate...

Then, the following agents can be provided OOB:
class WorkbenchSearchAgent(AssistantAgent):
    """ Searches for tools, but does *not* call them. Good for planning for example."""
    def __init__(
        self,
        name: str,
        model_client: ChatCompletionClient,
        workbench: Workbench,
        handoffs: List[Handoff | str] | None = None,
        description: str = "An agent that provides assistance to find relevant tools.",
        system_message: str | None = "You are a helpful AI assistant to find relevant tools to solve a problem.",
    ):
        super().__init__(
            name=name,
            model_client=model_client,
            handoffs=handoffs,
            description=description,
            system_message=system_message,
            tools=[
                workbench.get_tool_names_for_query,
                workbench.get_tool_documentation,
            ],
        )
        self._workbench = workbench

    @property
    def produced_message_types(self) -> List[type[ChatMessage]]:
        return [TextMessage]

    @property
    def workbench(self) -> Workbench:
        return self._workbench

class WorkbenchAgent(AssistantAgent):
    """Find and actually call tools. Good for the plan execution for example."""
    def __init__(
        self,
        name: str,
        model_client: ChatCompletionClient,
        workbench: Workbench,
        handoffs: List[Handoff | str] | None = None,
        description: str = "An agent that provides assistance to find relevant tools.",
        system_message: str | None = "You are a helpful AI assistant to find relevant tools to solve a problem.",
    ):
        super().__init__(
            name=name,
            description=description,
            model_client=model_client,
            system_message=system_message,
            # The tools are dynamically set based on the message list using
            # embedding search.
            tools=[],
            handoffs=handoffs,
        )

        self._workbench = workbench

    @property
    def workbench(self) -> Workbench:
        return self._workbench

    @property
    def produced_message_types(self) -> List[type[ChatMessage]]:
        return [ToolCallMessage, ToolCallResultMessage]

    async def on_messages_stream(
        self, messages: Sequence[ChatMessage], cancellation_token: CancellationToken
    ) -> AsyncGenerator[AgentMessage | Response, None]:
        self.remove_all_tools()
        tools = self._workbench.get_tools_for_context(messages)
        logger.info(f"selected tools: {[tool.name for tool in tools]}")
        for tool in tools:
            self.add_tool(tool)

        async for msg in super().on_messages_stream(messages, cancellation_token):
            yield msg

        self.remove_all_tools()

Used like this:
workbench_search_agent = WorkbenchSearchAgent(
        name="workbench_search_agent",
        model_client=model_client,
        workbench=openapi_agent.workbench,
        system_message="You are a helpful AI assistant to find tools. When you are done, handoff to planning_agent.",
        handoffs=[
            Handoff(
                target="planning_agent",
                message="Here are the tools your are looking for.",
            ),
        ],
    )

    planning_agent = AssistantAgent(
        name="planning_agent",
        model_client=model_client,
        system_message="You are a planning agent. Your task is to create a step-by-step plan for the given task."
        "In order to plan, you need to know the tools you can use."
        f"You start by asking {workbench_search_agent.name} to find the relevant tools."
        "Finally, you create a step-by-step plan for the given task."
        "When you are done, handoff to coordinator_agent.",
        handoffs=[
            "coordinator_agent",
            Handoff(
                target=workbench_search_agent.name,
                message="Find the tools to use for the given task.",
            ),
        ],
    )

Why is this needed?
1. Challenges in Current Tool Management

Static Tool Sets: Current systems rely on pre-defined, fixed tools, limiting flexibility and adaptability to different tasks.
Dynamic Task Requirements: Tasks often need tools tailored to specific contexts, but static systems can’t dynamically adapt.
Scalability Issues: Managing large pools of tools becomes inefficient without dynamic filtering or selection mechanisms.

2. The Role of the Workbench

Centralized Tool Management: The Workbench provides a unified system to add, remove, enable, and filter tools dynamically.
Context-Aware Tool Selection: Uses techniques like vector search to find tools relevant to the current task or query.
Agent Collaboration: Supports modular agents (e.g., Search Agent for finding tools and Execution Agent for using them) to streamline workflows.

3. Advantages for Autogen

Scalability: Handles large, virtually unlimited toolsets dynamically and efficiently.
Flexibility: Adapts tools in real-time to match task-specific needs.
Extensibility: Compatible with various retrieval methods, enabling advanced filtering mechanisms like LLM embeddings or vector matching.
Better Agent Collaboration: Facilitates seamless interactions between agents using a shared tool resource.

This is an interesting idea. Would you be available to discuss this in our community office hour meeting? Every wednesday 10 AM PST.
See: https://github.com/microsoft/autogen/discussions/4059

@ekzhu sure thing! See you tomorrow.


text:
javaVersion parameter is ignored

Repro steps:
Run a command like:

mvn archetype:generate -DarchetypeGroupId='com.microsoft.azure' -DarchetypeArtifactId='azure-functions-archetype' -DjavaVersion='11' -DgroupId='com.function' -DartifactId='ja2' -Dversion='1.0-SNAPSHOT' -Dpackage='com.function' -DappName='ja2-1598029847902' -B

Expected:
"java.version" is set to 11 in pom.xml
Actual:
"java.version" is still 1.8
Seems like it has to do with the "javaVersion" logic being inside this "if" condition here: https://github.com/microsoft/azure-maven-archetypes/blob/develop/azure-functions-archetype/src/main/resources/META-INF/archetype-post-generate.groovy#L26
We always specify an appName in the Azure Functions extension, so it always skips that part

@EricJizbaMSFT Thanks again for your help, we have fixed the issue and released the archetype 1.31 and you may get it here

repo: microsoft/azure-maven-archetypes


text:
azure-functions-maven-plugin 1.17.0 breaks package goal

For a HttpTrigger function project I am trying to update the azure-functions-maven-plugin to the latest version (1.36.0). But starting at version 1.17.0 the mvn azure-functions:package goal breaks.
It fails at Step 1 of 8: Searching for Azure Functions entry points and only gives me the following error:
[ERROR] Failed to execute goal com.microsoft.azure:azure-functions-maven-plugin:1.17.0:package (package-functions) on project eab-function: com.microsoft.azure.toolkit.lib.common.exception.AzureToolkitRuntimeException: com.microsoft.azure.functions.annotation.FunctionName -> [Help 1]
If I try to run maven with -e or -X it only gives me the stack trace, no other specific error.
When I upgrade the function to version 1.19.0 and later it gives a slightly more specific error:
[ERROR] Failed to execute goal com.microsoft.azure:azure-functions-maven-plugin:1.19.0:package (package-functions) on project eab-function: generate configuration files and prepare staging directory: AzureToolkitRuntimeException: com.microsoft.azure.functions.annotation.FunctionName -> [Help 1]
I already tried looking at the documentation for this plugin but there is nothing mentioned in the changelog for version 1.17.0, my azure CLI is updated to the latest version and core tools is as well.
This is my plugin configuration:
<plugin>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-functions-maven-plugin</artifactId>
    <version>1.17.0</version>
    <configuration>
        <resourceGroup>FAKE-rg</resourceGroup>
        <region>westeurope</region>
        <appName>${functionAppName}</appName>
        <runtime>
            <os>linux</os>
            <javaVersion>17</javaVersion>
        </runtime>
        <appSettings>
            <property>
                <name>WEBSITE_RUN_FROM_PACKAGE</name>
                <value>1</value>
            </property>
            <property>
                <name>FUNCTIONS_EXTENSION_VERSION</name>
                <value>~4</value>
            </property>
        </appSettings>
    </configuration>
    <executions>
        <execution>
            <id>package-functions</id>
            <goals>
                <goal>package</goal>
            </goals>
        </execution>
    </executions>
</plugin>

And this is my HttpTrigger code:
public class Function extends AzureHttpFunction {

    @FunctionName("HttpTrigger")
    public HttpResponseMessage invoke(@HttpTrigger(name = "req", methods = { HttpMethod.GET }, route = "{*route}",
            authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<String>> request,
            final ExecutionContext context) {

        context.getLogger().fine("Http trigger uri " + request.getUri());
        ThreadContext.put("id", context.getInvocationId());

        return super.route(request, context);
    }
}

Wondering if it could have something to do with this PR: https://github.com/microsoft/azure-maven-plugins/commit/476cc6e3693936d9143f05d8a5631f9033266703

I was correct in my assumption that the PR mentioned in my previous comment was the culprit.
To be precise, the removal of this dependency was causing my problem
<dependency>
            <groupId>com.microsoft.azure.functions</groupId>
            <artifactId>azure-functions-java-library</artifactId>
</dependency>

I added back the dependency and was able to upgrade to version 1.36.0 without further issue

repo: microsoft/azure-maven-plugins


text:
service endpoint retrieve username and password

I am building an azure-pipelines-extension I have a custom endpoint with basic authentication. I need to pass this endpoint credentials to my datasources.
this is my vss-manifest.json
     "dataSources": [
       {
        "name": "AccessToken",
        "endpointUrl": "$(endpoint.url)",
        "requestVerb": "Post",
        "requestContent": "username={{{endpoint.username}}}&password={{{endpoint.password}}}&grant_type=password",
        "resultSelector": "jsonpath:$.access_token",
        "headers": [
          {
            "name": "Content-Type",
            "value": "application/x-www-form-urlencoded"
          }
        ]
      }

However it doesnt seem like username is getting passed . When i replace the line "requestContent" with
       "requestContent": "username=my_username&password=my_password&grant_type=password",

It works.
What am i missing here ?

Hello, @pathakrohit08 , please take a look at this answer on developer community: https://developercommunity.visualstudio.com/t/Is-there-a-way-to-use-custom-endpoint-pa/61533?space=21&entry=problem&q=custom+endpoint&viewtype=all
Most likely it may help you to resolve you problem.

@tatyana-kostromskaya  Thank you i was able to make it work.

repo: microsoft/azure-pipelines-tasks


text:
Improving CMake Task

Environment
TFS on premise. Version 15.117.27024.0
Issue Description
The current CMake Task is basically worthless. All the benefits to the "Command Line" Task is adding cmake as executable and setting the demand.
Proposed enhancements

If Demand CMAKE points to cmake.exe, use this cmake.exe
Support and Demand multiple different cmake versions that can be installed in parallel
Add variables
Verbose option
Build Mode (Release, Debug, ... + free form)
Additional command line parameters
Drop down box: "Configure", "Build", "Install", "Run Script", "Test"
On Configure set source and configuration directory (maybe save configuration directory to variable for following CMake Build etc. tasks), Set Generator (add demands acordingly), Set Toolset (add demands acordingly)
On Install: Install directory (CMAKE_INSTALL_PREFIX), Component
On Test: Component, Regex for test, Make Badge with results, add results to Build Overview

Is there any update on this issue?

No update yet, we were working on fixing some cmake issues in the latest hosted 2017 image updates, which took priority over this.

No problem. Is there an estimated timeline for these improvements?

Sorry for the delay. Adding @vijayma for scheduling/prioritization.

If this ever will pop up into your work queue, please support the new cmake presets. This feature is the most important now...

authors: BotellaA KUGA2 azureDaveOps moswald


text:
Users/ozanaydin/wif kudu tasks new branch

Copy from PR - https://github.com/microsoft/azure-pipelines-tasks/pull/18273
Task names:

AzureFunctionAppContainerV1
AzureWebAppV1
AzureWebAppContainerV1

Description: Reintroduce WIF support to Kudu based tasks that had to be removed by #18202
Documentation changes required: N
Added unit tests: N
Attached related issue: N
Checklist:

[X] Task version was bumped - please check instruction how to do it
[ ] Checked that applied changes work as expected

I created this PR only for experimental purposes. Now closing.


text:
Additional Import for Sanitizer

Task name:
AzureFileCopyV1
AzureFileCopyV2
AzureFileCopyV3
AzureFileCopyV4
AzureFileCopyV5
WindowsMachineFileCopyV1
WindowsMachineFileCopyV2
Description: Additional imports for sanitizer
Documentation changes required: (Y/N) N
Added unit tests: (Y/N) N
Attached related issue: (Y/N) #18805
Checklist:

[X] Task version was bumped - please check instruction how to do it
[X] Checked that applied changes work as expected

The task is now breaking with the following error:
2023-08-23T19:03:22.1486408Z Import-Module : The specified module 'C:\Users\luc_admin\AppData\Local\Temp\ps_modules\Sanitizer'
2023-08-23T19:03:22.1487067Z At line:1 char:1
2023-08-23T19:03:22.1487560Z + & 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -NoLogo ...
2023-08-23T19:03:22.1488138Z + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-23T19:03:22.1488710Z     + CategoryInfo          : NotSpecified: (Import-Module :...les\Sanitizer' :String) [], RemoteException
2023-08-23T19:03:22.1489268Z     + FullyQualifiedErrorId : NativeCommandError
2023-08-23T19:03:22.1489647Z
2023-08-23T19:03:22.1489788Z
2023-08-23T19:03:22.1536522Z
2023-08-23T19:03:22.1612671Z was not loaded because no valid module file was found in any module directory.
2023-08-23T19:03:22.1613128Z
2023-08-23T19:03:22.1636455Z
2023-08-23T19:03:22.1709287Z At C:\Users\luc_admin\AppData\Local\Temp\1ad33f53-c244-4e76-b753-1b00c8e340a5.ps1:11 char:5
2023-08-23T19:03:22.1711031Z
2023-08-23T19:03:22.1733865Z
2023-08-23T19:03:22.1802001Z +     Import-Module $PSScriptRoot\ps_modules\Sanitizer
2023-08-23T19:03:22.1803247Z
2023-08-23T19:03:22.1824477Z
2023-08-23T19:03:22.1894457Z +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-08-23T19:03:22.1895536Z
2023-08-23T19:03:22.1916304Z
2023-08-23T19:03:22.1984431Z     + CategoryInfo          : ResourceUnavailable: (C:\Users\luc_ad...dules\Sanitizer:String) [Imp
2023-08-23T19:03:22.1985024Z
2023-08-23T19:03:22.2009377Z
2023-08-23T19:03:22.2337541Z    ort-Module], FileNotFoundException
2023-08-23T19:03:22.2337876Z
2023-08-23T19:03:22.2362456Z
2023-08-23T19:03:22.2434176Z     + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCom
2023-08-23T19:03:22.2434614Z
2023-08-23T19:03:22.2454849Z
2023-08-23T19:03:22.2521712Z    mand

We are seeing exactly the same issue with all versions of AzureFileCopy. Please advise where we can get the Sanitizer module or resolve this problem. Thanks

An ugly workaround is to download the Tasks/Common/Sanitizer folder and add to the target machine under the folder it claims it is missing.


text:
HCIBox-Client VM - Infrastructure deployment

I've started the HCIBox-Client VM - Infrastructure deployment and I see the following information:
AzSHOST1: Extension AzureEdgeTelemetryAndDiagnostics is in place and provisioned.
Extension AzureEdgeDeviceManagement is missing
AzSHOST1: Extension AzureEdgeLifecycleManager is missing
AzSHOST1: Waiting for extension installation to complete, sleeping for 2 minutes. Attempt 13 of 90
Current state: Succeeded
Is your issue related to a Jumpstart scenario, ArcBox, HCIBox, or Agora?
HCIBox
For the deployment of HCIBox I choose SwedenCentral because of getting an error when trying to deploy this in eastus.

Describe the issue or the bug
Is it normal that these extensions are missing? How can I troubleshoot this?

Seem similar to: https://github.com/microsoft/azure_arc/issues/2614
How to resolve is still a bit unclear to me.

@stefanstranger I believe the issue is related to the fact that Sweden Central is not supported for Azure Stack HCI.

Azure regions: Azure Stack HCI is supported for the following regions:
East US
West Europe
Australia East
Southeast Asia
India Central
Canada Central
Japan East
South Central US

As a possible enhancement, we can look into supplying a separate parameter for what region to register HCI against to make it possible to deploy the HCIBox Client VM to a different region than the HCI cluster & nodes registers against.
However, for now I would advise to leverage one of the above regions - as the current HCIBox automation registers the HCI cluster in the same region as the location specified for the deployment.
If you have time and would like to contribute, adding a separate parameter for the HCI cluster & node registration location would be a great first contribution to HCIBox.

Hi @janegilring sure thing. I can try to contribute to get swedencentral being added. Let me figure out what needs to change.

authors: janegilring stefanstranger


text:
Intellisense does not recognize new objects in database

Issue Type: Bug
Hello
Once views and functions are created, they are not recognized in Intellisense until ADS is restarted unlike it work in SSMS
Azure Data Studio version: azuredatastudio 1.35.1 (fab63efd307e54c063c8af03474bbb5d77f5fd11, 2022-03-15T18:03:38.261Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No
Extensions (15)

Extension
Author (truncated)
Version

sql-server-diagnostic-book
ema
0.2.0

qpi
joc
0.1.6

admin-pack
Mic
0.0.2

admin-tool-ext-win
Mic
0.0.3

agent
Mic
0.48.0

dacpac
Mic
1.8.0

import
Mic
1.5.0

profiler
Mic
0.11.0

query-history
Mic
0.1.0

server-report
Mic
0.2.3

sql-assessment
Mic
0.6.1

azdata-sanddance
msr
3.3.0

schema-visualization
R0t
0.8.2

sql-prompt
Red
0.2.10

vscodeintellicode
Vis
1.2.1

(1 theme extensions excluded)

@ragnarok154 there is a command Refresh Intellisense Cache available that should update suggestions, etc. when the DB schema changes.  This should be similar to SSMS which contains a similar command.  We would like to implement schema drift-detection like SSDT which automatically detects schema changes, but don't have that support currently.  Please let us know if this command does not work as expected.  Thanks!

repo: microsoft/azuredatastudio


text:
ALTER not recognized as reserved keyword

SQL Operations Studio Version: 0.31.3-insider

Steps to Reproduce:

Open New Query
Type Alter

Expected behavior is for Alter to be colored blue. For September, we should do a pass of all recognized T-SQL reserved keywords and ensure they are recognized in SQL Operations Studio. Is there a reference file I can review?

https://docs.microsoft.com/en-us/sql/t-sql/language-elements/reserved-keywords-transact-sql?view=sql-server-2017

ALTER (something) is caught and given a blue highlight. ALTER on it's own isn't. This may be working as intended. I'll confirm the intended behavior.

This is now fixed and verified.

authors: aaomidi abist yualan


text:
Keychain Keeps Asking Me For Password

Issue Type: Bug
When I open Azure Data Studio, it asks me to enter my keychain password. After I do this, I click Always Allow. However, this does not work. Often, the next time I open Azure Data Studio, it asks for my password again. Sometimes upon opening Azure Data Studio it asks for my keychain password multiple times before I can actually use the application. The Always Allow button seems to do nothing, which is quite annoying.
Azure Data Studio version: azuredatastudio 1.36.2 (2299a76973585fa962cfd06e8acab4abb41567de, 2022-05-19T04:10:47.073Z)
OS version: Darwin x64 21.6.0
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledwebgl: enabledwebgl2: enabled

Load (avg)
3, 2, 2

Memory (System)
16.00GB (0.02GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions: none

Hi @josh-rathke
Since we have an open issue #19269 with the same concern, I will close this as a duplicate.
You may follow the original issue for future progress and updates.

authors: cheenamalhotra josh-rathke


text:
Revert BDC deployment back to using old azdata check (#12470)

Fixes https://github.com/microsoft/azuredatastudio/issues/12462
Bring back old azdata experience for BDC contribution - will follow up post-September with making this work with azdata extension.

Pull Request Test Coverage Report for Build 261842639

28 of 42 (66.67%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 38.912%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

extensions/resource-deployment/src/services/tools/azdataToolOld.ts
27
41
65.85%

Totals

Change from base Build 261636869:
0.02%

Covered Lines:
19235

Relevant Lines:
45102

💛  - Coveralls

authors: Charles-Gagnon coveralls


text:
add tabindex and handle keyboard selection

This PR fixes #12963
add tabindex to leverage the vscode global outline color: https://github.com/microsoft/azuredatastudio/blob/main/src/vs/workbench/browser/style.ts#L114
and I noticed the page number doesn't handle keyboard selection so adding it.
before:

after:

Pull Request Test Coverage Report for Build 356929796

0 of 5 (0.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.005%) to 41.309%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/sql/workbench/services/dialog/browser/wizardNavigation.component.ts
0
5
0.0%

Totals

Change from base Build 356915875:
-0.005%

Covered Lines:
21739

Relevant Lines:
48317

💛  - Coveralls

authors: alanrenmsft coveralls


text:
Use azdata-test ModelView stubs

This is the first amount of work done to create a common test utility package for our extension tests.
It uses the https://github.com/Charles-Gagnon/azdata-test which is forked off of the vscode-test package.
Currently the only functionality that package provides is the ModelView stubs and mocks. But now we have a place to put common stuff for testing extensions.
I haven't fully figured out how we're going to handle making changes to the package - but for now it'll just be open a PR against it and I'll merge it in and publish a new version.
For purposes of this PR only focus on usage from the extension side - I'll be sending out something for people to review my implementation on the package side later on but I'd like to keep this focused on the changes specifically being done here.
Most of the test functionality was kept intact - with a few minor changes made where doing a specific check was extra work and I didn't see value in it (for example checking that objects being added to a container are specifically the objects we created).

Pull Request Test Coverage Report for Build 424608498

8 of 8 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.006%) to 43.111%

Totals

Change from base Build 424466713:
0.006%

Covered Lines:
24117

Relevant Lines:
51262

💛  - Coveralls


text:
Disable npm recompile step

Disable steps that attempt to recompile native npm module with node ABI instead of electron ABI.  I'm disabling instead of removing since the steps are necessary but are currently causing side-effects.  There will be a follow-up PR to re-enable without side-effects (and to actually accomplish the npm recompile 😄).

Pull Request Test Coverage Report for Build 864639949

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.002%) to 43.359%

Totals

Change from base Build 864594265:
0.002%

Covered Lines:
26559

Relevant Lines:
55686

💛  - Coveralls

authors: coveralls kburtram


text:
Added label description for RWX storage class

Updated the description for SQL MIAA deploy storage class backups to say "must be RWX capable storage class".

Pull Request Test Coverage Report for Build 2625653139

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 42.386%

Totals

Change from base Build 2625554850:
0.0%

Covered Lines:
28403

Relevant Lines:
62522

💛  - Coveralls

authors: candiceye coveralls


text:
Azure Pipelines with Microsoft Teams not working

Hi
I have followed this guide:
https://learn.microsoft.com/en-us/azure/devops/pipelines/integrations/microsoft-teams?view=azure-devops
I ran @azure pipelines subscribe [pipeline url].
Getting this:

To test it, I started my pipeline and ended up like this:

But there is absolutely zero activity in the Teams channel when building and deploying with my pipeline. I have no idea how to debug this :-)
Kind regards, Emil

For some reason (I didn't do anything), it started working today on September 28.

And it's not working again... Was a one time occurrence apparently.

repo: microsoft/azuredevopslabs


text:
fix Dynamic properties do not work

close #3391
When we evaluate such expression like "dialog[a].b" with the scope implement by DialogStateManager,
The steps to get the result:

call DialogStateManager.TryGetValue
2.TransformPath path to get the right format path
3.ResolveMemoryScope to get the memory scope and remaining path
...

The issue occurs in step3, when dialog['a'].b comes in, ResolveMemoryScope  would separate the path into two parts, first part is dialog['a'], and the second part is b, but dialog['a'] is not a valid scope, dialog is.
How to reproduce:
build the below dialog structure:
"actions":
[
                    {
                      "$kind": "Microsoft.SetProperty",
                      "property": "user.name.firstname",
                      "value": "dialog.jack"
                    },
                    {
                      "$kind": "Microsoft.SetProperty",
                      "property": "turn.nameproperty",
                      "value": "name"
                    },
                    {
                      "$kind": "Microsoft.SetProperty",
                      "property": "=user[turn.nameproperty].firstname",
                      "value": "daniel"
                    },
                    {
                      "$kind": "Microsoft.SendActivity",
                      "activity": "new firstname is ${dialog.jack}"
                    }
  ]

expect set value "daniel" into property "dialog.jack", but failed.
Expectation:
Separate path with both open square bracket and dot to get the right memoryscope.

Tagging R8.

Verified functionally that this fixes the regression w/ dynamic property access.

It's not exactly a regression, it's a long live bug i believe. The issue is that, DSM do path resolving with two step

step 1 : identify the scope, for example, dialog.abc, will identify as dialog scope, then path will becomes "abc"
step 2 : resolve value inside scope using the path left

The issue is in step 1 that we are only searching first "." to identify scope, so for "dialog["abc"]", it wouldn't correctly identify as dialog scope. The fix is to search "." and "[" both. @tomlm will this help explain the issue?

authors: Danieladu boydc2014 vishwacsena

repo: microsoft/botbuilder-dotnet


text:
Bot Framework Getting 502 Bad Gateway Errors in Production Environment after the Bot is not Requested for around 10 Minutes (Node.js)

When I use Microsoft Bot Framework for developing a conversational bot using multiple waterfall dialogs, I always receive 502 Bad Gateway errors in the Production Environment when the bot is not requested for around 10 Minutes.
However, in the local environment, the error will not happen when the application is tested using Bot Emulator.
I have been looking for solutions regarding this issue, and it seems that the error is caused by the bot not being able to send back the response within 15 Seconds.
Here are the things that I have tried in order to get around with the issue:

Enabled "Always on" options for Azure Cloud Application (cannot solve the issue)

Changed the in-memory storage of state into custom storage using Cosmos DB (cannot solve the issue)

Sending Proactive Messages for certain long-running processes. However, when the 502 error starts to happen, even fetching one document from Firebase Firestore can be the "long-running process" which results in the error. Since my application requires checking Firebase document status constantly to see whether certain conversation stage is open and decide which Dialog should be applied, it is unlikely to identify long-running processes in this context.

Based on my observation, when the 502 gateway error occurs, the bot will be stuck in the initial stage rather than running slowly (i.e. the bot will be stuck in the initial Firebase request), and it does not seem to be the problem of long-running processes. It is not a problem with Firebase since fetching data from Firebase (which basically should take no time) will appear to be long-running processes when the bot does not appear to be "active" after around 10 minutes. The issue is that the bot seems not being capable of sending the fetching requests.
Also, when the error occurs, the error message throwing by the bot framework is as follows, and I cannot find any related solutions for the error activity.code with value "14" must be of type string.

[onTurnError]: Error: No connection established
BotFrameworkAdapter.processActivity(): 500 ERROR - Error: activity.code with value "14" must be of type string. (node:5132) UnhandledPromiseRejectionWarning: Error: Error: activity.code with value "14" must be of type string. At BotFrameworkAdapter.processActivity (D\home\site\wwwroot\node_modules\botbuilder\lib\botFrameworkAdapter.js:511:19) at process._tickCallback (internal/process/next_tick.js:68:7). (node:5132) Unhandled Promise Rejection Warning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled
with .catch(). (rejection id: 9)

Considering this situation, what is the proper workaround of the issue?

I am trying to write a cloud function to actively sending requests to the bot at a 5 minutes interval to keep it alive, but I am not sure whether it will be working and it does not seem to be the proper solution.
If I need to send proactive messages for every received message (since it is not possible to identify long-running processes), how can I push the waterfall dialog forward & prompt users for certain inputs with proactive messages? Since the Proactive Message Sample https://docs.microsoft.com/en-au/azure/bot-service/bot-builder-howto-proactive-message?view=azure-bot-service-4.0&tabs=javascript does not provide an implementation to continue the waterfall dialog & prompt user for certain inputs (e.g. AttachmentPrompt, NumberPrompt, etc.).

Looking into

activity.code with value "14" must be of type string

as that is not an error I recognize offhand.

You said:

how can I push the waterfall dialog forward & prompt users for certain inputs with proactive messages

It is possible to create a dialog context and use it to begin the dialog from within the proactive context created when you call adapter.continueConversation.

@benbrown Hi, could you please specify a little bit about? If I am trying to forward all the messages received to proactive context, what should I do in the following function? Just send a HTTP request to the /api/notify endpoint?
adapter.processActivity(req, res, async turnContext => {
    //
}

Also, in the /api/notify route, after I get the conversationReference, this function seems not to be working. Using adapter.continueConversation, I can only await turnContext.sendActivity(msg), but I cannot run the current context. Could you provide some details regarding this?
await adapter.continueConversation(
      conversationReference,
      async turnContext => {
        return await bot.run(turnContext);
      }
    );

@jwiley84 Hi, is there any update for the error? I tried to activate the bot using a scheduler (sending the request to the bot at a five-minute interval in order to keep it alive), but it seems that it can only prolong the lifetime of the bot. And after 1 hour or so, I will still receive the same error message as activity.code with value "14" must be of type string.
And after receiving this error message, all the consequent messages will receive a 502 error.

Hello @PeterChen1105! Our support team looked into this item and escalated it to the dev team. I'm investigating, and will come back with questions and / or checks you can do to get to the resolution of this item. I'll reach out after I catch up and do a first round of investigation here.

Hi @carlosscastro, thx for your information, cheers

Hello @PeterChen1105!
There is a lot to unpack here so I'd like us to go back to the original issue. First, I'd like to note that if you could provide a minimal code example that demonstrates the problem with very little code and precise instructions, we could try it ourselves and analyze if there is a bug. So if you feel inclined and really want to get this fixed, I'd definitely recommend isolating the problem and how to get to it and sending us the steps and minimal code.
In the meantime, I'd like to organize the information here, particularly the original report:

The bot is a conversational bot using multiple waterfall dialogs
Customer always receives 502 Bad Gateway errors in the Production Environment when the bot is not requested for around 10 Minutes.
On the local environment, the error will not happen when the application is tested using Bot Emulator.
Enabling always or switching to memory store does not help

Then you mentioned that you tried proactive as a means to fixing this. Since it didn't fix it, potentially proactive would just complicate things further so I'd like to tackle the original issue.
Note that some of your symptoms make sense, since the timeout in directline when your bot is deployed to production is 15 seconds, while in the emulator we don't enforce that. This means that if your bot takes more than 15 seconds to respond we'll stop waiting.
Since I don't have a repro of your issue at this point, here are a few things that I'd recommend trying in order to gather more information. I cannot guarantee that any of these will lead to the root cause but they should help get closer to it.

Simplify and obtain minimal repro: As I mentioned below, remove all your custom logic and just replace with hardcoded answers in the waterfall and no database calls. Does the bot still get stuck? If yes, send us that code along with instructions on how to deploy and we can try it.
App insights: Are you using app insights? It's an amazing way of knowing what is going on with your bot, how long your bot is taking to respond, how long it's spending waiting for external calls to respond, etc
Deploy a sample: You could try getting a bot sample from botbuilder-samples and deploying it to see if it gets stuck for you: https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/javascript_nodejs/16.proactive-messages and then add your logic to it to see if that makes it get stuck

If I were in your position, I'd go for 2. and 1. If in 1 you remove your custom logic and the bot is not stuck anymore, you can tell which was the offending line and find a way to fix it.

@PeterChen1105 - Hi Peter, are you able to update this thread with a current status?

Hi @PeterChen1105, just checking in if you were to get a small repro of the issue so we can help you debug.

Hi @carlosscastro @cleemullins I have contacted the Microsoft Support Team to get some extra help, and it seems that the error is caused by Firestore that I used for persisting data and push real-time notifications.
Thu Dec 12 2019 15:14:56 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 1, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 16:14:56 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 1, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 17:14:58 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 1, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 17:14:58 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 2, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 17:14:58 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 3, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 18:15:00 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 1, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 18:15:00 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 2, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 18:15:01 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 3, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 18:15:03 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 4, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 18:15:05 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 5, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 18:15:09 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 6, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 18:15:11 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 7, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 18:15:16 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 8, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 18:15:22 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 9, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 18:15:35 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 10, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 18:15:58 GMT+0000 (Greenwich Mean Time): enter backoffAndWait, retryCount+1, this.retryCount: 11, exports.MAX_RETRY_ATTEMPTS: 10 Thu Dec 12 2019 18:16:34 GMT+0000 (Greenwich Mean Time): enter backoffAndWait error situation, this.retryCount: 11, exports.MAX_RETRY_ATTEMPTS: 10 Encountered error: Error: Exceeded maximum number of retries allowed
When encountering a maximum number of retries, the next bot message will receive a timeout error.
I tried to update the version of Firestore and started monitoring the bot status from the day before yesterday, and up until now, the error does not occur for 24 hours. So I will keep monitoring the status and hopefully, the problem has been tackled by the latest version of Firestore.
Sorry for the late update of the thread status since to reproduce the error, sometimes it will take more than 10 hours.

repo: microsoft/botbuilder-js


text:
[Localization] Wrong translation for odd and even function in Chinese

Describe the bug
The odd/even in function analysis (parity), which indicates odd function/even function (奇函数/偶函数 in Chinese) is wrongly translated as odd number/even number (奇数/偶数 in Chinese).

Steps To Reproduce

Go to Graphing Mode
Enter any function
Open Analysis tab
Check out Parity tab in Chinese (奇偶性)

Expected behavior
It should be translated correctly.

Screenshots

Device and Application Information

OS Build: 10.0.19041.0
Architecture: X64
Application Version: 10.2007.1.0
Region: zh-CN
Dev Version Installed: False

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

hello, I can fix it. Can I take this issue?

authors: MicrosoftIssueBot dovisutu yiransii

repo: microsoft/calculator


text:
MIDL2011 When consuming interface from C# Runtime Library within same solution

I have a solution in which I've defined a C# based Windows Runtime Component (WRC) library with a single interface in it.  In the same solution I've created a C++/WinRT WRC project that has a project reference to the C# WRC project.  Further, in the C++/WinRT project I've created an .idl file with a class that attempts to implement the interface defined by the C# library.
At compile time, I receive a MIDL2011 error stating 'unresolved type declaration' for the interface that the class is attempting to use.  If instead of a project reference, I add a direct reference to the winmd produced by the C# library, then the midl error goes away.  It is my assertion that adding a direct reference to the winmd is only a work-around and that a project reference should be sufficient.
Note that this appears to be a regression as this same scenario worked previously with 1.0.190211 (and without the direct winmd reference).
I have attached the solution/project files that reproduces this issue.
ConsumeCSharpWrcUsingCppWinRT.zip

@jlaanstra or @Scottj1s - do you know whether this is a regression? I can confirm the behavior reported here.

It is my assertion that adding a direct reference to the winmd is only a work-around and that a project reference should be sufficient.

I will just add that this workaround is required more often than we'd like due to various limitations/bugs in the Visual Studio support for cross-language references. That may be your best bet.

authors: MarkARussell kennykerr

repo: microsoft/cppwinrt


text:
Replace old headers with modern ones

Most files already have switched to use the modern variation, such as "", "", etc. However, a few files do not, so this PR fixes that.

Done! @kennykerr

/azp run


text:
Don't enable hook extension rundown until NMR binding is complete

Description
Today, the hook provider helper initializes the rundown protection object after invoking the provider-specific attach function. Since the provider-specific attach function may enable the inspection code path, it will attempt to acquire rundown protection before initialization is complete.
This is a problem per se, but the current design appears to be that the rundown should not be acquired until after the provider-specific attach function has returned successfully. The issue with this implementation is that initializing the rundown after acquisition attempts have made leads to undefined behavior, including rundown refcount underflows.
Fix the current design by initializing a disabled rundown before calling the provider-specific attach function, and then enable the refcount only if the attach succeeded.
Resolves #2010
Testing
Tested locally. Automation requires stress coverage, e.g., https://github.com/microsoft/ebpf-for-windows/issues/1933.
Documentation
N/A.

Please update unit tests or explain why that is not feasible as normally fixes should have accompanying test updates before being merged.

Sure, I've updated the description.

Automation requires stress coverage, e.g., #1933.

I don't believe that is true.

authors: dthaler mtfriesen

repo: microsoft/ebpf-for-windows


text:
Question: How can we setup the proxy with custom domain name?

Hello,
Is there any guidance for setting up the FHIR proxy with custom domain name, such as https://emr.abc.com/fhir?
Thank you very much

You can select the custom domain option on the proxy function app or you can follow this guide (it uses Azure DNS) but you can use your DNS as well
https://learn.microsoft.com/en-us/azure/dns/dns-custom-domain

@vohuythao @sordahl-ga
Where are you checking the version id and version name for the API?
We need to mention API version ID and version name in the documentation.
Is that why we need to use a custom domain for our API?
Proctor said that we could get the version id using a database query. Proctor needs a screenshot for the version name and version id for the API.
Any idea where I can get the API version id and name?
Thanks in advanced!

@vohuythao
Please ignore my above question. I resolved it.
How are you going to validate the access and refresh token for visual inspection 9.10.06?

You can select the custom domain option on the proxy function app or you can follow this guide (it uses Azure DNS) but you can use your DNS as well https://learn.microsoft.com/en-us/azure/dns/dns-custom-domain

Thank you @sordahl-ga , but how about the App Registration for the proxy?
After I change the custom domain name for proxy function app, the Inferno G10 testing is failed.
I think because the name of App Registration is not correct anymore
Proxy function app : emr.abc.com
Proxy App Registration : sfp-proxyxxxxx.azurewebsites.net
This cause problem when authentication
Thank you

@vohuythao
Are you passing Patient Context from your EHR for test 3 EHR App Launch?
Have you created the UI in your EHR for Scope selection?
It is mandatory for the certification.

Hello @Kedar782
You mean for selection of scope offline_access , right?
The Proctor said that we can put this in EHR document, so that users can be informed by  reading the document
It's my understanding
Thank you

@vohuythao
No, I mean Do you allow scope selection for FHIR resources from your EHR UI? Do you allow custom scope selection for the FHIR resources for 3rd test?
How do you launch EHR APP from EHR?
Do you select a patient first from your EHR and then pass this patient in the launch URL?
https://inferno.healthit.gov/suites/custom/smart/launch?iss={fhir-server-url}&launch=anystring
Here for launch =(anystring) we need to pass patient context(patient reference).

@Kedar782
For Inferno test 3, I just run with FHIR endpoint, EHR clientid, clientsecret and then when this popup display

Just open this link in a new tab
https://inferno.healthit.gov/suites/custom/smart/launch?iss=https://sfp-proxyxxxx.azurewebsites.net/fhir&launch=test

When it ask for authentication with SMART server just login with my Azure AD account, and the scope selection is default

@vohuythao
In the above link in a launch= test, we need to pass the patient context means the patient we selected from the EHR.
Are you done with your certification?

@vohuythao
Which test is not passed?
Have you appeared for certification before?
My certification is on Monday.

@Kedar782
We have not passed below test

How are you going to pass 9.10.04?
For me, the azure ad consent screen shows offline_access scope only once for the app(for standalone app launch and for EHR launch). This is what I'm planning to explain to my proctor.
For test 9.10.05, We need to attest that our token is valid for 3 months. I think verbal confirmation is valid for test 9.10.05. If not how are you going to pass 9.10.05?
For test 9.10.11 and test 9.10.12, I'm going to show Patient resource example in test 1.7 which element suffix and previous name. Is this valid for 9.10.11 and 9.10.12? If not how are you planning to pass these points?

@Kedar782
9.10.4: we are planning to show the proctor that we have added offline_access scope in the EHR document, user will be informed by reading that document
9.10.5: I think we had solution here
https://github.com/microsoft/fhir-proxy/issues/93
9.10.11 and 9.10.12: We must add more elements for the Patient
https://build.fhir.org/ig/HL7/US-Core/Patient-example.json.html

Hope these can help you in your certification
Thank you

@vohuythao
Offline_Access Scope is seen in the Azure AD consent screen only for the first time when you use your app.

But it only comes for the first time.
How did you demonstrate 9.10.10, 9.10.13 and 9.10.15?

Hello @Kedar782
9.10.10: I don't remember exactly how we pass this, but I show the proctor this page
https://learn.microsoft.com/en-us/azure/active-directory/develop/id-tokens
9.10.13: This endpoint https://sfp-proxyxxxxx.azurewebsites.net/oauth2/token
Is the endpoint for issuing refresh token, backed by Azure AD
9.10.15: I think this will be auto pass if we already pass before tests

And when I hit the generate access token button I get the new access token and refresh token.
But I cannot able to store that refresh token in the postman. Are you using postman for the demonstration?
If yes, Can you please share the screenshot for the following in the postman?:-

issuing refresh token in the postman and storing it in the postman
refreshing the access token using the refresh token in the postman

I really appreciate your help on this.

Hello @Kedar782
So sorry that I have not used Postman to show this, just show the endpoint
https://sfp-proxyxxxxx.azurewebsites.net/oauth2/token
And this is ok with the Proctor
Good luck with your certification

@vohuythao
I passed the certification. Thank you.
Any idea how can we use this API from our EMR and how are you planning to insert your real data into FHIR?
I have thousands of patients.
Thanks in advanced!

Hello @Kedar782
Great to hear that, congrats to you!
About processing the data, I think you can recruit a data engineer with FHIR, HL7 experience.
This task is related to ETL, process data from SQL to the CosmosDB inside Azure API for FHIR
Thank you

Closing Issue as answered above for archival

authors: Kedar782 sordahl-ga vohuythao

repo: microsoft/fhir-proxy


text:
ToolTip implementation

ToolTipBox is a composable that shows a tooltip box with a title and a text. It could also show custom content. It is used to show a tooltip box on a control.
Validations
Added UI Test Cases
Screenshots
Bottom Align ToolTip:

Top Align ToolTip

Custom content ToolTip:

Pull request checklist
This PR has considered:

[x] Light and Dark appearances
[x] Automated Tests
[x] Documentation and demo app examples
[x] VoiceOver and Keyboard Accessibility
[ ] Internationalization and RTL layouts
[ ] Size classes and window sizes (notched devices, multitasking, different window sizes, etc)

If you want to get rid of the line between the tip and the body, you can consider using a Shape for the background, instead of adding the tip as a vector drawable. This is what we did in our own implementation of Tooltip, and it offers a few other advantages, for example proper shadow or border rendering.

Haven't run the demo, my comment is based solely on the render presented in this PR. Feel free to reach out on Teams if this is interesting to you.

Fantastic addition, btw! If this were released just two weeks earlier, we would have been the first to use it.

repo: microsoft/fluentui-android


text:
fix: When data binding, Value is not updated before @onchange is called

Example: In the demos layout

A Task.Delay is required to allow the binding to occur before we know the value.

    public async void SwitchTheme()
    {
        await Task.Delay(50);

The code is tracking state rather than using the field _ltr that is bound to.

    public async Task SwitchDirection()
    {
        dir = (dir == LocalizationDirection.rtl) ? LocalizationDirection.ltr : LocalizationDirection.rtl;

This was a problem that was solved in .Net 7 when @bind-Value:after was introduced. However, because we need to continue to support .Net 6 this cannot be used.

Fixed with #473

authors: mrpmorris vnbaaij

repo: microsoft/fluentui-blazor