[Bug report] Fail to resolve images in  tag when using relative file path

Bug report
Description

We sometimes need to use regular HTML  elements in Markdown files, instead of the standard markdown image ![foo](foo.png) syntax. However, whenever using  with relative paths, I get a webpack compilation error.
ERROR in ./.vuepress/.temp/pages/index.html.vue?vue&type=template&id=0dd0b7d1 (./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./.vuepress/.temp/pages/index.html.vue?vue&type=template&id=0dd0b7d1) 2:0-34
Module not found: Error: Can't resolve './foo.png' in '/sandbox/.vuepress/.temp/pages'

webpack compiled with 1 error

Steps to reproduce

Reproduction link / repo: https://codesandbox.io/s/vuepress-next-img-element-eg68h?file=/README.md

Expected behavior

I would expect to be able to use standard HTML tags in Markdown files, in particular to this case, the  element, with relative or absolute URLs:

Some **markdown** content...

Some _more_ markdown content...

Screenshots

Environment info

Browser: n/a
Output of vuepress info:

System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 471.71 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
    Yarn: Not Found
    npm: 7.16.0 - ~/.nvm/versions/node/v14.17.0/bin/npm
  Utilities:
    Git: 2.31.0 - /usr/local/bin/git
  Browsers:
    Chrome: 91.0.4472.114
    Edge: 91.0.864.64
    Firefox: 89.0.2
    Safari: 14.1.1
  npmPackages:
    @vuepress/bundler-vite: Not Found
    @vuepress/bundler-webpack:  2.0.0-beta.17
    @vuepress/cli:  2.0.0-beta.17
    @vuepress/client:  2.0.0-beta.15
    @vuepress/core:  2.0.0-beta.17
    @vuepress/markdown:  2.0.0-beta.15
    @vuepress/plugin-active-header-links:  2.0.0-beta.17
    @vuepress/plugin-back-to-top:  2.0.0-beta.17
    @vuepress/plugin-container:  2.0.0-beta.17
    @vuepress/plugin-debug: Not Found
    @vuepress/plugin-docsearch: Not Found
    @vuepress/plugin-git:  2.0.0-beta.17
    @vuepress/plugin-google-analytics: Not Found
    @vuepress/plugin-medium-zoom:  2.0.0-beta.17
    @vuepress/plugin-nprogress:  2.0.0-beta.17
    @vuepress/plugin-palette:  2.0.0-beta.17
    @vuepress/plugin-prismjs:  2.0.0-beta.17
    @vuepress/plugin-pwa: Not Found
    @vuepress/plugin-pwa-popup: Not Found
    @vuepress/plugin-register-components: Not Found
    @vuepress/plugin-search: Not Found
    @vuepress/plugin-shiki: Not Found
    @vuepress/plugin-theme-data:  2.0.0-beta.17
    @vuepress/plugin-toc: Not Found
    @vuepress/shared:  2.0.0-beta.7
    @vuepress/theme-default:  2.0.0-beta.17
    @vuepress/theme-vue: Not Found
    @vuepress/utils:  2.0.0-beta.15
    vue:  3.1.1
    vue-loader:  16.2.0
    vue-router:  4.0.8
    vuepress: ^2.0.0-beta.17 => 2.0.0-beta.17
    vuepress-vite: Not Found

This is not a bug.
When you write , we will regard you are requiring a package called foo.png

When you write , vuepress will regard you are requiring a package called foo.png

... but it's not a package, it's standard HTML image. Markdown is a superset of HTML, so any valid HTML page is also a valid Markdown page.

I think this is not a bug.

I disagree, HTML is valid Markdown, and VuePress (being a Markdown-based static site generator), the expectation would be that valid, standard HTML should at least not break the build. So, imo, it is a bug, because it breaks a core piece of HTML.
I am not a Webpack expert, but in most other Webpack projects, there's no extra configuration needed to get Webpack to resolve  properly...

you must place the image in the public folder.

Yeah, that's a workaround I'm using for now, but that experience isn't great... imo, static assets should be stored as close to the content referencing it. Generally, the public folder is used to " provide static assets that are not directly referenced in any of your Markdown files"... so it seems a little smelly to put the image in public when the MD file is deeply nested.
.vuepress/public/foo.png
doc/path/to/some/deep/section/README.md

It'd be much cleaner to be able to put the image near the content, like this:
doc/path/to/some/deep/section/images/foo.png

but in most other Webpack projects, there's no extra configuration needed to get Webpack to resolve  properly...

