Private ACME authority aka custom root certificate for ACME

General description
We have set up private ACME authority to issue certificates signed with our internal root certificate. Root certificate is added to system keystore, so commands like curl https://our.internal.domain work correctly on k8s host machine & all workers.
However, we are not able to use that ACME server with cert-manager: it simply does not know about our root.
Events:
  Type     Reason                Age              From          Message
  ----     ------                ----             ----          -------
  Warning  ErrVerifyACMEAccount  4s (x2 over 4s)  cert-manager  Failed to verify ACME account: Get https://our.internal.ca/acme/directory: x509: certificate signed by unknown authority
  Warning  ErrInitIssuer         4s (x2 over 4s)  cert-manager  Error initializing issuer: Get https://our.internal.ca/acme/directory: x509: certificate signed by unknown authority

This is pretty reasonable and is expected to happen.
Proposed solution
It seems that currently it's not possible to add custom trusted root certificate. Or at least it is not well-documented.
Ideally, there should be a way to specify root certificate along with issuer definition, like:
spec:
  acme:
    server: https://our.internal.ca/acme/directory
    rootCertificate: <reference either to configmap, secret, or just PEM encoded string>

However, adding root certificate cluster-wide is perfectly OK, I think.
Alternatives
None, really. Let's Encrypt won't issue certs for domains that don't even exist in public network :)
I have not tried to patch Docker images yet, but this seems to be most feasible way to solve this issue temporarily.
Specifying http:// instead of https:// (all in all, it's trusted network) as a workaround does not work either -- ACME client ignores protocol.
Environment details:

Self-hosted Kubernetes 1.15.0
cert-manager v0.11.0 installed by static manifests

Solution was much simpler than I expected:

Create ConfigMap with single key: ca-certificates.crt and use desired CA certificates bundle as a value
Mount that ConfigMap over /etc/ssl/certs within a cert-manager Pod.

Voila,
Status:
  Acme:
    Last Registered Email<EMAIL_ADDRESS>    Uri:                    https://our.internal.ca/acme/account/CPdyUt....srXUVpKB
  Conditions:
    Last Transition Time:  2019-11-06T20:47:08Z
    Message:               The ACME account was registered with the ACME server
    Reason:                ACMEAccountRegistered
    Status:                True
    Type:                  Ready
Events:                    <none>

However, I think that there should be a way to do this directly in Issuer definition.

/remove-lifecycle stale

Seems like a reasonable feature request that we'd be happy to include! Thanks for the comprehensive issue description and for sharing your workaround.
/kind feature
/help-wanted
/good-first-issue
/area acme
/priority backlog

/remove-lifecycle stale

Solution by @makkarpov works fine. It is also available to customize in helm chart.

Hi @makkarpov Could you please add more details about - "Solution was much simpler than I expected:
Create ConfigMap with single key: ca-certificates.crt and use desired CA certificates bundle as a value
Mount that ConfigMap over /etc/ssl/certs within a cert-manager Pod."
If I've already created ConfigMap and mounted it as /etc/ssl, what next how can I use my own Certificate with cert-manager?

Not /etc/ssl, but /etc/ssl/certs. Then cert-manager will be use that certificates as roots, and you can configure your ACME authority as usual.

@makkarpov Thank you, it was my typo, I mounted cert to /etc/ssl/certs and create ACME ClusterIssuer, but nothing happened after that, Issuer has no any state, how can I check that my custom certs is using?

For examle:
K8s_install usermac$kubectl get clusterissuer
NAME                         READY   AGE
letsencrypt-staging-http01           17m
K8s_install usermac$kubectl describe clusterissuer letsencrypt-staging-http01
Name:         letsencrypt-staging-http01
Namespace:
Labels:
Annotations:
API Version:  cert-manager.io/v1
Kind:         ClusterIssuer
Metadata:
Creation Timestamp:  2021-02-26T18:11:08Z
Generation:          1
Managed Fields:
API Version:  cert-manager.io/v1alpha2
Fields Type:  FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.:
f:kubectl.kubernetes.io/last-applied-configuration:
f:spec:
.:
f:acme:
.:
f:email:
f:privateKeySecretRef:
.:
f:name:
f:server:
f:solvers:
Manager:         kubectl-client-side-apply
Operation:       Update
Time:            2021-02-26T18:11:08Z
Resource Version:  7092658
Self Link:         /apis/cert-manager.io/v1/clusterissuers/letsencrypt-staging-http01
UID:               8565b825-837c-44a6-b06a-18c4280df564
Spec:
Acme:
Email<EMAIL_ADDRESS>Preferred Chain:
Private Key Secret Ref:
Name:  letsencrypt-staging-http01
Server:  https://acme-staging-v02.api.letsencrypt.org/directory
Solvers:
http01:
Ingress:
Service Type:  ClusterIP
Selector:
Dns Names:
examlpe.localdomain.com
Status:
Events:

The next thing I observe all-time issue with retrieving information from ConfiMap:
E0226 22:51:48.940646 1 leaderelection.go:321] error retrieving resource lock kube-system/cert-manager-controller: Get "https://<IP_ADDRESS>:443/api/v1/namespaces/kube-system/configmaps/cert-manager-controller": Service Unavailable
I've run test pod, get cert-manager service account token and successfully run curl from cert-manager namespace, please see below:
root@busybox:/ ]$ curl -kvL -H "Authorization:Bearer $token" https://<IP_ADDRESS>:443/api/v1/namespaces/kube-system/configmaps/cert-manager-controller

SSLv3, TLS handshake, Client hello (1):
SSLv3, TLS handshake, Server hello (2):
SSLv3, TLS handshake, CERT (11):
SSLv3, TLS handshake, Server key exchange (12):
SSLv3, TLS handshake, Request CERT (13):
SSLv3, TLS handshake, Server finished (14):
SSLv3, TLS handshake, CERT (11):
SSLv3, TLS handshake, Client key exchange (16):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):

GET /api/v1/namespaces/kube-system/configmaps/cert-manager-controller HTTP/1.1
User-Agent: curl/7.35.0
Host: <IP_ADDRESS>
Accept: /
Authorization:Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IlFfQ182c0xLcUZteXhpUFptVzJ5QTlOUzhSdWlPN0FhNEczV0t0SXBFZDQifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJjZXJ0LW1hbmFnZXIiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlY3JldC5uYW1lIjoiY2VydC1tYW5hZ2VyLXRva2VuLXByZHM5Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6ImNlcnQtbWFuYWdlciIsImt1YmVybmV0...

< HTTP/1.1 200 OK
< Cache-Control: no-cache, private
< Content-Type: application/json
< Date: Fri, 26 Feb 2021 23:08:08 GMT
< Content-Length: 979
<
{
"kind": "ConfigMap",
"apiVersion": "v1",
"metadata": {
"name": "cert-manager-controller",
"namespace": "kube-system",
"selfLink": "/api/v1/namespaces/kube-system/configmaps/cert-manager-controller",
"uid": "3f42850e-c639-4b89-991f-883e91327e5a",
"resourceVersion": "6901891",
"creationTimestamp": "2021-02-22T18:06:10Z",
"annotations": {
"control-plane.alpha.kubernetes.io/leader": "{"holderIdentity":"cert-manager-7d696b488c-7l6xn-external-cert-manager-controller","leaseDurationSeconds":60,"acquireTime":"2021-02-25T00:06:49Z","renewTime":"2021-02-26T01:34:58Z","leaderTransitions":5}"
},
"managedFields": [
{
"manager": "controller",
"operation": "Update",
"apiVersion": "v1",
"time": "2021-02-22T18:06:10Z",
"fieldsType": "FieldsV1",
"fieldsV1": {"f:metadata":{"f:annotations":{".":{},"f:control-plane.alpha.kubernetes.io/leader":{}}}}
}
]
}
}

Hi @makkarpov is it possible that cert-manager makes requests over https instead of http? For example:
my current issue:
E0227 03:49:29.419018 1 sync.go:182] cert-manager/controller/challenges "msg"="propagation check failed" "error"="failed to perform self check GET request 'http://xxxx.com/.well-known/acme-challenge/FD_v3Aqntwk-T5iXp6XHBiHrwBe6JgUAH75SxmjMB58': Get "http://xxxx.com/.well-known/acme-challenge/FD_v3Aqntwk-T5iXp6XHBiHrwBe6JgUAH75SxmjMB58": dial tcp 1.x.x.0:80: connect: connection refused" "dnsName"="xxxx.com" "resource_kind"="Challenge" "resource_name"="xxxx.com-5hx2t-578086427-1035349906" "resource_namespace"="gloo" "resource_version"="v1" "type"="HTTP-01"
over https:
@busybox:/ ]$ curl -vkL https://xxxx.com/.well-known/acme-challenge/FD_v3Aqntwk-T5iXp6XHBiHrwBe6JgUAH75SxmjMB58
SSLv3, TLS handshake, Client hello (1):
SSLv3, TLS handshake, Server hello (2):
SSLv3, TLS handshake, CERT (11):
SSLv3, TLS handshake, Server key exchange (12):
SSLv3, TLS handshake, Server finished (14):
SSLv3, TLS handshake, Client key exchange (16):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):
GET /.well-known/acme-challenge/FD_v3Aqntwk-T5iXp6XHBiHrwBe6JgUAH75SxmjMB58 HTTP/1.1
User-Agent: curl/7.35.0
Host: xxxx.com
Accept: /
< HTTP/1.1 200 OK
< cache-control: no-cache, no-store, must-revalidate
< date: Sat, 27 Feb 2021 03:53:07 GMT
< content-length: 87
< content-type: text/plain; charset=utf-8
< x-envoy-upstream-service-time: 2
< server: envoy
<
FD_v3Aqntwk-T5iXp6XHBiHrwBe6JgUAH75SxmjMB58.6M5WXWjw_rw-kfYcGGo4my-CchJbGRRNuHUgAytzzJk

Hi @munnerz
is it possible that cert-manager makes requests over https instead of http?  I would be interested driving this if I get some guidance. It would be my first cert-manager contribution and my Golang knowledge is limited but I would love to have this feature and I am willing to do the work.

My idea of implementation would be that cert-manager iterates over the list of root-certs that are configured and uses that to import them with the available tools. As a "second" step we could improve this with a check if the certificate is already in the store before we run the import (of course if the tool used already does that we can skip that).

/remove-lifecycle stale

Is there a way to prevent this bot from requiring annoying bumps?

/remove-lifecycle stale

@makkarpov Maybe am I too new to K8s, but how would you go on about adding this Certificate? As far as I can see you cannot edit volume mounts after the pods have been created. Have you changed your deployment script to accompany this change (and if yes, how)?

You should edit that in deployment, right. Either by modifying cert-manager.yaml or directly editing deployment by kubectl edit.

Nice, thanks.
Just figured out that the Jetpack cert-manager Helm chart I am using supports a volume mount option. Should have looked before asking ^^

I had it working on 1.9.1 with the following setup:
# download the AIA Root certificate (the root issuer of the ACME server TLS certificate)
sudo curl http://aia.pki.domain.tld/aia/root.crt -o ~/root.cer
# encode base64
echo $(base64 ~/root.cer) | sudo tee ~/root.txt
# remove downloaded file
sudo rm ~/root.cer
# read bas64 into variable
root_cert=$(<~/root.txt)
# remove base64 file
sudo rm ~/root.txt
# format PEM and write it to file
echo -e "apiVersion: v1
data:
  acme-trust.pem: |
    -----BEGIN CERTIFICATE-----
    $root_cert
    -----END CERTIFICATE-----
