workflow is in running status after initcontainer failed

Pre-requisites

[X] I have double-checked my configuration
[X] I can confirm the issues exists when I tested with :latest
[ ] I'd like to contribute the fix myself (see contributing guide)

What happened/what you expected to happen?
When i submit a workflow with an initcontainer and if that initcontainer fails workflows stuck at running state. I expect workflow to fail.
Version
v.3.4.5
Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: init-fail
spec:
  entrypoint: init-container-example
  templates:
  - name: init-container-example
    container:
      image: alpine:latest
      command: ["echo", "bye"]
      volumeMounts:
      - name: foo
        mountPath: /foo
    initContainers:
    - name: hello
      image: alpine:latest
      command: ["abcd"]
      mirrorVolumeMounts: true
  volumes:
    - name: foo
      emptyDir: {}

Logs from the workflow controller
time="2023-03-20T19:35:43.494Z" level=info msg="Processing workflow" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:43.497Z" level=info msg="Updated phase  -> Running" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:43.498Z" level=info msg="Pod node init-fail initialized Pending" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:43.524Z" level=info msg="Created pod: init-fail (init-fail)" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:43.524Z" level=info msg="TaskSet Reconciliation" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:43.524Z" level=info msg=reconcileAgentPod namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:43.530Z" level=info msg="Workflow update successful" namespace=henkan-argo-test-flows phase=Running resourceVersion=250900670 workflow=init-fail
time="2023-03-20T19:35:46.527Z" level=info msg="Processing workflow" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:46.528Z" level=info msg="Task-result reconciliation" namespace=henkan-argo-test-flows numObjs=0 workflow=init-fail
time="2023-03-20T19:35:46.528Z" level=info msg="node changed" namespace=henkan-argo-test-flows new.message=PodInitializing new.phase=Pending new.progress=0/1 nodeID=init-fail old.message= old.phase=Pending old.progress=0/1 workflow=init-fail
time="2023-03-20T19:35:46.528Z" level=info msg="TaskSet Reconciliation" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:46.528Z" level=info msg=reconcileAgentPod namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:46.535Z" level=info msg="Workflow update successful" namespace=henkan-argo-test-flows phase=Running resourceVersion=250900702 workflow=init-fail
time="2023-03-20T19:35:49.536Z" level=info msg="Processing workflow" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:49.537Z" level=info msg="Task-result reconciliation" namespace=henkan-argo-test-flows numObjs=0 workflow=init-fail
time="2023-03-20T19:35:49.537Z" level=info msg="Pod failed: Pod failed before main container starts" displayName=init-fail namespace=henkan-argo-test-flows pod=init-fail templateName=init-container-example workflow=init-fail
time="2023-03-20T19:35:49.537Z" level=info msg="leaving phase un-changed: wait container is not yet terminated " namespace=henkan-argo-test-flows new.phase=Error workflow=init-fail
time="2023-03-20T19:35:49.537Z" level=info msg="node changed" namespace=henkan-argo-test-flows new.message="Pod failed before main container starts" new.phase=Pending new.progress=0/1 nodeID=init-fail old.message=PodInitializing old.phase=Pending old.progress=0/1 workflow=init-fail
time="2023-03-20T19:35:49.537Z" level=info msg="TaskSet Reconciliation" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:49.537Z" level=info msg=reconcileAgentPod namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:49.546Z" level=info msg="Workflow update successful" namespace=henkan-argo-test-flows phase=Running resourceVersion=250900729 workflow=init-fail
time="2023-03-20T19:35:52.547Z" level=info msg="Processing workflow" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:52.548Z" level=info msg="Task-result reconciliation" namespace=henkan-argo-test-flows numObjs=0 workflow=init-fail
time="2023-03-20T19:35:52.548Z" level=info msg="Pod failed: Pod failed before main container starts" displayName=init-fail namespace=henkan-argo-test-flows pod=init-fail templateName=init-container-example workflow=init-fail
time="2023-03-20T19:35:52.548Z" level=info msg="leaving phase un-changed: wait container is not yet terminated " namespace=henkan-argo-test-flows new.phase=Error workflow=init-fail
time="2023-03-20T19:35:52.548Z" level=info msg="node unchanged" namespace=henkan-argo-test-flows nodeID=init-fail workflow=init-fail
time="2023-03-20T19:35:52.548Z" level=info msg="TaskSet Reconciliation" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:52.548Z" level=info msg=reconcileAgentPod namespace=henkan-argo-test-flows workflow=init-fail

Logs from in your workflow's wait container
Error from server (BadRequest): container "wait" in pod "init-fail" is waiting to start: PodInitializing

I cannot reproduce this. My workflow failed locally. Please check if you are using v3.4.5. Also it would be helpful if you can paste your entire pod via kubectl get pod init-fail -o yaml.

I noticed  that it is running correctly when i submit workflow to the same namespace that argo-workflow installed. But if i submit init-fail to different namespace then it stuck. Is there anything i should check?
When i check controller and server pods here are the container statuses so i think it is v.3.4.5. It is installed with helm:
  containerStatuses:
  - containerID: containerd://9a83ecbaf680c6793a0cc10a7f3071ba92b79bfa9bb136bbbfdbb312c6d391c0
    image: quay.io/argoproj/argocli:v3.4.5
    imageID: quay.io/argoproj/argocli@sha256:3370abbce70c6b5c29bbc8b0fcb315f31497d1a5a8fec899184e37c32760c86e
    lastState: {}
    name: argo-server
    ready: true
    restartCount: 0
    started: true
    state:
      running:
        startedAt: "2023-03-22T11:40:58Z"

  containerStatuses:
  - containerID: containerd://473ca739552249ba8d2bb60338c74db2f7f9a3b1a9ef6d50f5aa5efb54aeb769
    image: quay.io/argoproj/workflow-controller:v3.4.5
    imageID: quay.io/argoproj/workflow-controller@sha256:1d7d9691080d18f066a4ccdbd3138eb735d3da1172561afa5762e58e30f9ba85
    lastState: {}
    name: controller
    ready: true
    restartCount: 0
    started: true
    state:
      running:
        startedAt: "2023-03-22T11:40:39Z"

I below output of kubectl get pod init-fail -o yaml -n henkan-argo-test-flows (argo-workflow installed in ns henkan-server):
apiVersion: v1
kind: Pod
metadata:
  annotations:
    kubectl.kubernetes.io/default-container: main
    workflows.argoproj.io/node-id: init-fail
    workflows.argoproj.io/node-name: init-fail
  creationTimestamp: "2023-03-23T07:04:09Z"
  labels:
    workflows.argoproj.io/completed: "false"
    workflows.argoproj.io/workflow: init-fail
  name: init-fail
  namespace: henkan-argo-test-flows
  ownerReferences:
  - apiVersion: argoproj.io/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: Workflow
    name: init-fail
    uid: ff17d83d-4e6e-4ab6-aca5-16e4ae49269d
  resourceVersion: "252611173"
  uid: b4191713-7789-4bdc-9182-0feb6268db41
spec:
  containers:
  - command:
    - argoexec
    - wait
    - --loglevel
    - info
    - --log-format
    - text
    env:
    - name: ARGO_POD_NAME
      valueFrom:
        fieldRef:
          apiVersion: v1
          fieldPath: metadata.name
    - name: ARGO_POD_UID
      valueFrom:
        fieldRef:
          apiVersion: v1
          fieldPath: metadata.uid
    - name: GODEBUG
      value: x509ignoreCN=0
    - name: ARGO_WORKFLOW_NAME
      value: init-fail
    - name: WAIT_CONTAINER_STATUS_CHECK_INTERVAL
      value: 2s
    - name: RESOURCE_STATE_CHECK_INTERVAL
      value: 2s
    - name: ARGO_CONTAINER_NAME
      value: wait
    - name: ARGO_TEMPLATE
      value: '{"name":"init-container-example","inputs":{},"outputs":{},"metadata":{},"container":{"name":"","image":"alpine:latest","command":["echo","bye"],"resources":{},"volumeMounts":[{"name":"foo","mountPath":"/foo"}]},"initContainers":[{"name":"hello","image":"alpine:latest","command":["abcd"],"resources":{},"mirrorVolumeMounts":true}]}'
    - name: ARGO_NODE_ID
      value: init-fail
    - name: ARGO_INCLUDE_SCRIPT_OUTPUT
      value: "false"
    - name: ARGO_DEADLINE
      value: "0001-01-01T00:00:00Z"
    - name: ARGO_PROGRESS_FILE
      value: /var/run/argo/progress
    - name: ARGO_PROGRESS_PATCH_TICK_DURATION
      value: 1m0s
    - name: ARGO_PROGRESS_FILE_TICK_DURATION
      value: 3s
    image: quay.io/argoproj/argoexec:v3.4.5
    imagePullPolicy: IfNotPresent
    name: wait
    resources: {}
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    volumeMounts:
    - mountPath: /mainctrfs/foo
      name: foo
    - mountPath: /tmp
      name: tmp-dir-argo
      subPath: "0"
    - mountPath: /var/run/argo
      name: var-run-argo
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: kube-api-access-q2z6n
      readOnly: true
  - command:
    - /var/run/argo/argoexec
    - emissary
    - --loglevel
    - info
    - --log-format
    - text
    - --
    - echo
    - bye
    env:
    - name: ARGO_CONTAINER_NAME
      value: main
    - name: ARGO_TEMPLATE
      value: '{"name":"init-container-example","inputs":{},"outputs":{},"metadata":{},"container":{"name":"","image":"alpine:latest","command":["echo","bye"],"resources":{},"volumeMounts":[{"name":"foo","mountPath":"/foo"}]},"initContainers":[{"name":"hello","image":"alpine:latest","command":["abcd"],"resources":{},"mirrorVolumeMounts":true}]}'
    - name: ARGO_NODE_ID
      value: init-fail
    - name: ARGO_INCLUDE_SCRIPT_OUTPUT
      value: "false"
    - name: ARGO_DEADLINE
      value: "0001-01-01T00:00:00Z"
    - name: ARGO_PROGRESS_FILE
      value: /var/run/argo/progress
    - name: ARGO_PROGRESS_PATCH_TICK_DURATION
      value: 1m0s
    - name: ARGO_PROGRESS_FILE_TICK_DURATION
      value: 3s
    image: alpine:latest
    imagePullPolicy: Always
    name: main
    resources: {}
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    volumeMounts:
    - mountPath: /foo
      name: foo
    - mountPath: /var/run/argo
      name: var-run-argo
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: kube-api-access-q2z6n
      readOnly: true
  dnsPolicy: ClusterFirst
  enableServiceLinks: true
  initContainers:
  - command:
    - argoexec
    - init
    - --loglevel
    - info
    - --log-format
    - text
    env:
    - name: ARGO_POD_NAME
      valueFrom:
        fieldRef:
          apiVersion: v1
          fieldPath: metadata.name
    - name: ARGO_POD_UID
      valueFrom:
        fieldRef:
          apiVersion: v1
          fieldPath: metadata.uid
    - name: GODEBUG
      value: x509ignoreCN=0
    - name: ARGO_WORKFLOW_NAME
      value: init-fail
    - name: WAIT_CONTAINER_STATUS_CHECK_INTERVAL
      value: 2s
    - name: RESOURCE_STATE_CHECK_INTERVAL
      value: 2s
    - name: ARGO_CONTAINER_NAME
      value: init
    - name: ARGO_TEMPLATE
      value: '{"name":"init-container-example","inputs":{},"outputs":{},"metadata":{},"container":{"name":"","image":"alpine:latest","command":["echo","bye"],"resources":{},"volumeMounts":[{"name":"foo","mountPath":"/foo"}]},"initContainers":[{"name":"hello","image":"alpine:latest","command":["abcd"],"resources":{},"mirrorVolumeMounts":true}]}'
    - name: ARGO_NODE_ID
      value: init-fail
    - name: ARGO_INCLUDE_SCRIPT_OUTPUT
      value: "false"
    - name: ARGO_DEADLINE
      value: "0001-01-01T00:00:00Z"
    - name: ARGO_PROGRESS_FILE
      value: /var/run/argo/progress
    - name: ARGO_PROGRESS_PATCH_TICK_DURATION
      value: 1m0s
    - name: ARGO_PROGRESS_FILE_TICK_DURATION
      value: 3s
    image: quay.io/argoproj/argoexec:v3.4.5
    imagePullPolicy: IfNotPresent
    name: init
    resources: {}
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    volumeMounts:
    - mountPath: /var/run/argo
      name: var-run-argo
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: kube-api-access-q2z6n
      readOnly: true
  - command:
    - abcd
    env:
    - name: ARGO_CONTAINER_NAME
      value: hello
    - name: ARGO_TEMPLATE
      value: '{"name":"init-container-example","inputs":{},"outputs":{},"metadata":{},"container":{"name":"","image":"alpine:latest","command":["echo","bye"],"resources":{},"volumeMounts":[{"name":"foo","mountPath":"/foo"}]},"initContainers":[{"name":"hello","image":"alpine:latest","command":["abcd"],"resources":{},"mirrorVolumeMounts":true}]}'
    - name: ARGO_NODE_ID
      value: init-fail
    - name: ARGO_INCLUDE_SCRIPT_OUTPUT
      value: "false"
    - name: ARGO_DEADLINE
      value: "0001-01-01T00:00:00Z"
    - name: ARGO_PROGRESS_FILE
      value: /var/run/argo/progress
    - name: ARGO_PROGRESS_PATCH_TICK_DURATION
      value: 1m0s
    - name: ARGO_PROGRESS_FILE_TICK_DURATION
      value: 3s
    image: alpine:latest
    imagePullPolicy: Always
    name: hello
    resources: {}
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    volumeMounts:
    - mountPath: /foo
      name: foo
    - mountPath: /var/run/argo
      name: var-run-argo
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: kube-api-access-q2z6n
      readOnly: true
  nodeName: henkan-demo-node001
  preemptionPolicy: PreemptLowerPriority
  priority: 0
  restartPolicy: Never
  schedulerName: default-scheduler
  securityContext: {}
  serviceAccount: default
  serviceAccountName: default
  terminationGracePeriodSeconds: 30
  tolerations:
  - effect: NoExecute
    key: node.kubernetes.io/not-ready
    operator: Exists
    tolerationSeconds: 300
  - effect: NoExecute
    key: node.kubernetes.io/unreachable
    operator: Exists
    tolerationSeconds: 300
  volumes:
  - emptyDir: {}
    name: var-run-argo
  - emptyDir: {}
    name: tmp-dir-argo
  - emptyDir: {}
    name: foo
  - name: kube-api-access-q2z6n
    projected:
      defaultMode: 420
      sources:
      - serviceAccountToken:
          expirationSeconds: 3607
          path: token
      - configMap:
          items:
          - key: ca.crt
            path: ca.crt
          name: kube-root-ca.crt
      - downwardAPI:
          items:
          - fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
            path: namespace