I doubt that. I don't think  works in webpack, only  works in my experiences.
VuePress 0.x and 1.x requires ./ to declare it's a relative path, so does v2. VuePress is a vue powered site generator. It supports people to write both markdown and vue file and also themes and plugins to make them together as a site, and it also support Vue in markdown. So it's OK (and since it's born) that it is not a standard markdown parser.
From main page:

Vue-powered Static Site Generator

See here https://vuepress2.netlify.app/guide/assets.html#packages-and-path-aliases, VuePress is providing ability to import packages, that why a ./ is requried for a relative assets.
You are neither using the latest package nor providing screenshots whether  work. If ./ works, that's the expect behaviour since v0.x.

Also there is a possiable solution:
Build a markdown-it plugin by your own, which check every source link in the page, if it's not beginning with / or ./ append ./ at the beginning.

@chris-dura Thanks for reporting.
@Mister-Hope You may misunderstand this issue. Things work well with markdown image syntax ![](), but fail with html  tag

Pending for https://github.com/markdown-it/markdown-it/issues/796

@Mister-Hope
When I am in dev mode, I can find the images if I use  and I put the image in the public folder
But When I am in build mode, I cannot resolve the image
info Initializing VuePress and preparing data...
⠧ Compiling with vite[vite]: Rollup failed to resolve import "cover.jpg" from "docs/.vuepress/.temp/pages/en/xx/index.html.vue".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`

@Mister-Hope When I am in dev mode, I can find the images if I use  and I put the image in the public folder
But When I am in build mode, I cannot resolve the image
info Initializing VuePress and preparing data...
⠧ Compiling with vite[vite]: Rollup failed to resolve import "cover.jpg" from "docs/.vuepress/.temp/pages/en/xx/index.html.vue".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`

I am not sure whether we should force throw an error in this case, but this could be an improvement though.
By default, a package called cover.jpg will be treated as first chiose, it seems that vite will fallback to public folder.

@Mister-Hope When I am in dev mode, I can find the images if I use  and I put the image in the public folder
But When I am in build mode, I cannot resolve the image
info Initializing VuePress and preparing data...
⠧ Compiling with vite[vite]: Rollup failed to resolve import "cover.jpg" from "docs/.vuepress/.temp/pages/en/xx/index.html.vue".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`

I am not sure whether we should force throw an error in this case, but this could be an improvement though.
By default, a package called cover.jpg will be treated as first chiose, it seems that vite will fallback to public folder.

Yes, it should be the same when in both modes.


Pulling test images not Sonobuoy from private registry with secret.

I am able to use sonobuoy image from private registry by following this document. Thanks for that. However, for those e2e test images I got image pull error. Sonobuoy creates new namespace but there is no secret key and imagepullsecrets  created. Below is my config for the job. Can anybody help me on this? Appreciate it.
---
apiVersion: v1
kind: Namespace
metadata:
  name: sonobuoy
---
apiVersion: v1
data:
  .dockerconfigjson: JSONSECRET
kind: Secret
metadata:
  name: sonobuoydockerkey
  namespace: sonobuoy
type: kubernetes.io/dockerconfigjson
---
apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    component: sonobuoy
  name: sonobuoy-serviceaccount
  namespace: sonobuoy
imagePullSecrets:
- name: sonobuoydockerkey
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  labels:
    component: sonobuoy
  name: sonobuoy-serviceaccount-sonobuoy
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: sonobuoy-serviceaccount
subjects:
- kind: ServiceAccount
  name: sonobuoy-serviceaccount
  namespace: sonobuoy
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    component: sonobuoy
  name: sonobuoy-serviceaccount
rules:
- apiGroups:
  - '*'
  resources:
  - '*'
  verbs:
  - '*'
- nonResourceURLs:
  - '/metrics'
  - '/logs'
  - '/logs/*'
  verbs:
  - 'get'
---
apiVersion: v1
data:
  config.json: |
    {"Description":"DEFAULT","UUID":"51d479c2-6238-4484-ad9b-ac3e8bbc4251","Version":"v0.16.4","ResultsDir":"/tmp/sonobuoy","Resources":["apiservices","certificatesigningrequests","clusterrolebindings","clusterroles","componentstatuses","configmaps","controllerrevisions","cronjobs","customresourcedefinitions","daemonsets","deployments","endpoints","ingresses","jobs","leases","limitranges","mutatingwebhookconfigurations","namespaces","networkpolicies","nodes","persistentvolumeclaims","persistentvolumes","poddisruptionbudgets","pods","podlogs","podsecuritypolicies","podtemplates","priorityclasses","replicasets","replicationcontrollers","resourcequotas","rolebindings","roles","servergroups","serverversion","serviceaccounts","services","statefulsets","storageclasses","validatingwebhookconfigurations","volumeattachments"],"Filters":{"Namespaces":".*","LabelSelector":""},"Limits":{"PodLogs":{"Namespaces":"","SonobuoyNamespace":true,"FieldSelectors":[],"LabelSelector":"","Previous":false,"SinceSeconds":null,"SinceTime":null,"Timestamps":false,"TailLines":null,"LimitBytes":null,"LimitSize":"","LimitTime":""}},"QPS":30,"Burst":50,"Server":{"bindaddress":"<IP_ADDRESS>","bindport":8080,"advertiseaddress":"","timeoutseconds":10800},"Plugins":[{"name":"e2e"},{"name":"systemd-logs"}],"PluginSearchPath":["./plugins.d","/etc/sonobuoy/plugins.d","~/sonobuoy/plugins.d"],"Namespace":"sonobuoy","WorkerImage":"sonobuoy/sonobuoy:v0.16.4","ImagePullPolicy":"IfNotPresent","ImagePullSecrets":"sonobuoydockerkey","ProgressUpdatesPort":"8099"}
kind: ConfigMap
metadata:
  labels:
    component: sonobuoy
  name: sonobuoy-config-cm
  namespace: sonobuoy
---
apiVersion: v1
data:
  plugin-0.yaml: |
    extra-volumes:
    - configMap:
        name: repolist-cm
      name: repolist-vol
    sonobuoy-config:
      driver: Job
      plugin-name: e2e
      result-format: junit
    spec:
      command:
      - /run_e2e.sh
      env:
      - name: E2E_FOCUS
        value: \[Conformance\]
      - name: E2E_SKIP
        value: \[Disruptive\]|NoExecuteTaintManager
      - name: E2E_PARALLEL
        value: "1"
      - name: E2E_USE_GO_RUNNER
        value: "true"
      - name: KUBE_TEST_REPO_LIST
        value: /tmp/sonobuoy/repo-list.yaml
      image: DOCKERREGISTRY/google-containers/conformance:v1.14.8
      imagePullPolicy: Always
      name: e2e
      resources: {}
      volumeMounts:
      - mountPath: /tmp/results
        name: results
      - mountPath: /tmp/sonobuoy
        name: repolist-vol
  plugin-1.yaml: |
    sonobuoy-config:
      driver: DaemonSet
      plugin-name: systemd-logs
      result-format: raw
    spec:
      command:
      - /bin/sh
      - -c
      - /get_systemd_logs.sh && while true; do echo "Sleeping for 1h to avoid daemonset
        restart"; sleep 3600; done
      env:
      - name: CHROOT_DIR
        value: /node
      - name: RESULTS_DIR
        value: /tmp/results
      - name: NODE_NAME
        valueFrom:
          fieldRef:
            fieldPath: spec.nodeName
      image: DOCKERREGISTRY/heptio-images/sonobuoy-plugin-systemd-logs:latest
      imagePullPolicy: Always
      name: systemd-logs
      resources: {}
      securityContext:
        privileged: true
      volumeMounts:
      - mountPath: /tmp/results
        name: results
      - mountPath: /node
        name: root
kind: ConfigMap
metadata:
  labels:
    component: sonobuoy
  name: sonobuoy-plugins-cm
  namespace: sonobuoy
---
apiVersion: v1
kind: Pod
metadata:
  labels:
    component: sonobuoy
    run: sonobuoy-master
    tier: analysis
  name: sonobuoy
  namespace: sonobuoy
spec:
  containers:
  - command:
    - /bin/bash
    - -c
    - /sonobuoy master --no-exit=true -v 3 --logtostderr
    env:
    - name: SONOBUOY_ADVERTISE_IP
      valueFrom:
        fieldRef:
          fieldPath: status.podIP
    image: sonobuoy/sonobuoy:v0.16.4
    imagePullPolicy: IfNotPresent
    name: kube-sonobuoy
    volumeMounts:
    - mountPath: /etc/sonobuoy
      name: sonobuoy-config-volume
    - mountPath: /plugins.d
      name: sonobuoy-plugins-volume
    - mountPath: /tmp/sonobuoy
      name: output-volume
  imagePullSecrets:
  - name: sonobuoydockerkey
  restartPolicy: Never
  serviceAccountName: sonobuoy-serviceaccount
  tolerations:
  - key: "kubernetes.io/e2e-evict-taint-key"
    operator: "Exists"
  volumes:
  - configMap:
      name: sonobuoy-config-cm
    name: sonobuoy-config-volume
  - configMap:
      name: sonobuoy-plugins-cm
    name: sonobuoy-plugins-volume
  - emptyDir: {}
    name: output-volume
---
apiVersion: v1
data:
  repo-list.yaml: |
    dockerLibraryRegistry: DOCKERREGISTRY
    e2eRegistry: DOCKERREGISTRY/kubernetes-e2e-test-images
    gcRegistry: DOCKERREGISTRY
    etcdRegistry: DOCKERREGISTRY/coreos
    privateRegistry: DOCKERREGISTRY/k8s-authenticated-test
    sampleRegistry: DOCKERREGISTRY/google-samples
kind: ConfigMap
metadata:
  name: repolist-cm
  namespace: sonobuoy
---
apiVersion: v1
kind: Service
metadata:
  labels:
    component: sonobuoy
    run: sonobuoy-master
  name: sonobuoy-master
  namespace: sonobuoy
spec:
  ports:
  - port: 8080
    protocol: TCP
    targetPort: 8080
  selector:
    run: sonobuoy-master
  type: ClusterIP

It sounds like you are interested in running tests using a completely separate registry than the defaults? Not just Sonobuoy, but also the e2e tests (and maybe systemd-logs as well), is that right?
If that is the case you need to also look at the docs about testing in airgapped environments.
Sonobuoy has some commands sonobuoy images to help with moving the images from the public locations to your own private one.
But as of now there are a few images you have to move yourself, like the e2e image. See #1028 for details.
After taking some time to look at those docs, let me know if that answers your question or you need additional guidance?

Thank you so much for answering John.
I have been follow the airgapped documents. All necessary images have been pull/push to our private registry. But like I mentioned, when Sonobuoy creates new namespace the secret not been created as long as the imagepullsecrets. Therefore I got unauthorized error. Please take a look at the details show below. Let me know further information need it.
Docker image
$docker search $PRIVATE_REG/nginx:1.14-alpine

NAME                                                                      DESCRIPTION         STARS               OFFICIAL            AUTOMATED
$PRIVATE_REG/nginx:1.14-alpine                       0

Cluster pods
$kubectl get po -A

NAMESPACE         NAME                                                      READY   STATUS             RESTARTS   AGE
daemonsets-6591   daemon-set-6bkqd                                          0/1     ImagePullBackOff   0          3m35s
daemonsets-6591   daemon-set-9sqpt                                          0/1     ImagePullBackOff   0          3m35s
kube-system       aws-node-42kkn                                            1/1     Running            0          116m
kube-system       aws-node-82g22                                            1/1     Running            0          117m
kube-system       cluster-autoscaler-57fd5dcfdc-mmz7b                       1/1     Running            0          119m
kube-system       coredns-78768fbc56-p7p9d                                  1/1     Running            0          127m
kube-system       coredns-78768fbc56-svj5p                                  1/1     Running            0          127m
kube-system       kube-proxy-6656d                                          1/1     Running            0          120m
kube-system       kube-proxy-pr7qp                                          1/1     Running            0          120m
sonobuoy          sonobuoy                                                  1/1     Running            0          3m39s
sonobuoy          sonobuoy-e2e-job-934d8d246b794e97                         2/2     Running            0          3m38s
sonobuoy          sonobuoy-systemd-logs-daemon-set-4f743dd305694dd9-57wn6   2/2     Running            0          3m38s
sonobuoy          sonobuoy-systemd-logs-daemon-set-4f743dd305694dd9-lstcc   2/2     Running            0          3m38s

Pod errors
$kubectl -n  daemonsets-6591 describe po daemon-set-6bkqd

Name:           daemon-set-6bkqd
Namespace:      daemonsets-6591
Priority:       0
Node:           ip-10-6-215-185.ca-central-1.compute.internal/<IP_ADDRESS>
Start Time:     Mon, 09 Dec 2019 14:54:14 -0500
Labels:         controller-revision-hash=78c64684c7
                daemonset-name=daemon-set
                pod-template-generation=1
Annotations:    kubernetes.io/psp: e2e-test-privileged-psp
Status:         Pending
IP:             <IP_ADDRESS>
IPs:            <none>
Controlled By:  DaemonSet/daemon-set
Containers:
  app:
    Container ID:
    Image:          $PRIVATE_REG/nginx:1.14-alpine
    Image ID:
    Port:           9376/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ImagePullBackOff
    Ready:          False
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-phnph (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  default-token-phnph:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-phnph
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/disk-pressure:NoSchedule
                 node.kubernetes.io/memory-pressure:NoSchedule
                 node.kubernetes.io/not-ready:NoExecute
                 node.kubernetes.io/pid-pressure:NoSchedule
                 node.kubernetes.io/unreachable:NoExecute
                 node.kubernetes.io/unschedulable:NoSchedule
Events:
  Type     Reason     Age                   From                                                    Message
  ----     ------     ----                  ----                                                    -------
  Normal   Scheduled  4m2s                  default-scheduler                                       Successfully assigned daemonsets-6591/daemon-set-6bkqd to ip-10-6-215-185.ca-central-1.compute.internal
  Normal   Pulling    2m28s (x4 over 4m1s)  kubelet, ip-10-6-215-185.ca-central-1.compute.internal  Pulling image "$PRIVATE_REG/nginx:1.14-alpine"
  Warning  Failed     2m28s (x4 over 4m1s)  kubelet, ip-10-6-215-185.ca-central-1.compute.internal  Failed to pull image "$PRIVATE_REG/nginx:1.14-alpine": rpc error: code = Unknown desc = Error response from daemon: unauthorized: access to the requested resource is not authorized
  Warning  Failed     2m28s (x4 over 4m1s)  kubelet, ip-10-6-215-185.ca-central-1.compute.internal  Error: ErrImagePull
  Normal   BackOff    2m17s (x6 over 4m)    kubelet, ip-10-6-215-185.ca-central-1.compute.internal  Back-off pulling image "$PRIVATE_REG/nginx:1.14-alpine"
  Warning  Failed     2m4s (x7 over 4m)     kubelet, ip-10-6-215-185.ca-central-1.compute.internal  Error: ImagePullBackOff

Here is the different between namespace sonobuoy and daemonsets-6591
sonobuoy
$ kubectl get serviceaccounts -n sonobuoy
NAME                      SECRETS   AGE
default                   1         16m
sonobuoy-serviceaccount   1         16m

$ kubectl get secret -n sonobuoy
NAME                                            TYPE                                  DATA   AGE
default-token-qg7sk                             kubernetes.io/service-account-token   3      16m
sonobuoy-plugin-e2e-934d8d246b794e97            kubernetes.io/tls                     2      16m
sonobuoy-plugin-systemd-logs-4f743dd305694dd9   kubernetes.io/tls                     2      16m
sonobuoy-serviceaccount-token-rkgh6             kubernetes.io/service-account-token   3      16m
sonobuoydockerkey                               kubernetes.io/dockerconfigjson        1      16m

daemonsets-6591
$ kubectl get secrets -n daemonsets-6591
No resources found in daemonsets-6591 namespace.
$ kubectl get serviceaccounts -n daemonsets-6591
No resources found in daemonsets-6591 namespace.

Ah I see.
So the problem you're running into is that the containers that the e2e process spawns also are in a private registry and the secret isnt available (and also not set on the container to even utilize it if it were)
I'm not certain there is an ideal resolution to this. A little bit of brainstorming though:

Ideally you'd be able to put these images into your own public registry and avoid the issue entirely.
If you can prepull the images into the cluster then it won't need to pull them again when running in the different namespaces. That is, depending on the tags. I believe if something uses the :latest tag then it will still pull as well as if the ImagePullPolicy is Always. See https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images
At the very least, supporting this would require a change to the Kubernetes test framework so that it knows what secrets to move into the namespaces and something like a mutating webhook to update all the containers to set the imagepullsecrets. This would be a pretty sizable change I wouldnt expect it to be implemented any time in the near future.

Unfortunately the framework does just assume that the registries are "public" (not password protected) for most of the images. So you can easily point them to another registry, but not easily change whether it is a public or private one.

Thank you so much again @johnSchnake . I will try prepull option and see how it works. Otherwise pulling from public is the only way I guess.

Good luck. If you hit a bug or just want to talk about the process, let us know. You can file another issue or find us in the k8s slack channel #sonobuoy

@johnSchnake - just wanted to share  what's probably a better way to do this - in case it helps unblock others in my shoes. I've read through your analysis here, so I think you'll find the below approach is new (and scalable/easier?):

https://github.com/vmware-tanzu/sonobuoy/issues/1038
https://github.com/vmware-tanzu/sonobuoy/issues/424
https://github.com/vmware-tanzu/sonobuoy/pull/660
https://github.com/vmware-tanzu/sonobuoy/issues/692

In my use case, we have multiple imagePullSecrets that can be used by the test images (we are generating 100s of plugins via sonobuoy gen plugin > plugin-n.yaml then executing them in parallel, the worker images are private, unique and different, and each different image can be in a different image registry due to release trains/customizations....complicated, I know).
The YAML injection approach in official docs here didn't cut it for our use case, even if we scripted out the YAML injection.
Basically, besides injecting the imagePullSecret into the Pod, Kubernetes also let's you specify a ServiceAccount to have permissions to the Secret. And as long as whatever Pod is using that ServiceAccount, it can pull from there:

https://dev.to/rizwankh_24/how-to-use-service-accounts-for-kubernetes-imagepullsecrets-3b57

Using this tidbit, I have a "launcher" namespace with a pre-created secret with several (10s) of imagePullSecrets (via Kustomize):
- name: image-pull-secrets
  namespace: arc-ci-launcher
  options:
    disableNameSuffixHash: true
  files:
  - configs/arc-acr-1-imagePullSecret.json
  - configs/arc-acr-2-imagePullSecret.json
  - ...

So Kustomize creates a single humungous secret in arc-ci-launcher with all the Docker Configs as K:V pairs with the JSON. This namespace contains a launcher Pod, where I have sonobuoy CLI ready to trigger sonobuoy run - below.
Then, I have this bash function, that simply injects the secret into the Sonobuoy namespace:
function patch_namespace_imagepull()
{
  if [ $# -lt 3 ];
  then
      echo "Usage: patch_namespace_imagepull <source-namespace> <source-secret> <destination-namespace> <destination-sa>"
      exit 1
  fi

  SOURCE_NS="$1"
  SOURCE_SECRET="$2"
  DEST_NS="$3"
  DEST_SA="$4"

  # Verify secret exists in source namespace
  if ! kubectl get secret -n ${SOURCE_NS} ${SOURCE_SECRET} > /dev/null 2>&1; then
    echo "No \"${SOURCE_SECRET}\" secret found in ${SOURCE_NS}, exiting"
    exit 0
  fi

  SECRETS_JSON=$(kubectl get secret -n ${SOURCE_NS} ${SOURCE_SECRET} -o json | jq -r '.data')
  CONFIGS_BASE64=$(echo "$SECRETS_JSON" | jq -c -r '.[]')

  for CONFIG_BASE64 in ${CONFIGS_BASE64[@]}; do
      # Decode JSON, get the registry url under '.auths', replace '.' with '-'
      CONFIG_JSON=$(echo $CONFIG_BASE64 | base64 -d)
      NEW_DOCKER_SECRET_NAME=$(echo $CONFIG_JSON | jq -r '.auths | keys[]' | sed 's/\./-/g')

      # Create docker config secret in destination namespace
      kubectl create secret generic "${NEW_DOCKER_SECRET_NAME}" \
              -n "${DEST_NS}" \
              --type=kubernetes.io/dockerconfigjson \
              --from-literal=.dockerconfigjson="${CONFIG_JSON}" \
              --dry-run=client -o yaml \
              | kubectl apply -f -

      # Patch the ServiceAccount in the destination namespace. We use jq
      # because 'kubectl patch' makes it difficult to use nested objects
      kubectl get serviceaccount "${DEST_SA}" -n "${DEST_NS}" -o json \
              | jq ".imagePullSecrets += [{\"name\": \"${NEW_DOCKER_SECRET_NAME}\"}]" \
              | kubectl apply -f -
  done
}

Finally, here's the sequence in which I trigger sonobuoy, such that the ServiceAccount the Pods run under auto inherits all of the above imagePullSecrets, making them all work:
# Pre-create sonobuoy namespace
kubectl create namespace sonobuoy

# Pre-create and patch sonobuoy service account with imagePullSecret env var,
# sourcing the secret from the launcher namespace
kubectl create serviceaccount sonobuoy-serviceaccount --namespace sonobuoy
patch_namespace_imagepull ${LAUNCHER_NAMESPACE} ${IMAGE_PULL_SECRET} sonobuoy sonobuoy-serviceaccount

# Run with existing SA
sonobuoy run --skip-preflight --timeout $timeout --wait \
--service-account-name sonobuoy-serviceaccount \
--existing-service-account \
--plugin $PRE_GENERATED_YAML

We wrapped this launcher container up in a bash harness that can scale to N number of plugins, worked beautifully, the only tricky thing is the Launcher Kustomize Secret injection + that bash for-loop patcher patch_namespace_imagepull - we found it easier to implement that these Custom Operators though:

https://github.com/neutryno/imagepullsecret-serviceaccount-patcher
https://github.com/alexellis/registry-creds
https://github.com/titansoft-pte-ltd/imagepullsecret-patcher

| P.S. Thanks for maintaining this awesome product :)

@johnSchnake Is the issue @kobemtl faced here resolved in latest versions of k8s frameworks? We have a similar use-case and any confirmation is helpful. Thank you.


make phpredis work with lazy doctrine caches

Hopefully fixes #578

Closing as per issue comment saying that it is fixed.

Guys, this is a NO solution. The solution in the comment issue take doctrine system cache out from redis at all:
doctrine.system_cache_pool:
adapter: cache.system
We still need this pull request.

What's the issue with that?

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Doctrine\Common\Cache\RedisCache::setRedis() must be an instance of Redis, instance of Container1WKlMkT\RedisCluster_8dcfeee given, called in /var/www/html/var/cache/prod/Container1WKlMkT/SuppCore_AdministrativoBackend_KernelProdDebugContainer.php on line 1568 and defined in /var/www/html/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php:31

It looks like you're using RedisCluster while doctrine cache does not support it.
I don't get how it relates. Please open a detail issue if you think there is one.


Optimizer: support static initialization of global arrays

The buffer of global arrays could already be statically initialized.
The missing piece was the array variable itself, which is basically a reference to the array buffer.
For example:
var a = [1, 2, 3]

ends up in two statically initialized globals:

the array buffer, which contains the elements
the variable a which is a single reference (= pointer) of the array buffer

This optimization removes the need for lazy initialization of such variables.
rdar://127757554

@swift-ci test

@swift-ci benchmark

@swift-ci test

@swift-ci benchmark

@swift-ci test linux

@swift-ci test Windows

@swift-ci test

@swift-ci test macos

@swift-ci test

@swift-ci benchmark


Added Lifi switching chains

Description

Added lifi Chain switching
Type of change

[ ] Docs change / dependency upgrade
[ ] Configuration / tooling changes
[ ] Refactoring
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Requires changes in customer code

High-level change(s) description - from the user's perspective

Related Issue(s)
Fixes
Related pull request(s)

sejad


obsolete response to phorbol ester terms?

Response to phorbol esters terms - should probably not have been allowed through TG (my fault).
Phorbol esters are used to mimic DAG activiation of PKC (although probably have other effects too) - e.g. see http://www.ncbi.nlm.nih.gov/pubmed/17661218
[Term]
id: GO:1904627
name: response to phorbol 13-acetate 12-myristate
namespace: biological_process
def: "Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a phorbol 13-acetate 12-myristate stimulus." [GO_REF:0000071, GOC:TermGenie, PMID:2200903]
synonym: "response to phorbol 12-tetradecanoate 13-acetate" EXACT []
synonym: "response to PMA" EXACT []
synonym: "response to tetradecanoylphorbol acetate" EXACT []
synonym: "response to TPA" EXACT []
is_a: GO:0033993 {is_inferred="true"} ! response to lipid
is_a: GO:1901700 {is_inferred="true"} ! response to oxygen-containing compound
intersection_of: GO:0050896 ! response to stimulus
intersection_of: has_input CHEBI:37537 ! phorbol 13-acetate 12-myristate
relationship: has_input CHEBI:37537 {is_inferred="true"} ! phorbol 13-acetate 12-myristate
created_by: sl
creation_date: 2015-08-28T13:44:03Z
[Term]
id: GO:1904628
name: cellular response to phorbol 13-acetate 12-myristate
namespace: biological_process
def: "Any process that results in a change in state or activity of a cell (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a phorbol 13-acetate 12-myristate stimulus." [GO_REF:0000071, GOC:TermGenie, PMID:2200903]
synonym: "cellular response to phorbol 12-tetradecanoate 13-acetate" EXACT []
synonym: "cellular response to response to PMA" EXACT []
synonym: "cellular response to tetradecanoylphorbol acetate" EXACT []
synonym: "cellular response to TPA" EXACT []
is_a: GO:0071396 {is_inferred="true"} ! cellular response to lipid
is_a: GO:1901701 {is_inferred="true"} ! cellular response to oxygen-containing compound
is_a: GO:1904627 {is_inferred="true"} ! response to phorbol 13-acetate 12-myristate
intersection_of: GO:0070887 ! cellular response to chemical stimulus
intersection_of: has_input CHEBI:37537 ! phorbol 13-acetate 12-myristate
relationship: has_input CHEBI:37537 {is_inferred="true"} ! phorbol 13-acetate 12-myristate
created_by: sl
creation_date: 2015-08-28T13:44:10Z

Adding text "use case for assay ontology" so can find this later

Also wondering what to do with this:
[Term]
id: GO:1990840
name: response to lectin
namespace: biological_process
def: "Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a lectin stimulus. A lectin is a carbohydrate-binding protein, highly specific for binding sugar moieties." [PMID:2200903]
subset: termgenie_unvetted
is_a: GO:0071216 ! cellular response to biotic stimulus
created_by: sl
creation_date: 2015-08-27T20:02:21Z
At first I thought we shouldn't allow this as in many cases experiments will be looking at toxic effects of lectins.  But after doing some more reading, I have found cases of endogenous lectins and their receptors in animals.  Probably needs a comment to say that this should NOT be used to annotated the toxic effects of exogenous lectins.

Response to lectin added, but with a comment pointing out that this doesn't cover simple toxicity.

Hi @slaulederkind
I agree about the lectin.
Phorbol ester is a little different, especially if it's used to mimic a pathway, but I agree with you that it could remain. Phorbol esters are natural compounds produced by plants, it seems conceivable that organisms that can encounter these plants can respond to the compounds that they produce.
What do you think @thomaspd ? @ukemi @vanaukenk @ValWood ?
Thanks, Pascale

We probably need a proposal to deal with 'response to'; both at the level of rules for terms to be created, and for annotation rules.


Is it possible to make a new instance of Logbook based on the existing one with some modifications?

Suppose I created a Logbook instance with Logbook.builder()....build() method (or took it from Spring's logbook auto config).
Now I need to create another one with overriding e.g. bodyFilter(). I plan to use it only for specific externall calls. Can I use the original object as a base for a new one?

If you created the original instance manually, then I'd just extract the
common parts into a function and call that function twice with different
filters eg.
On Thu, 9 Mar 2023, 14:36 amseager, @.***> wrote:

Suppose I created a Logbook instance with Logbook.builder()....build()
method (or took it from Spring's logbook auto config).
Now I need to create another one with overriding e.g. bodyFilter(). I
plan to use it only for specific externall calls. Can I use the original
object as a base for a new one?
—
Reply to this email directly, view it on GitHub
https://github.com/zalando/logbook/issues/1449, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AADI7HIVX3D4NBVCBKH2Z7DW3HMHDANCNFSM6AAAAAAVVECTGY
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


debian support, fix exec validations and repository, also confine for provider and require apt_update before install

done


Squeryl CRUDify doesn't properly use transactions during rewrites

See https://groups.google.com/d/topic/liftweb/5lgMX_HKhoU/discussion

Closed by https://github.com/lift/framework/pull/1227


Use GPU for SGD weight update calculations

Currently weight updates are calculated on Native backend. Profiling shows that about 40% of CPU time is spent doing corresponding BLAS operations. Another 40% are in an area without debug info, quite likely that's nvidia driver doing i/o. In the same time according to nvidia-smi GPU load is about 20% even on my relatively slow GTX 960.
I think it's possible to get 3x-5x speedup if weight updates are implemented on GPU. It should be quite easy since update is a simple BLAS operation y = a * x + b * y where a and b are scalars, x and y are tensors of equal dimensions.

I've hacked in Cuda backend in a dirty way, but performance is a lot worse. perf top shows a lot of time spent in sync() in cuda lib. Possibly performance degrades because scalars lr and momentum are reallocated each time.
I've tried to add those scalars to struct Momentum, but I get panic:
 Running `target/debug/leaf-examples mnist mlp --batch-size 20 --momentum 0.03`
local_lr 0.03
local_lr 0.03
Last sample: Prediction: 5, Target: 4 | Accuracy 2/20 = 10.00%
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Plugin(Operation("Unable to execute operation gemm."))', ../src/libcore/result.rs:746
stack backtrace:
   1:     0x5555ef04d5f0 - sys::backtrace::tracing::imp::write::h1df2fc52f5a1077eehv
   2:     0x5555ef04fd7b - panicking::default_handler::_$u7b$$u7b$closure$u7d$$u7d$::closure.44584
   3:     0x5555ef04f9e8 - panicking::default_handler::hdd51c136086dc3e0CWz
   4:     0x5555ef0454cc - sys_common::unwind::begin_unwind_inner::h3a281a3586db30a7x5t
   5:     0x5555ef045bf8 - sys_common::unwind::begin_unwind_fmt::heafd13fa24ecdc24D4t
   6:     0x5555ef04cba1 - rust_begin_unwind
   7:     0x5555ef07fcef - panicking::panic_fmt::h98b8cbb286f5298alcM
   8:     0x5555eed84e58 - result::unwrap_failed::h1490796611167060425
                        at ../src/libcore/macros.rs:29
   9:     0x5555eeda30b6 - result::Result<T, E>::unwrap::h4534188100940040184
                        at ../src/libcore/result.rs:687
  10:     0x5555eedb8afc - layers::common::linear::Linear.ComputeOutput<f32, B>::compute_output::h10814396721572671422
                        at /home/butler/projects/nn/leaf/src/layers/common/linear.rs:124
  11:     0x5555eedb562f - layer::ILayer::forward::h4987377018252282577
                        at /home/butler/projects/nn/leaf/src/layer.rs:769
  12:     0x5555eee0e55e - layer::Layer<B>::forward::h1519220139108033296
                        at /home/butler/projects/nn/leaf/src/layer.rs:465
  13:     0x5555eee0cb21 - layers::common::sequential::Sequential<B>.ILayer<B>::forward::h5245413676380592566
                        at /home/butler/projects/nn/leaf/src/layers/common/sequential.rs:250
  14:     0x5555eee0e55e - layer::Layer<B>::forward::h1519220139108033296
                        at /home/butler/projects/nn/leaf/src/layer.rs:465
  15:     0x5555eee765c9 - solver::Solver<SolverB, B>::train_minibatch::h17553229467080863917
                        at /home/butler/projects/nn/leaf/src/solver/mod.rs:76
  16:     0x5555eed7b76e - run_mnist::h3be3c63c881614b9Mfa
                        at src/main.rs:191
  17:     0x5555eed6fe1f - main::h27645fdaeccde482Zea
                        at src/main.rs:84
  18:     0x5555ef04f644 - sys_common::unwind::try::try_fn::h7821988306635677941
  19:     0x5555ef04cb2b - __rust_try
  20:     0x5555ef04f0db - rt::lang_start::h582466266dfb2119IOz
  21:     0x5555eed7bc69 - main
  22:     0x7f1af8a2460f - __libc_start_main
  23:     0x5555eed6fac8 - _start
  24:                0x0 - <unknown>

I've tried to move initialization from Momentum::new() into Momentum::compute_update_value() with no success. If this if let is commented out, code works, if it's not, it fails after the first iteration. But the code in question does nothing more than just allocation of scalar on Cuda backend, it isn't even used anywhere! But if allocated scalar isn't not stored into self.lr and is dropped at the end of function, code runs normally.
Any ideas?


Fixes #212

A picture tells a thousand words
Before this PR

After this PR

Coverage increased (+0.8%) to 41.408% when pulling 3d163c36674c9811c97e67895854cb6d4837d4e2 on bjornreppen:tom0 into 715241b3a65b68d48299f2c19cc52669874acde1 on Artsdatabanken:master.


Won't install on windows

Just tried npm install, it fails:
D:\s\typescript\TS-N-S\gitHub> npm install
                                                                                modules
><EMAIL_ADDRESS>install D:\src\typescript\TypeScript-Node-Starter\gitHub\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.7.2/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.7.2/win32-x64-64_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

><EMAIL_ADDRESS>postinstall D:\src\typescript\TypeScript-Node-Starter\gitHub\node_modules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe D:\src\typescript\TypeScript-Node-Starter\gitHub\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
...

I think npm is trying to download a non-existent file. node-sass v4.7.2 win32-x64-64_binding.node is not listed in the releases, node-sass v4.7.2

npm i is working for me, but it's building node-sass instead of just downloading the release.

Yep, but in order to build the node-sass package locally you need python installed which I didn't fancy doing. Not sure if that's the only thing I would need to install.
Any way I've gone over to create-react-app which is more suited to my needs.
create-react-app myapp --use-npm --scripts-version=react-scripts-ts
Cheers.


fix: req.collection being lost when querying a global inside a collection

Description
Closes https://github.com/payloadcms/payload/issues/5720
Type of change

[x] Bug fix (non-breaking change which fixes an issue)

Checklist:

[ ] I have added tests that prove my fix is effective or that my feature works
[x] Existing test suite passes locally with my changes
[ ] I have made corresponding changes to the documentation

@paulpopus this change might introduce a different issue: a mismatch between req.collection and the collection targeted by the localAPI operation. For example when using req.payload.update({req})..
Perhaps it would make sense to find a solution that would fix all the problems related to https://github.com/payloadcms/payload/issues/5720 . The issue used in the reproduction was just an example, but the problem occurs in other properties of req which get overridden when using the localAPI.
I'm not sure about this approach, but could it make sense to shallow clone the req object in createLocalReq instead of setting it's properties?

@franciscolourenco Thanks for looking into this mate
When implementing this fix I tested with other operations against collections and I didn't see the issue happen again. Now I just double checked as well and it's working fine, do you have more examples of this issue persisting after this fix? Maybe the issue is elsewhere if so

@franciscolourenco I made a new PR here https://github.com/payloadcms/payload/pull/5748 to instead use the isolateObjectProperty function. If there's further issues let's continue in that PR
Appreciate your time here!


Feature request : Jetpack gliding

I believe this has been asked in the past and was told this was being looking into, is this still the case? Would love to have this feature.

What exactly do you mean by gliding?

Basically a fast way to travel using the jetpack (fast forward motion).

That would be extremely handy. I only use Mek's Jetpack early-game and when I'm doing a Mek playtrough because of that reason.

there is actually a way for fast-travel but it will be so much cooler with built-in gliding/jet option.
The way I do it is use the slime sling of tinker construct to shoot me to the air then turn around and keep going with jetpack it's pretty fast.

As another workaround, again with Tinkers Construct, using the slime boots, you have to bounce at least once, and then fly with the jetpack. This will allow you to have the mid-air speed of the slime boots and the flight of the jetpack. This is how I get around quickly and easily.


scanner.py: add support for "original_type" attribute of "Argument" XML tag

scanner.py: add support for "original_type" attribute of "Argument" XML tag. For array args this means avoiding losing the delcared width of the array and having its decl_type show as pointer_t.
Fall back on "type" (current default-no-matter-what) attribute when "original_type" is not present.
XML generated by pygccxml+CastXML:

Behaviour:
classes_obj                       = global_ns.classes()
class_im_looking_for              = [d for d in classes_obj.declarations if "class_im_looking_for" in d.name][0]
method_im_looking_for_declaration = [d for d in class_im_looking_for.declarations if d.name == "method_name"][0]
method_arguments                  = method_im_looking_for_declaration.arguments
argument                          = method_arguments[0]

# pre-PR this gives:
argument.decl_type.decl_string
Out[2]: '::my_namespace::my_type *'
pygccxml.declarations.type_traits.array_size(argument.decl_type)
#AssertionError:
#> path/to/site-packages/pygccxml/declarations/type_traits.py(293)array_size()
#    291     nake_type = remove_reference(nake_type)
#    292     nake_type = remove_cv(nake_type)
#--> 293     assert isinstance(nake_type, cpptypes.array_t)
#    294     return nake_type.size

# post-PR this gives:
argument.decl_type.decl_string
Out[4]: '::my_namespace::my_type[1024]'
pygccxml.declarations.type_traits.array_size(argument.decl_type)
Out[5]: 1024

Overwrote previous commit to avoid linter complaints.

Overwrote previous commit to fix silly oversight where decl_type fallback assignment value was XML_AN_TYPE ("type" literal) and not the value in attrs mapped to by XML_AN_TYPE.

Looks great. Please ignore the macos runner errors, these are pre-existing.
Do you think you could add a test for this?
Most of the tests are now in the tests folder (ran with pytest), and some legacy tests are in the unitest folder. Either one of these can be extended or a new one can be written.

Overwrote previous commit to avoid the stern gaze of the linter.

Thanks for the test!
How quickly do you need this in a new release? I will probably do one before end of 2024, if you need the change in a release faster I can do one next week.

Thanks for the merge!
No rush re a release. I'm working off of a local copy currently and can continue to do so.

@pdatkinson v2.6.0 is out and contains the change

@iMichka awesome - thank you!


Edit the resource definition and add match rules, the value of the variable is not committed

Describe the bug
Edit the resource definition and add match rules, the value of the variable is not committed.
Steps to reproduce

Create a resource definition and add three match rules;
Edit the resource definition and add a new match rules.

Result

Environment

Walrus version:
UI: dev-d69ebcc
Server: dev-ee6f735

Fixed.


Update Charge struct

Summary
Repost of #398 using different branch instead of master.
Fixed de/serialization of Charge struct. "refunds" attribute is expandable and is not sent in webhook events as the most minimum size is sent so deserialization fails. This can be seen by running stripe trigger charge.succeeded in the stripe-cli. Implemented #[serde(default)] on attribute. Also added missing attribute stripe_report for fraud_details object.
This is my first pull request ever so I am not sure whether I have done things correctly so feel free to give any suggestions for improvement.
Thanks!
Checklist

[x] ran cargo make fmt
[x] using conventional commits to hightlight user-facing fixes and features

Hey @hzargar2 the PR itself and description are great however any changes to the generated folder will be overwritten every week when the api is updated so I can't accept this change as-is. Updating the code to do what you need would require some changes to the codegen.

After some reflection, I'd prefer a proper change to the codegen end up in a new PR.


Have a cdn up-to-date with master

First thanks for all the hard work that is being put into this framework, it is quite a gem.
Now to the issue: I have spent hours fixing 2 bugs in https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.7/js/materialize.js
Only to then realize they are already fixed in master. Now I have to spend even more time on learning how to compile materialize myself.
I think it would save time if there was a cdn link to a compiled materialize source from latest master commit.

Use http://rawgit.com/

We are planning on releasing bugfixes more often. Sorry for the inconvenience.


<C-[> still broken for certain Cyrillic keyboard layouts

Steps to reproduce

Run gvim -u NONE
Enter Insert mode
Switch to Russian (I'm using the standard/most common ЙЦУКЕН keyboard layout)
Press Ctrl+Cyrillic letter х to attempt to exit Insert mode
Observe how nothing happens

Expected behaviour
Before Vim-8.2.4807, <C-х> was fully equivalent to <C-[> / <Esc>, in any mode ([ and Х are one and the same key).
Version of Vim
9.1.0181
Environment
OS: Windows 10
$TERM: N/A
On Windows, the issue is only present in gVim and does not seem to affect console Vim at all.
Logs and stack traces
No response

Please take a look here and here.

@RestorerZ
Thanks, I've been through those threads and a number of other similar ones.
If I were to set set_keycode_trans_strategy to experimental, that would also require setting up hundreds of explicit <C-*> mappings: <C-ц> would have to be mapped to <C-w>, <C-г> to <C-u> and so on. Clearly that's not the way to go.
The problem with set_keycode_trans_strategy == classic is that it does not quite restore the old (pre-8.2.4807) behavior: in this mode, <C-х> basically does not exist, so you cannot even map it meaningfully (but thankfully all the other Ctrl+Cyrillic letter combinations seem to work out of the box).

Sorry, my bad. It turns out <C-х> does NOT work in Vim-8.

Question is, if it is meaningful feature request then...

I for one would very much like to see this implemented.
One can actually map <C-х> to <C-[> under set_keycode_trans_strategy = experimental, but for that solution to be viable, we would need an equivalent of langmap for Ctrl key bindings.

Thanks to @RestorerZ explanations in PR #14277, right way to
solve this issue seems to be to modify slightly the standard RU
keyboard layout.
Using MSFT "Keyboard Layout Creator" I created custom RU layout
(it is possible to load the existing layout as the starting
point), modified it so that the "small russian ha" (aka VK_OEM_4)
button sends ESC when pressed with CTRL: entered there
U+001b, generated the setup package (named my new layout in
description as "Russian - Custom with ESC on CTRL+HA"), installed
generated setup.exe (requires admin privileges), changed in
system settings which RU layout to use instead of standard one,
reboot - and it works.


update type spec for middleware

Offense:
lib/tesla/middleware/tuples.ex:40: The inferred return type of call/3 ({'error',_} | {'ok',_}) has nothing in common with #{'__client__':=fun(), '__module__':=atom(), '__struct__':='Elixir.Tesla.Env', 'body':=_, 'headers':=#{binary()=>binary()}, 'method':='delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace', 'opts':=[any()], 'query':=[{atom() | binary(),binary() | [{atom() | binary(),binary() | [{_,_}]}]}], 'status':=integer(), 'url':=binary()}, which is the expected return type for the callback of the 'Elixir.Tesla.Middleware' behaviour

The return types from Tesla.Middleware was only Tesla.Env.t. However, Tesla.Middleware.Tuples was returning {:ok, Env.t} | {:error, any()}. I've updated the return spec for this. While I was doing this, I updated some of the docs; line endings and s/transations/transactions.

Hi again :)
I appreciate the changes but please keep them to the minimum - I am working on a 1.0 branch and I'd like to have as few merge conflicts as possible.
The Tuples middleware is a special one and this is a known type error (see #109).
I'd rather keep it as a exception and not change the Tesla.Middleware spec.

@BenMorganIO I'm closing this. Please take a look at 1.0 branch as it solves this issue.


cargo build needs to be run twice to succeed

Hi,
Trying to build one of the examples on a newly created cargo project, cause the build to fail with the (final) error of
--- stderr
fatal: Not a git repository (or any of the parent directories): .git

running git commit followed by cargo build again cause the build to succeed.
I'm not sure if the bug is cargo's or curl-rust's.
full cargo build output: https://gist.github.com/dovreshef/ff4354094ac858c711351a0ec625c58f

Oh that's actually a red herring I think, the real error is:
Could Not Find C:\Users\****\.cargo\registry\src\github.com-1ecc6299db9ec823\curl-sys-0.2.1\curl\winbuild\LIBCURL_OBJS.inc
Could Not Find C:\Users\****\.cargo\registry\src\github.com-1ecc6299db9ec823\curl-sys-0.2.1\curl\winbuild\CURL_OBJS.inc
thread 'main' panicked at 'fs::remove_dir_all(src.join("curl/builds")) return the error The directory is not empty. (os error 145)', C:\Users\****\.cargo\registry\src\github.com-1ecc6299db9ec823\curl-sys-0.2.1\build.rs:267

Do you have some commands available to reproduce this?

I've reproduced the issue, though it is a bit different.
The steps to reproduce:

cargo new issues121 --bin.
curl = "0.3.2" in cargo.toml dependencies.
Replace main.rs with one of the examples from the start page.
run cargo build.

It will fail with the same error. Re-running cargo build again though, without doing anything, will succeed.
Tested on windows 7. rustc details:
Default host: i686-pc-windows-gnu

installed toolchains
--------------------

nightly-i686-pc-windows-gnu
nightly-i686-pc-windows-msvc (default)

active toolchain
----------------

nightly-i686-pc-windows-msvc (default)
rustc 1.12.0-nightly (b30eff7ba 2016-08-05)`

Hm I wonder, but what does your VS installation look like? Is it relatively standard or is there something custom about it?

Standard VS2015 installation.
I've also got the following C++ redistributable components installed:

Is there perhaps any concurrent build happening or some other process trying to access these files?

@alexcrichton not that I could see. I'll try to replicate it in a newly built VM, but that will take a while (a week or so).

Just had to build twice. First time I got this error:
--- stderr
configure: WARNING: Cannot find libraries for IDN support: IDN disabled
configure: WARNING: disabling built-in manual
make: warning: -jN forced in submake: disabling jobserver mode.
make[2]: *** No rule to make target '/tools/frankenlinux/root/.cargo/registry/src/github.com-1ecc6299db9ec823/curl-sys-0.3.12/curl/lib/file.c', needed by 'libcurl_la-file.lo'.  Stop.
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
thread 'main' panicked at '
command did not execute successfully, got: exit code: 2

Enough about the build has changed that I believe this is fixed, so closing.


server.js connection

It does work but sometimes when server starts/restarts I get that error and get disconnected to db
[nodemon] starting node server.js
Server is running on port: 5000
(node:18433) UnhandledPromiseRejectionWarning: MongoNetworkError: connection 0 to crud-shard-00-02-
(node:18433) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:18433) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Hints for Workaround solution
: Check the mongo connection uri
Consider whitelisting your current IP address to the mongo cluster you are working on
Also add