kind: ConfigMap
metadata:
  name: configmap-acme-trust
  namespace: cert-manager
  resourceVersion: \"9979\"
  selfLink: /api/v1/namespaces/cert-manager/configmaps/configmap-acme-trust
" \
  | tee ~/microk8s/configMaps/configmap-acme-trust.yaml

kubectl apply -f ~/microk8s/configMaps/configmap-acme-trust.yaml;

echo -e "spec:
  template:
    spec:
      containers:
      - args:
        name: cert-manager
        volumeMounts:
        - name: acme-trust
          mountPath: /etc/ssl/certs/acme-trust.pem
          subPath: acme-trust.pem
          readOnly: false
        resources: {}
      volumes:
        - name: acme-trust
          configMap:
            # Provide the name of the ConfigMap containing the files you want
            # to add to the container
            name: configmap-acme-trust" \
  | tee ~/microk8s/patches/truststore-patch-1.9.1.yaml

kubectl patch deployment cert-manager -n cert-manager --patch "$(cat ~/microk8s/patches/truststore-patch-1.9.1.yaml)"

In the output of kubectl describe deployments cert-manager --namespace=cert-manager I can see the volume as well as the mount:
Pod Template:
  Labels:           app=cert-manager
...
  Containers:
   cert-manager:
    Image:      quay.io/jetstack/cert-manager-controller:v1.9.1
...
    Mounts:
      /etc/ssl/certs/acme-trust.pem from acme-trust (rw,path="acme-trust.pem")
  Volumes:
   acme-trust:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      configmap-acme-trust
    Optional:  false

Now I upgraded to cert-manager 1.10. Better said I build a new separate k8s instance.
First thing that happened was the patch command failed because of the missing image property. So I modified the yaml and all went as expected. But when I created an Issuer/ClusterIssuer and looked at it using kubectl get clusterissuer -o wide I saw that the trust had not been established.
NAME                                      READY   STATUS
cluster-cert-issuer-acme-http   False     Failed to register ACME account: Get "https://acme.pki.domain.tld/.well-known/acme/default/directory": x509: certificate signed by unknown authority

So I tried to validate the change using kubectl describe deployments cert-manager --namespace=cert-manager. There was a new conatiner named cert-manager-controller that I do not see in my 1.9 deployment. I added a mount for that container too so it now looks like this:
echo -e "spec:
  template:
    spec:
      containers:
      - args:
        name: cert-manager
        image: cert-manager
        volumeMounts:
        - name: cam-acme-trust
          mountPath: /etc/ssl/certs/cam-acme-trust.pem
          subPath: cam-acme-trust.pem
          readOnly: false
        resources: {}
      - args:
        name: cert-manager-controller
        image: cert-manager-controller
        volumeMounts:
        - name: cam-acme-trust
          mountPath: /etc/ssl/certs/cam-acme-trust.pem
          subPath: cam-acme-trust.pem
          readOnly: false
        resources: {}
      volumes:
        - name: cam-acme-trust
          configMap:
            # Provide the name of the ConfigMap containing the files you want
            # to add to the container
            name: configmap-cam-acme-trust" \
  | tee ~/microk8s/patches/truststore-patch-1.10.yaml

microk8s kubectl patch deployment cert-manager -n cert-manager --patch "$(cat ~/microk8s/patches/truststore-patch-1.10.yaml)"

I can validate that the mounts have been patched into the deployment:
  Containers:
   cert-manager:
    Image:        cert-manager
  ...
    Mounts:
      /etc/ssl/certs/acme-trust.pem from acme-trust (rw,path="acme-trust.pem")
   cert-manager-controller:
    Image:      cert-manager-controller
...
    Mounts:
      /etc/ssl/certs/acme-trust.pem from acme-trust (rw,path="acme-trust.pem")
  Volumes:
   cam-acme-trust:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      configmap-acme-trust
    Optional:  false

I started and stopped microk8s. Rebooted the server. Deleted an created the Issuer/ClusterIssuer - But I always get the error (kubectl get event --sort-by=lastTimestamp):
LAST SEEN   TYPE      REASON          OBJECT                                                  MESSAGE
15s         Warning   ErrInitIssuer   clusterissuer/cluster-cert-issuer-acme-http-dev06   Error initializing issuer: Get "https://acme.pki.domain.tld/.well-known/acme/default/directory": x509: certificate signed by unknown authority

Any ideas?

I had it working on 1.9.1 with the following setup:
# download the AIA Root certificate (the root issuer of the ACME server TLS certificate)
sudo curl http://aia.pki.domain.tld/aia/root.crt -o ~/root.cer
# encode base64
echo $(base64 ~/root.cer) | sudo tee ~/root.txt
# remove downloaded file
sudo rm ~/root.cer
# read bas64 into variable
root_cert=$(<~/root.txt)
# remove base64 file
sudo rm ~/root.txt
# format PEM and write it to file
echo -e "apiVersion: v1
data:
  acme-trust.pem: |
    -----BEGIN CERTIFICATE-----
    $root_cert
    -----END CERTIFICATE-----
kind: ConfigMap
metadata:
  name: configmap-acme-trust
  namespace: cert-manager
  resourceVersion: \"9979\"
  selfLink: /api/v1/namespaces/cert-manager/configmaps/configmap-acme-trust
" \
  | tee ~/microk8s/configMaps/configmap-acme-trust.yaml

kubectl apply -f ~/microk8s/configMaps/configmap-acme-trust.yaml;

echo -e "spec:
  template:
    spec:
      containers:
      - args:
        name: cert-manager
        volumeMounts:
        - name: acme-trust
          mountPath: /etc/ssl/certs/acme-trust.pem
          subPath: acme-trust.pem
          readOnly: false
        resources: {}
      volumes:
        - name: acme-trust
          configMap:
            # Provide the name of the ConfigMap containing the files you want
            # to add to the container
            name: configmap-acme-trust" \
  | tee ~/microk8s/patches/truststore-patch-1.9.1.yaml

kubectl patch deployment cert-manager -n cert-manager --patch "$(cat ~/microk8s/patches/truststore-patch-1.9.1.yaml)"

In the output of kubectl describe deployments cert-manager --namespace=cert-manager I can see the volume as well as the mount:
Pod Template:
  Labels:           app=cert-manager
...
  Containers:
   cert-manager:
    Image:      quay.io/jetstack/cert-manager-controller:v1.9.1
...
    Mounts:
      /etc/ssl/certs/acme-trust.pem from acme-trust (rw,path="acme-trust.pem")
  Volumes:
   acme-trust:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      configmap-acme-trust
    Optional:  false

Now I upgraded to cert-manager 1.10. Better said I build a new separate k8s instance.
First thing that happened was the patch command failed because of the missing image property. So I modified the yaml and all went as expected. But when I created an Issuer/ClusterIssuer and looked at it using kubectl get clusterissuer -o wide I saw that the trust had not been established.
NAME                                      READY   STATUS
cluster-cert-issuer-acme-http   False     Failed to register ACME account: Get "https://acme.pki.domain.tld/.well-known/acme/default/directory": x509: certificate signed by unknown authority

So I tried to validate the change using kubectl describe deployments cert-manager --namespace=cert-manager. There was a new conatiner named cert-manager-controller that I do not see in my 1.9 deployment. I added a mount for that container too so it now looks like this:
echo -e "spec:
  template:
    spec:
      containers:
      - args:
        name: cert-manager
        image: cert-manager
        volumeMounts:
        - name: acme-trust
          mountPath: /etc/ssl/certs/acme-trust.pem
          subPath: acme-trust.pem
          readOnly: false
        resources: {}
      - args:
        name: cert-manager-controller
        image: cert-manager-controller
        volumeMounts:
        - name: acme-trust
          mountPath: /etc/ssl/certs/acme-trust.pem
          subPath: acme-trust.pem
          readOnly: false
        resources: {}
      volumes:
        - name: acme-trust
          configMap:
            # Provide the name of the ConfigMap containing the files you want
            # to add to the container
            name: configmap-acme-trust" \
  | tee ~/microk8s/patches/truststore-patch-1.10.yaml

microk8s kubectl patch deployment cert-manager -n cert-manager --patch "$(cat ~/microk8s/patches/truststore-patch-1.10.yaml)"

I can validate that the mounts have been patched into the deployment:
  Containers:
   cert-manager:
    Image:        cert-manager
  ...
    Mounts:
      /etc/ssl/certs/acme-trust.pem from acme-trust (rw,path="acme-trust.pem")
   cert-manager-controller:
    Image:      cert-manager-controller
...
    Mounts:
      /etc/ssl/certs/acme-trust.pem from acme-trust (rw,path="acme-trust.pem")
  Volumes:
   acme-trust:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      configmap-acme-trust
    Optional:  false

I started and stopped microk8s. Rebooted the server. Deleted an created the Issuer/ClusterIssuer - But I always get the error (kubectl get event --sort-by=lastTimestamp):
LAST SEEN   TYPE      REASON          OBJECT                                                  MESSAGE
15s         Warning   ErrInitIssuer   clusterissuer/cluster-cert-issuer-acme-http-dev06   Error initializing issuer: Get "https://acme.pki.domain.tld/.well-known/acme/default/directory": x509: certificate signed by unknown authority

Any ideas?

We are having exactly the same issue, Has anyone been able to solve this in the new 1.10.1 update?

Not yet. Sorry. @makkarpov @tacerus @Lirt any update on your site?

Unfortunately I don't know about that, as I use the obsolete version of cert-manager shipped with Rancher. I suppose it's only a matter of time for them to update and for my setup to break.

I'm using 1.6.1 and this works for me.
   volumes:
   - name: cert-manager-ca
     configMap:
       name: cert-manager-ca
   volumeMounts:
   - mountPath: /etc/ssl/certs/cert-manager-ca.crt
     name: cert-manager-ca
     subPath: ca.crt

If it stopped working, try to use helm template ... if templating works fine. I see that they are still using distroless image just newer version.

@Lirt Thanks. Before 1.10 It worked for me to. It would be great to get it up and running in 1.10.
I looked up the maintainers for the last few month. Maybe @SgtCoDFish could help here?

Hey! I think there are two issues at play here.
There's definitely a need for a solution to the problem originally described in this issue. Anywhere cert-manager talks to a service over TLS it should ideally allow for the user to configure the trust store. I've added that to the meeting notes for our cert-manager open meeting on Wednesday. I can't provide a promise on when or if that would be implemented so it'd be amazing if an community contribution could help. In any case, we'll try to come up with a plan for it!
I'll also add that we're trying to solve this problem more generally in Kubernetes using trust-manager. If you only needed to trust your private CA, trust-manager could help here. We're working on adding publicly trusted bundles too!
The second issue is the change in 1.10 which modified container names. It's too late to revert that change IMO, but in any case I think we could've done better at signposting that change - so I raised https://github.com/cert-manager/website/pull/1121 to update our website release notes to highlight it better. I've also updated the GitHub release to reflect the change more prominently.
I cannot see any reason that the changed container names would prevent the kinds of patches seen in this comment, @lennybacon - although I'm not familiar with how your patching process works. I'd expect that if you could patch the cert-manager-controller container in the controller pod, and the cert-manager-webhook container in the webhook pod, then it would work as before.

