Key Auth Plugin throws 400 Bad Request when requests doesn't have content-type using key_in_body

Summary
When Key Auth plugin is configured to use key_in_body option,  if a request contains an apikey in the query string and not in the body it should still work as normal. Instead, after https://github.com/Kong/kong/commit/3a642f52ffbfaabae225738ba8f9cb1d4fe9333b, when a request doesn't have any content-type, the plugins returns a 400 status code regardless of whether the request had an apikey in the query/header
Steps To Reproduce

Create an API with Key Auth plugin and key_in_body = false
Perform a request with an API Key in the query string --> Returns OK response
Patch the plugin to use key_in_body = true
Perform a request with an API Key in the query string --> Returns Bad Request response, But it should keep working
Perform a request with an API Key in the query string and a valid content type --> Returns OK response

If the body or the content type is not valid, it should ignore it but check other sources,  not throw  400.
Additional Details & Logs

Kong version (Since https://github.com/Kong/kong/commit/3a642f52ffbfaabae225738ba8f9cb1d4fe9333b)

I would think a key_in_body field refers to putting the API key in the body and explicitly not a query or header param. Maybe the plugin used to not catch it(would have been an unfound bug not to catch it right?), but just was reading some PR's and git issues and stumbled upon this one and started scratching my head.


E2E failed on first test - cannot find cluster resource

Both kubeconfigs of Cluster A and Cluster B, show that the cluster resource "nmanos-cluster-b" exists:

$ export KUBECONFIG=/mnt/skynet-data/ocp-install/ocpup/.config/cl1/auth/kubeconfig
$ oc describe cluster nmanos-cluster-b -n submariner-operator
Name:         nmanos-cluster-b
Namespace:    submariner-operator
Labels:       <none>
Annotations:  <none>
API Version:  submariner.io/v1
Kind:         Cluster
Metadata:
  Creation Timestamp:  2020-05-12T09:56:26Z
  Generation:          1
  Resource Version:    445097
  Self Link:           /apis/submariner.io/v1/namespaces/submariner-operator/clusters/nmanos-cluster-b
  UID:                 3ef6554f-a054-4f06-be71-514d04fd1179
Spec:
  cluster_cidr:
    <IP_ADDRESS>/14
  cluster_id:  nmanos-cluster-b
  color_codes:
    blue
  global_cidr:
  service_cidr:
    <IP_ADDRESS>/16
Events:  <none>

$ export KUBECONFIG=/mnt/skynet-data/ocp-install/nmanos-cluster-a/auth/kubeconfig
$ oc describe cluster nmanos-cluster-b -n submariner-operator
Name:         nmanos-cluster-b
Namespace:    submariner-operator
Labels:       <none>
Annotations:  <none>
API Version:  submariner.io/v1
Kind:         Cluster
Metadata:
  Creation Timestamp:  2020-05-12T09:56:26Z
  Generation:          1
  Resource Version:    111859
  Self Link:           /apis/submariner.io/v1/namespaces/submariner-operator/clusters/nmanos-cluster-b
  UID:                 52500002-e365-444d-a5e3-c6a99582b5b8
Spec:
  cluster_cidr:
    <IP_ADDRESS>/14
  cluster_id:  nmanos-cluster-b
  color_codes:
    blue
  global_cidr:
  service_cidr:
    <IP_ADDRESS>/16

However, when running the E2E, it fails right away (on the first test):
"Failed to find the submariner Cluster for nmanos-cluster-b" :
$ export KUBECONFIG=/mnt/skynet-data/ocp-install/nmanos-cluster-a/auth/kubeconfig:/mnt/skynet-data/ocp-install/ocpup/.config/cl1/auth/kubeconfig

$  /mnt/skynet-data/ocp-install/oc config get-contexts
CURRENT   NAME               CLUSTER            AUTHINFO   NAMESPACE
*         nmanos-cluster-a   nmanos-cluster-a   admin      test-submariner
nmanos-cluster-b   default-cl1        admin      test-submariner

$ go test -v ./test/e2e -args -dp-context nmanos-cluster-a -dp-context nmanos-cluster-b -connection-timeout 30 -connection-attempts 3 -ginkgo.v -ginkgo.randomizeAllSpecs -ginkgo.reportPassed -ginkgo.reportFile /mnt/skynet-data/ocp-install/e2e_junit_result.xml
go: finding cloud.google.com/go v0.34.0
go: finding github.com/google/uuid v1.0.0
=== RUN   TestE2E
Running Suite: Submariner E2E suite
===================================
Random Seed:<PHONE_NUMBER> - Will randomize all specs
Will run 19 of 20 specs

STEP: Creating kubernetes clients
STEP: Creating submariner clients
Failure [33.135 seconds]
[BeforeSuite] BeforeSuite
/home/jenkins/go/pkg/mod/github.com/submariner-io/shipyard@v0.0.0-20200415131458-43e0c8dc8ea3/test/e2e/e2e.go:24

Failed to find the submariner Cluster for nmanos-cluster-b. No Cluster found
Unexpected error:
<*url.Error | 0xc00028d260>: {
Op: "Get",
URL: "https://api.default-cl1.devcluster.openshift.com:6443/apis/submariner.io/v1/namespaces/submariner/clusters/nmanos-cluster-b",
Err: {s: "EOF"},
}
Get https://api.default-cl1.devcluster.openshift.com:6443/apis/submariner.io/v1/namespaces/submariner/clusters/nmanos-cluster-b: EOF
occurred

/home/jenkins/go/pkg/mod/github.com/submariner-io/shipyard@v0.0.0-20200415131458-43e0c8dc8ea3/test/e2e/framework/framework.go:355

Note that Unit-Tests (pkg) has passed, but only the E2E on my existing clusters has failed.
Full CI report:
https://qe-jenkins-csb-skynet.cloud.paas.psi.redhat.com/job/Submariner-OSP-AWS/338/Test-Report

As @mangelajo suggested, I changed cluster B kubeconfig, to have NAME=CLUSTER(= nmanos-cluster-b), but the same error returned when running E2E:
$ export KUBECONFIG="/mnt/skynet-data/ocp-install/nmanos-cluster-a/auth/kubeconfig:/mnt/skynet-data/ocp-install/ocpup/.config/cl1/auth/kubeconfig.new"

bash-4.2$ oc config get-contexts
CURRENT   NAME               CLUSTER            AUTHINFO   NAMESPACE
*         nmanos-cluster-a   nmanos-cluster-a   admin      test-submariner
          nmanos-cluster-b   nmanos-cluster-b   admin      test-submariner
bash-4.2$ go test -v ./test/e2e -args -dp-context nmanos-cluster-a -dp-context nmanos-cluster-b -connection-timeout 30 -connection-attempts 3 -ginkgo.v -ginkgo.randomizeAllSpecs -ginkgo.reportPassed -ginkgo.reportFile /mnt/skynet-data/ocp-install/e2e_junit_result.xml
can't load package: package ./test/e2e: cannot find package "." in:
	/test/e2e
bash-4.2$ cd /home/jenkins/go/src/github.com/submariner-io/submariner
bash-4.2$ go test -v ./test/e2e -args -dp-context nmanos-cluster-a -dp-context nmanos-cluster-b -connection-timeout 30 -connection-attempts 3 -ginkgo.v -ginkgo.randomizeAllSpecs -ginkgo.reportPassed -ginkgo.reportFile /mnt/skynet-data/ocp-install/e2e_junit_result.xml
=== RUN   TestE2E
Running Suite: Submariner E2E suite
===================================
Random Seed:<PHONE_NUMBER> - Will randomize all specs
Will run 19 of 20 specs

STEP: Creating kubernetes clients
STEP: Creating submariner clients
Failure [120.434 seconds]
[BeforeSuite] BeforeSuite
/home/jenkins/go/pkg/mod/github.com/submariner-io/shipyard@v0.0.0-20200415131458-43e0c8dc8ea3/test/e2e/e2e.go:24

  Failed to find the submariner Cluster for nmanos-cluster-b. No Cluster found
  Unexpected error:
      <*errors.errorString | 0xc0002e6090>: {
          s: "timed out waiting for the condition",
      }
      timed out waiting for the condition
  occurred

  /home/jenkins/go/pkg/mod/github.com/submariner-io/shipyard@v0.0.0-20200415131458-43e0c8dc8ea3/test/e2e/framework/framework.go:355
------------------------------

JUnit path was configured: /mnt/skynet-data/ocp-install/e2e_junit_result.xml

JUnit report was created: /mnt/skynet-data/ocp-install/e2e_junit_result.xml

Ran 19 of 0 Specs in 120.599 seconds
FAIL! -- 0 Passed | 19 Failed | 0 Pending | 0 Skipped
--- FAIL: TestE2E (120.60s)
FAIL
FAIL	github.com/submariner-io/submariner/test/e2e	120.685s

@mkolesnik , @tpantelis  I've also tried to run the E2E directly with subctl verify-connectivity, but it still fails on timeouts:
subctl verify-connectivity --verbose /mnt/skynet-data/ocp-install/nmanos-cluster-a/auth/kubeconfig /mnt/skynet-data/ocp-install/ocpup/.config/cl1/auth/kubeconfig
Running Suite: Submariner E2E suite
===================================
Random Seed:<PHONE_NUMBER>
Will run 16 of 16 specs

STEP: Creating kubernetes clients
[dataplane] Basic TCP connectivity tests across clusters without discovery when a pod connects via TCP to a remote pod when the pod is not on a gateway and the remote pod is not on a gateway
  should have sent the expected data from the pod to the other pod
  /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:15
STEP: Creating namespace objects with basename "dataplane-conn-nd"
STEP: Generated namespace "e2e-tests-dataplane-conn-nd-8z8jc" in cluster "ClusterA" to execute the tests in
STEP: Creating namespace "e2e-tests-dataplane-conn-nd-8z8jc" in cluster "ClusterB"
STEP: Creating a listener pod in cluster "ClusterB", which will wait for a handshake over TCP
May 14 17:37:18.920: INFO: Will send traffic to IP: <IP_ADDRESS>
STEP: Creating a connector pod in cluster "ClusterA", which will attempt the specific UUID handshake over TCP
STEP: Waiting for the listener pod "tcp-check-listenergnzfk" to exit, returning what listener sent
May 14 17:39:19.004: INFO: Pod "tcp-check-listenergnzfk" output:
listening on <IP_ADDRESS>:1234 ...
nc: timeout

STEP: Waiting for the connector pod "tcp-check-podgxqxm" to exit, returning what connector sent
May 14 17:39:19.039: INFO: Pod "tcp-check-podgxqxm" output:
nc: <IP_ADDRESS> (<IP_ADDRESS>:1234): No route to host
nc: <IP_ADDRESS> (<IP_ADDRESS>:1234): No route to host

May 14 17:39:19.039: INFO: Connector pod has IP: <IP_ADDRESS>
STEP: Deleting namespace "e2e-tests-dataplane-conn-nd-8z8jc" on cluster "ClusterA"
STEP: Deleting namespace "e2e-tests-dataplane-conn-nd-8z8jc" on cluster "ClusterB"

• Failure [130.606 seconds]
[dataplane] Basic TCP connectivity tests across clusters without discovery
/home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:9
  when a pod connects via TCP to a remote pod
  /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:32
    when the pod is not on a gateway and the remote pod is not on a gateway
    /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:38
      should have sent the expected data from the pod to the other pod [It]
      /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:15

      Expected
          <int32>: 1
      to equal
          <int32>: 0

      /home/jenkins/go/pkg/mod/github.com/submariner-io/shipyard@v0.0.0-20200424120554-752db6dc1c90/test/e2e/framework/network_pods.go:139
------------------------------
[dataplane] Basic TCP connectivity tests across clusters without discovery when a pod connects via TCP to a remote pod when the pod is not on a gateway and the remote pod is on a gateway
  should have sent the expected data from the pod to the other pod
  /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:15
STEP: Creating namespace objects with basename "dataplane-conn-nd"
STEP: Generated namespace "e2e-tests-dataplane-conn-nd-wlnh2" in cluster "ClusterA" to execute the tests in
STEP: Creating namespace "e2e-tests-dataplane-conn-nd-wlnh2" in cluster "ClusterB"
STEP: Creating a listener pod in cluster "ClusterB", which will wait for a handshake over TCP
May 14 17:39:25.170: INFO: Will send traffic to IP: <IP_ADDRESS>
STEP: Creating a connector pod in cluster "ClusterA", which will attempt the specific UUID handshake over TCP
STEP: Waiting for the listener pod "tcp-check-listenermksxl" to exit, returning what listener sent
May 14 17:41:25.251: INFO: Pod "tcp-check-listenermksxl" output:
listening on <IP_ADDRESS>:1234 ...
nc: timeout

STEP: Waiting for the connector pod "tcp-check-podmht57" to exit, returning what connector sent
May 14 17:41:25.286: INFO: Pod "tcp-check-podmht57" output:
nc: <IP_ADDRESS> (<IP_ADDRESS>:1234): No route to host
nc: <IP_ADDRESS> (<IP_ADDRESS>:1234): No route to host

May 14 17:41:25.286: INFO: Connector pod has IP: <IP_ADDRESS>
STEP: Deleting namespace "e2e-tests-dataplane-conn-nd-wlnh2" on cluster "ClusterA"
STEP: Deleting namespace "e2e-tests-dataplane-conn-nd-wlnh2" on cluster "ClusterB"

• Failure [126.250 seconds]
[dataplane] Basic TCP connectivity tests across clusters without discovery
/home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:9
  when a pod connects via TCP to a remote pod
  /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:32
    when the pod is not on a gateway and the remote pod is on a gateway
    /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:42
      should have sent the expected data from the pod to the other pod [It]
      /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:15

      Expected
          <int32>: 1
      to equal
          <int32>: 0

      /home/jenkins/go/pkg/mod/github.com/submariner-io/shipyard@v0.0.0-20200424120554-752db6dc1c90/test/e2e/framework/network_pods.go:139
------------------------------
[dataplane] Basic TCP connectivity tests across clusters without discovery when a pod connects via TCP to a remote pod when the pod is on a gateway and the remote pod is not on a gateway
  should have sent the expected data from the pod to the other pod
  /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:15
STEP: Creating namespace objects with basename "dataplane-conn-nd"
STEP: Generated namespace "e2e-tests-dataplane-conn-nd-krvl8" in cluster "ClusterA" to execute the tests in
STEP: Creating namespace "e2e-tests-dataplane-conn-nd-krvl8" in cluster "ClusterB"
STEP: Creating a listener pod in cluster "ClusterB", which will wait for a handshake over TCP
May 14 17:41:31.425: INFO: Will send traffic to IP: <IP_ADDRESS>
STEP: Creating a connector pod in cluster "ClusterA", which will attempt the specific UUID handshake over TCP
STEP: Waiting for the listener pod "tcp-check-listenermz2ft" to exit, returning what listener sent
May 14 17:43:31.506: INFO: Pod "tcp-check-listenermz2ft" output:
listening on <IP_ADDRESS>:1234 ...
nc: timeout

STEP: Waiting for the connector pod "tcp-check-podzd76t" to exit, returning what connector sent
May 14 17:43:31.541: INFO: Pod "tcp-check-podzd76t" output:
nc: <IP_ADDRESS> (<IP_ADDRESS>:1234): No route to host
nc: <IP_ADDRESS> (<IP_ADDRESS>:1234): No route to host

May 14 17:43:31.541: INFO: Connector pod has IP: <IP_ADDRESS>
STEP: Deleting namespace "e2e-tests-dataplane-conn-nd-krvl8" on cluster "ClusterA"
STEP: Deleting namespace "e2e-tests-dataplane-conn-nd-krvl8" on cluster "ClusterB"

• Failure [126.251 seconds]
[dataplane] Basic TCP connectivity tests across clusters without discovery
/home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:9
  when a pod connects via TCP to a remote pod
  /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:32
    when the pod is on a gateway and the remote pod is not on a gateway
    /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:46
      should have sent the expected data from the pod to the other pod [It]
      /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:15

      Expected
          <int32>: 1
      to equal
          <int32>: 0

      /home/jenkins/go/pkg/mod/github.com/submariner-io/shipyard@v0.0.0-20200424120554-752db6dc1c90/test/e2e/framework/network_pods.go:139
------------------------------
[dataplane] Basic TCP connectivity tests across clusters without discovery when a pod connects via TCP to a remote pod when the pod is on a gateway and the remote pod is on a gateway
  should have sent the expected data from the pod to the other pod
  /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:15
STEP: Creating namespace objects with basename "dataplane-conn-nd"
STEP: Generated namespace "e2e-tests-dataplane-conn-nd-sgd6j" in cluster "ClusterA" to execute the tests in
STEP: Creating namespace "e2e-tests-dataplane-conn-nd-sgd6j" in cluster "ClusterB"
STEP: Creating a listener pod in cluster "ClusterB", which will wait for a handshake over TCP
May 14 17:43:36.807: INFO: Will send traffic to IP: <IP_ADDRESS>
STEP: Creating a connector pod in cluster "ClusterA", which will attempt the specific UUID handshake over TCP
STEP: Waiting for the listener pod "tcp-check-listenermz4qw" to exit, returning what listener sent
May 14 17:45:36.919: INFO: Pod "tcp-check-listenermz4qw" output:
listening on <IP_ADDRESS>:1234 ...
nc: timeout

STEP: Waiting for the connector pod "tcp-check-podw4b7p" to exit, returning what connector sent
May 14 17:45:37.123: INFO: Pod "tcp-check-podw4b7p" output:
nc: <IP_ADDRESS> (<IP_ADDRESS>:1234): No route to host
nc: <IP_ADDRESS> (<IP_ADDRESS>:1234): No route to host

May 14 17:45:37.123: INFO: Connector pod has IP: <IP_ADDRESS>
STEP: Deleting namespace "e2e-tests-dataplane-conn-nd-sgd6j" on cluster "ClusterA"
STEP: Deleting namespace "e2e-tests-dataplane-conn-nd-sgd6j" on cluster "ClusterB"

• Failure [125.583 seconds]
[dataplane] Basic TCP connectivity tests across clusters without discovery
/home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:9
  when a pod connects via TCP to a remote pod
  /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:32
    when the pod is on a gateway and the remote pod is on a gateway
    /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:50
      should have sent the expected data from the pod to the other pod [It]
      /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:15

      Expected
          <int32>: 1
      to equal
          <int32>: 0

      /home/jenkins/go/pkg/mod/github.com/submariner-io/shipyard@v0.0.0-20200424120554-752db6dc1c90/test/e2e/framework/network_pods.go:139
------------------------------
[dataplane] Basic TCP connectivity tests across clusters without discovery when a pod connects via TCP to a remote service when the pod is not on a gateway and the remote service is not on a gateway
  should have sent the expected data from the pod to the other pod
  /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:15
STEP: Creating namespace objects with basename "dataplane-conn-nd"
STEP: Generated namespace "e2e-tests-dataplane-conn-nd-c2s4h" in cluster "ClusterA" to execute the tests in
STEP: Creating namespace "e2e-tests-dataplane-conn-nd-c2s4h" in cluster "ClusterB"
STEP: Creating a listener pod in cluster "ClusterB", which will wait for a handshake over TCP
STEP: Pointing a service ClusterIP to the listener pod in cluster "ClusterB"
May 14 17:45:48.273: INFO: Will send traffic to IP: <IP_ADDRESS>
STEP: Creating a connector pod in cluster "ClusterA", which will attempt the specific UUID handshake over TCP
STEP: Waiting for the listener pod "tcp-check-listener279qc" to exit, returning what listener sent
May 14 17:47:48.629: INFO: Pod "tcp-check-listener279qc" output:
listening on <IP_ADDRESS>:1234 ...
nc: timeout

STEP: Waiting for the connector pod "tcp-check-podrvvqn" to exit, returning what connector sent
May 14 17:47:48.665: INFO: Pod "tcp-check-podrvvqn" output:
nc: <IP_ADDRESS> (<IP_ADDRESS>:1234): No route to host
nc: <IP_ADDRESS> (<IP_ADDRESS>:1234): No route to host

May 14 17:47:48.665: INFO: Connector pod has IP: <IP_ADDRESS>
STEP: Deleting namespace "e2e-tests-dataplane-conn-nd-c2s4h" on cluster "ClusterA"
STEP: Deleting namespace "e2e-tests-dataplane-conn-nd-c2s4h" on cluster "ClusterB"

• Failure [131.542 seconds]
[dataplane] Basic TCP connectivity tests across clusters without discovery
/home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:9
  when a pod connects via TCP to a remote service
  /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:55
    when the pod is not on a gateway and the remote service is not on a gateway
    /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:61
      should have sent the expected data from the pod to the other pod [It]
      /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:15

      Expected
          <int32>: 1
      to equal
          <int32>: 0

      /home/jenkins/go/pkg/mod/github.com/submariner-io/shipyard@v0.0.0-20200424120554-752db6dc1c90/test/e2e/framework/network_pods.go:139
------------------------------
[dataplane] Basic TCP connectivity tests across clusters without discovery when a pod connects via TCP to a remote service when the pod is not on a gateway and the remote service is on a gateway
  should have sent the expected data from the pod to the other pod
  /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:15
STEP: Creating namespace objects with basename "dataplane-conn-nd"
STEP: Generated namespace "e2e-tests-dataplane-conn-nd-7nq68" in cluster "ClusterA" to execute the tests in
STEP: Creating namespace "e2e-tests-dataplane-conn-nd-7nq68" in cluster "ClusterB"
STEP: Creating a listener pod in cluster "ClusterB", which will wait for a handshake over TCP
STEP: Pointing a service ClusterIP to the listener pod in cluster "ClusterB"
May 14 17:47:53.997: INFO: Will send traffic to IP: <IP_ADDRESS>
STEP: Creating a connector pod in cluster "ClusterA", which will attempt the specific UUID handshake over TCP
STEP: Waiting for the listener pod "tcp-check-listenerx78ft" to exit, returning what listener sent
May 14 17:49:54.091: INFO: Pod "tcp-check-listenerx78ft" output:
listening on <IP_ADDRESS>:1234 ...
nc: timeout

STEP: Waiting for the connector pod "tcp-check-podvjt56" to exit, returning what connector sent
May 14 17:49:54.127: INFO: Pod "tcp-check-podvjt56" output:
nc: <IP_ADDRESS> (<IP_ADDRESS>:1234): No route to host
nc: <IP_ADDRESS> (<IP_ADDRESS>:1234): No route to host

May 14 17:49:54.127: INFO: Connector pod has IP: <IP_ADDRESS>
STEP: Deleting namespace "e2e-tests-dataplane-conn-nd-7nq68" on cluster "ClusterA"
STEP: Deleting namespace "e2e-tests-dataplane-conn-nd-7nq68" on cluster "ClusterB"

• Failure [125.459 seconds]
[dataplane] Basic TCP connectivity tests across clusters without discovery
/home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:9
  when a pod connects via TCP to a remote service
  /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:55
    when the pod is not on a gateway and the remote service is on a gateway
    /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:65
      should have sent the expected data from the pod to the other pod [It]
      /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:15

      Expected
          <int32>: 1
      to equal
          <int32>: 0

      /home/jenkins/go/pkg/mod/github.com/submariner-io/shipyard@v0.0.0-20200424120554-752db6dc1c90/test/e2e/framework/network_pods.go:139
------------------------------
[dataplane] Basic TCP connectivity tests across clusters without discovery when a pod connects via TCP to a remote service when the pod is on a gateway and the remote service is not on a gateway
  should have sent the expected data from the pod to the other pod
  /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:15
STEP: Creating namespace objects with basename "dataplane-conn-nd"
STEP: Generated namespace "e2e-tests-dataplane-conn-nd-cm2zt" in cluster "ClusterA" to execute the tests in
STEP: Creating namespace "e2e-tests-dataplane-conn-nd-cm2zt" in cluster "ClusterB"
STEP: Creating a listener pod in cluster "ClusterB", which will wait for a handshake over TCP
STEP: Pointing a service ClusterIP to the listener pod in cluster "ClusterB"
May 14 17:49:59.462: INFO: Will send traffic to IP: <IP_ADDRESS>
STEP: Creating a connector pod in cluster "ClusterA", which will attempt the specific UUID handshake over TCP
STEP: Waiting for the listener pod "tcp-check-listenerftlf6" to exit, returning what listener sent
May 14 17:51:59.544: INFO: Pod "tcp-check-listenerftlf6" output:
listening on <IP_ADDRESS>:1234 ...
nc: timeout

STEP: Waiting for the connector pod "tcp-check-podkjll5" to exit, returning what connector sent
May 14 17:51:59.579: INFO: Pod "tcp-check-podkjll5" output:
nc: <IP_ADDRESS> (<IP_ADDRESS>:1234): No route to host
nc: <IP_ADDRESS> (<IP_ADDRESS>:1234): No route to host

May 14 17:51:59.579: INFO: Connector pod has IP: <IP_ADDRESS>
STEP: Deleting namespace "e2e-tests-dataplane-conn-nd-cm2zt" on cluster "ClusterA"
STEP: Deleting namespace "e2e-tests-dataplane-conn-nd-cm2zt" on cluster "ClusterB"

• Failure [125.452 seconds]
[dataplane] Basic TCP connectivity tests across clusters without discovery
/home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:9
  when a pod connects via TCP to a remote service
  /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:55
    when the pod is on a gateway and the remote service is not on a gateway
    /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:69
      should have sent the expected data from the pod to the other pod [It]
      /home/jenkins/go/pkg/mod/github.com/submariner-io/submariner@v0.3.0/test/e2e/dataplane/tcp_pod_connectivity.go:15

      Expected
          <int32>: 1
      to equal
          <int32>: 0

      /home/jenkins/go/pkg/mod/github.com/submariner-io/shipyard@v0.0.0-20200424120554-752db6dc1c90/test/e2e/framework/network_pods.go:139
------------------------------

It's still failing in submariner latest commit (Framework E2E detection should be independent of cluster IDs #566):
https://qe-jenkins-csb-skynet.cloud.paas.psi.redhat.com/job/Submariner-OSP-AWS/385/Test-Report
(look under "Testing Submariner End-to-End tests with GO")
@mangelajo  is this bug related to https://github.com/submariner-io/submariner-operator/issues/381  ?
If so, can the fix be implemented also when running E2E with go test directly ?


Create setting to stop queue gauge

Without this setting it can be pretty chatty.

Thank you for your PR. We apologize we couldn't get to it sooner however we are no longer doing any new feature work for notifications.


Feature/ilm tests

@JonathanRosado did you run the test suite outside of the container as well with make test?

@JonathanRosado this pull request is no longer valid, correct?


A

[ ] #### > ~~~~@@johanbay @Alexanderalonso890 ~~~~

Um I don't know exactly how to use git hub yet I'm not understanding
clearing on some things
On Fri, Jan 5, 2024, 3:06 PM Alexanderalonso890 @.***>
wrote:

—
Reply to this email directly, view it on GitHub
https://github.com/puppeteer/replay/issues/734, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AXMJYJFSCQUF7ELRB5CXZOLYNBTOZAVCNFSM6AAAAABBO6XT5SVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA3DQMBTHE4DOOA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Don't use deprecated fixer in integration tests

I've spotted this, so this one is to update integration tests.
@keradus @SpacePossum @julienfalque WDYT?

Im not sure, I mean as long as we support the deprecated fixer it might be best to keep testing so we don't break it by accident
looking at the linked PR Im not 100% sure what was going on at the time...  ping @keradus for this PR as well :)