status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: "2023-03-23T07:04:09Z"
    message: 'containers with incomplete status: [hello]'
    reason: ContainersNotInitialized
    status: "False"
    type: Initialized
  - lastProbeTime: null
    lastTransitionTime: "2023-03-23T07:04:09Z"
    reason: PodFailed
    status: "False"
    type: Ready
  - lastProbeTime: null
    lastTransitionTime: "2023-03-23T07:04:09Z"
    reason: PodFailed
    status: "False"
    type: ContainersReady
  - lastProbeTime: null
    lastTransitionTime: "2023-03-23T07:04:09Z"
    status: "True"
    type: PodScheduled
  containerStatuses:
  - image: alpine:latest
    imageID: ""
    lastState: {}
    name: main
    ready: false
    restartCount: 0
    started: false
    state:
      waiting:
        reason: PodInitializing
  - image: quay.io/argoproj/argoexec:v3.4.5
    imageID: ""
    lastState: {}
    name: wait
    ready: false
    restartCount: 0
    started: false
    state:
      waiting:
        reason: PodInitializing
  hostIP: <IP_ADDRESS>
  initContainerStatuses:
  - containerID: containerd://3ab3bee87c7e541196f7e465ebdb16d2e4db9c922310fe9fd61401475da601b2
    image: quay.io/argoproj/argoexec:v3.4.5
    imageID: quay.io/argoproj/argoexec@sha256:3f2ba3b355eccc61ec0e3b5c9fc547f4e9ff5821bf6f08485a6a5fc99bf7731b
    lastState: {}
    name: init
    ready: true
    restartCount: 0
    state:
      terminated:
        containerID: containerd://3ab3bee87c7e541196f7e465ebdb16d2e4db9c922310fe9fd61401475da601b2
        exitCode: 0
        finishedAt: "2023-03-23T07:04:10Z"
        reason: Completed
        startedAt: "2023-03-23T07:04:09Z"
  - containerID: containerd://aac7b8be10511bd71f9e50e01ac8f0ff12d394d6ea52492db8ed7a53c9da7718
    image: docker.io/library/alpine:latest
    imageID: docker.io/library/alpine@sha256:69665d02cb32192e52e07644d76bc6f25abeb5410edc1c7a81a10ba3f0efb90a
    lastState: {}
    name: hello
    ready: false
    restartCount: 0
    state:
      terminated:
        containerID: containerd://aac7b8be10511bd71f9e50e01ac8f0ff12d394d6ea52492db8ed7a53c9da7718
        exitCode: 128
        finishedAt: "2023-03-23T07:04:11Z"
        message: 'failed to create containerd task: failed to create shim task: OCI
          runtime create failed: runc create failed: unable to start container process:
          exec: "abcd": executable file not found in $PATH: unknown'
        reason: StartError
        startedAt: "1970-01-01T00:00:00Z"
  phase: Failed
  podIP: <IP_ADDRESS>
  podIPs:
  - ip: <IP_ADDRESS>
  qosClass: BestEffort
  startTime: "2023-03-23T07:04:09Z"

In the mean time it stucks at running state randomly even if i submit it to the same namespace argo-workflow installed.
Workflows marked as failed has below message in controller logs:
"marking node as failed since init container has non-zero exit code"
but workflows remains at running does not have above log but have :
"Pod failed before main container starts"

Related: https://github.com/argoproj/argo-workflows/issues/10045#issuecomment-1480928176

Hello @terrytangyuan ,
The issue is still present with your fix on my tests:

The issue only appears when Argo is deployed with a container. I am not able to reproduce the exact same thing when using the local development setup.
In order to show it, I deployed some instrumented version of the controller on my setup (only woc.log.Infof() added).

Easy to reproduce, at least since 3.4.2, to the lastest: simple apply the following Workflow:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: initfailtest
spec:
  ttlStrategy:
    secondsAfterCompletion: 3600
  podGC:
    strategy: OnWorkflowSuccess
  entrypoint: test
  templates:
  - name: test
    initContainers:
    - name: inittest
      image: argoproj/argosay:v2
      command:
        - bash
        - 'c'
        - ' . /dev/stdin <<< "return 1" '
    container:
      image: argoproj/argosay:v2
      command: [sh, -c]
      args: ["ls -l"]

The pod will go into Init:Error state, but the workflow will be stuck Running.
Now if we have a look at the code:

in operator.go, func (woc *wfOperationCtx) inferFailedReason(pod *apiv1.Pod, tmpl *wfv1.Template) (wfv1.NodePhase, string)definition:

func (woc *wfOperationCtx) inferFailedReason(pod *apiv1.Pod, tmpl *wfv1.Template) (wfv1.NodePhase, string) {
	woc.log.Infof("=====> inferFailedEnter: %v", pod.Status.InitContainerStatuses)

	if pod.Status.Message != "" {
		// Pod has a nice error message. Use that.
		woc.log.Infof("=====> inferFailed #1: %v", pod.Status.InitContainerStatuses)
		return wfv1.NodeFailed, pod.Status.Message
	}

	// We only get one message to set for the overall node status.
	// If multiple containers failed, in order of preference:
	// init, main (annotated), main (exit code), wait, sidecars
	order := func(n string) int {
		switch {
		case n == common.InitContainerName:
			return 0
		case tmpl.IsMainContainerName(n):
			return 1
		case n == common.WaitContainerName:
			return 2
		default:
			return 3
		}
	}
	woc.log.Infof("=====> inferFailed #2: %v", pod.Status.InitContainerStatuses)
	ctrs := append(pod.Status.InitContainerStatuses, pod.Status.ContainerStatuses...)
	woc.log.Infof("=====> inferFailed #3: %v", pod.Status.InitContainerStatuses)
	sort.Slice(ctrs, func(i, j int) bool { return order(ctrs[i].Name) < order(ctrs[j].Name) })
	woc.log.Infof("=====> inferFailed #4: %v", pod.Status.InitContainerStatuses)

The associated logs:
time="2023-04-05T12:47:13.203Z" level=info msg="=====> inferFailed #2: [{init {nil nil &ContainerStateTerminated{ExitCode:0,Signal:0,Reason:Completed,Message:,StartedAt:2023-04-05 12:47:03 +0000 UTC,FinishedAt:2023-04-05 12:47:03 +0000 UTC,ContainerID:containerd://a861510330a7265e23203e20ec1f69c300625d53810b605a93b08f230830a06a,}} {nil nil nil} true 0 quay.io/argoproj/argoexec:v3.4.5 quay.io/argoproj/argoexec@sha256:3f2ba3b355eccc61ec0e3b5c9fc547f4e9ff5821bf6f08485a6a5fc99bf7731b containerd://a861510330a7265e23203e20ec1f69c300625d53810b605a93b08f230830a06a <nil>} {inittest {nil nil &ContainerStateTerminated{ExitCode:127,Signal:0,Reason:Error,Message:,StartedAt:2023-04-05 12:47:04 +0000 UTC,FinishedAt:2023-04-05 12:47:04 +0000 UTC,ContainerID:containerd://efcd143df1caaf4cbbf0bd30d069d46fdeda0d081babe4f62ae162961339d16a,}} {nil nil nil} false 0 docker.io/argoproj/argosay:v2 docker.io/argoproj/argosay@sha256:f0b51e5d3a394af492de5ae50af93f11ba0862480d0eb2cbb48286fe58745303 containerd://efcd143df1caaf4cbbf0bd30d069d46fdeda0d081babe4f62ae162961339d16a <nil>}]" namespace=default workflow=initfailtest
time="2023-04-05T12:47:13.203Z" level=info msg="=====> inferFailed #3: [{init {nil nil &ContainerStateTerminated{ExitCode:0,Signal:0,Reason:Completed,Message:,StartedAt:2023-04-05 12:47:03 +0000 UTC,FinishedAt:2023-04-05 12:47:03 +0000 UTC,ContainerID:containerd://a861510330a7265e23203e20ec1f69c300625d53810b605a93b08f230830a06a,}} {nil nil nil} true 0 quay.io/argoproj/argoexec:v3.4.5 quay.io/argoproj/argoexec@sha256:3f2ba3b355eccc61ec0e3b5c9fc547f4e9ff5821bf6f08485a6a5fc99bf7731b containerd://a861510330a7265e23203e20ec1f69c300625d53810b605a93b08f230830a06a <nil>} {inittest {nil nil &ContainerStateTerminated{ExitCode:127,Signal:0,Reason:Error,Message:,StartedAt:2023-04-05 12:47:04 +0000 UTC,FinishedAt:2023-04-05 12:47:04 +0000 UTC,ContainerID:containerd://efcd143df1caaf4cbbf0bd30d069d46fdeda0d081babe4f62ae162961339d16a,}} {nil nil nil} false 0 docker.io/argoproj/argosay:v2 docker.io/argoproj/argosay@sha256:f0b51e5d3a394af492de5ae50af93f11ba0862480d0eb2cbb48286fe58745303 containerd://efcd143df1caaf4cbbf0bd30d069d46fdeda0d081babe4f62ae162961339d16a <nil>}]" namespace=default workflow=initfailtest
time="2023-04-05T12:47:13.203Z" level=info msg="=====> inferFailed #4: [{init {nil nil &ContainerStateTerminated{ExitCode:0,Signal:0,Reason:Completed,Message:,StartedAt:2023-04-05 12:47:03 +0000 UTC,FinishedAt:2023-04-05 12:47:03 +0000 UTC,ContainerID:containerd://a861510330a7265e23203e20ec1f69c300625d53810b605a93b08f230830a06a,}} {nil nil nil} true 0 quay.io/argoproj/argoexec:v3.4.5 quay.io/argoproj/argoexec@sha256:3f2ba3b355eccc61ec0e3b5c9fc547f4e9ff5821bf6f08485a6a5fc99bf7731b containerd://a861510330a7265e23203e20ec1f69c300625d53810b605a93b08f230830a06a <nil>} {main {&ContainerStateWaiting{Reason:PodInitializing,Message:,} nil nil} {nil nil nil} false 0 argoproj/argosay:v2   0xc0005c9df4}]" namespace=default workflow=initfailtest

Here we see that we do not have the same content for pod.Status.InitContainerStatuses before and after line 	sort.Slice(ctrs, func(i, j int) bool { return order(ctrs[i].Name) < order(ctrs[j].Name) })
This is this value exactly which is used in the assesNodeStatus() function to look for failed initContainers:
	// If the init container failed, we should mark the node as failed.
	var initContainerFailed bool
	for _, c := range pod.Status.InitContainerStatuses {

That is why this feature is never triggered: we never see the failed initContainer since it is somehow replaced by the main container when we arrive here.
I cannot see any possible link with the sort.slice part, so I am stuck here. I guess there is a dynamic issue somewhere, maybe it will be clearer for you.
This issue is easily reproduced on multiple cluster:

our production cluster, kubeadm deployed 1.25.1.
a simple Rancher Desktop setup,  v1.25.7+k3s1

I am available for a live session if needed.

I can confirm also the issue still present with v3.4.6. below are the logs
[ 12GiB/31GiB][☸ henkandemo (henkan-ml)]argo/workflows/initfail kubectl logs -n henkan-server argo-release-argo-workflows-workflow-controller-5c987d99cd7rdbc| grep init-fail
time="2023-04-07T10:44:15.006Z" level=info msg="Processing workflow" namespace=default workflow=init-fail
time="2023-04-07T10:44:15.008Z" level=info msg="Task-result reconciliation" namespace=default numObjs=0 workflow=init-fail
time="2023-04-07T10:44:15.008Z" level=info msg="Pod failed: Pod failed before main container starts" displayName=init-fail namespace=default pod=init-fail templateName=init-container-example workflow=init-fail
time="2023-04-07T10:44:15.008Z" level=info msg="leaving phase un-changed: wait container is not yet terminated " namespace=default new.phase=Error workflow=init-fail
time="2023-04-07T10:44:15.008Z" level=info msg="node unchanged" namespace=default nodeID=init-fail workflow=init-fail
time="2023-04-07T10:44:15.009Z" level=info msg="TaskSet Reconciliation" namespace=default workflow=init-fail
time="2023-04-07T10:44:15.009Z" level=info msg=reconcileAgentPod namespace=default workflow=init-fail
time="2023-04-07T10:44:17.886Z" level=info msg="Processing workflow" namespace=default workflow=init-fail
time="2023-04-07T10:44:17.887Z" level=info msg="Task-result reconciliation" namespace=default numObjs=0 workflow=init-fail
time="2023-04-07T10:44:17.887Z" level=info msg="Pod failed: Pod failed before main container starts" displayName=init-fail namespace=default pod=init-fail templateName=init-container-example workflow=init-fail
time="2023-04-07T10:44:17.887Z" level=info msg="leaving phase un-changed: wait container is not yet terminated " namespace=default new.phase=Error workflow=init-fail
time="2023-04-07T10:44:17.887Z" level=info msg="node unchanged" namespace=default nodeID=init-fail workflow=init-fail
time="2023-04-07T10:44:17.887Z" level=info msg="TaskSet Reconciliation" namespace=default workflow=init-fail
time="2023-04-07T10:44:17.887Z" level=info msg=reconcileAgentPod namespace=default workflow=init-fail
time="2023-04-07T10:45:15.861Z" level=info msg="Processing workflow" namespace=default workflow=init-fail
time="2023-04-07T10:45:15.862Z" level=info msg="Task-result reconciliation" namespace=default numObjs=0 workflow=init-fail
time="2023-04-07T10:45:15.862Z" level=info msg="Pod failed: Pod failed before main container starts" displayName=init-fail namespace=default pod=init-fail templateName=init-container-example workflow=init-fail
time="2023-04-07T10:45:15.862Z" level=info msg="leaving phase un-changed: wait container is not yet terminated " namespace=default new.phase=Error workflow=init-fail
time="2023-04-07T10:45:15.862Z" level=info msg="node unchanged" namespace=default nodeID=init-fail workflow=init-fail
time="2023-04-07T10:45:15.862Z" level=info msg="TaskSet Reconciliation" namespace=default workflow=init-fail
time="2023-04-07T10:45:15.862Z" level=info msg=reconcileAgentPod namespace=default workflow=init-fail
time="2023-04-07T10:48:51.295Z" level=info msg="Processing workflow" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:48:51.298Z" level=info msg="Updated phase  -> Running" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:48:51.298Z" level=info msg="Pod node init-fail initialized Pending" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:48:51.322Z" level=info msg="Created pod: init-fail (init-fail)" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:48:51.322Z" level=info msg="TaskSet Reconciliation" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:48:51.322Z" level=info msg=reconcileAgentPod namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:48:51.329Z" level=info msg="Workflow update successful" namespace=henkan-argo-test-flows phase=Running resourceVersion=264356785 workflow=init-fail
time="2023-04-07T10:48:54.325Z" level=info msg="Processing workflow" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:48:54.325Z" level=info msg="Task-result reconciliation" namespace=henkan-argo-test-flows numObjs=0 workflow=init-fail
time="2023-04-07T10:48:54.325Z" level=info msg="node changed" namespace=henkan-argo-test-flows new.message=PodInitializing new.phase=Pending new.progress=0/1 nodeID=init-fail old.message= old.phase=Pending old.progress=0/1 workflow=init-fail
time="2023-04-07T10:48:54.326Z" level=info msg="TaskSet Reconciliation" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:48:54.326Z" level=info msg=reconcileAgentPod namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:48:54.332Z" level=info msg="Workflow update successful" namespace=henkan-argo-test-flows phase=Running resourceVersion=264356824 workflow=init-fail
time="2023-04-07T10:49:06.972Z" level=info msg="Processing workflow" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:49:06.973Z" level=info msg="Task-result reconciliation" namespace=henkan-argo-test-flows numObjs=0 workflow=init-fail
time="2023-04-07T10:49:06.973Z" level=info msg="node unchanged" namespace=henkan-argo-test-flows nodeID=init-fail workflow=init-fail
time="2023-04-07T10:49:06.973Z" level=info msg="TaskSet Reconciliation" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:49:06.973Z" level=info msg=reconcileAgentPod namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:49:12.977Z" level=info msg="Processing workflow" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:49:12.978Z" level=info msg="Task-result reconciliation" namespace=henkan-argo-test-flows numObjs=0 workflow=init-fail
time="2023-04-07T10:49:12.978Z" level=info msg="Pod failed: Pod failed before main container starts" displayName=init-fail namespace=henkan-argo-test-flows pod=init-fail templateName=init-container-example workflow=init-fail
time="2023-04-07T10:49:12.978Z" level=info msg="leaving phase un-changed: wait container is not yet terminated " namespace=henkan-argo-test-flows new.phase=Error workflow=init-fail
time="2023-04-07T10:49:12.978Z" level=info msg="node changed" namespace=henkan-argo-test-flows new.message="Pod failed before main container starts" new.phase=Pending new.progress=0/1 nodeID=init-fail old.message=PodInitializing old.phase=Pending old.progress=0/1 workflow=init-fail
time="2023-04-07T10:49:12.978Z" level=info msg="TaskSet Reconciliation" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:49:12.978Z" level=info msg=reconcileAgentPod namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:49:12.986Z" level=info msg="Workflow update successful" namespace=henkan-argo-test-flows phase=Running resourceVersion=264356998 workflow=init-fail
time="2023-04-07T10:49:15.986Z" level=info msg="Processing workflow" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:49:15.987Z" level=info msg="Task-result reconciliation" namespace=henkan-argo-test-flows numObjs=0 workflow=init-fail
time="2023-04-07T10:49:15.987Z" level=info msg="Pod failed: Pod failed before main container starts" displayName=init-fail namespace=henkan-argo-test-flows pod=init-fail templateName=init-container-example workflow=init-fail
time="2023-04-07T10:49:15.987Z" level=info msg="leaving phase un-changed: wait container is not yet terminated " namespace=henkan-argo-test-flows new.phase=Error workflow=init-fail
time="2023-04-07T10:49:15.987Z" level=info msg="node unchanged" namespace=henkan-argo-test-flows nodeID=init-fail workflow=init-fail
time="2023-04-07T10:49:15.987Z" level=info msg="TaskSet Reconciliation" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-04-07T10:49:15.987Z" level=info msg=reconcileAgentPod namespace=henkan-argo-test-flows workflow=init-fail

workflow output with status
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"argoproj.io/v1alpha1","kind":"Workflow","metadata":{"annotations":{},"name":"init-fail","namespace":"henkan-argo-test-flows"},"spec":{"entrypoint":"init-container-example","templates":[{"container":{"command":["echo","bye"],"image":"alpine:latest","volumeMounts":[{"mountPath":"/foo","name":"foo"}]},"initContainers":[{"command":["abcd"],"image":"alpine:latest","mirrorVolumeMounts":true,"name":"hello"}],"name":"init-container-example"}],"volumes":[{"emptyDir":{},"name":"foo"}]}}
    workflows.argoproj.io/pod-name-format: v2
  creationTimestamp: "2023-04-07T10:48:51Z"
  generation: 4
  labels:
    workflows.argoproj.io/phase: Running
    workflows.henkan.io/submit: "true"
  name: init-fail
  namespace: henkan-argo-test-flows
  resourceVersion: "264356998"
  uid: 930d2760-b921-4f1e-961e-d834e946bd22
spec:
  arguments: {}
  entrypoint: init-container-example
  podGC:
    strategy: OnWorkflowCompletion
  templates:
  - container:
      command:
      - echo
      - bye
      image: alpine:latest
      name: ""
      resources: {}
      volumeMounts:
      - mountPath: /foo
        name: foo
    initContainers:
    - command:
      - abcd
      image: alpine:latest
      mirrorVolumeMounts: true
      name: hello
      resources: {}
    inputs: {}
    metadata: {}
    name: init-container-example
    outputs: {}
  ttlStrategy:
    secondsAfterCompletion: 15
  volumes:
  - emptyDir: {}
    name: foo
status:
  artifactGCStatus:
    notSpecified: true
  artifactRepositoryRef:
    artifactRepository: {}
    default: true
  conditions:
  - status: "False"
    type: PodRunning
  finishedAt: null
  nodes:
    init-fail:
      displayName: init-fail
      finishedAt: null
      hostNodeName: henkan-demo-node002
      id: init-fail
      message: Pod failed before main container starts
      name: init-fail
      phase: Pending
      progress: 0/1
      startedAt: "2023-04-07T10:48:51Z"
      templateName: init-container-example
      templateScope: local/init-fail
      type: Pod
  phase: Running
  progress: 0/1
  startedAt: "2023-04-07T10:48:51Z"

example workflow that init container will fail
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: init-fail
spec:
  entrypoint: init-container-example
  templates:
  - name: init-container-example
    container:
      image: alpine:latest
      command: ["echo", "bye"]
      volumeMounts:
      - name: foo
        mountPath: /foo
    initContainers:
    - name: hello
      image: alpine:latest
      command: ["abcd"]
      mirrorVolumeMounts: true
  volumes:
    - name: foo
      emptyDir: {}

Ok the issue is that you added additional init container with the name "hello" that's not covered in the code. I'll fix.

https://github.com/argoproj/argo-workflows/pull/10849 should fix it. Want to try it again?

I tested it with latest container tag and now it is working thanks :)