@SgtCoDFish Thank you for adding this issue to the meeting notes. Looking forward what you guys discuss.
Regarding my patching process, I added complete scripts that echo the yaml files and call cubectl. What I have not done is to patch the cert-manager-webhook. I hope I'll find time this week to check that and provide my results here.

Hi,
I can confirm that patching v1.10.1 works but you have to modify those patches a little bit.

You can't pass empty args: because you overwrite cert-manager's starting args as empty
Container name changed to from cert-manager to cert-manager-controller
You have to patch cert-manager-webhook also - as @SgtCoDFish mentioned

Here are my example patches for both pods
controller:
spec:
  template:
    spec:
      containers:
      - args:
        - --v=2
        - --cluster-resource-namespace=$(POD_NAMESPACE)
        - --leader-election-namespace=kube-system
        image: quay.io/jetstack/cert-manager-controller:v1.10.1
        name: cert-manager-controller
        volumeMounts:
        - name: ca-pemstore
          mountPath: /etc/ssl/certs/custom-root-ca.pem
          subPath: custom-root-ca.pem
          readOnly: false
        resources: {}
      volumes:
        - name: ca-pemstore
          configMap:
            name: configmap-ca-pemstore

webhook
spec:
  template:
    spec:
      containers:
      - args:
        - --v=2
        - --secure-port=10250
        - --dynamic-serving-ca-secret-namespace=$(POD_NAMESPACE)
        - --dynamic-serving-ca-secret-name=cert-manager-webhook-ca
        - --dynamic-serving-dns-names=cert-manager-webhook
        - --dynamic-serving-dns-names=cert-manager-webhook.$(POD_NAMESPACE)
        - --dynamic-serving-dns-names=cert-manager-webhook.$(POD_NAMESPACE).svc
        image: quay.io/jetstack/cert-manager-webhook:v1.10.1
        name: cert-manager-webhook
        volumeMounts:
        - name: ca-pemstore
          mountPath: /etc/ssl/certs/custom-root-ca.pem
          subPath: custom-root-ca.pem
          readOnly: false
        resources: {}
      volumes:
        - name: ca-pemstore
          configMap:
            name: configmap-ca-pemstore

If anyone is trying to get smallstep working with cert-manager and ACME here is a good tutorial for a start https://smallstep.com/docs/tutorials/kubernetes-acme-ca
I agree that this issue should be resolved somehow by letting people inject their custom CA certificastes. Patching works but it is additional layer that you have to be aware in production environments. Modifying helm templates and adding volume mounts could help but there should be specific mechanizm for this.
ps: I have no idea if trust-manager can help here. As far as I can see it just copy secrets to other namespaces.

As an update: we didn't get the time to discuss this issue in the last meeting; hopefully we'll have time in the next one! If we don't, probably it'll be next year.
Thank you @zolech for the information people can use if they need to update their scripts to deal with the new container names!

ps: I have no idea if trust-manager can help here. As far as I can see it just copy secrets to other namespaces.

It does a little more than that - it collects configmaps and secrets together, joins them and then distributes that resulting bundle to other namespaces.
So it helps you to create your private trust bundle, and make it available to your pods - but yeah to be fair it doesn't yet help with actually mounting it.

Dropping a quick note here: I've raised #5644 to add a CABundle field for ACME servers, which should hopefully fix this issue!
I'm hoping it'll get merged in cert-manager 1.11 which is due to be released in January - although we can't guarantee any timelines or that a given feature will be available in any given release!

@makkarpov @zolech @lennybacon @vankefr (and anyone else affected) - we've just published cert-manager v1.11.0-alpha.2 which will enable you to pass a custom CA bundle for the ACME server like so:
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: myacme
spec:
  acme:
    email<EMAIL_ADDRESS>    server: https://example.com
    caBundle: <base64-encoded PEM bundle>
    privateKeySecretRef:
      name: example-issuer-account-key
    solvers:
    ...

Would any of you be able to test the alpha release before we release cert-manager 1.11 on 2023-01-11? It'd be great to see if it'll help avoid the hacks you've been doing!

@SgtCoDFish awesome! I should be able to test it during Christmas or right after. Will post results asap.

@zolech That's amazing, thank you so much for sharing that. Glad to hear it helped, I love it when I land a feature that has immediate positive impact like this :grin:
I'll leave this issue open until we get closer to a release of 1.11, but it looks like this is mostly done now!


Configured storage account in binder does only create the container, not the blob

Blob is not created in binder when StorageAccountAttribute is used in Binder. Only the container is created.
Repro steps
Provide the steps required to reproduce the problem
Create a function:
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host.Bindings.Runtime;
public static async  void Run(string  myBlob, string name, Binder binder, TraceWriter log )
{
    log.Info($"C# Blob trigger function processed: {name} {myBlob} -> peer test3");
    string path = "testcontainer/xxx";
    log.Info($"path: {path}");

    var attributes = new Attribute[]
    {
        new BlobAttribute(path),
        new StorageAccountAttribute("storageaccount")
    };

    using (var writer = await binder.BindAsync<TextWriter>(attributes))
    {
        writer.Write(myBlob);
    }
}

with bindings:
{
  "bindings": [
    {
      "name": "myBlob",
      "type": "blobTrigger",
      "direction": "in",
      "path": "test/{name}",
      "connection": "storageaccount"
    }
  ],
  "disabled": false
}

confiruge the storage account: storageaccount in the appsettings
put a blob in the test container
the container testcontainer is created, the blob is not created
Expected behavior
Blob is created
Actual behavior
Only the container, without blob is created
Known workarounds
Do this without  the attribute  new StorageAccountAttribute("storageaccount")
then the container and blob are created in the function its storage account
Related information
functions version 1

Do you see any errors in your function logs? Likely the blob write is failing for some reason. You're saying that the blob container is correctly created in the secondary storage account (meaning the account info is valid)?
This is known to work and we have tests exercising it, so we just have to figure out what is happening in your scenario :) https://stackoverflow.com/questions/39855409/how-do-i-use-binder-to-perform-dynamic-bindings-in-my-c-sharp-function

Any suggestions on how to get more logging. I used that question/answer to create the function idd. I have done the following steps:
Reconfigured the connectionstrings => no blob
Changed the name of the blob to larger and smaller path => no result
Created a new Storage account without any logging, encryption etc (standard mp) => no blob
created a new function app with the mp and added the function to see if there was something in the arm templates => no blob
Changed the output storageaccount to the same as the function storage account => no blob
in all scenarios the container was created, no error in the log files. I'm 100% sure the connection strings are correct. I'm testing in West Europe.

Ah, looking at your original code above, I see your issue! Your async signature is incorrect. You need to change:
public static async  void Run(

to
public static async Task Run(

Thx that is idd the problem!


Add black.yml GitHub Action to run Black automatically on push, pull requests

As the title says, add black.yml GitHub Action. This will automatically trigger a Black formatting test to validate that formatting has been applied to the latest push or pull request.
This is just a drive-by commit :-) if you find it useful, feel free to merge.

Thanks for this workflow. I didn't even know it exists.


Cancel inprogress actions

good for the planet :)
@Zethson do you see any obvious unwanted implications of how I implemented this?

alright, let's find out if it breaks stuff in the next release then ^^


coverage information

Coverage percentages and line-by-line information is useful to determine where testing is insufficient.

Note that this approach of building test binaries can also be trivially extended to enable https://golang.org/doc/articles/race_detector.html - it's basically one additional flag and some checking of the logs.

I tried to run tests. I see coverage information is printed at end of log, if a container gets completed (like InitContainers), but how to get coverage info from driver itself? commit log mentions "need ssh access to cluster" but are there some instructions how to do it? a new make targets ? Should we add relevant instructions to DEVELOP, README ?

unit test coverage: when I added -cover option to unit test cmd in an earlier PR, you asked to remove it with plan to cover in later work (I understand it's here now), but unit test output shows no coverage here.

There are new make targets: https://github.com/intel/pmem-CSI/blob/3bb4e3a2413f0fd085827e6a06e77c7e160eb25d/test/test.make#L147-L173
I'm not sure whether it is worth documenting them. Definitely not in the README (why would a user care?), perhaps in DEVELOP.

Rebased and updated the "shut down cleanly commit".

I used new make targets and I can get nice-looking coverage output.

Rebased again on top of the merged https://github.com/intel/pmem-CSI/pull/252.
In the commit where I had the merge conflict due to the modified main() I've made further changes to the exit error message formatting and enabled it also for the init containers.

E2E testing passed.

@okartau I've force-pushed a revised and enhanced version of the PR.

I tried this in Clear-based cluster, ran make test_e2e make _work/coverage.txt make _work/coverage.html, I see useful coverage reports created, no issues detected. Anything else to try?

I tried this in Clear-based cluster, ran make test_e2e make _work/coverage.txt make _work/coverage.html, I see useful coverage reports created, no issues detected.

make coverage is now a newer shorthand for re-running the tests and producing the text and html output.

Anything else to try?

No, that should be it. Please merge if you agree.

tried latest version, make coverage works OK.

We almost agreed to merge this few days ago, but then discussion add few more comments. Does recent discussion mean more changes will be needed/done here, or is considered good to merge?
I plant to start namespace-size change PR, and would like to have that merged before, to reduce rebasing needs later, as some code migrates

Amarnath Valluri<EMAIL_ADDRESS>writes:

I would prefer to define new BUILD_VARIANT build arg, instead of BIN_SUFFIX, and define below make targets:
build: $(CMDS)
build-test: $(addsuffix -test,$(CMDS))
build-all:
   make build
   make build-test OUTPUT_DIR=${OUTPUT_DIR}/test

I don't like this because it makes our build targets even more
confusing. We would have "make all", "make build", "make build-all". Is
that really what we want?
My proposal is to keep "make all" as-is and extend "make build" with the
additional test variants of the binaries. I'm even tempted to go further
and remove the difference between "make all" and "make build".
Olev, it looks like you get too choose between two options here
and act as a tie-breaker - please pick something and I'll adapt the PR
accordingly.

I don't follow well your advanced dialogue about variables, directories.
The change that this PR brings to make targets, already confuses me. I vote for reducing build targets. make all is not logical as we have multiple build and test-related targets, does "all" mean all of those, or all of build-related, or both local-build and containers-build, etc. There are many combinations and whatever we pick, is probably not intuitive as meaning of "all".
Container images: I almost never use containers building without pushing, so for me explicit build-image target remains unused and I run push-image (which includes build).
My typical use model goes like this:

make test to verify sources are ok (but target name is bit misleading as this is very different from test_e2e)
make shortened version of above, sometimes
make push-image to get container images built and into registry
make start to create cluster
make test_e2e to test on cluster

more detailed build targets may appear confusing. (make coverage is very useful but not used often).
make all does not really fit anywhere in that model.

Olev Kartau<EMAIL_ADDRESS>writes:

I don't follow well your advanced dialogue about variables, directories.
The change that this PR brings to make targets, already confuses me. I
vote for reducing build targets.

As we were discussing it here, I'll update this PR accordingly.

make all is not logical as we have multiple build and test-related
targets,

Exactly. I think we already fooled one user into thinking that he has to
do "make" and then do something with the resulting binaries.

My typical use model goes like this:

make test to verify sources are ok (but target name is bit misleading as this is very different from test_e2e)
make shortened version of above, sometimes
make push-image to get container images built and into registry
make start to create cluster
make test_e2e to test on cluster

So let's treat "make" aka "make all" as an alias for "make build" and
define that as "build all binaries". That then covers the "test that
everything at least compiles" aspect of development. "make test" must
include that and then add running some actual tests.

I added the "make all/build" changes and rebased. There was a huge number of conflicts with PR #266 and I currently cannot do more than simple build testing, so please review carefully again and try whether "make coverage" still works.
I got errors from kustomize about conflicting patches in the -testing variants. It looks like it doesn't simply apply them one-after-the-other. I solved this by layering the coverage changes on top of the testing ones, without actually generating all of these variants in the output directories. For `deploy/kustomize' that's fairly clean, the only potentially confusing part is the mapping between kustomize variant and output files.

I am not convinced fully, still it sounds to me like "coverage/test" builds are kind of BUILD_VARIANT than BIN_SUFFIX and below targets makes most sense to me:
build: $(CMDS)
build-test: $(addsuffix -test,$(CMDS)) # "-coverage" is even better than "-test" suffix i feel

and use them(build${BUILD_VARIANT} in Dockerfile, instead of asking to make individual binaries.
But, I have no strong opinion here, @okartau can take the last call :)

Coverage analysis is one thing that can be done with these binaries, but I hope that it won't be the only thing. I also intend to enable race detection, so "-test" is a better suffix.
Regarding "build variant": I prefer a flat hierarchy of targets because it keeps the makefile simpler, and building individual targets in the Dockerfile is intentional because it avoid accidentally building things that aren't needed.
But I think we've discussed this enough now, @okartau you have @avalluri's permission to merge, so please do.

I don't feel comfortable as tie-breaker here as I feel confused with changing make targets, variables and change variants. I could formulate opinion after some time of using those targets, but right now I can't tell which I prefer. So I will merge this to get moving, future improvement will come later if needed/agreed.
One related idea: With multiple make targets and sub-targets, areas and sub-areas, what about maintaining a list of commands with one-line description? We could show this via 'make help', or/and have chapter in DEVELOPMENT.md. It will take some extra effort to maintain this, but one line is not long to write, and it would be valuable for those who did not invent the make targets.


Upgrade to django 1.7 migrations

@digi604, @josjevv guys, what's up with this PR? is it good to go into master? it's still hasn't been resolved in master branch.

I am just a contributor, not a maintainer. I was not able to reach @digi604 about this change. Since I needed this change for one of my projects, I created a fork and published this on pypi. You can just run pip install djangocms-table-changer until the day this will be accepted ;)