I think we should keep testing it. 👎 on merging this into 2.x.

Deprecated doesn't mean that it shouldn't be used by people. It just means that people shouldn't write new code that uses it, and should be prepared for it to possibly go away in a future major release.


Wrong dataclass AuthorizationData (v1.6)

Based on the documentation on section "7.1. AuthorizationData", this class has the idTagInfo field Optional
In file ocpp.v16.datatypes.py, the field is actually optional but the default is missing
current version (0.16.0)
@dataclass
class AuthorizationData:
    """
    Elements that constitute an entry of a Local Authorization List update.
    """

    id_tag: str
    id_tag_info: Optional[IdTagInfo]

In my opinion, it should be
@dataclass
class AuthorizationData:
    """
    Elements that constitute an entry of a Local Authorization List update.
    """

    id_tag: str
    id_tag_info: Optional[IdTagInfo] = None

Without that correction, the following code crashes
k = {"id_tag": "1234"}
k_dataclass = AuthorizationData(**k)

with
TypeError: AuthorizationData.__init__() missing 1 required positional argument: 'id_tag_info'

In the meantime, the only fix I have found at application level is
k = {"id_tag": "1234"}
if "id_tag_info" not in k:
    k["id_tag_info"] = None
k_dataclass = AuthorizationData(**k)