in 3.4.11 i am seeing rare case of node showing message of 'Pod failed before main container starts' and the node stays Pending until activeDeadlineSeconds is met (8hrs in my case) at which point it turns Failed and workflow turns failed, i feel argo should detect this message within couple of minutes and attempt retry

see https://github.com/argoproj/argo-workflows/pull/13858


Laravel 5.8 Class blade.compiler does not exist

After adding the service provider Longman\LaravelLodash\LodashServiceProvider::class, the application throws the error "Class blade.compiler does not exist".
In the LodashServiceProvider.php it is loading $this->registerBladeDirectives(); in the register() method instead of the boot() method. Laravel 5.8 requires blade directives to be loaded in the boot method.
https://laravel.com/docs/5.8/blade#extending-blade

Seems like this is fixed on master but composer require defaults to 1.0.2

I will release master as 2.x version and will be fixed


Current condition Icons

Just a suggestion for a future enhancement I'm sure it is possible but if someone's willing to tackle it the ability to show current condition related to an icon like one the animated ones used in weather cards we could define them in the config this way not to infringe on any copyrights etc. and have the ability to use custom sets as you please
Of course taking into consideration Cloud Luxe temperature weather conditions as far as precipitation is concerned etcetera in real time
Regards
Robert

That think would be outside of the ability of this integration; that would have to be a custom weather card of some type to change the icons.  You can however bring all of this into a weather card but defining the icons would have to happen in that card since Home Assistant uses a set of inputs for weather.  I am working on the 'current conditions' to be generated locally like sunny, foggy, night but there is a lot to it (see other issue in list).

I agree with @GlennGoddard. This Integration just supplies states for the icons, and then the HA UI, should be where the actual icons are selected and displayed in the different built-in or custom cards.. So I will close this now.


🪸 last check "Request new schema" view [epic 350]

🗂 this is a sub-issue for our epic #350
#Todo
When all issues related to epic #350    are finished:

check, potential update and get ok for all copies with technical writer
check, potential update and get ok with design
check and potential update user flows in form for accessibility

keyboard usage
screenreader
automated tests like for color contrasts etc.

💡 If there are things that we can improve in design system or consoles form component, don't forget to make them aware and support!

Check copies
1. copies for pristine form

2. copies form with errors for missing fields

3. copies for form with errors for invalid schema input
(environment can't be invalid if it's not missing)

I added a few suggestions for the copies below.

1. copies for pristine form

Instead of "please select" -> "Select environment" to keep it consistent with other screens  (all three screens)
Message for the approval - > Enter a message for approval  (all three screens)

2. copies form with errors for missing fields

 For the select environment error:

Selection Error: Please select an environment.
or
Select an environment. This field is required.

For schema file error:

File Missing: Upload the AVRO schema file.
or
Upload the AVRO schema file. This field is required.
(you could also omit the line - This field is required, as there is an asterisk above, so kind of self-explanatory)

For preview error:

Preview Error: A file is required to preview the schema. Upload a file.
or
A file is required to preview the schema. Upload a file.

3. copies for form with errors for invalid schema input
(environment can't be invalid if it's not missing)

Below Upload AVRO schema option, probably change the error message to -> Invalid file type/Invalid file extension?
Error message for the preview :

Invalid data format. Ensure the data is in a JSON object, array, or literal form.
Invalid data format. Enter a valid JSON object, array, or literal.
Invalid input. Enter a valid JSON object, array, or literal.

Thanks so much @harshini-rangaswamy  🙏
I see I need to create a follow up issue on that 🙈
This is what I updated in the PR

✅  Message for the approval
✅ Selection Error: Please select an environment.
✅  File Missing: Upload the AVRO schema file.

Needs to wait / question:
1. select placeholder

`Instead of "please select" -> "Select environment" to keep it consistent with other screens (all three screens)
Currently the placeholder is not shown (it shows the first value right away), since we updated the DS and that added a new behaviour, so the text can only be updated when #495  is merged.

Note about this: The placeholder is used for screen readers, too and it is read:
<placeholder><label> so for screen reader users it would be best to have something like:
"Please select" "Environment" (which is the reason the placeholder here is so generic)
Would it be ok if we kept it that way? I feel for sighted users it's pretty clear that they have to select an environment anyway, but for screen reader users it would be nicer to have the read-out text less redundant (e.g. "Select Environment Select Environment")
preview error
At the moment, the error message for both file and preview are the same text, I set the error for a missing field myself and the other error is provided by a third party library (the editor that shows the preview). I can probably manually set the error messages from the editor better, but that's a bit out of scope for this PR.
I would leave the validation errors as they are for now and create a follow up issue for that. I'm not working tomorrow 🙈  and would like to get this PR merged for the release.  I hope that's ok!

t the moment, the error message for both file and preview are the same text, I set the error for a missing field myself and the other error is provided by a third party library (the editor that shows the preview). I can probably manually set the error messages from the editor better, but that's a bit out of scope for this PR.

1. select placeholder

`Instead of "please select" -> "Select environment" to keep it consistent with other screens (all three screens)
Currently the placeholder is not shown (it shows the first value right away), since we updated the DS and that added a new behaviour, so the text can only be updated when #495  is merged.

Note about this: The placeholder is used for screen readers, too and it is read: <placeholder><label> so for screen reader users it would be best to have something like: "Please select" "Environment" (which is the reason the placeholder here is so generic) Would it be ok if we kept it that way? I feel for sighted users it's pretty clear that they have to select an environment anyway, but for screen reader users it would be nicer to have the read-out text less redundant (e.g. "Select Environment Select Environment")

Sure! I understand the issue with the placeholder and the concern for both sighted and screen reader users. We can revisit this once #495 is merged and update the text accordingly."

At the moment, the error message for both file and preview are the same text, I set the error for a missing field myself and the other error is provided by a third party library (the editor that shows the preview). I can probably manually set the error messages from the editor better, but that's a bit out of scope for this PR.
I would leave the validation errors as they are for now and create a follow up issue for that. I'm not working tomorrow 🙈 and would like to get this PR merged for the release. I hope that's ok!

Sounds good! thanks.


why does +39 return vatican instead of italy

when entering an italian number it returns "vatikanstadt" instead of italy as detected country.
Is this the expected behaviour or how can I get Italy as the country of origin ?

It's impossible to accurately derive the country name from the phone code. The reason is many countries share the same country code at the beginning and have the same phone pattern. That's why it's best to always display a dropdown list for the user to pick their country if it's important to know the correct country.

alright thanks for the info.


Changed HttpTransport to use sync requests instead of promises

The problem of the current implementation of HttpTransport is:

In the send() function, the request is immediately initiated using sendAsyncRequest()
This already opens file-descriptors and uses resources for the connection
As we do not have an event-loop, the initiated connection "hangs" until the shutdown-function is reached and cleanupPendingRequests() finalizes the requests

For "normal" PHP scripts, this may not be a big problem, but:

For long-running scripts the HTTP connection may timeout in the meantime
When generating more events than allowed maximum filedescriptors (normally 1024) in one script run, then everything will crash/hang/whatever with really strange errors
A lot of events will lead to much more memory usage while script run (e.g. ~250MB for 1024 PHP-Notices)

This patch just puts the requests into pendingRequests directly instead of promises, and uses sendRequest() later instead of sendAsyncRequest().
I also noticed the deprecation of "delaySendingUntilShutdown" and i saw the RFC for making it configurable in #910 - I don't know what the final goal would be - personally I prefer a configuration option as both scenarios have pro's and con's. And with this patch, the "delaySendingUntilShutdown" should lead to less problems.

The promise is not resolved until the call to wait, thus the request should not even start and consequently I would expect no file descriptor to be opened until that moment.

@ste93cry: That's not correct. You are right, that the promise is not resolved until the wait()-call. But the "synchronous part" of the promise is executed immediately - that means "initiating the connection" in this case. You can easily reproduce this by generating 10 Notices:
\Sentry\init(['dsn' => '...']);