@josjevv gotcha, i ended up forking it and fixing it in my fork too... thanks!

@josjevv sorry for the long wait. this was totally forgotten.


documentation list wrong dependency

Issue description
We say:
jakarta.validation:validation-api
however, dependency is:
jakarta.validation:jakarta.validation-api

Ha...looks like I got it wrong in the starter MicronautValidationFeature too (I used these docs). I'll fix that too.

Ha...looks like I got it wrong in the starter MicronautValidationFeature too (I used these docs). I'll fix that too.

I fixed that here https://github.com/micronaut-projects/micronaut-starter/pull/1744


Add Feed component

[WIP]

Fixes #188

Current coverage is 91.34% (diff: 42.85%)

Merging #363 into master will decrease coverage by 1.25%

@@             master       #363   diff @@
==========================================
  Files            63         66     +3
  Lines           811        832    +21
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits            751        760     +9
- Misses           60         72    +12
  Partials          0          0

Powered by Codecov. Last update 22895e4...46c633d

Note on docs, I've updated the doc example logic and file naming patterns.  Doc files are now organized like so:
/docs
  /app
    /Examples
      /views
        index.js  <--- previously "FeedExamples.js"
        /Types
          index.js <-- (optional) previously "FeedTypesExamples.js"

You can still put all the examples in the root index.js, just the filename pattern has been updated.  I'll be updating the old doc files to use this new naming pattern.  All new components should follow it.

@levithomason Did I correctly named doc files?

The naming is only dictated for the index.js files, so you are good.  The other files just need to make sense.  I think what you have is OK 👍

It seems we're ready for initial discussion :smile:

there are huge amount of subcomponents, it's not looks good;
like designed to be used only with like icon, but we use stars in production, so I've made small overhead in <Like>;

   4 Likes

I'm using imagePropRender() on Label, it produces html with class="ui image", while there are no classes on  in SUI docs;
TAL on <FeedExtra>: seems prop validation for text is ugly, what about shorthand for images, ideas?
seems  and <Meta> can be shorthands on <Content>, what you think?
do we need render with passing object on <Feed>, like:

const events = [
  { content: 'Text' },
  ...
]

() => <Feed events={events}>

Something else? :smile:

@davezuko and I had an offline discussion regarding similar difficulties with sub components in the Message component PR.
I'm out today but will check back tonight or tomorrow and give an update.

there are huge amount of subcomponents, it's not looks good;

Indeed. I'll take any better ideas on how to improve this.  Either way, once we get all the components in, we'll revisit these and see if we can optimize them.  We may be able to reuse a single set of component parts.  I want to get all the components completed with explicit parts before we start to optimize though.  This way we can see all the requirements of all the components before making final decisions on how it should be optimized.  If you have any ideas or suggestions, please add them to #345 where this is being worked on.

like designed to be used only with like icon, but we use stars in production, so I've made small overhead in <Like>;

Makes sense to me.  I think the user should be able to pick the icon as well.

I'm using imagePropRender() on Label, it produces html with class="ui image", while there are no classes on  in SUI docs;

It looks like this img does not support any of the <Image /> props nor any classNames (i.e. ui, image, etc.).  It is simply an img tag.  Because of this, it seems to me we should handle rendering this prop internally in the component.  If the prop _.isString() use it as the src for a regular img.  If it _.isObject() (an element), use the element itself.
Side note, I plan on improving the icon/prop renderers a bit.  Right now they accept either an icon name or image src, or an Icon or Image element.  I think it would be good to allow a string (name/src), a plain props object (_.isPlainObject() && !React.isValidElement), or an element (React.isValidElement).  I'll probably double back and make these updates a little later.  We just need a util to distinguish

TAL on <FeedExtra>: seems prop validation for text is ugly, what about shorthand for images, ideas?

The text prop validation looks correct to me.
Regarding shorthand for images, we could accept an array of image src strings or image elements.  This would make the validation oneOfType([bool, arrayOf(string), arrayOf(node)]).

seems  and <Meta> can be shorthands on <Content>, what you think?

Makes sense to me.  Seems a component is component parts should allow a props to configure those parts.

do we need render with passing object on <Feed>, like:

I also thinks this also makes great sense.  Just like <Accordion panels={} />, <Breadcrumb sections={} />, etc.

Something else?

Probably! 😄 This is a really great start though, let's keep momentum and just tackle these items for now.

It looks like this img does not support any of ...

Updated.

Nevermind :smile:

Regarding shorthand for images, we could accept an array of image src strings or image elements.

There is problem with key handling. TAL on FeedExtra, any ideas?

Sorry, not sure what TAL is and I need a little more info to help on this one.  Can you describe the issue with key handling?

Seems, docs and components finished. I'll writting test after review. So, feedback is welcome

Updated, take a look at the last commit and comments.

Thanks for review, all is nice, I'll fix it soon and add tests.

Oh, I missed that you've already applied all :smile_cat: Working on tests, seems we can merge it today.

Awesome, I've got the Modal updates and docs done.  It was blocked by the Image, so finishing that up as well.

I think I blurted out too much about today :cry:
I've finish with tests tomorrow and will wait for final review.

No worries, I'll review once tests are in then.  Thanks.

Heads up, I've done some heavy utils refactoring in #388.  I left many comments there to help get up to speed.  That PR greatly improved things and unblocks the Image and Modal work.  Really glad with the results and I think you will be too after updating.
LMK if you have any questions.  I'll leave comments on this PR where it needs updated to meet the new refactors later tonight.

I'm updating this branch and will push in a few minutes.

I updated this PR to use the new utils.  It might be a good idea to familiarize yourself with the changes made in the last commit.  I also fixed tests and lint issues.
I'm not sure why PhantomJS is crashing in watch mode though.  The branch was doing that before the updates.  Master branch does not crash.  Looking into it.

Suddenly after the rebase test watching is working again.  LMK if you have any issues.

Suddenly after the rebase test watching is working again.

Offtop: Did you have issues with PhantomJS's crash, too?

Feed.js
I've updated key prop handling as we discussed.
const eventsJSX = events.map(eventProps => {
    const { childKey, date, meta, summary, ...eventData } = eventProps
    const finalKey = childKey || `${date}-${meta}-${summary}`

    return <FeedEvent
      date={date}
      key={finalKey}
      meta={meta}
      summary={summary}
      {...eventData}
    />
  })

FeedExtra.js

Only array of string can be passed now.

- PropTypes.arrayOf(PropTypes.node),
+ PropTypes.arrayOf(PropTypes.string),

Updated key prop (better ideas?) and used new factory.

const imagesJSX = images.map((image, index) => {
  const key = [index, image].join('-')

  return createImg(image, {key})
})

FeedLabel-test.js
Are tests for image prop correct (createImg factory)?

Tests are ready. Show must go on :ghost:

Did you have issues with PhantomJS's crash, too?

Indeed, not sure what fixed it in the rebase but it seems to be fine now?

I've updated key prop handling as we discussed.

We'll have to pick a different prop name as key won't work, see here: https://github.com/TechnologyAdvice/stardust/pull/390#discussion_r74691048

FeedExtra 👍
FeedLabel-test 👍 though, we'll need to update the key prop to another name then update the factories to apply our standard key prop name to the key prop.

Indeed, not sure what fixed it in the rebase but it seems to be fine now?

Yep.

We'll have to pick a different prop name as key won't work, see here: #390 (comment)

events: customPropTypes.every([
  PropTypes.arrayOf(PropTypes.shape({
    childKey: PropTypes.string,
  })),
]),

childKey will be applied to FeedEvent as it might be, or not?

we'll need to update the key prop to another name then update the factories to apply our standard key prop name to the key prop.

??? Not understand you there.

What you've done for FeedEvent is correct.  My comment was in regard to passing a childKey prop to the image prop:
// on an element
const image =
<FeedLabel image={image} />

// or a props object (this is a new feature of our factories)

<FeedLabel image={{ childKey='...', src='...' }}

Our factories are responsible for merging those props by default.  Currently, they will simply pass the childKey prop since onto the final element.  We need to map childKey to the key prop for the final element in the createFactory.js mergePropsAndClassName().
This work can be done on a separate PR though to keep this one moving.

Anything else to update here?  Looks great.  I'd like to merge and make any updates on future PRs.

No, we can go :car:

💥 Released in<EMAIL_ADDRESS>


Serilog ADX sink is not working when logger.error(ex,"string") is used