an no crashes occurs.
Best regards
Davide

I concur, this makes the removal of a badge in the local auth list by an incremental update impossible : it needs the id_tag_info not to be present.


can't save as h264

function startRecording() {
    try {
      var stream = canvas.elt.captureStream(); // frames per second
      mediaRecorder = new MediaStreamRecorder(stream);
      mediaRecorder.mimeType = format;
    } catch (e) {
      console.error('Exception while creating MediaRecorder: ' + e);
      alert('Exception while creating MediaRecorder: '
        + e + '. mimeType: ');
      return;
    }
    mediaRecorder.onstop = handleStop;
    mediaRecorder.ondataavailable = handleDataAvailable;
    mediaRecorder.start(5000); // collect 10ms of data
    console.log('MediaRecorder started', mediaRecorder);
}

function download() {
  mediaRecorder.save();
}

I've tried format = 'video/mp4', format = 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"' and format="video/mp4;codecs=H264"
won't open on twitter or quicktime

Hi. MediaRecorder on Firefox an Chrome don't have support do mp4. I have the same issue. You can save as a mp4, sending to blob as mp4, but when you see de metadatas of the file, is Webm. But Iphone with Safari don't play mp4. That's my problem. Do you find any solution to this?


feat(metadata): Implement Metadata GET /deviceservice/name/{name} V2 API

Fix #2772
PR Checklist
Please check if your PR fulfills the following requirements:

[x] The commit subject follows the Conventional Commits spec
[x] The commit message follows the EdgeX Contributor Guide
[x] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)
[x] make test has completed successfully

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #2772
What is the new behavior?
Implement Core Metadata GET /deviceservice/name/{name} V2 API according to the API doc
Does this PR introduce a breaking change?

[ ] Yes
[x] No

Are there any new imports or modules? If so, what are they used for and why?
Are there any specific instructions or things that should be known prior to reviewing?
Other information

recheck

Codecov Report

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

@@           Coverage Diff           @@
##           master    #2773   +/-   ##
=======================================
  Coverage   38.77%   38.77%
=======================================
  Files         164      164
  Lines       12792    12792
=======================================
  Hits         4960     4960
  Misses       7524     7524
  Partials      308      308

Continue to review full report at Codecov.

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


Hold SymbolInformation table in memory

Closes #91

Current coverage is 90.23% (diff: 87.50%)

Merging #101 into master will increase coverage by 0.06%

@@             master       #101   diff @@
==========================================
  Files            31         31
  Lines           722        727     +5
  Methods          93         94     +1
  Messages          0          0
  Branches          0          0
==========================================
+ Hits            651        656     +5
  Misses           71         71
  Partials          0          0

Diff Coverage
File Path

•••••••    71%
src/Project.php

••••••••   83%
src/PhpDocument.php

•••••••••• 100%
src/NodeVisitor/DefinitionCollector.php

•••••••••• 100%
src/Server/TextDocument.php

•••••••••• 100%
src/Server/Workspace.php

Powered by Codecov. Last update 9cbca1c...ac0fef8


0.7

It seems like the examples in the README do not work with the 0.7 version of BlockBandedMatrices.
If this is expected, could you modify the doc with the new syntax?

Fixed.


neo-tree on left alpha on right

Greetings,
How can I get neo-tree on the left and alpha on the right on startup like the attached screenshot?
I'm using lazy.
"https://imgur.com/YHf3qnG"

https://github.com/goolord/alpha-nvim/blob/1356b9ef31b985d541d94314f2cf73c61124bf1d/doc/alpha.txt#L286
this should help you get started


[FLINK-2089] [runtime] Fix possible duplicate buffer release

This PR contains multiple independent commits, which address issues discovered while debugging FLINK-2089.

It adds the partition request backoff logic to local requests as well. The backoffs were introduced recently for remote requests. I've missed that the same problem could also happen for local input channels. The fix was easy and moves the backoff logic to the abstract InputChannel, which both Local and RemoteInputChannel extend.

The duplicate buffer release was hard to track. In some corner cases, the record serializers were incorrectly holding references to buffers after written them out to a result partition. In failure cases, the serializers recycled these buffers too early. The later recycling (by the component, which is actually responsible for this) then resulted in an IllegalStateException.