merge from arlac77/npm-package-template-kronos-module

package.json

chore(scripts): add c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 2m && c8 report -r lcov -o build/coverage --temp-directory build/tmp (scripts.cover)
chore(scripts): add ava && ava --timeout 2m (scripts.test)
chore(package): add ^3.3.0 remove ^2.4.0 (devDependencies.ava)
chore(package): remove ^3.2.25 (devDependencies.esm)
chore(package): (ava)

.travis.yml

chore(travis): (jobs.include)
chore(travis): remove 12.15.0 (jobs.include.node_js)
chore(travis): (script)

Codecov Report

Merging #685 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #685   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           1      1
  Lines          30     30
  Branches        9      7    -2
=====================================
  Hits           30     30

Continue to review full report at Codecov.

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

:tada: This PR is included in version 2.1.4 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Is this library supported anymore?

I am having issues with an iPhone 7 specifically. Everything runs perfectly in simulator then on device it never invokes the .play() callback. Its very strange. I see theres other forks with active maintenance.  Are the current contributors active? If I were to debug/fix my issues (assuming its a bug) would it be merged?

I am seeing this exact same issue. .play never gets called on the device. Simulator is 💯.

Do you have multiple players in your project by chance?

I don't. I am using it alongside react-native-audio to playback voice recordings.