Hi,
I am from playwright service team. We are using Serilog as our logging framework.
We want to push logs to Kusto using serilog ADX sink
This is the SerilogConfig change that ive done.
serilogConfig.WriteTo.AzureDataExplorerSink(new Serilog.Sinks.AzureDataExplorer.AzureDataExplorerSinkOptions {     IngestionEndpointUri = "<ADX ingestion endpoint>",     DatabaseName = "serilogdb",     TableName = "serilogtable",     FlushImmediately = true });
I'm facing below error in console.

As per discussion with team,
we found that issue is because of
_logger.Error(ex,$"{ex.Message}");
and System.Text.Json.JsonSerializer.Serialize is throwing above exception.
repo code responsible for this error
https://github.com/Azure/serilog-sinks-azuredataexplorer/blob/77bbe1ab925a8fa50cdeebe96eb8dfdaf989be72/src/Serilog.Sinks.AzureDataExplorer/Sinks/AzureDataExplorerSink.cs#L238

This is resolved.
Exception Logs are flowing to Kusto in non durable mode


Longest Common Subsequence using DP | Python3

Longest Common Subsequence -
Thinking of adding code to find the Longest Common Subsequence using Dynamic Programming
Type of Issue -

[x] Adding New Code

Programming Language

[x] Python

Self Check

Ask for issue assignment before making Pull Request.
Add your file in the proper folder
Clean Code and Documentation for better readability
Add Title and Description of the program in the file

:star2: Star it :fork_and_knife:Fork it :handshake: Contribute to it!
Happy Coding,

I would like to contribute here to solve this issue. Please assign me this issue so that I can proceed to make PR.

I would also like to contribute.


moldoc images showing locally but not on ReadtheDocs

Hey Lukas,
it's me again :) We have progressed with our package and have published our documentation now to ReadtheDocs. However, in the online documentation, the moldoc images are not showing, it's just blank. Locally, they do show though. In addition, there is no error message in the build from ReadtheDocs, it just fails silently.
You can see the issue in the documentation. If you scroll down a little, underneath the green info box that mentions moldoc, there should be three moldoc images of molecules. I have attached a screenshot of how it looks when I render the documentation locally.
Do you have any experience in this issue? I find it very hard to debug because I don't know where it fails.