$x = [];
for ($i = 0; $i < 10; $i++) {
    $x[$i]++; // Notice
}

// analyze open PHP resource handle counts by type:
foreach (get_resources() as $resource) {
    $type = get_resource_type($resource);
    if (!isset($resourceTypes[$type])) $resourceTypes[$type] = 0;
    $resourceTypes[$type]++;
}

print_r($resourceTypes);

Before this patch I have 10 open curl handles here:
Array
(
    [stream] => 63
    [stream-context] => 1
    [curl] => 10
    [curl_multi] => 1
)

After this patch it is much cleaner:
Array
(
    [stream] => 23
    [stream-context] => 1
)

Also the proposed changes are breaking because you are changing all typehints from HttpAsyncClientInterface to HttpClientInterface.

Ok I see, I have rewritten the patch now to use $this->httpClient->sendAsyncRequest($request)->wait(); instead of sendRequest(), so we do not need an interface change.
There is just one failing test in Sentry\Tests\ClientTest::testSampleRateAbsolute: It checks against $httpClient->getRequests() it must be rewritten to check against HttpTransport::$pendingRequests array, but it is a private property. Maybe you have a good idea, how this test can be rewritten in an easy way :-)

But the "synchronous part" of the promise is executed immediately

Right, I checked the code of Guzzle and it's like you says. I honestly didn't expect that though, I don't know if it may be worth to report this upstream and see if there is room for changing this behavior as it may affect users in general and not only this library

Maybe you have a good idea, how this test can be rewritten in an easy way

What about mocking the transport instead of the HTTP client? We're only interested in how many times the transport is called, so it should be enough to write the assertion against the TransportInterface::send method

I don't know if it may be worth to report this upstream

I don't think so. It is the way, promises work - the Guzzle implementation is not wrong here :-)

What about mocking the transport instead of the HTTP client?

Ah, sure ... good idea, I'll try.

A further improvement in cleanupPendingRequests() would be to send the requests with some concurrency - you wouldn't want to try to send 1400 requests in parallel, but a max concurrency of 5 or 8 could make sense.

@mfb: Maybe, yes (but keep in mind, that it is easier to "overload" the server instances then). Maybe the protocol could also be improved, in the way that multiple events can be sent in one HTTP request.
But this is out of scope of this bug-report ;-)

@ste93cry: Ok I changed testSampleRateAbsolute now - the build succeeds now :-)
But I'm stuck with the "codecov/project" check. It does not show me, in which line coverage is missing exactly. Can you help me here?

Well, it seems like the server overload issue was already present, since without this PR there is no limit on the number of concurrent connections that will be opened.. :)
This PR reduces the concurrency to 1 - each request will have to wait for the previous one to complete before a new connection is opened - such that multiple events will take measurably longer to send, so I think it would be good to restore some concurrency either in this PR or as a followup.
I guess the Sentry team could recommend a reasonable max concurrent requests or it could be configurable.

In my testing, a test script that sends 20 events to sentry.io is 0.3 seconds without this PR, 1.4 seconds with this PR.

@mfb: Hmm okay. I didn't keep in mind, that wait() on one promise also executes the others in parallel - but yes, it makes sense.
@ste93cry: It would be easy with \GuzzleHttp\Pool. Would it be okay, to add this dependency here?
An alternative "poor man" implementation would be, to generate "chunks" of e.g. 5 promises, which are executed in parallel with Promise\settle($promises)->wait() - but it would not reach a real "pool" implementation.

But I'm stuck with the "codecov/project" check. It does not show me, in which line coverage is missing exactly. Can you help me here?

I don't really have any clue about what changed that is causing the status check to fail, anyway it's not required for merge so if we don't find the root cause it's not really an issue

Well, it seems like the server overload issue was already present, since without this PR there is no limit on the number of concurrent connections that will be opened

True story, not sure if the HTTP clients or cURL itself (most of them use it) have some hard limit, we didn't set any anyway so this is a good point to fix

I guess the Sentry team could recommend a reasonable max concurrent requests or it could be configurable.

I would like to avoid exposing any other option related specifically to the HTTP client from the options of the SDK because that's not the place where they belongs to

It would be easy with \GuzzleHttp\Pool. Would it be okay, to add this dependency here?

I'm not a real expert about this class, but as far as I see Promise\settle($promises) uses EachPromise under the hood which in turn is also used by the GuzzleHttp\Pool class, so they are basically the same except for the configurable concurrency limit. If we want to support batching let's use the pool at this point. As an hard limit we may use 30, which is the same default concurrency limit used in the Javascript SDK

True story, not sure if the HTTP clients or cURL itself (most of them use it) have some hard limit, we didn't set any anyway so this is a good point to fix

I believe the limit would be openfiles limit that @not-implemented described above - which is often 1024 by default.  In my testing, the the requests seem to hang (due to Sentry server rate limiting?) and the server could have an out-of-memory situation, with the script being killed by the OOM reaper. In addition, when encountering this openfiles limit, the script is unable to load various exception class files such as guzzle ConnectException.php
A limit of 30 concurrent connections seems fine if other sentry SDKs are using it.

@ste93cry @mfb Okay, I implemented concurrency now in a new commit. I used EachPromise directly because GuzzleHttp\Pool needs a GuzzleHttp\ClientInterface instead of a HttpAsyncClientInterface. But the implementation is still simple and short and should still be fully backward-compatible.
I hardcoded the concurrency limit to 30 now ... it is much better than before in any case ... (I still recommend to reduce it to e.g. 6, because the browser limits of concurrent HTTP connections to one host are similar ... but this is up to you ;-))

Okay, I fixed the small issues and force pushed the 3 commits (also optimized the commit messages). Should I also add a Changelog-entry like:

Changed HttpTransport to not pre-initialize promises to avoid resource-/file-descriptor-overhead (#981)

?

also optimized the commit messages

Thank you, although we squash and merge so the commit messages will not be retained anyway

Should I also add a Changelog-entry like

What you proposed is ok, another variant that came up to my mind could be Hard-limit the number of concurrent requests sent by the `HttpTransport` transport, but feel free to choose whichever you think is more appropriate

Ok done (+ already squashed commits together) :-) ... so from my point of view, the PR is ready :-)

Woops, build failed due to an error that sometimes happen. Would you mind force-push to retrigger the CI?

Haha ... done ;-)

Looks good in my testing - performance when sending 20 events is the same as master branch.  When sending 2000 events with concurrency of 30, sentry.io pretty quickly responds with a 429 error (presumably due to hitting my project's spike protection limit), HttpTransport catches the exception and stops sending. I guess that's fine - no need to keep attempting to send? It is quite different from the current behavior, where the 429 exception is caught and then the next pending request is sent.

@not-implemented, sorry to ask again to force push but you did it while GitHub was having some issues with the webhooks and so it didn’t get notified that the AppVeyor build passed

In current code, we wait, hit exception, then wait again. With this PR, the exception bubbles up, is caught and script ends, right? To corroborate this, the script ends in ~0.5 seconds if you try to send 2000 events but already hit your quota.

Well I might be wrong about this, because it does take longer if I send more events. Maybe it is sending but the Sentry dashboard doesn't accurately report the rate limiting, it just ignores the events.

Confirmed that requests are in fact sent - I jumped to conclusions based on sentry dashboard. Sorry for the noise...

In current code, we wait, hit exception, then wait again. With this PR, the exception bubbles up, is caught and script ends, right?

It theory yes, but the EachPromise class catches any rejected promise and ensures that the processing of the pending ones continues. I just did a few tests on my own and it seems to work as described, so we are good to go. As soon as the status checks are green I will merge

For the record, after sending thousands of events to sentry.io, it reports 845 accepted, 257 rate limited, 1.1k total. So there is some non-transparent rate limiting in place, which makes sense, as accepting all those requests even just to count them would be resource intensive.

Yes, the errors should be silently catched by EachPromise, but it does not stop sending. Maybe the try/catch around the EachPromise can even be completely removed as it is really misleading.

Maybe the try/catch around the EachPromise can even be completely removed as it is really misleading.

That try/catch is necessary because most users don't want Sentry to throw an additional exception while logging.  For example, it might be logging notices, hit a 4xx error, and throw the ClientErrorException exception, which is good for knowing that your logging isn't working, but generally bad for practical purposes...

@mfb: That's what I mean with "misleading" :-) ... Any errors while processing the promises (like connection errors etc.) are catched by EachPromise itself. Normally you define a 'fulfilled' and 'rejected' callback via the constructor-config of EachPromise to get the (success or error) result of the promises (I just skipped that, because the result is not interesting here). So the only errors that the try/catch in cleanupPendingRequests() would catch, are e.g. interface errors while calling the EachPromise constructor (or on any bugs in EachPromise itself).
(It would be very bad architecture anyway, to "hard cancel" any other half-processed requests while just one is failing :-))
Maybe I remove the try/catch here and leave a short comment line there?

I had another look into EachPromise ... there is indeed one case when the try/catch is needed: When sendAsyncRequest() inside the generator throws an error because $request is invalid for any case, then the EachPromise itself is rejected and throws an error because of wait().
I force-pushed again now to trigger the CI ;-)

We are using the wait() method on the promise which has an argument with the default value of true, which means that the result will be unwrapped and thus if the result is an exception it will be thrown. When I tried to test that all requests were sent regardless of one failing I saw sometimes the code inside the catch block to be executed, and even if I didn’t investigate why it proves that it may happen. In the past we also had problems with exceptions still being thrown while calling wait(false), so I would not beat that it’s really safe

Thanks for this PR! For the try-catch scenario, I would also add that we could fill the catch in the future when relanding #907


how to build on Android and iOS

I'm trying to build leveldown which can working with nodejs-mobile using nodejs-mobile-gyp.
I'm very confused with how to build on Android and iOS. There is no docs about it.
I have run following commands on ubuntu. As a result, it still built x86 arch which runs on linux.
Could you help me with how should I use the nodejs-mobile-gyp?
nodjs-mobile-gyp configure --dest-os=android --dest-cpu=arm
nodjs-mobile-gyp build --dest-os=android --dest-cpu=arm

and
nodjs-mobile-gyp configure --arch=arm
nodjs-mobile-gyp build --arch=arm

Hi @blueye ,
The way we are using nodejs-mobile-gyp is through the react-native and cordova plugins, which have to set environment variables when using npm rebuild --build-from-source to set the current node_gyp and node_headers, among other things.
Here's an example of how it's done by nodejs-mobile-react-native for ios: https://github.com/JaneaSystems/nodejs-mobile-react-native/blob/651425964f77a0520ba7c34c7cd6783b0ac1b6cf/scripts/ios-build-native-modules.sh#L50
Here's an example of how it's done by nodejs-mobile-react-native for android: https://github.com/JaneaSystems/nodejs-mobile-react-native/blob/651425964f77a0520ba7c34c7cd6783b0ac1b6cf/android/build.gradle#L368-L407