I am too. Hmmm. Perhaps recorder isn't releasing the file in time?
--
Jim ForCy
On February 7, 2017 at 4:57:59 PM, Matthew Oaxaca<EMAIL_ADDRESS>wrote:

I don't. I am using it alongside react-native-audio to playback voice
recordings.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/zmxv/react-native-sound/issues/102#issuecomment-278172094,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAGpivAebZV06YrwpQ7Ax0Xbn3onmmY_ks5raPb3gaJpZM4L5GiS
.

It could be, I dumped the container just to make sure it was recording and it played back on my mac. I will inject a static file to test if its a release issue.

This ended up working for me: https://github.com/jsierles/react-native-audio/pull/155
Heads up it seems like it still isn't on npm so you'd need to install from master.

Sorry for the lack of maintenance in the past few months.
I've just added @benvium as a collaborator who will help merge some of the outstanding PRs. I myself will also be more active when I get more time.

@zmxv Ty

IT WORKS !!!!!!! Thank you @jimthedev pulling both from master fixed it.

@moaxaca In case do you do decide to contribute to this repo, I am actively working on this repo now.
At present I'm going through backlog of tickets and PRs. I be will merging useful, working PRs in.

Closing this ticket as the answer to the headline is 'yes!'.

@benvium sounds good.