Hi Timo! Thanks again for using the library, giving it a shout-out in your docs and reporting your issues!
So. I normally use the furo theme (https://github.com/pradyunsg/furo), it looks like this theme has a bug. It means that the scripts which moldoc needs to insert are inserted at the end of the HTML file. I thought this was just sphinx being weird and so i "fixed" it. this means everything runs fine if you use the furo theme.
Not so good if you're using a different theme.
I'll try to have a fix out today.

I've reported an issue with furo https://github.com/pradyunsg/furo/discussions/850 but will try to come up with a patch that fixes this immediately

I've released version 3.0.5 -- hopefully that should fix it! Let me know if that's not the case and I will re-open the issue

Thank you, it works perfectly now, even with my current theme! This closes the following issue in the DARTassembler package: https://github.com/CCEMGroupTCD/DARTassembler/issues/2


Work in progress?

I see on the resolved issue that as of May 23rd you were still working on this implementation. Is this still an active project for you? It would be fantastic to have an open source version of Video LDM!
Let me/us know if there is any way we can support your work.

@powerspowers I did not check the code yet, but do you feel the current version is incomplete? Can someone clarify?


Simplify the fontID handling in PartialEvaluator.loadFont

The fontID handling is quite old and predates the use of the idFactory to generate a unique id for each font, hence we can simplify this code a little bit.

/botio test

/botio browsertest


Improve handling on $prerelease parameter

This format of the input parameter doesn't support $false, where it will result in the value true.
With this PR I've improved the validation of the -prerelease flag.
DownloadFile.ps1 -TargetPath ""
DownloadFile.ps1 -TargetPath "" -prerelease false
DownloadFile.ps1 -TargetPath "" -prerelease False
DownloadFile.ps1 -TargetPath "" -prerelease $False
DownloadFile.ps1 -TargetPath "" -prerelease SomeRandomValue

These examples will download the Latest version.
DownloadFile.ps1 -TargetPath "" -prerelease true
DownloadFile.ps1 -TargetPath "" -prerelease True
DownloadFile.ps1 -TargetPath "" -prerelease $True

These examples will download the Pre-release version.
More details on https://github.com/StefanMaron/BusinessCentral.LinterCop/issues/500.

@StefanMaron can this PR be please approved and merged?


Improve Flow usage

As a Mineral UI developer, I would like to improve flow usage in the app.
AC:

Investigate if possible to de-dupe flow types in layout components without adversely affecting the prop type documentation

Other Considerations:

Other easily identifiable areas that could be improved?  Create additional stories as needed.
Extracted prop type documentation using doc-gen is limited in capabilities

Closed via https://github.com/mineral-ui/mineral-ui/pull/794


pluma: init at 1.18.2

Motivation for this change
Add Pluma package.
Pluma is a powerful text editor for MATE.
Things done
Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers.

[x] Tested using sandboxing
(nix.useSandbox on NixOS,
or option build-use-sandbox in nix.conf
on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] Linux

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

I'm noticing that all the packages in pkgs/desktops/mate are using the same source, "http://pub.mate-desktop.org/releases/${major-ver}/${name}.tar.xz", but there are currently 4 different (major, minor) versions being used (atril-1.19.0, caja-1.18.0, mate-common-1.18.0, mate-desktop-1.18.0, mate-icon-theme-faenza-1.18.0, mate-icon-theme-1.18.1, mate-terminal-1.18.0, pluma-1.18.2).
I think it would make sense to refactor it so that a single version is used for all the packages distributed by this Mate source

1.19.x seems to be development versions. Only atril is using it. It has been added by someone else. The other packages are at 1.18.x, which is the stable version. Some of them receive minor updates. Therefore the minor version x is not the same for all of them.
So I agree to use the same major stable versions for the mate packages, with the latest minor version available for each of them. Therefore atril would be downgraded to version 1.18.0.
I want to (slowly) add more mate applications until the desktop is complete.

Oh I actual misread the download URL, I thought all packages were built from the same source tarball, which is not the case, sorry for that.
In that case it's not really bad with the versions, probably just updating them to v1.19 when it's out would be nice.
I tested the editor btw, works without problems (except some GTK messages on stdout regarding themes, but I think that's pretty standard to have).

@Mic92 Why a dependency on gnome3.defaultIconTheme is needed?
Should every application with icons depend on it?
Also when should gnome3.defaultIconTheme be prefferred over hicolor_icon_theme?


added planet defense game

fixes #628
Planet defense game.

Planet Earth needs to be protected.
There is a gun with planet.
Gun is used to attack stones or meteroids hitting the planet.
Score increases if you hit the meteroids.
Game ends if any one touches the earth.

Please review my PR and can u increase the level of the game?
@panwar8279

Please review my PR and can u increase the level of the game? @panwar8279

Thankyou Mam😍

@SimranLahrani842 dont make spam pr's

Why don't u assign me 663,664 and 670 .I have not done that please assign


error: enum 'std.target.Tag' has no field named 'macosx'

On Zig 0.6.0+3ab4d112e on macOS, the zls build for https://github.com/zigtools/zls/commit/e8c20351d85da8eb4bf22480045b994007284d69 breaks with the following error:
./src/known-folders/known-folders.zig:95:9: error: enum 'std.target.Tag' has no field named 'macosx'
        .macosx => {
        ^
/Users/jsolom206/meta/build/zig/build/lib/zig/std/target.zig:23:25: note: 'std.target.Tag' declared here
        pub const Tag = enum {
                        ^
./src/known-folders/known-folders.zig:50:5: note: referenced here
    switch (std.builtin.os.tag) {

This is easily resolved by correcting the enum value to macos:
https://github.com/ziglang/zig/blob/e02655798fbd97a069ee8be38a6eceac18335a4d/lib/std/target.zig#L34
This change was introduced in Zig by the following commit:
https://github.com/ziglang/zig/commit/2ab0c7391a871a3063f825e08e02ea2a8e9269e9

Oops, I see that this has already been resolved in this repo.  I'll open an issue on the dependent repo to upgrade the dependency.  👌


Dataset does not match

Hi, I downloaded the dataset with the command aws s3 sync
--no-sign-request
s3://cellpainting-gallery/cpg0003-rosetta/broad/workspace/preprocessed_data .
And from your application2:
procProf_dir='/home/ubuntu/bucket/projects/2018_04_20_Rosetta/workspace/
metadata_dir='/home/ubuntu/bucket/projects/2018_04_20_Rosetta/workspace/metadata/
but in the dataset downloaded, I only get the preprocessed_data folder, there is no detadata folder.
Do I miss something or should I make a empty folder called metadata?

Hi @shihanyu, which script you are trying to run? metadata are added to the preprocessed profiles as extra columns. metadata_dir variable is not used in App1 and App2 scripts. I have deleted the line to avoid the confusion. Sorry for the inconvenience.


Conversation with Claude

First thing: I'm quite noob in Python.
I'm trying out this package, but I can't find a way to make a conversation longer than one sentence with Claude: how can I code an iterative conversation with him? Like "How are you?" "Not so well" "Why not?" "Because I'm tired".
This is my code:
import os

c = anthropic.Client(api_key="XXX")

def ask_Claude(frase):
    resp = c.completion(
        prompt=f"{anthropic.HUMAN_PROMPT} {frase} {anthropic.AI_PROMPT}",
        stop_sequences=[anthropic.HUMAN_PROMPT],
        model="claude-v1.3",
        max_tokens_to_sample=3000,
    )
    print(resp)

ask_Claude("Am I dumb?")
ask_Claude("Did I ask you something before?") ```

When you prompt it with "Human: Question AI:", and it gives you "Answer", you can concatenate those two "Human: Question AI: Answer Human: Question2 AI:" and send it back to the model. (I'm paraphrasing for speed, please ensure you follow the proper formatting as detailed in https://console.anthropic.com/docs/prompt-design)


Can't import the named export 'makeFetchBody' from non EcmaScript module (only default export is available)

It's me again with a new error
[ error ]<EMAIL_ADDRESS>[1] Can't import the named export 'makeFetchBody' from non EcmaScript module (only default export is available)
[1] Could not find files for /en/movement/new in .next/build-manifest.json
[1] Could not find files for /en/movement/new in .next/build-manifest.json
[1] ModuleDependencyError: Can't import the named export 'makeFetchBody' from non EcmaScript module (only default export is available)

Versions:
"urql": "1.9.7",
"@urql/exchange-graphcache": "2.3.5",
"@urql/exchange-multipart-fetch": "0.1.5",
(Did a reinstall after the new release of @urql/core)

Hey, sorry for the trouble. Would you mind trying it with
"@urql/core": "https://pkg.csb.dev/FormidableLabs/urql/commit/0ebb2f04/@urql/core"

I tried it and I think it's the same error, I copied the whole error log this time:
[ error ]<EMAIL_ADDRESS>[1] Can't import the named export 'makeFetchBody' from non EcmaScript module (only default export is available)
[1] Could not find files for /movement in .next/build-manifest.json
[1] ModuleDependencyError: Can't import the named export 'makeFetchBody' from non EcmaScript module (only default export is available)
[1]     at Compilation.reportDependencyErrorsAndWarnings (/Users/bjoern/projects/inventhora/frontend/node_modules/webpack/lib/Compilation.js:1468:21)
[1]     at /Users/bjoern/projects/inventhora/frontend/node_modules/webpack/lib/Compilation.js:1258:10
[1]     at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/bjoern/projects/inventhora/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
[1]     at AsyncSeriesHook.lazyCompileHook (/Users/bjoern/projects/inventhora/frontend/node_modules/tapable/lib/Hook.js:154:20)
[1]     at Compilation.finish (/Users/bjoern/projects/inventhora/frontend/node_modules/webpack/lib/Compilation.js:1253:28)
[1]     at /Users/bjoern/projects/inventhora/frontend/node_modules/webpack/lib/Compiler.js:672:17
[1]     at _done (eval at create (/Users/bjoern/projects/inventhora/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
[1]     at eval (eval at create (/Users/bjoern/projects/inventhora/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:31:22)
[1]     at runMicrotasks (<anonymous>)
[1]     at processTicksAndRejections (internal/process/task_queues.js:94:5)
[1] ModuleDependencyError: Can't import the named export 'makeFetchBody' from non EcmaScript module (only default export is available)
[1]     at Compilation.reportDependencyErrorsAndWarnings (/Users/bjoern/projects/inventhora/frontend/node_modules/webpack/lib/Compilation.js:1468:21)
[1]     at /Users/bjoern/projects/inventhora/frontend/node_modules/webpack/lib/Compilation.js:1258:10
[1]     at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/bjoern/projects/inventhora/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
[1]     at AsyncSeriesHook.lazyCompileHook (/Users/bjoern/projects/inventhora/frontend/node_modules/tapable/lib/Hook.js:154:20)
[1]     at Compilation.finish (/Users/bjoern/projects/inventhora/frontend/node_modules/webpack/lib/Compilation.js:1253:28)
[1]     at /Users/bjoern/projects/inventhora/frontend/node_modules/webpack/lib/Compiler.js:672:17
[1]     at _done (eval at create (/Users/bjoern/projects/inventhora/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
[1]     at eval (eval at create (/Users/bjoern/projects/inventhora/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:31:22)
[1]     at runMicrotasks (<anonymous>)
[1]     at processTicksAndRejections (internal/process/task_queues.js:94:5)

When using with react the docs say to install via:
yarn add urql graphql
This means we don't have @urql/core in our package.json.  I've replaced urql with the commit:
  2   "name": "ui",
  3   "version": "0.1.0",
  4   "private": true,
  5   "dependencies": {
...
 16     "@urql/exchange-multipart-fetch": "^0.1.5",
...
 26     "react-use-form-state": "^0.11.0",
 27     "typescript": "^3.6.4",
 28     "urql": "https://pkg.csb.dev/FormidableLabs/urql/commit/0ebb2f04/@urql/core"
 29   },```

But we then can't import `Provider` from `urql`:

```import {
  Provider as UrqlProvider,
  createClient,
  dedupExchange,
  cacheExchange,
} from "urql";```

Gives this error:

```Attempted import error: 'Provider' is not exported from 'urql' (imported as 'UrqlProvider').```

Could we roll a new release with the fix? :)

I mean, it's normal that it won't work when you use urql/core as urql adding a dep can pin it to a certain version.
So adding @urql/core: "version x" can pin it for you.

Right, but adding just that doesn't fix the problem.  With this:
    "urql": "^1.9.7",
    "@urql/core": "https://pkg.csb.dev/FormidableLabs/urql/commit/0ebb2f04/@urql/core",
    "@urql/exchange-multipart-fetch": "^0.1.5",

We get the error:
Can't import the named export 'makeFetchBody' from non EcmaScript module (only default export is available)

With this:
    "urql": "https://pkg.csb.dev/FormidableLabs/urql/commit/0ebb2f04/@urql/core",
    "@urql/core": "https://pkg.csb.dev/FormidableLabs/urql/commit/0ebb2f04/@urql/core",
    "@urql/exchange-multipart-fetch": "^0.1.5",

We get the error:
Attempted import error: 'Provider' is not exported from 'urql'.

Yes so "urql": "https://pkg.csb.dev/FormidableLabs/urql/commit/0ebb2f04/@urql/core", as I said this is using @urql/core as the data for urql

I tried two things in the above post.  Looking at the first:
    "urql": "^1.9.7",
    "@urql/core": "https://pkg.csb.dev/FormidableLabs/urql/commit/0ebb2f04/@urql/core",
    "@urql/exchange-multipart-fetch": "^0.1.5",

It gives us the same error. I'm a little confused at what else you're proposing as the fix here?

To quickly chime in here, I believe the CodeSandbox CI package for 0ebb2f04 is broken; this one is a newer one: https://pkg.csb.dev/FormidableLabs/urql/commit/73d2f3f8/urql and https://pkg.csb.dev/FormidableLabs/urql/commit/73d2f3f8/@urql/core

Can you have a look at running<EMAIL_ADDRESS>please? That should fix this issue. yarn upgrade @urql/core should do the trick.

Unfortunately fails.  I believe it's not the core package, it's specifically "@urql/exchange-multipart-fetch": "^0.1.5",.
Here's my package.json:
"@urql/core": "1.11.3",
"@urql/exchange-multipart-fetch": "^0.1.5",
"urql": "^1.9.7"

Also tried using require...
const { multipartFetchExchange } = require('@urql/exchange-multipart-fetch')

Using create-react-app.  I guess I'll rewire webpack's config.

Ok, I’ll investigate this further. In my quick test in Next, I can’t reproduce this anymore however. So if it’s no old version of @urql/core are showing up for you with yarn list --pattern urql` then it’s still an issue and I’ll take another look tomorrow-ish 🤞

 ❯ yarn list --pattern urql                                                                               [17:11:52]
yarn list v1.21.1
├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>└─<EMAIL_ADDRESS>Done in 0.82s.

Still seeing it, but it's no bother.  Quickly wanted to say that this is a really, really, really awesome library, so thank you all for your work!!!

Seems to work in the codesandbox CRA, this is odd https://codesandbox.io/s/flamboyant-moon-0kh6h?file=/src/App.js

Super weird.  I'll try reinstalling everything and upgrading any global packages I have to see if it fixes.  Sounds like it's something local.  Appreciate it.

okay so I tried again with<EMAIL_ADDRESS>being installed and I still get the same error.
I am using Next.js as you could probably already deduct from my error log

Sorry about this! I finally found what caused our broken builds and #734 fixed it. That's released as<EMAIL_ADDRESS>and<EMAIL_ADDRESS>The broken releases have been marked as deprecated (or deleted where possible) on npm.

can confirm, that it works :) Thanks for your quick response and great lib

@BjoernRave Are you using next-urql by any chance?
I am running next-urql powered by ts-node and I still get the following error, even on 1.11.4:
Error: No valid exports main found for '/Users/ante/Projects/MarkerHero-Website/node_modules/@urql/core'
    at resolveExportsTarget (internal/modules/cjs/loader.js:611:9)
    at applyExports (internal/modules/cjs/loader.js:492:14)
    at resolveExports (internal/modules/cjs/loader.js:541:12)
    at Function.Module._findPath (internal/modules/cjs/loader.js:643:22)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:941:27)
    at Function.Module._load (internal/modules/cjs/loader.js:847:27)
    at Module.require (internal/modules/cjs/loader.js:1016:19)
    at require (internal/modules/cjs/helpers.js:69:18)
    at Object.<anonymous> (/Users/ante/Projects/MarkerHero-Website/node_modules/urql/dist/urql.js:1:12)
    at Module._compile (internal/modules/cjs/loader.js:1121:30)
    at Module._extensions..js (internal/modules/cjs/loader.js:1160:10)
    at Object.require.extensions.<computed> [as .js] (/Users/ante/Projects/MarkerHero-Website/node_modules/ts-node/src/index.ts:832:44)
    at Module.load (internal/modules/cjs/loader.js:976:32)
    at Function.Module._load (internal/modules/cjs/loader.js:884:14)
    at Module.require (internal/modules/cjs/loader.js:1016:19)
    at require (internal/modules/cjs/helpers.js:69:18) {
  code: 'MODULE_NOT_FOUND'
}

Oh, I didn’t realise you were running ts-node. I was able to replicate this bug for @urql/core/internal in prior versions with Next.js, but @urql/core should always work as usual.
Could it be that it’s specific to ts-node?

I can confirm, that everythings works now for me.
The error from @OriginalEXE seems to be different that what I was facing

ts-node might have issues with "guessing" extensions which is a measure we had to call-to-live so we could support both Node 13 and Webpack

The weird thing is that I tried to manually specify the extension, but that did not help.
I will try to create a minimal reproduction, and will open a separate ticket.

FYI, I kept getting the same issue as @BjoernRave, and not even the upgrade to<EMAIL_ADDRESS>and<EMAIL_ADDRESS>resolved it for me.
However, adding the following to my webpack config seemed to fix the issue:
module: {
  rules: [
    {
      test: /\.mjs$/,
      include: /node_modules/,
      type: 'javascript/auto'
    }
  ]
}


Run As account vs Managed Identity.

[The article gives direction for creating a Run As account. Microsoft is suggesting using Managed Identity instead of Run As Accounts for most cases. Is this a different scenario, or can you also use a Managed Identity, and if you can, would that be the preferred method?]

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

ID: 24a6c4e2-702f-2b17-3e2d-c86f33b13beb
Version Independent ID: 1e7811d8-668a-db98-34ca-eaf4d7ee8c1f
Content: Set up scaling of session hosts using Azure Automation and Azure Logic Apps for Azure Virtual Desktop - Azure
Content Source: articles/virtual-desktop/set-up-scaling-script.md
Service: virtual-desktop
GitHub Login: @Heidilohr
Microsoft Alias: helohr

@randydover
Thanks for your Question! We are currently investigating and will get back on this.

@randydover
Looks like you are using OLD Scaling script - where you need to use Logic app and to initiate it you require a run as account.
Also, creating autoscale scaling plan for Azure Virtual Desktop (Scaling plans) is GA and available in major regions. Please refer this document.

@VikasPullagura-MSFT , I'm not using a script, I'm quoting the article. The article states use a Run As account. (Link to the specific spot in the doc: https://learn.microsoft.com/en-us/azure/virtual-desktop/set-up-scaling-script#create-an-azure-automation-run-as-account )
Run As is older process. Current process (and therefore an update to the article) is to use a Managed Instance.
Please see my original comment.

@randydover Apologies for the confusion.
I have assigned the issue to content author to check and update the document as appropriate.

@Heidilohr
Can you please check and add your comments on this doc update request as applicable.

Hi @randydover, we now have a generally available scaling service called Autoscale that doesn't require this permissions setup process. We are consequently no longer making updates to the Azure Automation scaling script. All additions and improvements will come to Autoscale. Please refer to our documentation for more information: https://learn.microsoft.com/en-us/azure/virtual-desktop/autoscale-scaling-plan

I've added clarification about Run As accounts vs managed identity to this article. The change should be visible later today.
#please-close


HF solution depends on available memory for 2D, GDF/MDF systems

Using this minimal example, mostly taken from example/pbc/32:
from pyscf.pbc import gto as pbcgto
from pyscf.pbc import scf as pbchf

Lz = 25 # Smallest Lz value for ~1e-6 convergence in absolute energy
a = 1.42 # bond length in graphene

cell = pbcgto.Cell()
cell.build(unit = 'B',
           a = [[4.6298286730500005, 0.0, 0.0], [-2.3149143365249993, 4.009549246030899, 0.0], [0.0, 0.0, Lz]],
           atom = 'C 0 0 0; C 0 2.67303283 0',
           dimension=2,
           pseudo = "gth-pade",
           verbose = 4,
           precision = 1e-6,
           basis='gth-szv',
           #max_memory=1,
           )

mf = pbchf.RHF(cell)
mf = mf.density_fit()
mf.conv_tol = 1e-6
e_mf = mf.kernel()

I converge to converged SCF energy = -10.7012224101449
On the other hand, if I uncomment the max_memory = 1, line, I converge to
converged SCF energy = -14.6469819237595 (This is just a minimal example - the way I found this behaviour was that the mean-field solution was different depending on whether an unrelated CCSD calculation was performed or not).
This seem to only happen for 2D systems with GDF and MDF. Taking a wild guess, is the negative mode in the three center integrals (for 2D systems) not correctly stored/loaded if not enough memory is available to store them incore?
More info:
Python 3.5.2 (default, Apr 16 2020, 17:47:17)
[GCC 5.4.0 20160609]
numpy 1.15.4  scipy 1.1.0
Date: Tue Apr 28 16:16:01 2020
PySCF version 1.7.1
PySCF path  /apps/pyscf/1.7.1/pyscf
GIT HEAD      d11041db344dbf798445e574a6cfe72e16f3549d```

I couldn't reproduce the error with the latest release.
594_1.txt
594.txt

Your output seems to indicate that you set cell.dimension to 3?

ok, I can reproduce the error now. I'll take a look.

fixed in 36731ed


Are the jobs performed simultaneously ?

Are the jobs performed simultaneously ? I mean, if job 1 and job 2 scheduled for the same time, will they run at the same time? or each job will be execute only after the previous one has finished?

Yes, they should be simultaneous. The jobs are forked.


queue/qbuf: add QBufferWeak for stateless decoders

This commit provides the weak version QBuffer without strong reference to its queue. It is espcially usefull for the frame based stateless decoder when processing farmes with mutliple slices in the output direction.

I have changed the way QBuffer works in 2c56d1f1f, d4af16dd and a32642f97a7. These change make it such that when obtaining a QBuffer from a Queue that is behind a reference-counter pointer (such as Rc or Arc), the obtained QBuffer clones the smart pointer instead of taking a direct reference to the Queue, thus removing the lifetime constraint that QBuffer originally had.
It is not a weak reference per-se, but should provide the same level of functionality as this PR while using the existing code. Let me close this PR.

Slawomir, this part was confusing for me.
So the initial plan for you was to merge this PR add QBufferWeak to v4l2r for v4l2 stateless usage in cros-codecs.
But Alex made above changes, so this PR was decided not to be merged.
It stopped here, so QBufferWeak related change in cros-codecs still remains as it is.
Is this correct understanding of the status?

Checked that above patches from Alex merged to master.
https://github.com/Gnurou/v4l2r/commit/2c56d1f1fc09b2a7b0944dfe29f41042ec7e2964 , https://github.com/Gnurou/v4l2r/commit/d4af16ddd7d27f603ef08f78cb4288b36f48042a and https://github.com/Gnurou/v4l2r/commit/a32642f97a7302784fae743090a5ab6f59313cc1

Slawomir, this part was confusing for me.
So the initial plan for you was to merge this PR add QBufferWeak to v4l2r for v4l2 stateless usage in cros-codecs.
But Alex made above changes, so this PR was decided not to be merged.
It stopped here, so QBufferWeak related change in cros-codecs still remains as it is.
Is this correct understanding of the status?

I'd introduced QBufferWeak as a workaround for static lifetime constraints to integrate v4l2 with cros-codecs. Since Alex changed the original implementation of QBuffer you should probably be able to simply use QBuffer instead of QBufferWeak in cros-codecs.

Thank you Slawomir for the clarification!


ci: run browser tests on pull_request_target

pull_request_target allows runs to access the secret values. Since this adds an attack vector described here https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ I added the extra condition to only run on the main repo push or if someone adds a safe to test label after reviewing the code

Question: What happens if a PR is tagged "safe to test" and then subsequently modified by the author (e.g. in some malicious way)?
(Not questioning this PR.  Just a general question I've had for awhile.)


Making adjustments to the translation in Russian

Minor errors were found in the Russian translation, but they were very noticeable and I could not help but correct them.

Thanks for the translation work! I noticed you submitted a pull request for the Greek translations and some German fixes. Really appreciate your efforts.
Just a heads up, I usually handle translations through Crowdin. It helps us keep everything organized and makes it easier to integrate with the bot. Would you mind using Crowdin for this instead? It would make things a lot smoother on both ends.
If you need any help please tell me?


Optional fields

Hi,
I wondered how you would handle an optional field, indicated by a presence flag?
Regards

In it's current form, it isn't able to handle optional fields. It is only able to handle static message structures. I do have in my future plans (i.e. when I get around to working on this project more) to have parameterized fields. I think what you are talking about would fit this description. This is where a field is parameterized in some way by a field that has been parsed before it. This should be possible to implement, just would need to add some logic to the parsing to be able to look back at previous fields.
With that being said, I think how this would be implemented from a user's perspective might look something like this:
from typing import Optional
from bytechomp import dataclass, Annotated

@dataclass
class InnerMessage:
    key: str
    val: str

class OuterMessage:
    identity: str
    tag: bool
    inner: Annotated[Optional[InnerMessage], "tag"]

This would signal to the parser that a previously defined field at the same level in nested data structure should be used to continue parsing the inner data structure or just stop and populate it with a None.
I keep myself pretty busy with full-time work and getting a Master's degree, but I do catch some free time every once and a while. That being said, pull requests are always welcome and encouraged.


Display Blitkin collection as  instead of  to correctly display

Our SVGs have embedded code to make them dynamic. This allows us to do interesting things like modify them on the fly. Unfortunately, this means they can't be rendered via <img>. I am requesting they be displayed as objects and have confirmed this works. See below for requested changes.
This is what an item in our collection currently displays as:

The code currently used to display the image is
<img class="page_content__HT_T4 InscriptionContent_image__QTQgG" src="https://turbo.ordinalswallet.com/inscription/content/b82fd9c1118c753a14616635804ff53743ee9512c9fd74817f19522cce164a45i0">

If modified to be
<object type="image/svg+xml" class="page_content__HT_T4 InscriptionContent_image__QTQgG" data="https://turbo.ordinalswallet.com/inscription/content/b82fd9c1118c753a14616635804ff53743ee9512c9fd74817f19522cce164a45i0" t=""></object>

then the item displays as intended

smart. stay tuned.


README should describe what the broker does

provisions EC2 instances
what does the bind operation do?
supports service keys

@shalako add more description in the README. thanks for your comments!

OK README now includes brief description so closing.
Also, I will add a link to a long blog post which covers the broker in details.


Docs UI glitch between 1025px and 1249px screen width

Problem
Between 1025px and 1249px screen width, the side bar overlays docs content, even if collapsed. Tested in Firefox 94.0 on my 1280x1024px screen (due to Ubuntu dash bar, actual browser window width is 1204px).
The screenshot demonstrates the behaviour. It is not possible to click links under the red area.

Solution
Fix media queries
Workaround
Zoom out or make window width smaller than 1025px.

This still happens to me on https://docs.streamlit.io/library/changelog

Thanks for reporting this @StefanBrand. Reopening this issue and looping in @imjuangarcia to take a look.


Improve MIDI reader and add writer

For my own needs, I wrote a MIDI writer in complement of your MIDI parser.
I open this as a draft for two reasons:

I did not yet implement the serialization of SysEx events
MIDI writing does not seem very relevant for Llama. But maybe the parser and writer could be extracted into a standalone library?

I have not performed extensive testing, but I checked it by parsing a MIDI of Bach’s BWV 772, writing it to another file, and checking that the two files are byte-wise identical.

I implemented the missing events in the MIDI writer.
So are you considering including this into Llama? Or is it not relevant?

Hey, yep I'm planning to merge this tomorrow as part of the hacking days.

Thanks so much for this change :)


Swift | 104. Maximum Depth of Binary Tree

File(s) Modified: [104-Maximum-Depth-of-Binary-Tree.swift]
Language(s) Used: [swift]
Submission URL: [https://leetcode.com/submissions/detail/755929212/]

Thanks, @diss1993!


Fix #37: Ensure that the calculated viewport width is always even numbered

Fixes regression (?) of #37. Pages were being cut off from the left side in 2 page mode.

ACTION:  Juan to check this against the other "too many/too few pages

Related to: https://github.com/readium/readium-shared-js/pull/188/files


Graph Algorithms

Implementation of Graph Algorithms:
Needs to be merged in Python/Graphs.

[ ] A* (A star)

[ ] Dijkstra’s shortest path algorithm

[ ] Dijkstra’s Algorithm for Adjacency List Representation

[ ] Kruskal’s Minimum Spanning Tree Algorithm

[x] Bellman-Ford Algorithm

[ ] Floyd Warshall Algorithm

[ ] Dial's Algorithm

[ ] Kahns Algorithm

[ ] Peterson Graph Problem

Hey @geekquad , I would like to work on Dijkstra’s shortest path algorithm and Floyd Warshall Algorithm. Please assign this to me.

Assigning Dijkstra’s shortest path algorithm and Floyd Warshall Algorithm to @diyajaiswal11

Hey @geekquad , I would like to work on the Peterson Graph Problem. Please assign this to me,

Assigning Peterson Graph Problem to @SaiAshish2906.

Hey @geekquad
I'd like to work on the A* (A-star) algorithm. Please assign it to me
Thanks

Assigning A* algorithm to @rajatsahay .

Can i work on java language as well?

Can i work on java language as well?

Hey @nileshteji, For now we haven't started with any language other than Python. If you want to contribute now, please stick to this language. Also for more updates, you can keep a check.

Hey @geekquad, I would like to work on Kruskal’s Minimum Spanning Tree Algorithm.

Assigning Kruskal’s Minimum Spanning Tree Algorithm to @rudrakshi99

Hey @geekquad
I would like to work on Dial's algorithm

Hey @geekquad  and @MAJOR-BEAST  I want to work on

Hey @geekquad and @MAJOR-BEAST I want to work on the Peterson graph problem. Please assign this to me.

@sachincpu , please check, Peterson graph problem has been already assigned. You look out for other problems.

Hey @geekquad , I would like to contribute for Prim's algorithm for  Mininum Spanning Tree ( it is not listed ) with Adjacency Matrix representation.

Hello @MAJOR-BEAST @geekquad, I would like to work on this issue :)
I would like to add this algorithm in your repo

[x] Kahns sort
[x] Prism minimum spanning tree

Thank you :)

Hey @geekquad @MAJOR-BEAST , I would like to work on Kahn's Algo for topo Sort with Adjacency List Representation.
Thank You :)
PS:  I have already made a pull request for the same ;)

Hey @geekquad @MAJOR-BEAST , I would like to work on Kahn's Algo for topo Sort with Adjacency List Representation.
Thank You :)
PS: I have already made a pull request for the same ;)