HI all,
Do we have any solution for this?
I am trying to establish offline db using pouch db in mobile.
I have an application which uses node express and pouch db. Its running well in my pc. I was able to take a build using webpack and tried in android/ios, which is not working.
IOS Error:
Error: No native build was found for platform=ios arch=arm64 runtime=node abi=57 uv=1 armv=8 libc=glibc at load.path (/private/var/mobile/Containers/Data/Application/74907299-A8BC-40E0-98CC-A5D65DDA491C/Documents/nodejs-project/api/node_modules/node-gyp-build/index.js:56:3)
Android Error:
Error: dlopen failed: cannot locate symbol "napi_get_global" referenced by "/data/data/digital.lamp.mindlamp/files/lampBuild/api/node_modules/leveldown/prebuilds/android-arm64/node.napi.armv8.node"...
Any help would be appreciated

You need to build leveldown against nodejs-mobile. Did you try the information from the previous comment?

@jaimecbernardo
I have tried. But mine is a native app which uses kotlene/swift. Native module compiling of leveldown seems complicated in this.
I tried with the commands above. But not worked

@jaimecbernardo Is the behavior you referenced from nodejs-mobile-react-native also present in nodejs-mobile-cordova? I'm also having issues with leveldown in nodejs-mobile-cordova, as well as with rocksdb and the leveldown-nodejs-mobile fork: https://github.com/staltz/leveldown-nodejs-mobile/issues/1#issuecomment-907706645

Error: dlopen failed: "/data/data/com.cyph.test/files/www/nodejs-project/node_modules/leveldown-nodejs-mobile/build/Release/leveldown.node" has bad ELF magic: cffaedfe

Hi @blueye , The way we are using nodejs-mobile-gyp is through the react-native and cordova plugins, which have to set environment variables when using npm rebuild --build-from-source to set the current node_gyp and node_headers, among other things.
Here's an example of how it's done by nodejs-mobile-react-native for ios: https://github.com/JaneaSystems/nodejs-mobile-react-native/blob/651425964f77a0520ba7c34c7cd6783b0ac1b6cf/scripts/ios-build-native-modules.sh#L50
Here's an example of how it's done by nodejs-mobile-react-native for android: https://github.com/JaneaSystems/nodejs-mobile-react-native/blob/651425964f77a0520ba7c34c7cd6783b0ac1b6cf/android/build.gradle#L368-L407

hi @jaimecbernardo
I use nodejs-mobile-react-native for my android project ,and  ../nodejs-assets/BUILD_NATIVE_MODULES.txt has been set 1 ,but I still got this error!
W/Thread-10: type=1400 audit(0.0:38498): avc: granted { execute } for path="/data/data/com.awesomeproject/files/nodejs-project/node_modules/classic-level/build/Release/node.napi.armv8.node" dev="sdd74" ino=188861 scontext=u:r:untrusted_app:s0:c212,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c212,c257,c512,c768 tclass=file app=com.awesomeproject E/nodejs: node:internal/modules/cjs/loader:1210 E/nodejs:   return process.dlopen(module, path.toNamespacedPath(filename)); E/nodejs:                  ^ E/nodejs:  E/nodejs: Error: dlopen failed: cannot locate symbol "napi_add_env_cleanup_hook" referenced by "/data/data/com.awesomeproject/files/nodejs-project/node_modules/classic-level/build/Release/node.napi.armv8.node"... E/nodejs:     at Object.Module._extensions..node (node:internal/modules/cjs/loader:1210:18) E/nodejs:     at Module.load (node:internal/modules/cjs/loader:1004:32) E/nodejs:     at Function.Module._load (node:internal/modules/cjs/loader:839:12) E/nodejs:     at Module.require (node:internal/modules/cjs/loader:1028:19) E/nodejs:     at require (node:internal/modules/cjs/helpers:102:18) E/nodejs:     at load (/data/data/com.awesomeproject/files/nodejs-project/node_modules/node-gyp-build/node-gyp-build.js:22:10) E/nodejs:     at Object.<anonymous> (/data/data/com.awesomeproject/files/nodejs-project/node_modules/classic-level/binding.js:1:43) E/nodejs:     at Module._compile (node:internal/modules/cjs/loader:1126:14) E/nodejs:     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10) E/nodejs:     at Module.load (node:internal/modules/cjs/loader:1004:32) { E/nodejs:   code: 'ERR_DLOPEN_FAILED' E/nodejs: } I/BpBinder: onLastStrongRef automatically unlinking death recipients: <uncached descriptor> E/NODEJS-MOBILE: exiting due to SIG_DFL handler for signal 11 A/libc: exiting due to SIG_DFL handler for signal 11 A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 17548 (FlipperEventBas), pid 17458 (.awesomeproject)


cocoapods 报错 error: Access level on imports require '-enable-experimental-feature AccessLevelOnImport'

pod 'LiveKitClient', '2.0.12'
build error

I couldn't find the pod 'LiveKitClient', version '2.0.12' in CocoaPods. The highest version I found is 2.0.5.

I couldn't find the pod 'LiveKitClient', version '2.0.12' in CocoaPods. The highest version I found is 2.0.5.

Hi, the problem still exists in 2.0.14.

Just released pod ver 2.0.14, this should be fixed.


Windows Terminal not accepting input/text or commands after Vmmem fix

Apologies if this is not the correct place to ask but I've been searching for a solution for a couple days now.
It started with trying to solve Vmmem eating all of my memory whether anything was running or not. I followed the instructions from https://docs.microsoft.com/en-us/windows/wsl/wsl-config#configure-global-options-with-wslconfig and once I did that Vmmem did drop considerably but when I launched Windows Terminal Ubuntu and Kali gave the error

The system cannot find the path specified. [process exited with code<PHONE_NUMBER>]

and would not except any input.
So after not being able to find someone with similar issues I deleted the file C:\Users<yourUserName>.wslconfig hoping all would just go back and I could try to start over. That was not the case though, after deleting the file Windows Terminal and distros seemed to load normally however they still would not accepting any input.
Then tried uninstalling and reinstalling Windows Terminal but still same results loads but no inputs are recognized whether typing text or ctrl f to bring up the search- I just tried that to see if other commands besides text would work.
An the individual terminals seem to be fine.
I am a newbie so I'm sure it is something simple but I am looking for help before I make it worse. Also please keep the fix as elementary as possible but details on the why would be appreciated.
Thank you in advance for your time and help.

I would recommend filing this on the Windows Terminal repository: https://github.com/microsoft/terminal :)


Z-Conversion does not correctly work with Simple

Expected result
If a Pokémon with Simple uses Z-Conversion, each stat should be raised by 2 stages
Actual result
In this case Porygon-Z had Simple, but Z-Conversion only rose the stats by 1 stage. This is not correct.
Replay
http://replay.pokemonshowdown.com/gen7vgc2017-566773294

You're wrong; please do at least 5 seconds of research before opening an issue here. And even then you should be posting in the Bug Reports thread instead. Boosting effects from Z-Power aren't normal stat stage changes, so they're not affected by Contrary or Simple.


Add extra checks to check_board_header.py

The main change here is checking that each "interface" has pins for all of its required "functions".
E.g. if you define PICO_DEFAULT_I2C then you also have to define both PICO_DEFAULT_I2C_SDA_PIN and PICO_DEFAULT_I2C_SCL_PIN, and if you define PICO_DEFAULT_UART then you also have to define at least one ofPICO_DEFAULT_UART_TX_PIN or PICO_DEFAULT_UART_RX_PIN.

arguably you don't need to have both UART TX and UART RX

Ahh, I was wondering about that but wasn't sure. Is a similar thing true for SPI where you have to have SPI_SCK, but you might have only a SPI_TX or only a SPI_RX ?

arguably you don't need to have both UART TX and UART RX

Fixed with the latest commit :slightly_smiling_face:


Can I replace java class in main dir with one in flavor?

Expected Behavior

I am using gradle build system. Let me explain this a bit more specific.
I have a project and its structure is:
project
  |
  |---src
       |-----main
       |       |-----java
       |              |------com/example/A.java
       |
       |-----flavor
               |-----java
                      |------com/example/A.java

When I execute ./gradlew build, as you see, I will get compile error because system find two same java class A.java.
So can I replace A.java in main with the one in flavor ?
In addition, I can use exclude in gradle to do that thing. But I want to know can I let build system do that automatically.
    sourceSets {
        main {
            java {
                exclude 'com/example/A.java'
            }
        }
    }

Maybe you think I can add if/else in code then create different class instance such as A a = new B() and A a = new C().
    A a;
    if(isProductBoss()) {
       a = new A();
    }else if (isProductEmployee) {
       a = new B();
    }else ... {
       a = new C();
    }

But it pack redundant class to my product.
Current Behavior

Context

Steps to Reproduce (for bugs)

Your Environment

Build scan URL:

Hi, have you ever viewed this issue?

This does not appear to be an issue related to core Gradle functionality.  Since you're talking about flavors, I assume this is related to the Android plugin.  The relationships between source sets and when their compiled results are joined into a single classpath is specific to the Android plugin.  It would be more appropriate to raise your question on their bug tracker instead.


Change orb to awesome browser-y thing

https://bugs.eclipse.org/bugs/show_bug.cgi?id=475615 https://bugs.eclipse.org/bugs/show_bug.cgi?id=301627 Can we fix JGit to do a shallow clone? Don’t spend too much time, but it would be nice; otherwise, let’s do full clone

Ignore all that complexity, way too hard if not impossible. Derek discovered that. Change the orb to a browser like thing. Can it have inside it the remote location?
http://github.com/elegit  ...?
Also rename top graph thing to "remote cache" instead of remote

Name of remote (GitHub or whatever) could be dummy string now, but should be Elegit determined, not hardcoded in image

Work with Kiley on how to get merged into master and verify that it works without exceptions

Fix NullPointerException. Look at Repository object (jGit) and see if we can identify remote URL (for origin). Look at  handleRemoteCircleMouseClick in SessionController to see how to grab it. Also rename method.

One thing to look at for the method getLinkedRemoteRepoURLs: returns a list of remote repos. A git repo in principle can be linked to different remotes. When clicking the remote orb, we should be showing the specific remote URL that the current branch is tracking. jGit can likely get that for us.

Things to do:
make sure the URL is the one the branch is tracking
refresh the text when the URL changes
format the text nicely so it fits/doesn't take up a large amount of space

Ha!

Make sure to clear / disable / undo / anti-something when repo is removed.

Parse better ssh'y URLs and replace box with a more empty one


Lambda - Provide environment variable HANDEL_ENVIRONMENT_NAME

This is something Beanstalk already has.
Since the keys for Handel-provided environment variables change based on environment, I've seen how this variable is pretty useful in determining where to check for the other variables.

Somehow this got left out of Lambda; it's in the other compute services (ECS, Beanstalk, API Gateway). I'll make sure it gets added.

This should be added for Lambdas. Do a redeploy and you should see the HANDEL_ENVIRONMENT_NAME there.


Rearrange docgen for multiple backends