Is @benvium going to have npm release access?

@jimthedev I've asked @zmxv for this.

Ok great. Being able to refer to releases instead of master would be very helpful. Ideally semantic release would be great but just being able to get off master at this point would make tackling issues easier.

@jimthedev Yep, I'll semver this for sure.


[Needs verification] scroll strategy performs bad in FireFox and IE relative to other implementations

Hello!
I've tested your plugin and there is one Problem.
Actually the "scroll" strategy is just faster in case of loading performance.
The "object" strategy is much faster in runtime.
I've created a fiddle: https://jsfiddle.net/930mvaux/4/
The first element has the object strategy and the second has the scroll strategy.
If you will start resizing both elements, you will notice how mich faster the object strategy actually is.
Maybe you have some improvements.
Best regards,
Sora

Hi @KingSora. Have you profiled it? I can't notice any performance difference between both methods by simply resizing the elements on latest Chrome (v53) for Mac.

I've tested it on the latest Firefox / Edge / IE. Chrome seems to be fine on windows too.

Well, I've found a plugin which is using the "scroll strategy" too, but it has way more performance than yours (testet in Firefox 49.0.1).
Your Plugin: https://jsfiddle.net/930mvaux/1/
Other Plugin: https://jsfiddle.net/930mvaux/5/
Maybe you can figure out what is causing the performance issues in Firefox.
(I think its the fact, that youre resizing the "expand" div every time the div is expanding)
Best regards.