Travis gives a green light. I'm merging this. This will will give the changes as much testing exposure before the release as possible.


Fix empty telegram handle after @

Fix #176

Should be fixed in PR #254 already

Should be fixed in PR #254 already

Oh my bad, I didn't check your PR properly. I'll leave it here in case there is anything you want to check. Can just close it once you don't need it.


Spanner: Session to database transaction-usage

Moved to #4515

Must have closed the wrong one.

So do I still merge this or just delete the file?


Uptake chat-sdk 1.5.7

Currently when createObject or uploadDocument requests failed, it is still treated as a success, and a message is sent to ACS. This is causing data loss, as on C2 side the attachment is marked as successfully sent while in reality it is not
ams-client PR: https://github.com/microsoft/omnichannel-amsclient/pull/36

Sanity Tests

[ ] You have tested all changes in Popout mode
[ ] You have tested all changes in cross browsers i.e Edge, Chrome, Firefox, Safari and mobile devices(iOS and Android)
[ ] Your changes are included in the CHANGELOG

A11y

[ ] You have run the Automated Accessibility Check and have no reported issues

Please provide justification if any of the validations has been skipped.

Can you please confirm the on the comment added on AMS repo changes


Support for tcp transport

Implementation for D-Bus communication via TCP/IP. Previously there was also AUTH ANONYMOUS added to the authentifications but this is now already implemented - so no need to change anything there.

Is it possible to write tests for this?

It is - if there is a CI system available where a tcp-dbus connection is possible. Currently we are using a special test system where the dbus is open to the network and allows anonymous authentification (very evil).
I will try out if a simple, safe and effective test can be implemented with socat on the loopback interface.
Tony Crisci<EMAIL_ADDRESS>hat am 23. August 2020 um 21:19 geschrieben:
Is it possible to write tests for this?
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

Okay I managed to get it fully working for a local test:

Open a local socket:
socat TCP-LISTEN:55556,reuseaddr,fork,range=<IP_ADDRESS>/32 UNIX-CONNECT:$(echo $DBUS_SESSION_BUS_ADDRESS | sed 's/unix:path=//g')

This piece of code creates a notification via tcp:

import asyncio
import sys
from dbus_next.aio import MessageBus
#from dbus_next.message import Message, MessageType

async def main(args):
  bus = await MessageBus(bus_address="tcp:host=<IP_ADDRESS>,port=55556").connect()
  #reply = await bus.call(Message(destination='org.freedesktop.DBus',path='/org/freedesktop/DBus',interface='org.freedesktop.DBus',member='ListNames'))
  introspection = await bus.introspect('org.freedesktop.Notifications', '/org/freedesktop/Notifications')
  obj = bus.get_proxy_object('org.freedesktop.Notifications', '/org/freedesktop/Notifications', introspection)
  notification = obj.get_interface('org.freedesktop.Notifications')
  await notification.call_notify("test.py", 0, "", "DBus Test", "Test notification", [""], dict(), 3000)

if __name__ == "__main__":
  loop = asyncio.get_event_loop()
  basefilename = loop.run_until_complete(main(sys.argv))

It is somehow amazing that it works because neither d-feet nor notify-send were able to connect to the socat in my case.
Or what kind of tests specifically shall I add?

The only way I can ensure this will be stable with future changes if you add tests to the test suite for your use cases.

Here you go :+1:. Added 2 tests which are simple but should be very effective to protect the functionality. Also added an example for anyone willing to use it.

This is fine for now :+1:

Thanks a lot. I am sorry I could not get a good working test for the combination network+anonymous auth via dbus config. Some colleagues of mine figured it out on an embedded device but it didn't work for me on any x86 machine.


Action Buttons: Implement Cancel Functionality

Create a Cancel action for swaps, allowing users to cancel an existing swap before it is accepted or expired.

this one is finished?

https://github.com/kodadot/nft-gallery/pull/11182

this one is finished?

feat: Display Swap in Item View & Profile View  #11182

yep


Drag and drop onto .py file

I am unable to drag and drop the .sav file onto the .py file. When I do nothing runs. The .py file doesn't highlight which leads me to believe that there is no interaction happening.

The script has been updated to 1 file, and it is run using the command "python3 convert.py Level.sav" in a CMD window. Read the information on the main page as this is mentioned there.

Ah I was looking under the Windows GUI Instructions section. Thanks!

No worries, hope it works !


restaurants two step selection

At this moment the options for food are one step, while thuisbezorgd has two steps very often.
It would be really useful to support this in the food options. For example wok2go has bami nasi or rijst. Now I added everything from wok2go three times, once with every option, but it would be much more concise if I could add the bami nasi or rijst options after the main option is chosen, so that the list is shorter.

I agree with the statement made here - I actually quite like the idea a lot -, but I'd like to mention that signups through the API and therefore the mobile apps are likely to break if any changes are made to this specific process.

Sophie and I have discussed this and we believe that although it would be nice to include a feature like this, it is likely to break the website in too many places. Also, there does not seem to be a straight-forward way of implementing this feature. Therefore, we currently do not plan on implementing the requested changes.


Notification Icon Persistent

My Setup

Operating System: MacOS 10.13.6
App Version: 2.12.0

[X ] I have tested with the latest version
[X ] I can simulate the issue easily

Description

After a new message is sent, the notification icon on the dock remains even after the message is read. This was not an issue with 2.11.0
Current Behavior

New message sent. Dock icon shows a missed message. Click on the missed message to "read" it and the dock icon still shows that I have missing messages.
Expected Behavior

Dock icon notification badge should disappear.

Yes, apologies. Thanks!


Refactor Blocks/Video/Edit component

#4460

@sneridagh I think we should add default props and prop types to the functional components also. What do you think?


TypeError: 'set' on proxy: trap returned falsish for property

Version
3.2.28
Reproduction link
sfc.vuejs.org/
Steps to reproduce
When change value gives an error
What is expected?
Work
What is actually happening?
Gives an error

In version 3.2.27 works just fine

introduced by: https://github.com/vuejs/core/commit/171f5e9c6008bf0dff565991f34b214da016dde0

Seems to be a side effect of my patch, indeed. Will try and get a fix for this done tomorrow.


HMR with react-hot-loader doesn't hot update for react functional components

Bug report

What is the current behavior?
I'm using the react-hot-boilerplate
https://github.com/gaearon/react-hot-boilerplate
Changed the App.js to
export default () => (

Hello world!

)

HMR doesn't work anymore. It gives the message:

[HMR] The following modules couldn't be hot updated: (Full reload needed)
This is usually because the modules which have changed (and their parents) do not know how to hot reload themselves. See http://webpack.github.io/docs/hot-module-replacement-with-webpack.html for more details.

What is the expected behavior?
The App.js should HMR as it does with an ES6 class component.
OS and versions.
Using the same npm versions on:
https://github.com/gaearon/react-hot-boilerplate/blob/master/package.json
Node: v5.5.0
OS: Max OSX Yosemite 10.10.5
Browser: Chrome  55.0.2883.95 (64-bit)

Can you report this to react-hot-loader? There's not much we can do about the issue here.


Keyboard accessibility updates for docs

Pull Request Summary
This PR adds support for keyboard users to navigate the docs.

Adds skip to link.
Makes sidebar navigation a nav element so keyboard users can navigate to it via landmarks menu.
Adds role="contentinfo" to the footer element so keyboard users can navigate to it via landmarks menu.

Before embarking on a large, complex, or controversial feature, please open an issue so we can discuss it. Someone may be working on it already, it might not align with the project's roadmap, or we might be able to improve on your idea before you spend a lot of time working on it.
If your PR doesn't get accepted, don't let it get you down. Many don't. It doesn't mean I don't value your idea or contribution, it just means that it doesn't align with my vision for the project. As the maintainer, I'll do my best to explain why every PR doesn't get accepted.

Thanks for submitting this. Great PR!


[BUG] Import 30 000 rows - PHPExcel_Reader_Exception in Excel2007.php line 82

Please prefix your issue with one of the following: [BUG] [PROPOSAL] [QUESTION].
Package version: ~2.1.0 , Laravel version:5.1
Expected behaviour
Hi, i try to import several row(30 000) by 35 columns with this code :
public function importAdscan(Request $request) {         $data = $request->all();               $results = Excel::selectSheetsByIndex(0)->load($data['adscan'])->get()->groupBy('nomprenom')->toArray();        dd($results);       }
This code works when i delete many many rows until to arrive at 1500 rows.
The debug warning is :
PHPExcel_Reader_Exception in Excel2007.php line 82: Could not open for reading!
File does not exist.
As i say before, if i reduce number of row, the same code work.
Have you got an idea because i'm lost.
Thanks

I'm using "chunk" for a file with 200k rows.
$file = Excel::filter('chunk')->load(storage_path('file.csv'));
$file->chunk(10000, function (RowCollection $results) {
   //
});


Enhancement: Enable batching for SharePoint List Item creation

The spo listitem add command should allow users to create multiple SharePoint List Items without having to execute the same command multiple times.
If you need to create a couple of items this most likely is not an issue but we should consider scenarios where hundreds or even thousands of items need to be created. At the moment the automation script required to perform this action would run into hundreds and thousands of lines.
To address this issue, it is proposed that a new command be created under 'spo listitem' called 'batch' with a sub commands for add, i.e. spo listitem batch add, that takes a definition file (initially txt or csv) as an input which describes each item to be created when the command is executed.
Example: spo listitem batch add --path listitems.csv
This approach would then allow us to further expand the batch command with more sub commands to cover remove, update and get should the need arise.
Once the approach is validated, we could implement it on other types like file, list, field, file, etc.

anyone working on this.?

also The spo listitem update command should also allow users to update multiple SharePoint List Items without having to execute the same command multiple times.

And perhaps rather than just a csv as input, we could let it take it’s inputs from another list?

Hey @russgove 👋🏻
No one is working on this at the moment, would you like to take it?

also The spo listitem update command should also allow users to update multiple SharePoint List Items without having to execute the same command multiple times.

This is something that we can consider, however this issue is to provide a way of bulk creating items in the first instance. Once we have validated an approach for creation we can certainly look to enhance the functionality to provide a similar update command.

And perhaps rather than just a csv as input, we could let it take it’s inputs from another list?

We can certainly do this, however let's keep it simple with using flat files (csv) for now, we can always enhance the command once the base functionality is validated.

Yes , I can take it. I  have most of the required code from that other command i proposed.

Great 😀
All yours @russgove 👍🏻

@garrytrinder  So what you call spo listitem batch add  is remarkably similar to what I call[ed] spo field copy!
We're both talking about bulk updates to sharepoint list items.
You want to read from a CSV, I want to read from sharepoint.
You want to add new items , I want to update existing items.
The hard parts of both our needs are the same -- the data type conversion, the batching, the mapping, maybe some caching.
So for spo listitem batch add :
Lets say column headers must match the internal name of the field to be updated.
We need a --batchsize parameter to say how many updates to send to the backend at a time.
We need to have some switches to determine how to map the text we recieve from a csv column to a sharepoint field. (i.e. for a user column , is it the display name , or the email we should map on)

does anyone have any preferences as to which csv parser should be used?