Sorry, @panda311 but this not how things work, first the mentor, should assign a specific task to someone then only he/she can make a pull request. sorry if I hurt you but that is a general rule that we all have to follow.
Thank you :)

Hey @geekquad , I would like to work on Kruskal’s Minimum Spanning Tree Algorithm. Please assign this to me.

I'd like to work on Kahn's Algorithm using C++  @geekquad @MAJOR-BEAST

Hey @MAJOR-BEAST  and @geekquad  sir I want to work on Dijkstra’s Algorithm for Adjacency List Representation. Please assign this to me

Hello @gabrielknot, Kruskal’s Minimum Spanning Tree Algorithm has already been assigned to someone. Please see other issues and see if you can find something else to contribute to. We are adding more issues soon. Thankyou :)
Hey @devangmukherjee, we have not added a C++ track yet. We will let you know soon. For further updates, please join our Slack channel. Thankyou :)
Hey @panda311, please let us assign you first. Since we are following first come first serve, Khans Algorithm is already assigned. Please see other issues and see if you can find something else to contribute to. We are adding more issues soon. Thankyou :
Assiging:

Dijkstra’s Algorithm for Adjacency List Representation to @sachincpu
Kahns sort to @hritik5102

Please comment again if I have missed someone out. Do look out for other issues and see if you can find something else to contribute to. We are adding more issues soon. Thankyou all.