Hi and thanks for the detailed bug report, it's much appreciated :)
I'll look into it. I think expanding the div is necessary in order to handle render-tree detaching (e.g., display:none correctly). It's great that you have found a similar approach so that I can have a look at it.
I'll investigate this further, and keep you updated on the progress.

Hi again.
I've been profiling the samples you provided in FireFox 47, but when I benchmark the two scroll approach implementations I get roughly the same result: ~30ms for a resize.
Could you describe more in depth how you perform the benchmarks?
Regarding resizing the expand div, it's actually mandatory to do so in order for the algorithm to work. I remembered it wrong when I said it was due to handling display:none before.
For the record, the other implementation also resizes the divs on resizes https://github.com/ShimShamSam/ResizeListener/blob/master/ResizeListener.js#L211

I am just resizing the blue div with the mouse really fast in all directions. You will notice the lags in your plugin (FPS drops to 1-2 in total). When you test it the other plugin the FPS drops too, but not that much as they drop in your Plugin. Maybe I am able to record this.

Did you manage to record it? Could you also try removing the logic in the onResize callback, so that  it doesn't access the offsetWidth/offsetHeight and see if the problem still exists?

FYI The article linked from the readme (which i assume means it is reasonably reliable 🙂) has a performance chart in section 5.1 that shows object approach is faster at runtime across all browsers tested:
https://arxiv.org/pdf/1511.01223v1.pdf
Indeed in FF the difference is the largest at about 2.3x according to the article:

Keep in mind that the article is advocating responding to element dimensions for many (hundreds) of elements being dynamically modified (potentially injected/removed in an SPA setting) and resized. i.e. they're proposing using this as a significant or complete replacement of global media queries, not just an ad-hoc technique for tweaks here and there (which might change your mind about whether the tradeoff of object vs. scroll is a good one).
From the article (referring to using objects):

This approach has good browser compatability and excellent resize
detection performance, but imposes severe performance
impacts during injection since object elements use a significant
amount of memory as shown in Section 5.1.

The problem with the object method wasn't the runtime performance (which they said was excellent) but that there were two deal breakers for their vision of dimension-aware-elements-everywhere:

The injection performance is OK at first but scales badly past a few dozen elements
There is a memory overhead of ~0.55mb per object that doesn't exist (memory impact of the scroll divs was so small they failed to measure it) with the scroll method

@thedavidmeister
Hi, and thank you for your comment. Yes, I am aware of that the object approach performs better at detection. However, only slightly so if you consider few elements (when I do manual testing in FF 50 I get ~30ms vs ~20ms). My reasoning has been that the normal case for resize detection is that the elements doesn't usually resize and therefore the installation time is more important. If you do have a case where you know that there are few elements that will resize often, perhaps it is more suitable to use the object approach (which is why I allow to choose both with the "strategy" option). I know that the object approach is marked as deprecated, but it is still supported and works just fine. If there are real use cases for it, I should perhaps unmark it as deprecated.
@KingSora I think this library seems to perform worse in your fiddle due to your script accessing element.offsetWidth/offsetHeight in the callback. If you comment that out I think it will perform as good as the other lib you linked to. The other lib is actually sending some additional resize-data with the callback, which I think is a good solution to this. If you could verify this theory, I would happily implement this in this library as well :)

@wnr yeah i tend to agree that installation time is more important. IMO it could be clearer in the readme, etc. about what the 37x faster claim refers to specifically and yeah, i don't think the object method should really be deprecated as it is a perfectly reasonable tradeoff to want to make.
elements can resize very often in a SPA setting where page layouts are highly dynamic, I don't think you can assume that the calculations are being triggered rarely.

It seems like the problem was fixed.
My Firefox has now the version 52.0 and I cant reproduce the bug anymore.
May someone has a older FF version (between 45 and 52) to check in which version this behavior was fixed?

Yeah, it seems to have been fixed. I'll close this. Thanks for the report 👍

There are still performance issues under ie11, you can see the window keeps shaking.


Make application_process optional to match OR 1.0

Coverage remained the same at 99.5% when pulling 5f9ece43ea64fff5f214421e7a8c9406c36fe728 on update-required-fields into 81d0ec9f9dea95e4eb36f4bc5da11292ff9a8841 on master.


Added Create endpoint for Inventory.

Added support for the Create endpoint.
Added relevant happy and sad path tests.

My changes achieve 100% test coverage in the routes.py file.


Fix playbook 'Watchlist-InformSubowner-IncidentTrigger' prerequisites

Change prerequisites to be a single item with custom formatting and line breaks, since having multiple items in prerequisites automatically adds line numbers in the portal

@lior-tamir , please review when you can

@dicolanl, @Yaniv-Shasha - this PR has been opened for a while and approved by Lior Tamir who added this template and owns the playbook gallery scenario. Can one of you please merge it?


Isn't working anymore - Start button appears multiple times

None of the buttons work

Oddly enough, the first button asks for the wait time, but still doesn't work

Hm....Can you tell me if this happens again? If it does, make sure you apply the updated script I will upload in a bit when it does happen.

Yep, still there, I'll try the new version

Sorry, it's kind of delayed since I have a lot going on right now. I'll get to it.

Yeah, take your time. This repo has really helped, thanks for your efforts.

Any progress? Sorry to bother you.
If you explain how it works I can try and fix it.

No, I really thought I would have more time to look at this since it was literally winter break, but I've been caught up with other things. Give me until January 31.

Ok I FINALLY pushed the update. It should be fixed now, but if it happens again reopen it.


Remove password from commit history

Although you removed the password in a subsequent commit, the password is still retained in the commit history. In order to remove the password from that point in the commit history, I rebased forward from that commit with an edit directly to "adding config file".
Your password is currently publicly exposed. Please take appropriate measures including changing your passwords.

Thank you @sschadwick


Wrong month shown in daliserver log

This is very odd!  (But apparently harmless.)
The log entries from daliserver are being made with the wrong month.  Year, day and time are all correct.  An example from /var/log/daliserver.log today:
[2019-02-28 13:09:39] INFO Starting daliserver
[2019-02-28 13:09:39] INFO Kernel driver is active, trying to detach
[2019-02-28 13:09:39] INFO Server ready, waiting for events

daliserver was started with the command line /usr/bin/daliserver -l <IP_ADDRESS> -f /var/log/daliserver.log -u 2:7

Ouch!
RTFM would have helped.
I'm using localtime_r to format the date: https://github.com/onitake/daliserver/blob/master/lib/log.c#L69-L70
			localtime_r(&now, &nowtm);
			snprintf(datefmt, 32, "[%d-%02d-%02d %02d:%02d:%02d] ", nowtm.tm_year + 1900, nowtm.tm_mon, nowtm.tm_mday, nowtm.tm_hour, nowtm.tm_min, nowtm.tm_sec);

And the manual page says:
               int tm_mday;   /* Day of the month (1-31) */
               int tm_mon;    /* Month (0-11) */
               int tm_year;   /* Year - 1900 */

The year is 1900-based, the day 1-based and the month 0-based. Very consistent...


Updated patch for openssl

Added new extensions to enum tlsext_index_en in ssl/ssl_locl.h according to comments in source code - now tests in debian package pass without errors.

I'll take a look.

This broke the patching for me
patching file include/openssl/tls1.h
patching file ssl/statem/extensions.c
can't find file to patch at input line 45
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -upr openssl-1.1.1d_orig/ssl/ssl_locl.h openssl-1.1.1d/ssl/ssl_locl.h
|--- openssl-1.1.1d_orig/ssl/ssl_locl.h  2020-10-26 18:19:43.157168940 +0300
|+++ openssl-1.1.1d/ssl/ssl_locl.h       2020-11-10 18:49:14.150574957 +0300
--------------------------

It was working fine, is there any other change required for this to work ?

@kedare , what version of openssl are you using?

OpenSSL 1.1.1

Please be more specific. My patch is for 1.1.1d, which is also 1.1.1.
Version is specified in include/openssl/opensslv.h:
openssl-1.1.1d_orig $ grep OPENSSL_VERSION include/openssl/opensslv.h
# define OPENSSL_VERSION_NUMBER  0x1010104fL
# define OPENSSL_VERSION_TEXT    "OpenSSL 1.1.1d  10 Sep 2019"

yes, @kedare , can you please give more details, system wide or for the full build process.
This passed the travis tests and I've also tested manually.
Thanx.

I am using it on top of the openresty/opensresty:<IP_ADDRESS>-5-buster image version, and building over the OpenSSL_1_1_1-stable branch of the https://github.com/openssl/openssl repository.
And for the openresty part, I am building the <IP_ADDRESS> source code (directly from the source .tar.gz)
This is the failing step :
RUN git clone --depth 1 https://github.com/SpiderLabs/ModSecurity-nginx.git && \
    curl -O https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz && \
    tar -xf openresty-${OPENRESTY_VERSION}.tar.gz && \
    rm openresty-${OPENRESTY_VERSION}.tar.gz && \
    git clone https://github.com/openssl/openssl.git && \
    cd /openssl && \
    git checkout OpenSSL_${OPENSSL_VERSION}-stable && \
    cd / && \
    git clone https://github.com/fooinha/nginx-ssl-ja3.git && \
    cd /nginx-ssl-ja3 && \
    git checkout ${NGINX_JA3_COMMIT} && \
    cd /openssl && \
    cp /nginx-ssl-ja3/patches/openssl.extensions.patch . && \
    patch -p1 < openssl.extensions.patch && \
    cd /openresty-${OPENRESTY_VERSION}/bundle/nginx-1*/ && \
    cp /nginx-ssl-ja3/patches/nginx.latest.patch . && \
    patch -p1 < nginx.latest.patch && \
    cd /openresty-${OPENRESTY_VERSION}

OPENRESTY_VERSION=<IP_ADDRESS>
OPENSSL_VERSION=1_1_1

(I added the current checkout as workaround the nginx-ssl-ja3)