The hard parts of both our needs are the same -- the data type conversion, the batching, the mapping, maybe some caching.

I'm not sure I agree with the data conversion part, the issue does not propose to implement any conversion of data types but to simplify the creation of list items in bulk.
Just to clarify what is being proposed, currently to create multiple items using the CLI the user would need to create a line for each item they wish to create. This could become a burden to maintain if creating 100s of items this way.
spo listitem add --contentType Item --listTitle "Demo List" --webUrl https://contoso.sharepoint.com/sites/project-x --Title "Demo Item 1"
spo listitem add --contentType Item --listTitle "Demo List" --webUrl https://contoso.sharepoint.com/sites/project-x --Title "Demo Item 2"
spo listitem add --contentType Item --listTitle "Demo List" --webUrl https://contoso.sharepoint.com/sites/project-x --Title "Demo Item 3"

The proposed spo listitem batch add command would simplify this process by allowing the user to supply a flat file that contains the values to create the list items. I see this new command in its most basic form as acting as a wrapper for the spo listitem add command functionality that already supports different data types.
spo listitem batch add --path listitems.csv

The contents of the listitems.csv file in the above example would contain the following contents, the headings mapping to the options on the spo listitem add command, Title being an example of a SharePoint field.
contentType,listTitle,webUrl,Title
Item,Demo List,https://contoso.sharepoint.com/sites/project-x,Demo Item 1
Item,Demo List,https://contoso.sharepoint.com/sites/project-x,Demo Item 2
Item,Demo List,https://contoso.sharepoint.com/sites/project-x,Demo Item 3

@waldekmastykarz @VelinGeorgiev do you have any suggestions regarding the above design?

We need a --batchsize parameter to say how many updates to send to the backend at a time.

I don't think we need to expose this to the user and is something that can be handled internally by the command.

does anyone have any preferences as to which csv parser should be used?

fast-csv looks like a good option which has decent support and examples https://www.npmjs.com/package/fast-csv

@garrytrinder agreed with the design you proposed. Let's keep it simple to start with and we can always extend it later if there is any interest.

OK, I was thinking that we would 'convert' that data on the csv to a form that was acceptable to sharepoint. We would put<EMAIL_ADDRESS>in the  csv and  the command would convert it to the format needed for SP. Same idea for other column types.
I'll skip all that stuff an make it just duplicate what listitem add does.

Hey @russgove, are you still working on this?

hey,
haven’t had a chance to work on it in a long,long time.
i  hope to get some time over the holidays.
if i’m blocking someone else from working on it, you can remove me from the task.
russell
Sent from my iPad

On Nov 21, 2020, at 2:18 PM, Waldek Mastykarz<EMAIL_ADDRESS>wrote:

Hey @russgove, are you still working on this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

No problem. I don't think it's blocking anyone.