We still have Dial's Algorithm left. It is up for grab!

Hey @geekquad I Know Dial's Algo too, Can I contribute with that ?

Please assign Kahn's Algorithm to me @geekquad

Please assign Kahn's Algorithm to me @geekquad

Hey @Karanr1, Kahns Algorithm has already been assigned to someone. However, we still have Dial's Algorithm left. Let me know if you want to work on this.

Hey, i can work on AO* algo. You didn't mention it. .But I can implement it

Sure @gpriya32, go ahead!

@geekquad check #240 ao*_algorithm commit.

Hey @geekquad, can you assign Steiner Tree, Boruvka’s algorithm and Karp’s minimum mean weight cycle algorithm to me? I'd like to work on these.

Assigning Steiner Tree, Boruvka’s algorithm, and Karp’s minimum mean weight cycle algorithm to @Mansi145.


Update Composer dependencies (2020-11-27-00-04)

Visual regression test passed!
View the visual regression test report


Android force kill doesn't disconnect

I know this was answered before and some suggested to use AppState/destroy solution but in my case I need characteristic data exchange also when app is in a background.
the actual issue occurs when my BT device uses fast mode and sends characteristics approx every 1 sec then if I swipe/kill the app the connection remains and from this point I can only power cycle BT device. If in normal mode (data approx every 3 sec) everything works fine and device disconnects perfectly.
I also noticed that leaving transaction id empty for monitorCharacteristicForService prevents BT device from disconnecting in both fast and normal mode which got me thinking that the initial issue is somehow related to transaction id.
Does anybody know how to get around this problem?

Does this bug affect Android, iOS or both?

I can confirm it only affects Android devices

Too many android phone didn't implement BLE stack like Pixel/nexus phones.

I'm excited to inform you that we've released a new version of react-native-ble-plx. Many of the concerns and bugs have been addressed in this update.
If you encounter any issues or have further suggestions, please don't hesitate to open a new issue.


CameraController doesn't switch cameras when we call switchCamera

I'm using an Ulefone armor X 10.  With Android 11.
The camera controller seems flakey. It doesn't switch cameras when we call switchCamera  and sometimes the torch doesn't work.
I have to close out of the screen and reopen it to get the camera to start working again. And I am disposing of the CameraController in the dispose function to do it and then opening it up again.
Ive tried stopping the scan before calling the switch camera function and restarting it to no avail.
Whatever camera is set when we setup the mobile_scanner control is what gets used and it works otherwise. But just doesn't want to switch cameras.

I get the same problem and i don't know how to solve it

Facing same issue. Camera controller dispose method called by itself when pop from scanner page. That's why couldn't able to switch camera and toggle flash light.


Not all artifacts are scanned

Version 0.8 works as expected.
Version 0.9 successfully scans all weapons and characters, but the artifact process seems to fail around row 11. At that point, row 13 scrolls from just below view at the bottom all the way up to the top visible row. The scanner then tries to scan rows 13-17 (basically all onscreen artifacts) before concluding the scanning process and moving on to characters (if enabled). This issue happens to me at all 3 delay levels.

This is a very old issue and has likely been fixed by the latest release or prerelease so I am going to close it. Please reopen this issue if the problem persists.

Just for confirmation, release 1.1 and prerelease 1.1.1 both work as expected, so the issue was resolved somewhere.


detour at motorway junction over motorway_link, wrong, time/speed calculation problem?

Situation link OSM site
Situation link Graphhopper site
Image situation:

Espected:
That the motorway was taken straight on.
Failure:
The D tour is taken over the motorway_link.
Data is changed recently because of Government maxspeed rules on motorway. (nation wide)
motorway:
maxspeed=100 maxspeed:conditional=130 @ (19:00-06:00)
But on the motorway_link to the motorway  situation streetview there is this  G01 trafficsign

This means from that point, rules says you can drive 130. And Government did not adjust that,
Once directly on the motorway, we get mostly a trafficsign with maxspeed=100 maxspeed:conditional=130 @ (19:00-06:00), because there is a other junction comming up, in this case, there is only a maxspeed=100 sign.
Stituation streetview.
Maybe for this type of situations, with a motorway_link. where the maxspeed is higher as the motorway, where a D tour is visualised wrongly a other time/speed calculation should be used?
There is also highway=give_way on the exit motorway_link, that does not have the effect as it should have. To better calculate the time/speed ratio?
General:
At a give_way, people come mostly to a stop, so this effect the time/speed ratio.
At a entrance motorway_link, people have to accelarate mostly, this should effect the time/speed ratio.
Or is the program struggling with the  conditional settings?

The data in OSM is correct, a situation, that now is common in the Netherlands.
The Government, says, because of the entrence of a motorway, people mostly drive/ride not that 130 maxspeed, must accelerate, because it is a entrance. More trafficsigns, does not make the road safer. After a cpuple of hunderd meters they get the new maxspeed sign.
It is a consideration of more trafficsigns, costs and safety risks.

Interesting case.

Or is the program struggling with the conditional settings?

It is ignored at the moment. See OSMMaxSpeedParser.

At a give_way, people come mostly to a stop, so this effect the time/speed ratio.

We indeed currently do not take into account these node infos, but we should :) Like we do consider barriers and convert them into tiny edges with certain edge access properties.
One temporal workaround could be to use the (rejected) maxspeed:practical tag: https://wiki.openstreetmap.org/wiki/Proposed_features/Practical_maxspeed

A motorway_link, in general is a part of the road system, where you accelerate to merge in to the motorway or exit decelerate.
Although a motoway_link has a maxspeed tag, we have to take in mind the acceleration/decellerate proces as a part of the traffic behaviour.
Acceleration, means, a average speed on that part of the road.
Adding some time/cost to the motorway link, could be a good idea, mostly these roads are curved, merge/exit behaviours, from other roads.
Sometimes extra speed traffic signs with a low speed. say 70 or less are placed. For saftey reasons.
Normally, then above 70, a time/cost must be taken in account. to level out the accelerate/decelerate.
Average, can not be expressed by a maxspeed:pratical tag, such tags is for the whole road, on every part you can drive/ride.
There is not a Government maxspeed advised sign.

I have a prototype that scans the neighboring edges of all these "links" and reduces the speed of these "links" to the maximum value of the adjacent edges (multiplied by a factor that is default 1 for non-motor vehicles and 0.85 for motor vehicles): https://github.com/graphhopper/graphhopper/compare/road_class_link
This way the acceleration is considered and these links should no longer be selected for a route. I have to do some quality and performance tests before we can consider this in the master branch.

Hmmh, the problem is that this does not happen with the open source version as the speed estimates are solely based on road classes and so link is always slower than the main road class and in theory it is not an issue here and nothing needs to be fixed ;) . So I'll try to fix this in our downstream code and if done close here.
Maybe if I find time I can try to make some code that improves the ETAs open and use the opportunity to re-implement some parts of it. This way the community could also fine-tune it for the different areas of the world. But this is a bigger effort ...

The problem does not appear if an actual 70 speed limit was given - but that's not necessarily the case. The problem here is the missing limit.
I agree with option one, a maxspeed practical. I would not add limits which actually are not there
However, there is a more practical solution, adding more details to the exits: Usually the end-of-highway sign appears about 150 m before the crossing, then a give-way-of-right is there. The entry line usually has the way of right and begins about 100 to 150 m after the crossing with the highway sign.
So adding more OSM details will prevent incorrrect routing because the speed limit in between would be 80.

The problem here is the missing limit.

All maxspeed limits are there.
The above case give now good routing, with the topic start links.
In the above case on the exit, it is 38 meter more 80 km/h where, now a maxspeed=100 is tagged. ST view
On the entrance it is 26 meter more 80 km/h, where now maxspeed=130 is tagged.
Totally 64 meter different km/h.
There is a part of 80 on the junction in the above case, now. Between secondary lanes

So adding more OSM details will prevent incorrrect routing because the speed limit in between would be 80.

The problem, people, maybe a judge, because of the general feeling explaining the law, the intention of the law, that on junction  the speed is from the junction (node) till the sign the speed on the sign.Also when the sign is 0-50 meter away. (practical place)
On that part  (64 meter, case) nobody get a speed ticket, so that is not brought to court, eventually to the high court. Not knowing what a judge would decided.
At the end, it also the judge who decide how we must understand the law.
There (general) taggers and to the point taggers. It is about the feeling what they think is okay, is that the majority(?) And does a judge see it this way. How should we tag. Or to the point because of routing.
That is the dertermination to make.
And adapt the routing system.
give_way helps, also.
This ticket could be closed because of the example, but probably there are more examples like this with just a little different tagging,  just a few more meters and the routing is different.

Yes, indeed, the routing should be fixed now. Thanks for reporting.
As stated before we adjust the speed a bit for more realistic values and had to do more fine tuning (see the branch for the actual fix).

just a few more meters and the routing is different.

This is not expected and would be a bug.

The routing problem was fixed because I had added a 100 km/h speed limit. But I learned by now that this limit was inappropriate. The legal speed is 130 km/h, on the entry line, until you pass the first new 100 km/h sign which should have been added at every entry by now.

The problem is now fixed on the software-side too. See e.g. also:

https://graphhopper.com/maps/?point=52.678269%2C5.730207&point=52.688506%2C5.755398
https://graphhopper.com/maps/?point=49.154787%2C8.564261&point=49.138958%2C8.554337
https://graphhopper.com/maps/?point=49.41477%2C8.547868&point=49.403814%2C8.545475

The routing problem was fixed because I had added a 100 km/h speed limit.

This case is about this road entry line since 2016-02-10 there is a maxspeed on it. I did not see you as author.
The exit2016-02-10

the software-side too

This topic case, only.

As stated before we adjust the speed a bit for more realistic values and had to do more fine tuning (see the branch for the actual fix).

Thanks.


Changing requirement to 7.0

Updating composer json

This should be all solved. Closing this for now :)