Seems like in openssl developers have changed name of that file from ssl_locl.h in 1.1.1d to ssl_local.h in 1.1.1e.
I'll create new patch for new versions of openssl, for now you can fix the patch yourself. I do not recommend using old version of this patch because number of extensions matters, and it's possible that old patch introduces memory leaking or out-of-bounds memory access, or at least it breaks some functionality (otherwise the tests wouldn't have failed).

https://github.com/fooinha/nginx-ssl-ja3/pull/23

Thanks, indeed it's a temporary workaround, I will use your version once merged :)


Chat session in Playground does not refresh.

Bug Description
The chat session in the playground does not automatically refresh. I can submit a question to the chatbot and hit send, but the chat session will not show me the response, until I switch to another window and switch back and/or close playground and re-open it. In other words, it seems it only refreshes when the browser window gets refocused.  Tried this on Mozilla and Brave (chrome)
Reproduction

In a chatbot workflow, open playground
type a question, hit send
one the send button stops showing "stop", no response is displayed in the chat.
Navigate away and go back to your browser window and/or leave playground and go back in, and now you can see the response.

Expected behavior
Upon hitting send, a response should automatically be displayed in the chat session.
Who can help?
No response
Operating System
Ubuntu LTS 20.24
Langflow Version
1.1.0
Python Version
3.12
Screenshot
No response
Flow File
No response

hey @greenmotion, I've tried the main branch and couldn't reproduce the issue, how are you running langflow exactly? are you using docker or something similar?

Thank you for your contribution! This issue will be closed. If you have any questions or encounter another problem, please open a new issue and we will be ready to help you.


XLSForm downloads are empty

Pretty important bug to fix quickly.
The XLSForm links don't work.  It's an excel with a link in it.
Also we don't want to time stamp the xlsforms.  The downloaded file should remain the same as the formid.

Related: Some forms aren't showing up (like my field_visit_2 form). I'm
guessing this was a form we didn't store back in the day... should people
be required to re-upload, or shown a message of some sort?

for now, forms that were not uploaded silently redirect, new issue for how we want to change this, https://github.com/modilabs/formhub/issues/86


Clean reflection of many-to-many relations.

I'm having trouble modelling many-to-many relations which reflect a straightforward GraphQL interface.
In the documentation, a schema like:
create table post (
  id serial primary key,
  author_id int non null references user(id),
  headline text,
  body text,
  …
);

can query relations like so:
{
  postNodes {
    nodes {
      headline
      body
      author: userByAuthorId {
        name
      }
    }
  }
}

Which works fine for one-to-many relations. However, I'm trying to write a schema which would, for example, allow a post to have many authors and still allow the same kind of straightforward queries:
{
  postNodes {
    nodes {
      headline
      body
      authors: someQueryName {
        name
      }
    }
  }
}

Using a relation table provides a postAuthorsByPersonIdAndPostId which seems tricky to use properly, and though I think I could write a query function providing computed columns, I'm not entirely sure that's the right way to proceed.
Then again, I'm basing my hacks on code from the kitchen sink example and integration code. I haven't found much mention of many-to-many relations here yet. 😢

Yep, this is a good space to explore. A computed column procedure (in this case) would actually work fairly well. If you write a procedure that returns setof person the procedure will return a connection. See the docs for connection procedure here. However, this is a common enough case that we should probably add automatic support for this. For the forum example we could add the concept of “stars” or “favorites” that exhibit a many-to-many relationship between posts and people.
The implementation for this would probably require detecting tables that have two one-to-many relationships and adding extra fields on the corresponding many-to-one tables (ideas on how this could be implemented would be great!).
I’m currently working on a refactor of PostGraphQL that will allow (in the future) for potential support of other database like MySQL and CockroachDB, support for other protocols like REST, richer authentication and subscriptions, and support for easy extension mechanisms. I’ll see how simple it is to roll out better support for many-to-many relationships with that. If it’s not easy I’ll try to get it implemented soon after.
In the mean time, a well written procedure should work great! If it doesn’t, that’s a bug in PostGraphQL and should be fixed. If you wanted to write a PR adding “favorites” to the forum example with a procedure to make selecting many-to-many easier, I’d gladly merge :blush:

An update, this feature is actually not super easy to add and I’m not convinced there are not a lot of people who would benefit especially when a set returning Postgres function is an option. For now, I definitely recommend using a procedure. If there is enough interest in this feature, and/or a community PR I’ll reprioritize :+1:

It took a while to get back here, sorry. Work, work, work…
I'm not expecting anyone to just add things for me, but was quite surprised more people didn't need such a thing. Posts with custom tags, for example, would warrant this.
However, I've been reading through the new schema readme in the forum example, which is in itself a wonderful course on how to write Posgres schemas. I see now that if I wrote a procedure just the right way, it would be added to a corresponding GraphQL type, and that's really really cool.
I had briefly thought that like some of the other features, Postgraphql could detect the junction tables  which indicate many-to-many relationships, and I might work on that later.
Until then however, now that I understand procedures better, I can move back to using and enjoying Postgraphql :)

@engleek Don't be surprised, but actually I didn't expect this to work seamlessly if you don't ask correctly through tie table in graphql.. I expect that 1:n ties works and 1:n as well so you just need walk through this intermediate table as well as you need in SQL with joins. I'm wrong?

@calebmer Generic solution is not easy and it can not make sense sometimes..
And you have still purely generic solution.

I suggest this ticket is just a documentation task -- how do we do this with a procedure?

Some pseudo-sql that may answer the question:
create table post (
  id serial primary key,
  headline text,
  body text
);
create table author (
  id serial primary keym
  name text
);
create table post_author (
  post_id integer references post,
  author_id integer references author,
  primary key (post_id, author_id)
);

create function post_authorsByPostId(p post) returns setof author as $$
  select author.* from author inner join post_author on (post_author.author_id = author.id) where post_author.post_id = p.id;
$$ language sql stable;

Untested, tweak as necessary

I think it'd be cool feature.
As a reference - I'd recommend https://graph.cool
You can simply create many-to-many relation like:

And then set relation name:

and then query it like:
query {
  user {
    tasks {
      id
    }
  }
}

Note that graph.cool is hiding it's abstraction, so it might have some join tables created under the hood.
What do you think about having join table 'marked' somehow so postgraphql knows it's relation table and is able to add proper query fields.

:+1: for computed columns.  You're defining the many-to-many in graph.cool, just with a wysiwyg.  Therefore, we have to define the many-to-many in postgraphql, and the way we do that is with a computed column.  Computed column procedures also gives us much more flexibility.

Has there been any more definitive solution on how to approach many-to-many relationships with postgraphile?
I'm pretty new to the DBing world and many-to-many relationships / permissions (on who can see what data in graphiql/graphql) are the only two things keeping me from using this package 100% all of the time.

Here is something I cobbled together to automate creation of the functions Postgraphile currently needs to glue many-to-many tables together until this issue gets resolved:
BEGIN;

CREATE TEMPORARY TABLE plurals("from" text, "to" text);
-- INSERT INTO plurals VALUES ...;

CREATE FUNCTION make_many_to_many(
    many_schema text, many_table text, many_column_1 text, many_column_2 text,
    schema_1 text, table_1 text, pk_1 text,
    schema_2 text, table_2 text, pk_2 text)
RETURNS void AS $$
DECLARE
    plural_2 text;
BEGIN
    SELECT "to" FROM plurals WHERE "from" = table_2 INTO plural_2;
    IF plural_2 IS NULL THEN
        plural_2 := table_2 || 's';
    END IF;

    EXECUTE format('CREATE OR REPLACE FUNCTION %I.%I(a %I.%I) ', schema_1, format('%s_%s', table_1, plural_2), schema_1, table_1)
         || format('RETURNS setof %I.%I AS $f$ ', schema_2, table_2)
         || format('SELECT %I.%I.* FROM %I.%I ', schema_2, table_2, schema_2, table_2)
         || format('INNER JOIN %I.%I ON %I.%I.%I = %I.%I.%I ', many_schema, many_table, schema_2, table_2, pk_2, many_schema, many_table, many_column_2)
         || format('WHERE %I.%I.%I = a.%I; ', many_schema, many_table, many_column_1, pk_1)
         || '$f$ LANGUAGE SQL STABLE';
END $$ LANGUAGE plpgsql;

CREATE FUNCTION add_many_to_many(schema_name text, table_name text)
RETURNS void AS $$
DECLARE
    fk1 RECORD;
    fk2 RECORD;
    count integer;
BEGIN
    CREATE TEMPORARY TABLE fks AS
        SELECT kcu.column_name,
            ccu.table_schema foreign_table_schema,
            ccu.table_name foreign_table_name,
            ccu.column_name foreign_column_name
        FROM information_schema.table_constraints tc
        INNER JOIN information_schema.key_column_usage kcu
            ON tc.constraint_name = kcu.constraint_name
            AND tc.table_schema = kcu.table_schema
        INNER JOIN information_schema.key_column_usage kcu2
            ON kcu2.column_name = kcu.column_name
            AND kcu2.table_name = kcu.table_name
            AND kcu2.table_schema = kcu.table_schema
        INNER JOIN information_schema.table_constraints tc2
            ON tc2.constraint_name = kcu2.constraint_name
            AND tc2.table_schema = kcu2.table_schema
        INNER JOIN information_schema.constraint_column_usage ccu
            ON ccu.constraint_name = tc2.constraint_name
            AND ccu.table_schema = tc2.table_schema
        WHERE tc.constraint_type = 'PRIMARY KEY'
            AND tc.table_schema = add_many_to_many.schema_name
            AND tc.table_name = add_many_to_many.table_name
            AND tc2.constraint_type = 'FOREIGN KEY';

    SELECT COUNT(*) FROM fks INTO count;

    IF count = 2 THEN
        SELECT * FROM fks LIMIT 1 INTO fk1;
        SELECT * FROM fks OFFSET 1 LIMIT 1 INTO fk2;

        EXECUTE make_many_to_many(
            schema_name, table_name,
            fk1.column_name, fk2.column_name,
            fk1.foreign_table_schema, fk1.foreign_table_name, fk1.foreign_column_name,
            fk2.foreign_table_schema, fk2.foreign_table_name, fk2.foreign_column_name);
        EXECUTE make_many_to_many(
            schema_name, table_name,
            fk2.column_name, fk1.column_name,
            fk2.foreign_table_schema, fk2.foreign_table_name, fk2.foreign_column_name,
            fk1.foreign_table_schema, fk1.foreign_table_name, fk1.foreign_column_name);
    END IF;
    DROP TABLE fks;
END $$ LANGUAGE plpgsql;

SELECT add_many_to_many(table_schema, table_name) FROM information_schema.tables WHERE table_schema = 'public';

DROP FUNCTION make_many_to_many;
DROP FUNCTION add_many_to_many;
DROP TABLE plurals;
COMMIT;

As can hopefully be seen, this scans for tables in the public schema that have two-column composite primary keys where the PK columns have FK references, which should handle most many-to-many tables. Insert to the plurals table as appropriate to handle any irregular pluralisations in the generated function name.
I’m not a Postgres expert, so there are probably some more optimal ways to do this, but this is working acceptably for the database I’ve been using to experiment with Postgraphile. I hope it is useful for others.

@csnover, could you provide an example of tables to which this would apply ?

@jide The same as in https://github.com/graphile/postgraphile/issues/91#issuecomment-308664225.

Ok, thanks !

Interestingly, with postgraphile 4, tables having a many to many relation from a two-column composite primary keys table already expose related content in generated queries. No need for a ad hoc function.

Interestingly, with postgraphile 4, tables having a many to many relation from a two-column composite primary keys table already expose related content in generated queries. No need for a ad hoc function.

@jide Not sure what are you talking about, can you provide an example? I definitely don't see any generated query to get list of related entities without having to browse through the join table...

I just released a plugin for this: https://github.com/graphile-contrib/pg-many-to-many
Requires<EMAIL_ADDRESS>

Superstar, @mattbretl! Please add it here (near the top!): https://www.graphile.org/postgraphile/community-plugins/

@mattbretl I'm exploring using that plugin with graphile, but I don't see any extra queries in my graphql schema?
I have two tables, tabletop and user which have a many-to-many relation:
  tabletop_id int
    REFERENCES dt_public.tabletop(tabletop_id)
    ON UPDATE CASCADE ON DELETE CASCADE,
  user_id int
    REFERENCES dt_public.user(user_id)
      ON UPDATE CASCADE ON DELETE CASCADE,
  CONSTRAINT tabletop_user_id PRIMARY KEY (tabletop_id, user_id),
  CONSTRAINT user_tabletop_id UNIQUE (user_id, tabletop_id)