The doc gen code traverses the AST and generates documentation that is then processed by some external tool. At the moment this always outputs the same type of output. Ideally it should be able to output multiple different kinds of output, eg to target different external document generation tools, to generate ctags files, etc.
The doc gen code has a single entry point generate_docs() (in src\libponyc\pass\docgen.c), which is passed the AST of the whole program and a pass_opt_t struct which contains the command line arguments, etc.
Currently this code traverses the AST generating various sorted lists of types, methods, etc and generates appropriate output. The traversing and sorting should be separated from the output generation.
We could arrange it so that the traversing is done first and the resulting information is passed to the output stage. Then only the output stage would need to change to add a new output target.
However, different output targets may have different collection and sorting requirements. So it would probably be better to provide these as utility functions.
The rough code arrangement would then be:

Determine which generation backend to use. Note that there may be more than one enabled on any given run, so we should check them all in turn.
Appropriate backend is called, passing in the given AST.
Backend calls whichever traversing, sorting, etc utility functions it wants.
Backend generates output.

This reorganisation can be done with just the current output backend for now. Once this is done other backends can be added.

@jemc, you're on the right lines, but we need a lot more than just a parser to generate the docs, we need most of a compiler.
One of the nice things our docs do is tell you (via links) which type definition each type reference refers to. So for any field, parameter, etc you can click to see the relevant type. This is trickier than it sounds when you remember that you can have multiple types with the same name when using multiple packages, with use commands becoming relevant.
There are also quite a lot of things in the docs that the compiler sugars in, including create constructors and eq and ne functions. In addition to that we include functions inherited from provided traits and interfaces.
All of that lot and more is needed to make the docs useful. Getting all of that information requires doing everything up to and including a full type check, which is basically everything the compiler does other than the code generation back end.

Given that existing package documentation contains Markdown, any thoughts on how we would address that if there are multiple backends? Do we need converters? Just dump Markdown into HTML or whatever else the backend might be? Wondering if anyone had thought about that yet.

I think I'm going to need to pick this up soon.
Mkdocs is excellent for small documentation sets. It isn't good for larger ones. In order to improve the the standard library docs, I'm going to need to move them off Mkdocs. The tools that would be good for supporting StdLib would make creating a doc site for a small library much more difficult. So, sounds like multiple backends are going to be needed pretty soon.
I'm going to think about how to prioritize this against the other documentation related work I have (like writing it). If someone picks this up before me, awesome. Otherwise, I expect to be working on this within 2 to 4 weeks.

If you are interested in working on this issue, speak to @seantallen.

As per our conversation yesterday, one of the initial blockers for this work is getting a Pony AST parser in Pony.  Then we can invoke ponyc to spit out an AST file that was processed up to an appropriate pass, then run a document generator written in Pony on the AST.

This is currently waiting @jemc's pony parser work.


tkinterdnd2  not working even after using hook file

Following is the file structure of my project. The python file is where I will be using the tkinterdnd2 package. I have already copied the hook-tkinterdnd2.py file in the base directory of the project.
Word-cloud-generator
├── LICENSE
├── README.md
└── word_cloud_generator.py
However, I still get the following error when this command is executed:
 pyinstaller -F -w Word-cloud-generator/word_cloud_generator.py --additional-hooks-dir=.