I have created a new issue (#2029) with a defined spec in the new command template to provide some clarity around the initial ask for this proposal, therefore I will close this issue as the work will be carried out against the new issue.


[Bug]: Inconsistent command line arguments in evaluation directory

Is there an existing issue for the same bug?

[X] I have checked the existing issues.

Describe the bug and reproduction steps
In the evaluation directory, some benchmarks have an incorrect README file that uses snake case for command line arguments. However, in the get_parser() shared function, the command line arguments are written in kebab case. All READMEs and .py files in the evaluation/benchmarks directory should be fixed to standardize on kebab case.
OpenHands Installation
Docker command in README
OpenHands Version
No response
Operating System
None
Logs, Errors, Screenshots, and Additional Context
No response

OpenHands started fixing the issue! You can monitor the progress here.

A potential fix has been generated and a draft PR #5736 has been created. Please review the changes.


create 2023-06-30-Introduction-layer5-learning-paths

Description
A new blog post fitting the following description is requested to be written
Desired Title: Introducing Layer5 Learning Paths
Draft: https://docs.google.com/document/d/1T5KycIgR6TtyTAv6bKuT-fiGQi7j9e4VYb0yzE2d4D8/edit?usp=sharing
Author: Akshaya
This PR fixes https://github.com/layer5io/layer5/issues/2323
Notes for Reviewers
Signed commits

[x] Yes, I signed my commits.

@akshayamadhuri, could you please provide an update on the current status of this issue? Are you still actively working on it? If not, I'd be happy to take it up and continue working on it.

@hirentimbadiya  sure you can work on this issue


Adopt Shouldly for test assertions

Update Framework unit tests to use Shouldly
Shouldly provides extension methods for assertions and also creates very detailed messages when assertions fail.  The documentation is here:  http://shouldly.readthedocs.io

fyi the CLI repo makes heavy use of FluentAssertions and already built a set of very useful extensions for it, mostly around filesystem concerns (e.g. binDirectory.Should().HaveFilesMatching("*.dll", SearchOption.AllDirectories);)

@dotnet-bot test Windows_NT Build for CoreCLR please

@dotnet-bot test this please

@dotnet-bot test Windows_NT Build for CoreCLR please

@dotnet-bot test this please

@dotnet-bot test Windows_NT Build for Full please

@AndyGerlicher can I merge this now?


TypeScript v5 support

Can't install it in projects that use TypeScript v5, getting this:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving<EMAIL_ADDRESS>npm ERR! Found<EMAIL_ADDRESS>npm ERR! node_modules/typescript
npm ERR!   dev<EMAIL_ADDRESS>from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm ERR! node_modules/eslint-plugin-sonar
npm ERR!   eslint-plugin-sonar@"*" from the root project

Maybe it's just easy to support it by extending the version range here https://github.com/un-ts/eslint-plugin-sonar/blob/main/eslint-plugin-sonar/package.json#L35
Would you like to raise a PR?

Although some TS v5 only feature could be unavailable.
See also https://github.com/SonarSource/SonarJS/issues/3770


Mocking password_last_used date

Is there a way to mock a specific date that an IAM user last used their password?
I think the answer is no, because you actually have to log into the console to have used the password, but just wondered if I had missed anything.
Thanks.

Thank you for the reply. I'm having trouble implementing this.
def test_password_last_used(iam):
    current_time = pytz.timezone("UTC").localize(datetime.utcnow())
    password_last_used_date = current_time - timedelta(days=100)

    username = "test.user"
    iam[0].create_user(Path='/staff/', UserName=username)
    iam[0].create_login_profile(
        UserName = username,
        Password = "Password1",
        PasswordResetRequired = False)

    iam_backend = get_backend("iam")[ACCOUNT_ID]["global"]
    iam_backend.users[username].password_last_used = password_last_used_date

    x = iam[1].CurrentUser().user_name
    print(x)

So this returns default_user, not the test.user created, soI'm unable to validate what date the password last used was.
Is there a way to change to current user from default_user to the created user, so I can access the password last used information?

The proper way would be to create an AccessKey for that user, and then login as that user:
access_key = client.create_access_key(UserName=username)["AccessKey"]

as_new_user = boto3.resource(
    "iam",
    region_name="us-east-1",
    aws_access_key_id=access_key["AccessKeyId"],
    aws_secret_access_key=access_key["SecretAccessKey"],
)

assert as_new_user.CurrentUser().user_name == username

Would that work?
Note that does not give you the password at the moment - Moto's implementation doesn't return that field yet. I'll raise a PR for that shortly to get that fixed.

Okay, so that has solved the issue about being the default-user, thank you for that.
However I'm still having trouble setting a date for password_last_used. This is my config:
def test_password_last_used(iam):
    current_time = pytz.timezone("UTC").localize(datetime.utcnow())
    password_last_used_date = current_time - timedelta(days=100)

    username = "test.user"
    iam[0].create_user(Path='/staff/', UserName=username)
    iam[0].create_login_profile(
        UserName = username,
        Password = "Password1",
        PasswordResetRequired = False)

    iam_backend = get_backend("iam")[ACCOUNT_ID]["global"]
    iam_backend.users[username].password_last_used = password_last_used_date

    access_key = iam[0].create_access_key(UserName=username)["AccessKey"]

    as_new_user = boto3.resource(
        "iam",
        region_name="us-east-1",
        aws_access_key_id=access_key["AccessKeyId"],
        aws_secret_access_key=access_key["SecretAccessKey"],
    )

    print(as_new_user.CurrentUser().password_last_used)

Which returns None

Can you try the latest version @WesleyHindle, moto >= 4.1.3.dev34? That should fix that

Thanks for the reply, I'm still getting None returned after updating
moto                     4.1.3.dev34

That's odd - it does work for me, and as far as I can tell, the script I use is the same.
My console output:

FYI, I've released Moto 4.1.3 just now. It contains the same functionality as 4.1.3.dev34, but maybe it's easier to install/test.

I'be updated to 4.1.3 and ran this code in a new file
import boto3
from datetime import datetime, timedelta
from moto import mock_iam
from moto.backends import get_backend
from moto.core import DEFAULT_ACCOUNT_ID as ACCOUNT_ID
import os
import pytest

mock = mock_iam()
mock.start()
client = boto3.client("iam", "us-east-1")
username = "test.user"
client.create_user(Path='/staff/', UserName=username)
client.create_login_profile(
    UserName = username,
    Password = "Password1",
    PasswordResetRequired = False )

iam_backend = get_backend("iam")[ACCOUNT_ID]["global"]
iam_backend.users[username].password_last_used = datetime.utcnow()
a_k = access_key = client.create_access_key(UserName=username)["AccessKey"]
print(a_k)
as_new_user = boto3.resource("iam", region_name="us-east-1", aws_access_key_id=access_key["AccessKeyId"], aws_secret_access_key=access_key["SecretAccessKey"] )
print("---")
print(as_new_user.CurrentUser().password_last_used)
mock.stop()

And I'm still getting None returned, is there anything else I can do to help with debugging?

Can you add some print-statements to get_user() in moto/iam/responses.py?
Right around here: https://github.com/getmoto/moto/blob/d001f6a22617f8adef0c2c382b886f8bf2dd5fae/moto/iam/responses.py#L537
Just curious to see what's going wrong, if it's the model or the view.
print(user.__dict__)
print(user.password_last_used_iso_8601)
print(template.render(action="Get", user=user, tags=tags))

And maybe a print(moto.__version__), just to double check that this is not executed against an older version of Moto somehow. Happens to me a little too often, that I'm playing around in the wrong virtual env or something like that...

Sorry, this is quickly becoming way out of my depth! So in moto/iam/responses.py I have:
def get_user(self):
        user_name = self._get_param("UserName")
        if not user_name:
            access_key_id = self.get_access_key()
            user = self.backend.get_user_from_access_key_id(access_key_id)
            if user is None:
                user = User(self.current_account, "default_user")
        else:
            user = self.backend.get_user(user_name)
        tags = self.backend.tagger.list_tags_for_resource(user.arn).get("Tags", [])
        template = self.response_template(USER_TEMPLATE)
        print(user.__dict__)
        print(user.password_last_used_iso_8601)
        print(template.render(action="Get", user=user, tags=tags))
        return template.render(action="Get", user=user, tags=tags)

Which when I run the previous code doesn't output anything,  additional.
I was also unsure where to add print(moto.__version__) as in responses.py this highlighted a moto is not defined error.

If nothing is printed, then we're definitely looking at different Moto versions/installations. It is the right method, since that's where the default_user comes from that we saw earlier. But if nothing is printed, then the Moto-library used by your script is not the same as the Moto-code that you're editing.
I would suggest to start from scratch. Are you using virtual environments? If so, just create a new one, install moto in that env and execute the script again. Feel free to share the steps that you take if you're unsure about anything.

Okay, so good news! You're right. Your update was working and it was an issue.
The only bad news is the horrible state of my pip, which was causing the issue.
Thank you for your patience, help and new feature.

Happy to hear this is now solved!

Okay. I think I was slightly eager!
I want to test this code:
def password_last_used():
    iam_resource = boto3.resource("iam")
    iam_client = boto3.client("iam")
    pass_last_used = iam_resource.CurrentUser().password_last_used
    username = iam_resource.CurrentUser().user_name

    if pass_last_used < cutoff_date:
        print("not fine")
    else:
        print("fine")

Using this test (I'll add the actual test once it's working):
@pytest.fixture
@mock_iam
def aws_credentials():
    """Mocked AWS Credentials for moto."""
    os.environ["AWS_ACCESS_KEY_ID"] = "testing"
    os.environ["AWS_SECRET_ACCESS_KEY"] = "testing"
    os.environ["AWS_SECURITY_TOKEN"] = "testing"
    os.environ["AWS_SESSION_TOKEN"] = "testing"

@pytest.fixture
def iam(aws_credentials):
    with mock_iam():
        #client will be [0], resource [1]
        yield (boto3.client("iam"), boto3.resource("iam"))

def test_password_last_used(iam):
    current_time = pytz.timezone("UTC").localize(datetime.utcnow())
    password_last_used_date = current_time - timedelta(days=100)

    username = "test.user"
    iam[0].create_user(Path='/staff/', UserName=username)
    iam[0].create_login_profile(
        UserName = username,
        Password = "Password1",
        PasswordResetRequired = False
    )

    access_key = iam[0].create_access_key(UserName=username)["AccessKey"]

    as_new_user = boto3.resource(
        "iam",
        region_name="us-east-1",
        aws_access_key_id=access_key["AccessKeyId"],
        aws_secret_access_key=access_key["SecretAccessKey"],
    )

    iam_backend = get_backend("iam")[ACCOUNT_ID]["global"]
    iam_backend.users[username].password_last_used = password_last_used_date

    print(password_last_used())

But when I run the test I get an error saying that there's None type, so can't comapre for dates. Makes sense, I'm comparing a different user to the test user who's password_last_used attribute I've manipulated.
However, I think that the test user only exists as a var within the test and not an env var as the actual current user, and because no param is passed into the test, there's no way for the test to know to use the test user if it isn't assigned as the CurrentUser as an env var.
Am I on the right track with this so and if so, is there a way for me to be able to configure the test so that I can use the test user's password last used object for testing the app code, even though the app doesn't take in a param.
I think realistically though this app code would have to take in a param, else you're editiing your own AWS user

Is the iam_resource actually defined inside the password_last_used()-method?
If it is created as part of a class, you could maybe override it as part of the test:
logic = LogicClass()  # whatever this is..
logic.iam_resource = as_new_user
logic.password_last_used()

A second theoretical option is to set environment variables just before calling password_last_used()
access_key = iam[0].create_access_key(UserName=username)["AccessKey"]
os.environ["AWS_ACCESS_KEY_ID"] = access_key["AccessKeyId"]
os.environ["AWS_SECRET_ACCESS_KEY"] = access_key["SecretAccessKey"]
password_last_used()

This should configure the boto3.resource to use the environment variables, and make the call as if it is the new user.
(Note the theoretical and should! I'm not able to test this at the moment, but I might just work...)

Okay, so I had think about what I was trying to do and I was overcomplicating it. There was no need to use the CurrentUser class, when the User Class has the same methods. You can easily change the user with User class too, unlike using CurrentUser.
This was my finished test / app code with a manipulated password_last_used date.
Thank you again.
# App

import boto3
import pytz
from datetime import datetime, timedelta

# Password can only be 30 days old
# Convert current time date to be time zone aware needed for comparison with an AWS user date
current_time = pytz.timezone("UTC").localize(datetime.utcnow())
cutoff_date = current_time - timedelta(days=30)

def password_last_used(username):
    iam_resource = boto3.resource("iam")
    iam_client = boto3.client("iam")
    aws_user = iam_resource.User(username)

    if aws_user.password_last_used < cutoff_date:
        print("not fine")
        iam_client.delete_login_profile(UserName=username)

from app_5 import password_last_used
import boto3
from datetime import datetime, timedelta
from moto import mock_iam
from moto.backends import get_backend
from moto.core import DEFAULT_ACCOUNT_ID as ACCOUNT_ID
import os
import pytest
import pytz

@pytest.fixture
@mock_iam
def aws_credentials():
    """Mocked AWS Credentials for moto."""
    os.environ["AWS_ACCESS_KEY_ID"] = "testing"
    os.environ["AWS_SECRET_ACCESS_KEY"] = "testing"
    os.environ["AWS_SECURITY_TOKEN"] = "testing"
    os.environ["AWS_SESSION_TOKEN"] = "testing"

@pytest.fixture
def iam(aws_credentials):
    with mock_iam():
        #client will be [0], resource [1]
        yield (boto3.client("iam"), boto3.resource("iam"))

def test_password_last_used(iam):
    current_time = pytz.timezone("UTC").localize(datetime.utcnow())
    password_last_used_date = current_time - timedelta(days=100)

    username = "test.user"
    iam[0].create_user(Path='/staff/', UserName=username)
    iam[0].create_login_profile(
        UserName = username,
        Password = "Password1",
        PasswordResetRequired = False
    )

    iam_backend = get_backend("iam")[ACCOUNT_ID]["global"]
    iam_backend.users[username].password_last_used = password_last_used_date

    assert iam[0].get_login_profile(UserName=username) is not None

    password_last_used(username)

    with pytest.raises(Exception):
        iam[0].get_login_profile(UserName=username)

As you mentioned changing the last used date requires you amending the backend, are there plans to implement functionality where you can manipulate the 'last used date' without amending the backend, or is this the only feasible way to do this?
If this is the case are changes to the internal API listed on change notes?

From what I can tell, this functionality isn't used by enough people to warrant a dedicated/public/fixed API.
There are honestly too many internal API changes to list them all in the change notes. But for the last used dates, I'll make a note to call it out in the changelog if it ever changes.

Thank you


Classroom view

The front page of the classroom..

Current app, and link to switching app
Present screen
New Post (message, reminder, poll, survey), post types described in https://github.com/sammysamau/remoteclassroom/issues/32
Classroom settings, https://github.com/sammysamau/remoteclassroom/issues/34
Activity feed

Let's prototype a few options.


Update docstring of tf.linspace.

Add braces to the documentation to avoid misunderstandings in the way the
increment is computed. Given the way that the help page is rendered and a
strict mathematical (or programmatic) understanding, one might misread the
formula as
stop - (start / num) - 1
which would be incorrect. While it is relatively obvious what linspace
does, the braces avoid any ambiguity.

closing this issue as there is no recent activity.


[Feature Request] Soft Delete

Use case

Sometimes we can't always perform hard deletions in production.
This is what most ORMs do

The Ideal way

Respect the deleted_at column (pub deleted_at: Option<DateTimeWithTimeZone>)
All deleted_at checkings should run behind the scenes instead manually adding AND deleted_at IS NULL
deleted_at columns should be indexed for performance reasons

Delete
let res: DeleteResult = fruit.delete(db).await?; // ID = 10

Should generate the SQL below
-- Soft Delete - If the column deleted_at exists
UPDATE `fruit` SET `deleted_at`="2020-10-29 10:23" WHERE id = 10

-- Hard Delete - If the column deleted_at doesn't exist
DELETE FROM `fruit` WHERE `fruit`.`id` = 10'

Select
let cheese: Option<cake::Model> = Cake::find_by_id(1).one(db).await?;

GORM, the popular ORM for Go, has defined a default struct called gorm.Model.
// gorm.Model definition
type Model struct {
  ID        uint           `gorm:"primaryKey"`
  CreatedAt time.Time
  UpdatedAt time.Time
  DeletedAt gorm.DeletedAt `gorm:"index"`
}

And any struct with gorm.Model in it will automatically become soft-delete aware.
type User struct {
  gorm.Model
  Name       string
  Phone      string
}

If one really needs to perform hard deletion, here's how in GORM:
db.Delete(&order)
// UPDATE orders SET deleted_at="2020-10-29 10:23" WHERE id = 10;

db.Unscoped().Delete(&order)
// DELETE FROM orders WHERE id=10;

Thank you so much for the proposal. And welcome to the Rust community!
Rust libraries tend to be less opinionated or at least offer choices. I am keen to bring this feature into SeaORM.
I also wonder, what is your stance on this? Are you confident in implementing this? If so, we can work together to bring this into reality.
Some rough thoughts off my head, I think we can add an attribute to the DeriveEntityModel macro to have a soft_delete annotation. The model then have to include a deleted_at attribute (or the user can specify a different attribute via another annotation).
Then, the Entity would impl a trait to allow us to automatically include the deleted_at IS NULL  on find and alter the behavior of delete.
Let me know your thoughts!

what is your stance on this?

This must be done for ORMs in my opinion. Currently, there is no rust ORM supports soft delete.

Are you confident in implementing this?

Still learning rust, can't really answer this.

Let me know your thoughts!

Like #185 , not only deleted_at , ORM should also respect created_at and updated_at. I am thinking something like this:
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: u32,
    #[sea_orm(created_at = "created_at")]
    pub created_at: DateTimeWithTimeZone,
    #[sea_orm(updated_at = "updated_at")]
    pub updated_at: DateTimeWithTimeZone,
    #[sea_orm(deleted_at = "deleted_at")]
    pub deleted_at: Option<DateTimeWithTimeZone>,
}

I'd be willing to help out on this feature request. I haven't yelled fully dug into the code yet and would require some pointers probably.

We can just implement soft delete for now and leave the created_at & updated_at for another PR.
Got a rough idea below on the implementation plan

Add deleted_at macro attribute.
pub struct Model {
    // ...
    #[sea_orm(deleted_at)]
    pub deleted_at: Option<DateTimeWithTimeZone>,
}

Store whether soft delete is enabled and its column name in ActiveModelTrait. Define the extra metadata inside derive macro given that the deleted_at macro attribute is tagged on some fields on Model struct.

Update existing CRUD logics & conditions

Read: return records with deleted_at = NULL
Update: update records with deleted_at = NULL
Delete: soft delete records

Unit testing it!

Agree on doing the pull requests seperately, I'll read up on the macros tonight and if I have anymore questions I will follow up!

I think 1) would be the most difficult if not familiar with derive macro already.
Let us know if you need help on that. Feel free to reach us on Discord.