Does your plugin allow me to get a list of users by tabletop_id?
Something like
tabletopMembershipsByTabletopId
or
tabletopMembershipsByUserId
I only see the following on localhost:5000/graphiql
allTabletopMemberships
allTabletops
allUsers
node
nodeId
query
tabletop
tabletopByTabletopId
tabletopMembership
tabletopMembershipByTabletopIdAndUserId
tabletopMembershipByUserIdAndTabletopId
user
userByUserId
userByUserName

After running:
postgraphile -c "postgresql://user:pass@host:port/database" --schema app_public --append-plugins "@graphile-contrib/pg-many-to-many" --enhance-graphiql

Can be closed I guess.

Closing in favour of https://github.com/graphile-contrib/pg-many-to-many plugin.


Some question about the datasets

I have to say, this is an excellent model!
but I have some questions about the datasets

I tried to get the co-purchase graphs AMAZON COMPUTERS and AMAZON PHOTO,but I just find this https://nijianmo.github.io/amazon/index.html,I don't know how to get these two datasets
and this dataset "co-author graph COAUTHOR CS",which from "Microsoft Academic Graph dataset",I want to know how to deal with it
THANKS!

Thank you for your interest in our research!
Our implementation is based on PyTorch geometric, which makes all of the datasets from the paper available:

Cora, Citeseer, and PubMed
Coauthor CS
Amazon Computers and Photo

In our implementation we use our own get_dataset function to load these datasets, as demonstrated in gdc_demo.ipynb.


add support for Fable & Idris

Want to try to rebase? The CI failures on master were fixed recently.

I hope this worked 🤞


added tokenization file

added tokenization file for codegeex2-6b in pytorch-models

Please also update readme about this file


Module not found: Error: Cannot resolve module 'react-router/lib/BrowserHistory' in...

I ran npm start.
ERROR in ./js/components/TodoRouter.jsx
Module not found: Error: Cannot resolve module 'react-router/lib/BrowserHistory' in F:\_vms\HomesteadCode\_live\misc\redux-react-router-todomvc\js\components
 @ ./js/components/TodoRouter.jsx 27:36-78

This was caused by react-router 1.0.0-beta4. Until the documentation is improved I've locked the app to beta3.

Thank You :) It works now.


 Nonexistent function "auth_user" in base "Node (gamejolt_api.gd)")
Is there something I'm doing wrong?

Turns out that the GamejoltApi is a custom API I was working on before I found this plugin, I forgot to undo the autoload on it


Print the simple batch report if no log fetch to prevent misunderstand

Why are the changes needed?

With yarn-cluster mode, if spark.yarn.submit.waitAppCompletion is false and kyuubi-ctl wait completion is true, we need still print some simple batch report to prevent misunderstand.
The batch report format refer spark-submit log.
Application report for <ApplicationID> (state: RUNNING)

How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[x] Run test locally before make a pull request

Codecov Report

Merging #3949 (9580277) into master (8305d80) will decrease coverage by 0.08%.
The diff coverage is 0.00%.

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

@@             Coverage Diff              @@
##             master    #3949      +/-   ##
============================================
- Coverage     51.90%   51.82%   -0.09%
  Complexity       13       13
============================================
  Files           521      521
  Lines         28843    28807      -36
  Branches       3864     3856       -8
============================================
- Hits          14972    14930      -42
- Misses        12494    12505      +11
+ Partials       1377     1372       -5

Impacted Files
Coverage Δ

...rg/apache/kyuubi/ctl/cmd/log/LogBatchCommand.scala
60.93% <0.00%> (-3.00%)
:arrow_down:

...g/apache/kyuubi/session/KyuubiSessionManager.scala
88.13% <0.00%> (-5.15%)
:arrow_down:

...g/apache/kyuubi/operation/BatchJobSubmission.scala
74.64% <0.00%> (-3.79%)
:arrow_down:

...apache/kyuubi/engine/JpsApplicationOperation.scala
77.41% <0.00%> (-3.23%)
:arrow_down:

.../apache/kyuubi/server/api/v1/BatchesResource.scala
69.00% <0.00%> (-3.00%)
:arrow_down:

...ache/kyuubi/server/KyuubiRestFrontendService.scala
82.95% <0.00%> (-0.75%)
:arrow_down:

...he/kyuubi/ha/client/etcd/EtcdDiscoveryClient.scala
68.50% <0.00%> (-0.56%)
:arrow_down:

...apache/kyuubi/session/KyuubiBatchSessionImpl.scala
90.66% <0.00%> (-0.13%)
:arrow_down:

...cala/org/apache/kyuubi/server/ui/JettyServer.scala
86.95% <0.00%> (ø)

...in/scala/org/apache/kyuubi/config/KyuubiConf.scala
97.50% <0.00%> (+0.06%)
:arrow_up:

... and 4 more

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

thanks, merged to master and 1.6.2


fix: Quickly clicking do it for me button shows errors during onboarding

Description
Fix issue where quickly clicking the do it for me button attempts to create multiple input widgets with the same name in onboarding
Fixes #4808
Type of change

Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?
Manually
Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes

Test coverage results :test_tube:
:red_circle: Total coverage has decreased
// Code coverage diff between base branch:release and head branch: fix/input-widget-step

Status
File
% Stmts
% Branch
% Funcs
% Lines

:red_circle:
total
54.85 (-0.01)
36.62 (-0.02)
34.25 (0)
55.38 (-0.01)

:green_circle:
app/client/src/components/editorComponents/Onboarding/Helper.tsx
43.37 (0.16)
34.23 (0)
0 (0)
46.75 (0.08)

:red_circle:
app/client/src/sagas/OnboardingSagas.ts
17.22 (-0.17)
1.33 (-0.06)
11.11 (0)
17.61 (-0.11)

:red_circle:
app/client/src/selectors/commentsSelectors.ts
78.23 (-1.61)
54.41 (-2.94)
70 (0)
84.09 (-2.27)

/ok-to-test sha=f86a4bd


Prevent initializing ssh.ClientConfig multiple times

This patch initiailzes ssh.ClientConfig once only and provides all
available ssh.AuthMethod to it. That says, if both SSH private key
and SSH agent is available, they will all be used in the SSH
authentication process.

LGTM
Thanks for the PRs @mrkschan


FilterExpression in query

Hello,
Is there a way to add an FilterExpression when I query a dynamodb table ?
Thanks

Hi @obazoud - sorry, I missed this question. No, there isn't. DynamoDB filters are only executed client side (not cloud side) and in my experience it's easier to use regular code (e.g. a .filter()) on the query / scan result, rather than use DDB filters. To my knowledge there's no performance drawback in doing so.


Where is the pushFront command defined?

I couldn't find the pushFront command to be defined anywhere.
https://github.com/Areloch/Torque3D/blob/BaseGameTemplate/Templates/BaseGame/game/core/parseArgs.cs#L80

original def to clone: https://github.com/GarageGames/Torque3D/blob/c83efa59e0a11fc15c68afaf106807643191ac6f/Templates/Empty/game/core/parseArgs.cs#L26

Copied this on over.


Add files via upload

Add files via upload plz
Hi, Philipto
You use wrong host name to check my school mail server
The currect domain was live.asia.edu.tw.
https://github.com/JetBrains/swot/pull/7895#issuecomment-597460892
Clould you check with currect domain again?
Thanks for your help
Institution/School Name
Asia University, Taiwan
Instiution/School Website
https://www.asia.edu.tw/
Email Users
Please place an x between the square brackets if yes

[X] Students
[ ] Academic/Teaching Staff
[ ] Other/Support Staff
[ ] Alumni

Education Levels
e.g<EMAIL_ADDRESS><EMAIL_ADDRESS>Please place an x between the square brackets if yes

[ ] Post-graduate research
[ ] Graduate School
[X] College (University) or Undergraduate School or equivalent
[ ] Community College or equivalent
[ ] High School or equivalent
[ ] Elementary School or equivalent

Institution/School Name
National Taitung University
Instiution/School Website
https://www.nttu.edu.tw/
Email Users
Please place an x between the square brackets if yes

[X] Students
[ ] Academic/Teaching Staff
[ ] Other/Support Staff
[ ] Alumni

Education Levels
e.g<EMAIL_ADDRESS><EMAIL_ADDRESS>Please place an x between the square brackets if yes

[ ] Post-graduate research
[ ] Graduate School
[X] College (University) or Undergraduate School or equivalent
[ ] Community College or equivalent
[ ] High School or equivalent
[ ] Elementary School or equivalent

@wade9058 I have to close this request without merging, because you requested to add a non-existent domain to this repository: Host live.asis.edu.tw not found: 3(NXDOMAIN) Please ensure that you are familiar with this repository rules located at the bottom of this page and submit a new request with the correct information. Thank you for understanding!

@wade9058 I have to close this request without merging, because you requested to add a non-existent domain to this repository: Host live.asis.edu.tw not found: 3(NXDOMAIN) Please ensure that you are familiar with this repository rules located at the bottom of this page and submit a new request with the correct information. Thank you for understanding!

Hi, Philipto
You use wrong host name to check my school mail server
The currect domain was live.asia.edu.tw.
Clould you check with currect domain again?
Thanks for your help


[feature request] cavebot wait milliseconds

i'm in a situation where i would like to wait for ~100 milliseconds or so (aka 0.1 seconds),
the closest thing i can do is to wait 1 second (1000 milliseconds) with the WaitX command
a "WaitMS 100" would be nice (eg wait 100 milliseconds), or perhaps a "WaitX 0.1" (wait for 0.1 seconds)

awesome thing is, support for fractional seconds was only a 2-line patch to WaitX :)

i made a pull request implementing this functionality, see PR #105
the syntax in that PR is
WaitX 0.1  (wait 100 milliseconds)
WaitX 0.5 (wait 500 milliseconds)
WaitX 1.5 (wait 1 second + 500 milliseconds)
and so on~


chore(pepicons.com): move lp to figma / ランディングページをfigmaへ移動

https://www.hypermatic.com/tutorials/how-to-convert-and-import-adobe-xd-to-figma-in-seconds-using-convertify/


Keyboard Page Carousel Navigation

Bug Description
There is no way to navigate pages via keyboard shortcut.
Expected Behaviour
I should be able to navigate pages via left and right arrows.
@samitron7 @pbakaus  to confirm keyboard shortcuts. See this convo for details.
https://docs.google.com/spreadsheets/d/17pZLd0faYZc9Xt7mG1KYtaZ0Krn5ppThIisz3TOsv8w/edit?ts=5e6082d2#gid=0
Steps to Reproduce

Screenshots

Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance Criteria
QA Instructions

Is feature is already working on the editor. Closing ticket.

While we can navigate between pages in the carousel using arrows once you've focused on a page, there is no global keyboard shortcut to do so (e.g. CMD+LeftArrow / CMD+RightArrow to go to previous/next page). Such a shortcut is also not listed at https://docs.google.com/spreadsheets/d/1VNv8O5SnlqZfgYXo5ua2mCc-MWTN9ow6OtYWxml5Ka0/edit#gid=0, but maybe we want one?
cc @o-fernandez