Error message -
pyinstaller : The term 'pyinstaller' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:1 char:1
+ pyinstaller -F -w Word-cloud-generator/word_cloud_generator.py --addi ...
+ ~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (pyinstaller:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Please tell me what is the proper command to be executed as well as if any additional steps need to be followed.

Following is the file structure of my project. The python file is where I will be using the tkinterdnd2 package. I have already copied the hook-tkinterdnd2.py file in the base directory of the project.
Word-cloud-generator ├── LICENSE ├── README.md └── word_cloud_generator.py
However, I still get the following error when this command is executed:  pyinstaller -F -w Word-cloud-generator/word_cloud_generator.py --additional-hooks-dir=.
Error message -
pyinstaller : The term 'pyinstaller' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:1 char:1
+ pyinstaller -F -w Word-cloud-generator/word_cloud_generator.py --addi ...
+ ~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (pyinstaller:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Please tell me what is the proper command to be executed as well as if any additional steps need to be followed.

You need to install pyinstaller. That is a message error for pyinstaller, not tkinterdnd2


Convert Single Plot to Two

Issue
Is there a way to split the model one pager and/or budget allocator to multiple plots. I want to look at 10 spending variables and all of them in a single plot are cluttered. If not, do you have suggestions on how to start working on additional code that could do that?

For the moment it's only aggregated. In Script .func, you can find the onepager plotting Loop from line 1599 on. We'll consider it in the future pipeline how to best offer the plot per channel.

Thank you!


Vend official React wrappers

Use @lit-labs/react to generate react wrappers for our components

How about https://github.com/BuilderIO/mitosis so every framework can use the components?

Several reasons as to why we are using Lit:

web components work everywhere. This bug is just for a more idiomatic feel for React users
we have first party clients at Google so we are subject to Google's infrastructure

i.e. the heavy use of Sass, and mitosis is not allowed internally

having the Lit team at Google means that we can get personalized support for the underlying library
web components serve the same use case as mitosis without additional build complexity

UPDATE: probably going to push this post 1.0 but offer documentation on how to make your own with @lit-labs/react

@e111077, @asyncLiz  Yo there!
Thanks for recommending to use of the @lit-labs/react package to display components in react. It was very helpful. I appreciate that.
I also use it to render the icon component. I have a problem rendering this component. This problem occurs if I want to pass the &#xe834 Unicode code point to the component. This link lists the valid values for the icon component.
Could you help me find out what the problem is and how to fix it? Any suggestions are welcome
Here is a link to the problem where you can look at it in more detail

Hello, I believe there is a typo in that example. Valid Unicode should end in a semicolon ; in HTML.
https://codesandbox.io/s/material-web-react-forked-kkyfwl

@e111077 would there be a standard you have for events naming?
Like Lit docs always have on<event>: 'event', I assume this would follow?
Would be nice to know so once we get an official one, I could hot swap my code to the official react wrappers without much migration needed.

Yes, we would likely do a direct camel case event name conversion e.g.
close-menu -> onCloseMenu
input -> onInput (rather than onChange unless that really breaks things in forms)

We (Grayhat) are working on a thin React wrapper which is in-sync with this repository. It's in its early stages, we'd appreciate any help.
https://github.com/grayhatdevelopers/material-web-react


Fix failing tests in Python 3.10

[ ] Include documentation when adding new features.
[x] Include new tests or update existing tests when applicable.

Tests now pass on Python v3.10

See PR #12 for the test results.


Add version: JetBrains.WebStorm version 222.3739.57

Result: Installation Failed

Manifest
Add/Remove Programs

Name
WebStorm

Version
222.3739.57

Publisher
JetBrains s.r.o.

ProductCode

Auto-updated by vedantmgoyal2009/winget-pkgs-automation in workflow run 2808
Microsoft Reviewers: Open in CodeFlow

Close with reason: Already merged;


Check og:title before title tag

Should play a lot more nicer with og:description.

Unfortunately, there are cases where this is not a clear win. For example, when entering https://github.com/rails/rails/search?utf8=✓&q=def+sanitize&type=, one gets:

Before
After

The first one comes with more details.
... Also, what's up with that cut width?!

Oh my, this width is painful:
On a recent release:

On master:

Completely off-topic of this PR obviously, but have you looked into this by any chance, @xPaw?


[SCB-810] fix compile error for eclipse "Photon Release (4.8.0)"

parent class brave.http.HttpClientAdapter<Req, Resp> of ConsumerInvocationAdapter and ProviderInvocationAdapter, depend both zipkin1 and zipkin2

Coverage remained the same at 86.202% when pulling 81758bcb2556b93b417bd0a9eade1c80f999c74d on wujimin:fix-zipkin-dependency into 865f1a9204d0f1369ca65ce2c983ee81213ff392 on apache:master.


Simple Chart Maker [FEATURE / QUESTION]

AMCharts has a simple chart maker : https://live.amcharts.com
It makes chart generation process very easy.  You type or upload excel data, choose the chart properties and it gives you JS code to add to a webpage.
It should be possible to make a similar editor for chartjs!
Does this exist?

@nofreemeal - there is a chart generator at http://charts.livegap.com/chart.js/ (from https://github.com/chartjs/Chart.js/issues/3999). This is based on v2.5.0.
I don't see an option to upload data. @omarsedki may be able to comment on whether such a feature is planned.
Cheers!

You can easily add your data by clicking on the arrow in the bottom of the page. It will open a spreadsheet to change your data .
But the chart maker is not complete.and  i stopped working in it.

Closing as answered per @potatopeelings


eslint and prettier not working in project?

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Summary 💡
When I try to edit the code, eslint or pretter show many errors.
Code should be formatted
Examples 🌈
DateTimePickerElement.tsx indentation of 2 spaces but found 84.eslint[indent](https://eslint.org/docs/rules/indent)

I did not see any issue with eslint so far.


Mark no file with /dev/null to align with git diff

If you run git diff locally with a staged new file the diff will indicate that the file did not exist before with --- /dev/null.
I believe this should align with that?

Merged a bit to fast. You should adapt running tests before you make a pull request. I do it for this one.

Merged a bit to fast. You should adapt running tests before you make a pull request. I do it for this one.

@wumpz Oh yeah, sorry! Will do next time - Too used to having CI around...

@wumpz opened PR https://github.com/java-diff-utils/java-diff-utils/pull/94 to fix the test.


[legacy] Decomposing and recomposing of Matrix like AS3

I was meaning to try and find a good test case, so that I could be sure that this was an improvement, and would not cause any regressions. A change at this level makes me feel scared that we'll take a step backward regarding functionality that I knew already worked, but I think that Matrix adjustments could very well be the right thing for making things better. If you had a test case that enabled the "before" and "after" of this fix, that would be super helpful as well

Hi Joshua,
Sorry, it was closed because of my brach managment.
I opened another pull request (https://github.com/openfl/lime/pull/315). It has a reference to test case of this issue (https://github.com/dimanux/MatrixTest).


Configurator Firewall

added fw agent, fw driver, fw constants, unit test suit
added directory structure

Closing this pull request as a new one will be re-generated which will not have nsf deletion changes. This is to avoid confusion during code review.


Crash Trying to add a name to a Matter Transporter

I have had 2 crashes (back to back) attempting to add a name to my Matter Transporter.
I think it might be due to a cross mod interaction due to having over 220 mods installed.
Here is the crash report: http://pastebin.com/r3JdbYW7
Let me know if you need anything else

I hate these kind of crash reports where nothing in the crash log indicates rftools. I've seen this before but I have absolutely no clue what could cause this. No code of rftools seems involved in this :-/

If it is any consolation, this type of crash has been popping up for both Reactorcraft and Rotarycraft machines today, which is odd since I have changed nothing in the configs or added any mods in the past week and it just started happening today.


fix: http method types

Description
Fixes BT HTTP client method types

Testing required outside of automated testing?

[x] Not Applicable

Screenshots (if appropriate):

[x] Not Applicable

Rollback / Rollforward Procedure

[x] Roll Forward
[ ] Roll Back

Reviewer Checklist

[ ] Description of Change
[ ] Description of outside testing if applicable.
[ ] Description of Roll Forward / Backward Procedure
[ ] Documentation updated for Change

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Rename folder file_ingestion to files

Renamed file_ingestion folder to files to match the rest of the folder structure. file_ingestion refers to a specific feature while files is more generic and can include more code in the future related to files but not necessarily related to 1-click ingestion.

I agree with the change, but I'd prefer someone more involved to approve for merge.

#560 includes this change. closing


BelongsTo ServerSide Search

Version information

Laravel: v5.4
Voyager: v1.1.3
PHP: 7.1
Database: MySQL 5.6.4

Description
Can't search BelongTo items on Browse view in Server-Side Search
Steps To Reproduce
Steps to reproduce the behavior:

Go to BREAD
Create a new BelongsTo relationship.
Select Server-Side pagination
Go to the model Browse View
Try to search content based on the Related table.

Expected behavior
What is needed here, is to customize the seach-key dropdown filter, so it is possible to search based on the related model data.
Screenshots

Are you claiming you can search for the relationship field when server-side pagination is disabled?

Probably. Because Datatables is responsible for searching then.

The main problem is that I cannot search for related BelongsTo items in the datatable when it is ServerSide.

I would also like to be able to search on fields from relationships.

Has anyone found a way to do this? Loading all the table entries for large tables without server side pagination just so I can use datatables takes an awfully long time.

any update on this ? server side search using relationship field ?

@emptynick  any update ?
but if i want to search date base on customer name in ORDERs
but in order table i store id of customer
and i am making relation in model then why its not searching with name

@emptynick  like he is saying in #4216

I made an ugly code, just to see if it works. Please, help me to improve it to be under the Voyager standard.
in the Class:
https://github.com/the-control-group/voyager/blob/1.3/src/Http/Controllers/VoyagerBaseController.php#L91
I added the following code:
$relationFiled = $this->findRelationField($dataType, $search->key);
if(is_array($relationFiled)) {
    $query->whereHas($relationFiled[0], function(Builder $query) use ($relationFiled, $search_filter, $search_value) {
        $query->where($relationFiled[1], $search_filter, $search_value);
    });
} else {
    $query->where($relationFiled, $search_filter, $search_value);
}

Method findRelationField looks like:
protected function findRelationField(DataType $dataType, string $searchKey)
{
    foreach ($dataType->browseRows as $key => $row) {
        if ($row->type === 'relationship' &&
            $row->details->type === 'belongsTo' &&
            $row->details->column === $searchKey
        ) {
            return [$row->details->table, $row->details->label];
        }
    }

    return $searchKey;
}

With this code is possible to search by relatives in the Voyager browser model.
Of course, this requires to have methods in the Models, like:
public function countries()
{
     return $this->belongsTo('App\Country', 'country_id', 'id');
}

@Kolesar  bro can you explain how this function will perform and what will it do?

Hi @Spartaa ,
Thanks for the quick reply.
Atm, on the Voyager Admin browser we have the server and client-side searching. Client-side works with JS and it works fine, but server-side searching does not work properly. We have to search by relation ID instead of by relation show field (what we select in BREAD).
For example:
Our Model table show is user model with relation field countries. If we set all parameters in the BelongsTo in BREAD for this modal, we will see in user modal table instead country_id, country_name. BUT! If we want to use searching by server-side it will not work as a user expect. Users can select Country and filter Contain for example but MUST enter country_id in the search field, not Country Name.
With this code, the end-user can search by country_name without any problem. I'm not sure that this code following the Voyager standard and that is the reason why I ask you to help me to improve this code to be under the Voyager standard. And need, unit tests and so on :)

@emptynick  Can you check this code is under the Voyager standard. And need, unit tests and so on :)

@Kolesar I am going to try this in my module then I will let you know and we can see how can we improve it more.

this code will be added after Line 91 @Kolesar  where they are saying about remove relation feild in a browse?

this code will be added after Line 91 @Kolesar where they are saying about remove relation feild in a browse?

Line 91 will be replaces with this code, exactly:
$relationFiled = $this->findRelationField($dataType, $search->key);
if(is_array($relationFiled)) {
    $query->whereHas($relationFiled[0], function(Builder $query) use ($relationFiled, $search_filter, $search_value) {
        $query->where($relationFiled[1], $search_filter, $search_value);
    });
} else {
    $query->where($relationFiled, $search_filter, $search_value);
}

Argument 1 passed to App\Http\Controllers\Wallet\WalletController::App\Http\Controllers\Wallet{closure}() must be an instance of App\Http\Controllers\Wallet\Builder, instance of Illuminate\Database\Eloquent\Builder given, called in E:\Quaid Ventures\qareeb_captain\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php on line 962
@Kolesar
Quaid Ventures\qareeb_captain\app\Http\Controllers\Wallet\WalletController.php:116
                $query->whereHas($relationFiled[0], function(Builder $query) use ($relationFiled, $search_filter, $search_value) {

Instead  Builder $query use only $query it will work fine @Kolesar
remove Builder

Instead Builder $query use only $query it will work fine @Kolesar
remove Builder

No! You use the wrong class. You have to use use Illuminate\Database\Eloquent\Builder; ;)

Instead Builder $query use only $query it will work fine @Kolesar
remove Builder

No! You use the wrong class. You have to use use Illuminate\Database\Eloquent\Builder; ;)

I removed Builder it start working fine thats why i thought may be that causing

Unfortunately we don't rely on relationship-methods. So we can't use the code as is.
Instead, we'd need to do some left-joins in the search-query.

@emptynick I saw in the MR so many requests for many different improvements. One or two of them are related to this topic and they implement it with the leftJoin, but you are not accepting their MR.
Can you check it, please?
If you need more developer hands on this, just tell us and we will give some effort :)

@emptynick I saw in the MR so many requests for many different improvements. One or two of them are related to this topic and they implement it with the leftJoin, but you are not accepting their MR.
Can you check it, please?
If you need more developer hands on this, just tell us and we will give some effort :)

I agree with @Kolesar  their is lot of  many requests for many different improvements and request are abandoned or pending

I agree with @Kolesar there is many requests for many different improvements and request are abandoned or pending

This is an open source project. Open source projects rely on users to create PRs and check PRs for quality and functionality.

we know that u dont get paid then why u r rejecting public requests then?

we also want to make it more perfect

I didn't reject anything?

Guys, can we move the discussion to slack?

Yes Sure

Guys, can we move the discussion to slack?

Is there any update on having associated data being searchable?

Hi All,
Was also experiencing this problem, I overrode VoyagerBaseController & added the following in place of lines 92-96 v1.42.
// CHANGED - Start
if ($search->value != '' && $search->key && $search->filter) {
    $search_filter = ($search->filter == 'equals') ? '=' : 'LIKE';
    $search_value = ($search->filter == 'equals') ? $search->value : '%'.$search->value.'%';

    $isRelation = false;
    $relationshipIds = [];

    foreach ($dataType->browseRows as $key => $row) {
        if ($row->type === 'relationship' &&
            $row->details->type === 'belongsTo' &&
            $row->details->column === $search->key
        ) {

            $relationshipIds = DB::table($row->details->table)
                ->select($row->details->key, $row->details->label)
                ->where($row->details->label, $search_filter, $search_value)
                ->pluck($row->details->key)
                ->toArray();

            $isRelation = true;
        }
    }

    if($isRelation) {
        $query->whereIn($search->key, $relationshipIds);
    } else {
        $query->where($search->key, $search_filter, $search_value);
    }
}
// CHANGED - End

The above relies on a BelongsTO Relationship BREAD field for displaying the label of the relationship instead of an id.
Should work for any belongsTo relationship as it takes the labels & keys needed defined in the BREAD.
Hope this may be of some use.

Hi All,
Was also experiencing this problem, I overrode VoyagerBaseController & added the following in place of lines 92-96 v1.42.
// CHANGED - Start
if ($search->value != '' && $search->key && $search->filter) {
    $search_filter = ($search->filter == 'equals') ? '=' : 'LIKE';
    $search_value = ($search->filter == 'equals') ? $search->value : '%'.$search->value.'%';

    $isRelation = false;
    $relationshipIds = [];

    foreach ($dataType->browseRows as $key => $row) {
        if ($row->type === 'relationship' &&
            $row->details->type === 'belongsTo' &&
            $row->details->column === $search->key
        ) {

            $relationshipIds = DB::table($row->details->table)
                ->select($row->details->key, $row->details->label)
                ->where($row->details->label, $search_filter, $search_value)
                ->pluck($row->details->key)
                ->toArray();

            $isRelation = true;
        }
    }

    if($isRelation) {
        $query->whereIn($search->key, $relationshipIds);
    } else {
        $query->where($search->key, $search_filter, $search_value);
    }
}
// CHANGED - End

The above relies on a BelongsTO Relationship BREAD field for displaying the label of the relationship instead of an id.
Should work for any belongsTo relationship as it takes the labels & keys needed defined in the BREAD.
Hope this may be of some use.

@ajduff14 that looks quite similar on what I'm doing in #5185.
I'm using a global scope because I tried to do it all in one query but since that didn't work I should probably drop it, thanks for the idea!
If you can have a look at my PR there is also the fix for ordering, more people can test it more likely is going to be merged.

@ajduff14 that looks quite similar on what I'm doing in #5185.
I'm using a global scope because I tried to do it all in one query but since that didn't work I should probably drop it, thanks for the idea!
If you can have a look at my PR there is also the fix for ordering, more people can test it more likely is going to be merged.

@ajduff14 that looks quite similar on what I'm doing in #5185.
I'm using a global scope because I tried to do it all in one query but since that didn't work I should probably drop it, thanks for the idea!
If you can have a look at my PR there is also the fix for ordering, more people can test it more likely is going to be merged.

Hi Crayon,
The error appears again and seems like it is caused by others' updates
I just check on the current code and seems like your modification (in file VoyagerBaseController) had some updates from other developers.
Hope you can get some help around there.

Hi @ajduff14,
It worked great for me thanks for the solution.
I was getting the error of unknown column at the database, something like SQLSTATE[42S22]: Column not found: 1054 Unknown column 'inspections.inspection_belongsto_lote_relationship' in 'where clause' (SQL: select count(*) as aggregate from inspections where inspections.inspection_belongsto_lote_relationship LIKE %210212%).

Hi @ajduff14,
I'm not sure if your comment was saying that you are still getting the "column not found" error, or if that was the error the above code fixed.
If it's the former, you may be interested in issue #5412 .

Hi @jegardiner
Sorry, I wasn't clear with my answer, the code above fixed the error. I posted the error for future readers that may have the same issue.


Add reload option in metadata

Add a reload option for each flag. This way we can be able to reload the application if a flag which is involved in how is setup the application changes.

update


Add possibility to skip empty lines

Add possibility to skip empty lines. Empty line is line which only contains deliminators.

Fixed in pull #15 thanks to @emmorts


[Monterey, Private API] Messages sent as replies with subject line text and a space in the main body appear to not deliver/disappear

No content

Issue created by BlueBubbles Bot in the BlueBubbles commnity on behalf of @CSab6482 in #server-support.

I'm not able to reproduce this on Big Sur. Will need to do further testing on Monterey