So I've been reading a bit and so far came up with this:
https://github.com/Ka1wa/sea-orm/commit/95c66e499d7d1b6de7189c6f2685c4217536f0af
Not sure about line 269~270 from src/entity/column.rs.
I figured the next logical step would be to work on the ActiveModelTrait, I checked out the DeriveEntityModel macro and ended up at derive_active_model -> derives::expand_derive_active_model which has the fields iterator which I assume would contain the deleted_at column.
How would check if this column exists and where would I store that metadata to be used in tne query logic?

I like the idea of adding it to ActiveModelTrait. But I'm thinking if there's a way to make this more generic rather than just for deleted_at.
I'm not sure if it's possible, but perhaps ActiveModelTrait could have a function instead like:
fn before_execute(&mut self, &mut query);

So it could be added with:
impl ActiveModelTrait {
    fn before_execute(&mut self, &mut query) {
        if query.is_select() {
            query.filter(Column::DeletedAt.not_null());
        } else if query.is_delete() {
            // ...
        }
    }
}

And SeaORM could export a helper function: fn soft_delete<C: ColumnTrait>(col: C, &mut query):
impl ActiveModelTrait {
    fn before_execute(&mut self, &mut query) {
        sea_orm::before_execute::soft_delete(Column::DeletedAt, query);
    }
}

Hey everyone, the soft delete PR is ready for comments and review

https://github.com/SeaQL/sea-orm/pull/790

maybe you can implement it like this:
trait QrySoftDel<E: EntityTrait> {
    async fn qry_all<C: ConnectionTrait>(self, db: &C) -> Result<Vec<E::Model>, DbErr>;
}

trait UptSoftDel<E: EntityTrait> {
    async fn upt_all<C: ConnectionTrait>(self, db: &C) -> Result<UpdateResult, DbErr>;
}

trait DelSoftDel<E: EntityTrait> {
    async fn del_all<C: ConnectionTrait>(self, db: &C) -> Result<UpdateResult, DbErr>;
}

impl<E: EntityTrait> QrySoftDel<E> for Select<E> {
    async fn qry_all<C: ConnectionTrait>(self, db: &C) -> Result<Vec<E::Model>, DbErr> {
        self.filter(Expr::cust("deleted_at is null")).all(db).await
    }
}

impl<E: EntityTrait> UptSoftDel<E> for UpdateMany<E> {
    async fn upt_all<C: ConnectionTrait>(self, db: &C) -> Result<UpdateResult, DbErr> {
        self.filter(Expr::cust("deleted_at is null")).exec(db).await
    }
}

impl<E: EntityTrait> DelSoftDel<E> for UpdateMany<E> {
    async fn del_all<C: ConnectionTrait>(self, db: &C) -> Result<UpdateResult, DbErr> {
        self.exec(db).await
    }
}

trait BaseRepo<T: EntityTrait> {
    fn field(&self) -> impl ColumnTrait;

    fn qry(&self) -> Select<T> {
        T::find()
    }

    fn upt(&self) -> UpdateMany<T> {
        T::update_many()
    }

    fn del(&self) -> UpdateMany<T> {
        T::update_many().col_expr(self.field(), Expr::cust("now()"))
    }
}

pub struct DocRepoImpl<'a> {
    conn: Connection<'a>,
}

impl<'a> BaseRepo<doc::Entity> for DocRepoImpl<'a> {
    fn field(&self) -> impl ColumnTrait {
        doc::Column::DeletedAt
    }
}

impl<'a> DocRepoImpl<'a> {
    pub fn new() -> Self {
        let conn = Connection::DatabaseConnection(get_db());
        Self { conn }
    }

    pub async fn query(&self) {
        let sql = self.qry().qry_all(&self.conn).await;
        println!("{:?}", sql);
    }

    pub async fn update(&self) {
        let sql = self.upt().col_expr(doc::Column::Type, Expr::cust("222222")).upt_all(&self.conn).await;
        println!("{:?}", sql);
    }

    pub async fn delete(&self) {
        let sql = self.del().filter(doc::Column::Id.eq(1)).del_all(&self.conn).await;
        println!("{:?}", sql);
    }
}

Any updates on this? I am using soft delete in my project but currently implementing it by creating a trait which wraps around existing methods. I would love to have a soft delete feature at this point.

Any updates on this?


Error: Could not load signature of Firebase.Crashlytics.Editor.iOSPostBuild:GetMainUnityProjectTargetGuid

Please fill in the following fields:
Unity editor version: 2019.3.0f1
Firebase Unity SDK version: 6.7.0
Firebase plugins in use (Auth, Database, etc.): Firebase Crashlytics
Additional SDKs you are using (Facebook, AdMob, etc.): No
Platform you are using the Unity editor on (Mac, Windows, or Linux): Windows 10
Platform you are targeting (iOS, Android, and/or desktop): Android
Scripting Runtime (Mono, and/or IL2CPP): Both
Please describe the issue here:
Error: Could not load signature of Firebase.Crashlytics.Editor.iOSPostBuild:GetMainUnityProjectTargetGuid due to: Could not load file or assembly 'UnityEditor.iOS.Extensions.Xcode, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null' or one of its dependencies. assembly:UnityEditor.iOS.Extensions.Xcode, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null type: member:(null) signature:
Error: Unloading broken assembly Assets/Firebase/Editor/Firebase.Crashlytics.Editor.dll, this assembly can cause crashes in the runtime
Steps to reproduce :
On Windows 10, install Unity 2019.3 for Windows with Android Build Support (AndroidSDK+OpenJDK)
Create empty 2D project
Download and unzip Firebase SDK 6.7.0
Import package FirebaseAnalytics.unitypackage - All Ok
Import package FirebaseCrashlytics.unitypackage - Error Occure immediately
Targeting : Android ( Standalone/Windows as well )
Please answer the following, if applicable:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
On Empty Project with Firebase Analytics and Crashlytics
What's the issue repro rate?
Reproduce rate 100%
Hello, Firebase Team !
Thank You for great products !
Now I catch stable error on Unity for Windows ( Firebase SDK 6.7.0 ) and there is no workaround found after googling.
Same issue also occure on 2019.2.7f2 (Firebase SDK 6.7.0) if import Firebase Crashlitics over Analitycs, RemoteConfig.
Without Crashlitics project with Firebase Analitycs, Firebase Remote Configs work very well.
Best regards,
Michael

This is a bug in the Crashlytics Unity editor plugin, we have a fix lined up internally.  The workaround is to install the Unity iOS extension which will resolve the missing type and allow the DLL to load.

Thank you!
Also this bug seems don't break build process. And after build for Android, in runtime Crashlytics can sent reports on exception.
The error message can be removed if run PlayServiceResolver->AndroidResolver->ForceResolve ( untill next auto dependency resolve )

This should be fixed as of version 6.8.1. Feel free to re-open if you still experience this error!
--Patrick


[Mattermost] Certificate expire alert not use correct notification config

⚠ Please verify that this bug has NOT been raised before.

[X] I checked and didn't find similar issue

🛡 Security Policy

[X] I agree to have read this project Security Policy

Description
I set up a Mattermost alert with icon url and channel info.
The up/down alert can use the correct config(correct icon & channel), but certificate expire alert not use the config, it use the webhook default config(without icon & default channel).
By the way, click test button on notification config dialog, it also use the default config but not my config. Hope this info is useful.
👟 Reproduction steps

set up a mattermost incoming webhook in mattermost server, do not select locked channels.
set up a mattermost alert in uptime-kuma, fill in the icon url and channel.
click test button, or wait uptime-kuma send a certification expire alert

👀 Expected behavior
notification test and certification expire alert use my nofitication config just like up/down alert, not webhook default config.
😓 Actual Behavior
notification test and certification expire alert use webhook default config, without icon and default channel.
🐻 Uptime-Kuma Version
1.11.0
💻 Operating System and Arch
docker
🌐 Browser
chrome 96.0.4664.4
🐋 Docker Version
18.06-ce
🟩 NodeJS Version
No response
📝 Relevant log output
No response

https://github.com/louislam/uptime-kuma/blob/dd183e2ec25d74429541ca06c412d53c92e2cb92/server/notification-providers/mattermost.js#L16-L17
It seems that it is Mattermost only bug, the channel and the icon do not passed to general message call.


chore: add qg checklist

add qg-checklist as markdown because of problem within ETX

https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/3022

hopefully then we have a file which can be added as issue to the product-repositories

synced fork tx-sig-infra before creating new branch on it

already provided to https://github.com/eclipse-tractusx/.github/blob/main/.github/ISSUE_TEMPLATE/system-team-qg-checklist.md


Android Studio 2.2 Preview 5: issues with runConfigurations

to make the run-configurations work in Android Studio 2.2 Preview 5, I had to change the factoryName in the run-configuration xml files from Android Application to Android App.
since I'm a newbie to Android, I am not sure, if this is something that you can fix, or if it's a problem with Android Studio.
for details see this Stack Overflow thread

I made the changes in xml files. now the run configurations are displayed but their is an error saying
The activity must be exported or contain an intent-filter with android.intent.action.MAIN action
I checked the manifest file and all the activities have intent-filter action of android.intent.action.MAIN
Any thoughts on what could be the possible solution.

try to add this to the intent-filter
<category android:name="android.intent.category.LAUNCHER" />

Found the problem, working on it.

Filed bug https://code.google.com/p/android/issues/detail?id=218981&thanks=218981&ts=1470126691

I don't recommend you to add LAUNCHER intent-filter, fixed in https://github.com/googlecodelabs/android-agera/commit/682324b4cbbc9a184fd052b21229a81e98289b5e

Thanks Jose. android:exported=true fixed it


Styling integrations

Hey! I've been using UnoCSS with Fresh privately for a while, updating it as Fresh has evolved, and it's seemed to be pretty reliable/fast/capable. I've made that integration available here and documented how to use it: https://github.com/dragonwocky/deno_tools#fresh_unocss
What might be the best way for that to be made available for Fresh users? Just leaving it there as-is, or publishing a module on https://deno.land/x/, or opening a PR to add it to Fresh itself? Is there a plan for any sort of plugin system with Fresh? I expect if that is planned, it might be complex to do right and wouldn't be part of v1.0.0.
I've noticed that the styling page of the docs is still empty, and I'd be happy to write that up, referencing how to use UnoCSS, Twind, post-processed stylesheets and normal stylesheets.
Side question: the _app.tsx route isn't documented yet either, and it doesn't really look like there's a gap where it would fit into the current docs? I'd be curious to know the plan for/intended uses of that.

I'd love to add plugins for styling integrations. I have unfortunately not found the right way to do this yet, and it won't be part of 1.0.0.
Once I have more time to work on plugins (hopefully in a couple of weeks), we can figure out how to integrate UnoCSS as a CSS engine. Ideally it would just be a built in plugin in the Fresh repo :)

FYI: just opened a PR which adds a unocss plugin based on the new renderAsync() method 👍🏼


Use 64 KiB buffered writes for performance and less fragmentation

I use yt-dlp on Windows writing to a Linux system via SMB over a 10GbE connection and downloading via 400 Mbps cable internet. I have observed that downloads often seem to start very fast (40+ MiB/sec) but then throttle down to 8-20 MiB/sec. I also observed a large amount of disk thrashing for such a large array and small amount of data that's supposedly being written sequentially.
The problem is two-fold. Downloaded fragments are stored using a very short-lived *-FragX file, then immediately appended to the stream upon fragment completion, and deleted. Both operations use small write buffers. When the OS write buffers start to flush, the two sets of writes plus the large number of writes start to force competition to complete the queued writes in different areas of the volume.
Python defaults to sending writes at the underlying device's "block size" or a fallback to io.DEFAULT_BUFFER_SIZE. In practical terms, this means a write buffer of 4096 or 8192 bytes. This commit increases most write buffers to 65536 (64 KiB) using the open() buffering=X option, significantly speeding up writes of larger chunks of data and reducing potential fragmentation in low disk space conditions. With these changes, I consistently see fast downloads and the array thrashing is noticeably lessened.
Template

Before submitting a pull request make sure you have:

[x] At least skimmed through contributing guidelines including yt-dlp coding conventions
[x] Searched the bugtracker for similar pull requests

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

[x] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[ ] Fix or improvement to an extractor (Make sure to add/update tests)
[ ] New extractor (Piracy websites will not be accepted)
[x] Core bug fix/improvement
[ ] New feature (It is strongly recommended to open an issue first)

What about buffered writes to stdout? I found this which I didn't quite understand and can't test (not on Windows).

What about buffered writes to stdout

I don't understand because these things are all dumping data to files.

I see.
@jbruchon do you think this makes much sense to do this for other files besides regular downloads? Also how does this affect Android devices? Also if this were done, it would probably make sense to have a global BUFFER_SIZE somewhere so that its controlled globally and people may change it.

, it would probably make sense to have a global BUFFER_SIZE somewhere so that its controlled globally and people may change it.

Or a utils.open which could set default buffer_size and encoding

That doesnt quite work since then people cannot control our buffer size for the internal calls without having to create a decorator/overwrite the function, which doesnt always work. Im not opposed to the helper function though since it could help simplify invocation

You're massively over-thinking this. Larger buffers only have one downside and that's RAM usage measured in kilobytes. Unless you are leaving tens of thousands of files open simultaneously, that's not going to be an issue even on Android devices from 2012. All remotely modern systems are more efficient with larger I/O blocks. The worst case scenario is that the change has no effect.

Core changes are always trouble and no matter what you think you covered, it will always result in problems for some people.
In my opinion it makes most sense to have it be configurable anyways, and for the config to be centralized

But it's a file buffer. It's not a logic change. The only thing that happens here is that more data is read or written at a time. Like I said, you're waaaaay over-thinking it.

Even non logic changes can have troublesome impact, and also that doesn't directly matter to the discussion.
I am saying that there should be a global parameter with which you can configure the buffer size, to maximize potential usecase of this change.

OK. Explain the problem that you have foreseen. All of that "any change can cause a problem" rhetoric has no actual value. What is the specific technical issue you are predicting from this change, based on your knowledge of how file buffers operate? Buffer overflow? Null pointer dereference? Out of memory crash? What's the technical merit behind this objection?

Like I said that was not the reason I was arguing you. It was just the reason I was careful and did not merge without understanding.
The reason I want a global value is that I want to be able to change the buffer size myself. It has nothing to do with estimated technical challenges.

Maybe relevant: https://github.com/python/cpython/issues/117151 and https://github.com/python/cpython/pull/118144

Give that information, it should probably be a global value set to 128 * 1024 by default.

FYI I've been using this for 9 days now with no issues and significantly improved performance.

FYI I've been using this for 9 days now with no issues and significantly improved performance.

There's been plenty of research and evidence that such small buffers are a major speed constraint on modern drives, so no-one is arguing about that, it just needs to be configurable.
I think the main concern is memory usage. It might skyrocket with people using very large -N values, though that's not default behavior it might need testing and a warning if it does increase it too much.

Give that information, it should probably be a global value set to 128 * 1024 by default.

The speed increase from 64->128 isn't that great, could always see how it goes first and increase later.

it just needs to be configurable
Unnecessary complexity, in my view.

I think the main concern is memory usage
The program doesn't hold enough files open at once for this to be an issue with reasonable buffer sizes. Another good reason to not make it configurable.

I suspect this change will also cause faulty drives to be more likely see errors
That makes no sense. If a drive has a fault then the buffer size won't matter. 64K written in 8 pieces vs. one piece is no different on the device level as large I/O is ultimately broken down into loops of smaller operations as needed by the underlying hardware's limitations.

Give that information, it should probably be a global value set to 128 * 1024 by default.
The size doesn't matter too much, but in my C programming experience, very large I/O buffers tend to blow out CPU D-caches and cause lower performance in some cases. Python is a hog by comparison, so the caches evicting is probably not as big of a performance issue by the simple nature of the language. I chose 64K  because the ideal size for 64K L1 D-cache in my C fread() experience is 32K (half the cache size) but writes work differently from reads and the bigger issue is enabling the OS to optimize delayed writes. There is also the issue of buffer bloat if the buffers are too large, causing the stop-start cause to be reversed: writes stop because the buffer isn't filled yet, then a massive write drops, then they stop again, which isn't an issue if the storage is fast enough but for inconsistent performance e.g. low space conditions SMR drives you'd want writes to dispatch to the drive as early as possible so the drive shingle rewrites or huge scattered allocation metadata collection to happen ASAP.

The speed increase from 64->128 isn't that great, could always see how it goes first and increase later.
Unless you have a multi-gigabit fiber connection and SSD or very fast RAID-0 storage targets, you're not going to see any noticeable improvement. I didn't pick 64K lightly. Frankly, it's possible that 16K would have made a huge difference since 8K is the default. I don't see 128K being harmful, but unless everything else (internet, storage) is fast enough to take advantage of it, it'll just double the RAM usage. Still, since the program only holds a few files open for writes at the most, we're not even talking 1M of extra usage.

Ultimately, all I can say is that it solved my performance issues and works well for me, a powerful sample size of 1. You should try it out for yourself and make it 2!

It will have to be a centralized variable nontheless, preferably with a comment. 128k was chosen by cpython so its the most reasonable thing to take as the default (sort of backporting that change to yt-dlp).
Maybe a utils.open helper would actually make sense, also providing a default for encoding if text mode is set.

That sounds reasonable to me. :-)

Ultimately, all I can say is that it solved my performance issues and works well for me, a powerful sample size of 1. You should try it out for yourself and make it 2!

I can't seem to replicate the performance issues on my 100Mb/s internet connection with my SSDs, maybe with a HDD but I don't use any anymore so I can't help test for speed increases but I guess I could just test for stability.

I have a 10GbE connection to a Linux RAID server over Samba. The Windows machine is pulling the data, then bouncing it to mapped drives over the private link.


document useful tools

https://yaml.to-go.online

This was a dumb note to myself when I was trying to figure out how to map yaml to structs. I think IntelliJ can do this for you now.


Quick fixes

Quick fix for typos. Added 'auctionId' in logs then parsing error happens .

Thanks for the fix :)

Whoops, I forgot about the CLA which you'll have to sign to contribute to RTBkit. You can find the relevant details here: http://rtbkit.org/site/contributions#CLA


Limit Pydantic < 2.0.0 until Airflow resolves incompatibilities

Before this change, the project's main branch tests failed.
Example of error:
    module = import_module(module_path)
  File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/runner/work/astro-sdk/astro-sdk/python-sdk/.nox/test_examples_by_dependency-extras-sqlite-include-sqlite/lib/python3.8/site-packages/airflow/models/skipmixin.py", line 25, in <module>
    from airflow.serialization.pydantic.dag_run import DagRunPydantic
  File "/home/runner/work/astro-sdk/astro-sdk/python-sdk/.nox/test_examples_by_dependency-extras-sqlite-include-sqlite/lib/python3.8/site-packages/airflow/serialization/pydantic/dag_run.py", line 24, in <module>
    from airflow.serialization.pydantic.dataset import DatasetEventPydantic
  File "/home/runner/work/astro-sdk/astro-sdk/python-sdk/.nox/test_examples_by_dependency-extras-sqlite-include-sqlite/lib/python3.8/site-packages/airflow/serialization/pydantic/dataset.py", line 40, in <module>
    class TaskOutletDatasetReferencePydantic(BaseModelPydantic):
  File "/home/runner/work/astro-sdk/astro-sdk/python-sdk/.nox/test_examples_by_dependency-extras-sqlite-include-sqlite/lib/python3.8/site-packages/pydantic/_internal/_model_construction.py", line 95, in __new__
    private_attributes = inspect_namespace(
  File "/home/runner/work/astro-sdk/astro-sdk/python-sdk/.nox/test_examples_by_dependency-extras-sqlite-include-sqlite/lib/python3.8/site-packages/pydantic/_internal/_model_construction.py", line 328, in inspect_namespace
    raise PydanticUserError(
pydantic.errors.PydanticUserError: A non-annotated attribute was detected: `dag_id = <class 'str'>`. All model fields require a type annotation; if `dag_id` is not meant to be a field, you may be able to resolve this error by annotating it as a `ClassVar` or updating `model_config['ignored_types']`.

From: https://github.com/astronomer/astro-sdk/actions/runs/5449375269/jobs/9913528880
Relates to: https://github.com/apache/airflow/issues/32311

Our master branch tests are currently broken due to recent permission changes between the account used in the CI and the S3 bucket used for testing. The current broken test relates to this.


Always get response CONNECTION_NOT_SECURE

Since i've updated my plugin to 6.0.0 version, i always get CONNECTION_NOT_SECURE. Hope you check and resolve this issue :)

Did you see the note about sha1 vs sha256 in the readme?

@EddyVerbruggen if we go to chrome, and click on Certificate then details and scroll down, there is no sha256 fingerprint. But there is the thumbprint, do we use that or what should we do exactly?

Chrome on macOS:


breaks with cassandra 3.3

Fatal configuration error; unable to start. See log for stacktrace.```

Hi, can you show your config? So far i'm not able to reproduce this.

I have updated dependencies, hope this will help.

That fixed it thanks!


Minor QoL improvements

Codecov Report

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

@@           Coverage Diff           @@
##           master      #23   +/-   ##
=======================================
  Coverage   65.71%   65.71%
=======================================
  Files          24       24
  Lines         595      595
  Branches       25       25
=======================================
  Hits          391      391
  Misses        198      198
  Partials        6        6

Continue to review full report at Codecov.

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


[oui-calendar] localization not working

Description
The locale option does not work because locale files are not imported
Steps to reproduce
ouiCalendarConfigurationProvider.setLocale('fr'); // same for fr-FR fr_FR
then instantiate a oui-calendar
Expected behavior:
oui-calendar should be displayed in french locale
Actual behavior:
oui-calendar is in english, warning message in the console telling that the flatpicker locale does not exists
Frequency:
always
Additional information
the oui-calendar component should import the given flatpicker locale automatically

I've updated the documentation about it: https://ovh.github.io/ovh-ui-kit/?path=/story/design-system-components-calendar-introduction--page.
If this way doesn't work, you could still try to import file according the flatpickr documentation: https://flatpickr.js.org/localization/