supprt --cert-dir to plugin existing cert or genereate self signed cert

https://github.com/istio/istio/issues/22245

@irisdingbj: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test lint_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test lint_istio

gencheck_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test gencheck_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test lint_istio

gencheck_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test gencheck_istio

unit-tests_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test unit-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test lint_istio

gencheck_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test gencheck_istio

unit-tests_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test unit-tests_istio

integ-local-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-local-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test lint_istio

gencheck_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test gencheck_istio

integ-local-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-local-tests_istio

unit-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test unit-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test gencheck_istio

integ-local-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-local-tests_istio

unit-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test unit-tests_istio

lint_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test lint_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test gencheck_istio

integ-local-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-local-tests_istio

unit-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test unit-tests_istio

lint_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test lint_istio

release-test_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test release-test_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test gencheck_istio

integ-local-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-local-tests_istio

unit-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test unit-tests_istio

lint_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test lint_istio

release-test_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test release-test_istio

integ-distroless-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-distroless-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test gencheck_istio

integ-local-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-local-tests_istio

unit-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test unit-tests_istio

lint_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test lint_istio

release-test_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test release-test_istio

integ-distroless-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-distroless-k8s-tests_istio

integ-mixer-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-mixer-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test gencheck_istio

integ-local-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-local-tests_istio

unit-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test unit-tests_istio

lint_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test lint_istio

release-test_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test release-test_istio

integ-distroless-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-distroless-k8s-tests_istio

integ-mixer-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-mixer-k8s-tests_istio

integ-telemetry-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-telemetry-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test gencheck_istio

integ-local-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-local-tests_istio

unit-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test unit-tests_istio

lint_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test lint_istio

release-test_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test release-test_istio

integ-distroless-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-distroless-k8s-tests_istio

integ-mixer-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-mixer-k8s-tests_istio

integ-telemetry-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-telemetry-k8s-tests_istio

integ-galley-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-galley-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test gencheck_istio

integ-local-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-local-tests_istio

unit-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test unit-tests_istio

lint_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test lint_istio

release-test_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test release-test_istio

integ-distroless-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-distroless-k8s-tests_istio

integ-mixer-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-mixer-k8s-tests_istio

integ-telemetry-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-telemetry-k8s-tests_istio

integ-galley-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-galley-k8s-tests_istio

integ-conformance-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-conformance-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test gencheck_istio

integ-local-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-local-tests_istio

unit-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test unit-tests_istio

lint_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test lint_istio

release-test_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test release-test_istio

integ-distroless-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-distroless-k8s-tests_istio

integ-mixer-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-mixer-k8s-tests_istio

integ-telemetry-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-telemetry-k8s-tests_istio

integ-galley-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-galley-k8s-tests_istio

integ-conformance-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-conformance-k8s-tests_istio

integ-security-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-security-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio
979e4c533e4cdb5bfce03094577ef63767811bf5
link
/test gencheck_istio

integ-local-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-local-tests_istio

unit-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test unit-tests_istio

lint_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test lint_istio

release-test_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test release-test_istio

integ-distroless-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-distroless-k8s-tests_istio

integ-mixer-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-mixer-k8s-tests_istio

integ-telemetry-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-telemetry-k8s-tests_istio

integ-galley-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-galley-k8s-tests_istio

integ-conformance-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-conformance-k8s-tests_istio

integ-security-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-security-k8s-tests_istio

integ-pilot-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-pilot-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-local-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-local-tests_istio

unit-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test unit-tests_istio

lint_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test lint_istio

release-test_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test release-test_istio

integ-distroless-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-distroless-k8s-tests_istio

integ-mixer-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-mixer-k8s-tests_istio

integ-telemetry-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-telemetry-k8s-tests_istio

integ-galley-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-galley-k8s-tests_istio

integ-conformance-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-conformance-k8s-tests_istio

integ-security-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-security-k8s-tests_istio

integ-pilot-k8s-tests_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test integ-pilot-k8s-tests_istio

gencheck_istio
dba7873e71f4f3b2de5358d25bf8ff55d4b7e25b
link
/test gencheck_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: PR needs rebase.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@costinm  Thanks a lot for the review!
I will move the common code under istio/pkg  and other changes to address your comments.
I am not clear about the root-cert suggestions.  So let's see the final command we want to support:
Is it something like istioctl manifest apply --root-cert /etc/istio/certs --clusterName myCluster ?
And the behavior is :
if /etc/istio/certs is empty or we can not read ca-cert.pem, ca-key.pem, root-cert.pem and cert-chain.pem within it, we will generate self singed root-certs and two intermediate CA certs and keys under /etc/istio/certs.
We will use myCluster as org Name in the generated root certs and use My Cluster-intermidate1`` and myCluster-intermidiate2` as org on the two intermediate CA certs.

cc @nmittler

@irisdingbj: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-security-k8s-tests_istio
86e7ea5260cd77575df4fa0e276d49c1b3c39cd3
link
/test integ-security-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test integ-security-k8s-tests_istio

@costinm @ayj PTAL, Thanks!

@ayj  @@nmittler @rshriram @costinm  get clusterID using below sequence:
global.values.clusterID ->  uuid of kube-system->default`
PTAL, Thanks!

@irisdingbj: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test lint_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test lint_istio

gencheck_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test gencheck_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test lint_istio

gencheck_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test gencheck_istio

unit-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test unit-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test lint_istio

gencheck_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test gencheck_istio

unit-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test unit-tests_istio

integ-distroless-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-distroless-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test lint_istio

gencheck_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test gencheck_istio

unit-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test unit-tests_istio

integ-distroless-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-distroless-k8s-tests_istio

integ-multicluster-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-multicluster-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test lint_istio

gencheck_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test gencheck_istio

unit-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test unit-tests_istio

integ-distroless-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-distroless-k8s-tests_istio

integ-multicluster-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-multicluster-k8s-tests_istio

integ-telemetry-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-telemetry-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test lint_istio

gencheck_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test gencheck_istio

unit-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test unit-tests_istio

integ-distroless-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-distroless-k8s-tests_istio

integ-multicluster-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-multicluster-k8s-tests_istio

integ-telemetry-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-telemetry-k8s-tests_istio

integ-mixer-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-mixer-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test lint_istio

gencheck_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test gencheck_istio

unit-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test unit-tests_istio

integ-distroless-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-distroless-k8s-tests_istio

integ-multicluster-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-multicluster-k8s-tests_istio

integ-telemetry-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-telemetry-k8s-tests_istio

integ-mixer-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-mixer-k8s-tests_istio

integ-pilot-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-pilot-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test lint_istio

gencheck_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test gencheck_istio

unit-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test unit-tests_istio

integ-distroless-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-distroless-k8s-tests_istio

integ-multicluster-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-multicluster-k8s-tests_istio

integ-telemetry-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-telemetry-k8s-tests_istio

integ-mixer-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-mixer-k8s-tests_istio

integ-pilot-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-pilot-k8s-tests_istio

integ-security-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-security-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

unit-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test unit-tests_istio

integ-distroless-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-distroless-k8s-tests_istio

integ-multicluster-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-multicluster-k8s-tests_istio

integ-telemetry-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-telemetry-k8s-tests_istio

integ-mixer-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-mixer-k8s-tests_istio

integ-pilot-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-pilot-k8s-tests_istio

integ-security-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-security-k8s-tests_istio

gencheck_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test gencheck_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-distroless-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-distroless-k8s-tests_istio

integ-multicluster-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-multicluster-k8s-tests_istio

integ-telemetry-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-telemetry-k8s-tests_istio

integ-mixer-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-mixer-k8s-tests_istio

integ-pilot-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-pilot-k8s-tests_istio

integ-security-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-security-k8s-tests_istio

gencheck_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test gencheck_istio

unit-tests_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test unit-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-multicluster-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-multicluster-k8s-tests_istio

integ-telemetry-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-telemetry-k8s-tests_istio

integ-mixer-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-mixer-k8s-tests_istio

integ-pilot-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-pilot-k8s-tests_istio

integ-security-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-security-k8s-tests_istio

gencheck_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test gencheck_istio

unit-tests_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test unit-tests_istio

integ-distroless-k8s-tests_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test integ-distroless-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-telemetry-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-telemetry-k8s-tests_istio

integ-mixer-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-mixer-k8s-tests_istio

integ-pilot-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-pilot-k8s-tests_istio

integ-security-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-security-k8s-tests_istio

gencheck_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test gencheck_istio

unit-tests_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test unit-tests_istio

integ-distroless-k8s-tests_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test integ-distroless-k8s-tests_istio

integ-multicluster-k8s-tests_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test integ-multicluster-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-mixer-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-mixer-k8s-tests_istio

integ-pilot-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-pilot-k8s-tests_istio

integ-security-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-security-k8s-tests_istio

gencheck_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test gencheck_istio

unit-tests_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test unit-tests_istio

integ-distroless-k8s-tests_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test integ-distroless-k8s-tests_istio

integ-multicluster-k8s-tests_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test integ-multicluster-k8s-tests_istio

integ-telemetry-k8s-tests_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test integ-telemetry-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-pilot-k8s-tests_istio

integ-security-k8s-tests_istio
389e195e6d06cdaa81035520f237b56b3ebeaacf
link
/test integ-security-k8s-tests_istio

gencheck_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test gencheck_istio

unit-tests_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test unit-tests_istio

integ-distroless-k8s-tests_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test integ-distroless-k8s-tests_istio

integ-multicluster-k8s-tests_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test integ-multicluster-k8s-tests_istio

integ-telemetry-k8s-tests_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test integ-telemetry-k8s-tests_istio

integ-mixer-k8s-tests_istio
3d94e84425e2a541c45bb77079d868a61384184f
link
/test integ-mixer-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@ayj  PTAL,  Thanks!

@irisdingbj: PR needs rebase.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ayj @costinm A ping to request review for this PR, I will rebase afterwards accordingly. Thanks!

cc @sdake

@irisdingbj: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-ipv6-k8s-tests_istio
5a452df000bde922ded13c8c1e392fdcbbb70ac5
link
/test integ-ipv6-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@irisdingbj: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-ipv6-k8s-tests_istio
5a452df000bde922ded13c8c1e392fdcbbb70ac5
link
/test integ-ipv6-k8s-tests_istio

analyze-tests_istio
5a452df000bde922ded13c8c1e392fdcbbb70ac5
link
/test analyze-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


Update the map to show availble filters and wire in to marker route

Depends on #106 being done first
Add filters for the properties outlined by Marianne to the map. Update the graphql query for map data to pass these filters to the api.
The list of filters is country, species, date ranges, larval/adult data, control (y/n), season (rain/dry)
Acceptance criteria:

[ ] Users can filter data in the map view based on the properties outlined by Marianne.
[ ] The markers on the map correspond to the filtered data.

Handed story over to Ray this afternoon. The main points covered:

filterToggle test needs fixing. Button can be clicked once and will dispatch the correct action, but any subsequent press seems inoperative.

Filter was tested during handover and is functional, but to evaluate it properly we need to verify that the test data is accurate (ie// Point in Egypt labelled as Sudan) and ideally main should merge in to take advantage of Andrew's map reload updates. However, the merge mentioned in the latter did break the map page when attempted earlier on in the ticket. So, that is a separate investigation if that occurs again

Currently the boolean filters are present in the mapSlice as [true, false, 'empty]. I think this will require review. Especially when considering how this will wire up following story #206.

The use of : any within the changed files will be worth a bit of clean-up. It was used just to get something up and running if a type or interface was a little more complicated.

Must implement a method to handle filter requests. If the filter is changed whilst points are still loading, it is rendered useless as the previous points will continue to load. Some sort of filterId or requestId

We should also ask Marianne to consider the ICIPE graphic designer to create some filter icons for us. Aside from season they don't quite match the style of the website, nor are they completely relevant.

All filters including area with #101 now implemented.


Highmem22 runners

Adds a new runner named highmem22 based on c3-highmem-22 node
Adds TotalNumberOfQueuedAndInProgressWorkflowRuns to the runner autscaler metrics list. This will allow to scale from zero as PercentageRunnersBusy cannot do that. This metrics is only considered if number of runners is zero and allows to start the scaling.
Moves PostCommit_Python_Examples_Flink to highmem22

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@liferoad This has been already applied.  I have added the label to the flink job so please trigger it.
related to: #32794


[1.x] Orchestrate services via config only.

What does this PR do? :robot:

Removes ability to orchestrate services via multiple drivers.
Deletes the Service::class model & removes the services table from the base migration.
Removes any additional complexity that was required to allow multiple drivers orchestrating the services.

Any background context you would like to provide? :construction:
This ability is being removed is because of the confusion it may cause and it didn't make much sense in the first place.
Does this relate to any issue? :link:
Closes #39

Codecov Report
Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (9192746) 90.81% compared to head (eb02654) 91.02%.

Files
Patch %
Lines

src/Models/Merchant.php
0.00%
1 Missing :warning:

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #40      +/-   ##
============================================
+ Coverage     90.81%   91.02%   +0.21%
+ Complexity      190      181       -9
============================================
  Files            22       21       -1
  Lines           653      635      -18
============================================
- Hits            593      578      -15
+ Misses           60       57       -3

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


How did you build for ARMv8?

Could you please tell how you built this for termux? I've been unable to link vulkan to anything i've tried

You need to compile glslangValidator first, then combine it with the system built-in libvulkan.so to generate a "mini-vulkan SDK".
Then export it to the VULKAN_SDK environment variable.
if you need libvulkan.so, go to /system/lib64/libvulkan.so

How do I do that? I have compiled it but have no idea on how to combine it with /system/lib64/libvulkan.so
I know how to export path but no idea about vulkan SDK related stuff.

How do I do that? I have compiled it but have no idea on how to combine it with /system/lib64/libvulkan.so
I know how to export path but no idea about vulkan SDK related stuff. Reading about the API or glslang git didn't help me much as I don't fully understand these.

Put libvulkan.so into [your build dir]/install/lib
export VULKAN_SDK=[your build dir]/install

Did this happen while you were building too? If so, why does this happen?

Did this happen while you were building too? If so, why does this happen?

Please clone the repository forked by me, otherwise you will need to solve many compile issues.


Unable to use "protected" modifier in Self prac exercise 2

I am unable to use the protected modifier as code crunch requires me to use "private final".

Need to change all class attributes to private final protected is not allowed as classes that should not be using that attribute can still access it if it's protected

You can check the lecture 3 slides, prof went through an example using the protected modifier while keeping the class attributes private final


Receiving QR code Error when trying to add Leviton Outlet (ZW15R)

Good afternoon,
I'm trying to add a Leviton Decora Smart Outlet (ZW15R) to my Z-wave network.  This is a 700 series Zwave plus outlet, supposedly with S2 support.
When I attempted to add it to my mesh through scanning the QR code, I received the following error:  "Error while calling api parseQRCodeString:  contains invalid characters (ZW1406).
I purchased 3 of these switches, and I've tried it on two so far, and zero luck.
I tried to add them the old fashioned way, by putting my Z-wave network into inclusion mode, and then held the inclusion button for 7 seconds, then pressed it once more after the light started flashing amber, to put it into inclusion mode per the manual, and it was found and recognized by HA, however, it did not prompt me for a PIN for the S2 security.
I've attempted to contact Leviton nad I was met with perhaps the dumbest Tier 1 I've ever spoken to, and then the rudest Tier 2 who didn't understand or care about the QR code issue.  He said, "well t's included, so that's all I can help you with."
So my questions are:

is this QR code a problem with Z-wave-js-ui, or with the manufacturer?
Is there a way to get the prompt for the PIN on this device?

Hi @tamorgen, are you adding it from the provisioning entries table so? Or are you using nodes manager dialog? Is the QR code so small? In case it is very small I can suggest you to take a picture of it, then zoom the picture in your phone and use that as a scan as there is a known issue with small qr codes not read correctly. If this still doens't work you could try to parse the QR code with some other tool and insert that string manually in the provisioning entries table dialog (just click the scan button and go to the 3rd tab of the dialog shown to input the string manually).
cc @AlCalzone

All the driver ever sees is the QR code's content, so either the code on the device is really shitty, or the UI has trouble reading it.
@robertsLando I had better luck parsing codes reliably by scaling the Webcam image up 2x before attempting detection. Maybe worth a try, ZUI not being able to scan seems to happen semi-frequently.

I tried all qrcode readers libraries I found online and none of them is able to read the qo code of my aeotec temperature and humidity sensor.
I think I may need to implement my own one? 😢

Maybe this could do the trick: https://github.com/mebjas/html5-qrcode/issues/308#issuecomment-1121195534

I'm adding it from the Manage Node's screen  (Action --> Manage Nodes --> Inclusion -- > Name and Location --> Scan QR Code
The QR code isn't terribly small.  It's the same size as others that have functioned properly (Enbrighten Switches, Zooz Switches).   I've tried both from the box QR and the receptacle QR.   If it was too small, generally I'd have problems focusing on it, but this scans it straight away and then gives me the error.  I have three of these devices and they all do the same thing.

Ok so the problem is not a small QR code, I think it may be something related to zwavejs method that parse the QR string, @AlCalzone should I move this to zwave-js?

One other piece of information.  I just tried to add the device using the QR text, and it's failing to add as well.  This time, it gives me an error about the length of the code.  (Not valid.  Must be 52 digits long and starts with "90".)
The code I'm trying to enter is:
18XXX-55502-60104-02250-44975-53279-60438-60082  (PIN partially excluded)
It's only 40 characters, so where are the other 12 characters supposed to come from?

Seems also it doesn't start with '90' at all, that validation is taken from zwave-js so I have no clue why this happens, let's see what Al says

So I noticed.  I'm wondering if Leviton isn't following an industry standard.

Is the QR code just the DSK (40 digits)? That's not a smart start QR code then, but we should probably detect it as a valid S2 DSK. It won't help much though, only spare you from entering the 5 digit PIN.

It only appears to show 40 digits, yes.  Their website claims it is SmartStart:

"Z-Wave 700 Series Chipset includes S2 security and SmartStart"

@AlCalzone So what about this?

https://github.com/zwave-js/node-zwave-js/issues/5205

This issue is the 2nd part of the linked one, only without the zws2dsk prefix, so I think we can close this.
In any case the QR code is an S2 QR code, but not a SmartStart QR code, so a manual inclusion will still be necessary.

Sorry, I’ve been out of town for a few days.  I did get a reply from Leviton engineering and they claim the whole code is in the QR code.  I’ll post their response later today.

I did try scanning the QR codes as he suggested, and it does scan with Smart Start prefix before the DSK.  However, it appears that there are more numbers included after the DSK.   I don’t know if that’s normal behavior when scanning from the iOS camera or not.l

Can you share the entire text content of the QR code?

Can you share the entire text content of the QR code?

900125692131184405550260104022504497553279604386008200100409601794022000029000560000200263

I believe I may have come up with an explanation for the invalid character error.   I appears to be in the generation of the QR code by Leviton, because I'm seeing it on all three Leviton devices I've tried to add, and none of the other 25 Smart Start devices I have on my network.
I went to manual add one of the outlets a short time ago by copying the string output by the iOS camera on my iPhone, and pasting it into the manual text entry field for QR Code text in the Nodes Manager.   When I copied the entire text, I got an error “Not valid.  Must be 52 digits long and starts with “90”, similar to my earlier attempts of just entering the SDK that was on the label.
I noticed however, that the QR cod text copied from the camera included a trailing space after the last digit.  When I backspaced, the QR code was accepted.
I checked the other two outlets, and they all had the same trailing spaces.
My guess is that when I used the scan by camera feature in the app, it is also detecting the trailing space, but throwing invalid characters error that I initially provided.
I haven’t seen this with any other companies Smart Start QR code.  I’ve added many devices including Zooz, Jasco/Enbrighten, and Yale locks with QR code, and the Leviton devices are the only ones doing this.   I would appear that there is an issue with the QR code generation that is adding this extra space, that other devices are not experiencing.
I think this is an issue for Leviton to solve.   The problem is fixed for me now by manually adding and correcting the text.
The only thing I could say that the app could do is do a sanity check when it scans the QR code with the camera, look for trailing spaces, and delete them.  I would think that would avoid this problem in the future.

Fair enough, I've put this on my to do list. Thanks for investigating. Can you let Leviton know too?

Fair enough, I've put this on my to do list. Thanks for investigating. Can you let Leviton know too?

I emailed them before I posted here.   I have not received a response from them yet.

@robertsLando that error message looks like it comes from Z-UI? Is there an additional check on your end that also needs to be fixed?

Yeah that's a frontend validation, I used the code you had on your side, does that changed?
https://github.com/zwave-js/zwave-js-ui/blob/master/src/components/Confirm.vue#L423

The next version is going to trim() the QR code before validating it. I guess you could replace whitespace with "" in the text field too.

I can add v-model.trim for this, it's automatically handeld by vue

Done


Figure out why the shex stuff is not working in the fork

Reported on telegram.
An initial poke was made in https://github.com/wbstack/cradle/pull/1 which fixed 1 thing, but left some parts still not working.
https://twitter.com/MagnusManske/status/1375375390135439362

OAuth permission error it seems:
The authorization headers in your request are not valid: No approved grant was found for that authorization token. See https://addshore-alpha.wiki.opencura.com/w/api.php for API usage."
So api.php reads in the same config as the JS frontend, but that is config.js, so I fiddle with the JS code in PHP to make a “pure” JSON file. All that window.location.protocol stuff in your config.js breaks that.

So it looks like a hack will also be needed in https://github.com/wbstack/cradle/blob/main/public_html/api.php#L8-L15

I took an initial look at this, but still more to do.
Tools like this would be easier to work with if their auth was not split out over widar and the tool itself.
Right now all that might be needed is WbstackMagnusOauth::setOauthDetails in api.php, but this api lives in cradle, but the other authed stuff is currently in widar...

I debugged through this and after a while I figured out what was necessary to get it to work, and some ways it might be improved.
The error message above occurs if you are not logged in via the tool; but even when you are, there is a problem in that valid shapes specified without EXTRA - including your shape <something> { wdt:P12 [wd:Q1] } - or with non-wdt: prefixes aren't loaded.
After some poking (vue.js loads shex as a dynamic component, harder to debug) I found this regex was failing to find any elements:

<([^/<>]+)>(?: EXTRA .?)?\w{(.+?)}

As Lucas notes "the regex currently treats EXTRA as a mandatory part of a shape, should be optional". In fact, an attempt was made to make the EXTRA into an optional non-capturing group; regardless, it does not actually work without it in many cases because \s is not included in \w and therefore any white space between > and { will break the match.
As I understand it, the EXTRA portion indicates that it is OK to have additional use of predicates not mentioned as part of the shape. For example, I believe this means that humans may be an instance of (P31) items other than a human.

<human> EXTRA wdt:P31 {
wdt:P31 [wd:Q5];
... }

I had a shape with <convention> { that was not detected.
When I changed it to <convention> EXTRA wfdt:P1 { it proceeded through that particular issue.
The regex <([^/<>]+)>(?:\s+EXTRA\s+.*?)?\s*\w*\s*\{(.+?)\} seems to work for both the CLOSED case, one or more EXTRA wdt:, or none and may resolve this issue. (There may however be a simpler alternative; and I cannot guarantee it works in all cases.)
However, I then ran into the fact that I wasn't using wdt: but rather wfdt: to refer to direct local properties. I did this in part because these are mentioned as being "internal to Wikidata" and may be confused with Wikidata, especially when working with multiple wikibases or performing a federated query.
Unfortunately Cradle is hardcoded to match via part.match(/^wdt:(P\d+)\s*(.*)$/) ; and so failed to find the direct props.
My schema contained PREFIX wfdt: <http://furry.wiki.opencura.com/prop/direct/> and it worked in the ShEx2 validator. Ideally Cradle might have looked for a prefix declaration with a path matching the value of d.query.general.server + '/prop/direct/' saved during its custom API step. (The same place where self.page_path is incorrectly set, as mentioned below.)
Once I had modified my shape to use wdt/wd, Cradle loaded the shape successfully. However, the component 'typeahead-search' has hardcoded references to https://www.wikidata.org/w/api.php?callback=? and therefore returns Wikidata items when typing. Once 'Q1' is entered for "instance of", the correct item is shown in the suggestion menu.

With all fields filled out, the item can be successfully created - a 200 was returned. However, when I did this, the 'working' circle to the right of 'Help' kept spinning (but this cleared when I edited one of the fields). If it intended to tell me it had succeeded, it did not.

As a secondary matter - I don't know if it matters at all, or where, but it seems incorrect:
In wikidata.js, function WikiData () , this.set_custom_api there is a line

self.page_path = 'https:' + d.query.general.server + d.query.general.articlepath ;

However d.query.general.server = "https://furry.wiki.opencura.com"
...so this means self.page_path = "https:https://furry.wiki.opencura.com/wiki/$1" which seems incorrect.
It might have helped if using d.query.general.servername (= "furry.wiki.opencura.com"), but then it'd need 'https://'

I know this sounds hacky, but if it was searching for t:(P\d+) (after all, the 'wd' is 'wikidata', right?) then the direct props would have been detected in this case, and probably for others making up their own prefixes using the pattern started by Wikidata.
Wikibooks suggests the only other built-in t: prefix is hint: which may not be used in ShEx - or it could be specifically excluded. Bigdata's QueryHints wiki page also suggests it is only "hint:Prior" with t:P - the P isn't followed by a number, so wouldn't match.

Unfortunately I think such abbreviations will not work with the new version of federated props, that proposes to use the Concept URI as the property identifier. Instead it may have to accept everything that can be a URL - or, more practically, everything up to a terminator.

However, the component 'typeahead-search' has hardcoded references to https://www.wikidata.org/w/api.php?callback=? and therefore returns Wikidata items when typing. Once 'Q1' is entered for "instance of", the correct item is shown in the suggestion menu.

I just encountered this issue when working on https://metabase.wikibase.cloud/tools/cradle/?#/shex/E2 -- the suggestions all come from Wikidata.

Seems to be https://github.com/wbstack/magnustools/blob/2c2e4128132ac7f943934fa909fa9da7b07e0138/public_html/resources/vue/typeahead-search.html#L118 and L135 causing that issue

moved to https://phabricator.wikimedia.org/T357109


Running on 64-bit Raspbian

I'm using a Raspberry Pi 4, running Raspbian 64-bit (aarch64)
At the beginning, when I tried to run creality_install, it gave me "GenerateIdentifier: No such file or directory". Then I realize that GenerateIdentifier binary is compiled for armhf, so I installed some armhf libraries, and the binary was executing.
But when I run creality_install again, it gave me "ioctl: No such device". I checked that /dev/ttyUSB0 is found.
Creality please consider this. Thank you !

We haven't tested it on 64-bit systems, and this is a problem.

sudo dpkg --add-architecture armhf
sudo apt update
sudo apt install libc6:armhf
sudo apt install -f
sudo apt install libstdc++6:armhf
sudo apt install libssl1.1:armhf
sudo apt install libz1:armhf
这些命令敲完64位系统就能正常运行了

sudo dpkg --add-architecture armhf
sudo apt update
sudo apt install libc6:armhf
sudo apt install -f
sudo apt install libstdc++6:armhf
sudo apt install libssl1.1:armhf
sudo apt install libz1:armhf
这些命令敲完64位系统就能正常运行了

它还是 ioctl: No such device

试试看：sudo chmod 777 /dev/ttyUSB0

还是一样

ls /dev/ttyUSB*
看一下设备是不是挂到/dev/ttyUSB1了

The 64bit Raspberry Pi OS beta (I'm not aware of an official release) has missing non 64 bit binaries, e.g. they are missing the built in raspistill command.
The missing binaries also stop devices like the PI Camera from working too with something like Octoprint, perhaps this is related?
https://www.raspberrypi.org/forums/viewtopic.php?t=276821
https://www.raspberrypi.org/forums/viewtopic.php?t=275370


Bot sometimes goes offline

Sometimes the bot just goes offline on Discord, and can't be communicated with, even though it is still running. We should investigate either why this is happening, or figure out a way to reconnect if it happens.

Doesn't seem to happen anymore. Gonna blame an outdated version of dsharpplus.

Doesn't seem to happen anymore. Gonna blame an outdated version of dsharpplus.


New Functionality "Bookmark"

We want to be able to bookmark a task, meaning it should be highlighted. It should have a star button, when its pressed it turns into a bookmark. When you press the bookmark it gets unmarked and turns into the star again. This should only be possible with tasks and not with headlines.

Added this feature on this commit https://github.com/elexess/DoneDone/commit/79ec20c64ea7e4f7049c15edfe74ae409fa66895


Tag helper to render checkbox/radio button list for Enum (incl. flags)

Do taghelpers currently supports the following scenarios?
I have a feeling that this is currently supported but I'm missing something.
I'm not sure how to use taghelpers in this cases.
Scenario1: radio
enum Gender {
    Male,
    Female
}

ViewModel {
    Gender Gender {get;set;}
}

so I get multiple (two in this case) radio buttons (one for Male and one for Female).
desired html output (doesn't have to be exact):

    <input type="radio" name="Gender" value="0">
    Male

    <input type="radio" name="Gender" value="1">
    Female

and
Scenario2: checkbox
[Flags]
enum Roles {
    Admin,
    User,
    Customer
}

ViewModel {
    Roles Roles {get;set;}
}

so I get multiple (three in this case) checkboxes.
desired html output (doesn't have to be exact):

    <input type="checkbox" name="Roles" value="0">
    Admin

    <input type="checkbox" name="Roles" value="1">
    User

    <input type="checkbox" name="Roles" value="2">
    Customer

What exactly is the scenario? A tag helper to render out the entire radio button list or checkbox list? I don't think we have that. I don't think there was ever an MVC HTML Helper for that either.
One reason we haven't built that helper is that making the UI reasonably customizable is quite challenging... so we just didn't do it 😄

Oh guess I'm not missing something then.
The scenario is having validation/metadata passed to the view. (via taghelpers or whatever).
Maybe something like Html.GetEnumSelectList but for checkbox/radios.
I'm not sure (yet) but I think the model binder also has problems with flag enum values. (see * below)
posting: name="Gender" value="Male" checked does not populate the underlying enum on the controller.
checkbox is only used for bool values. While this is fine, I think we are missing a lot of value from the input tag. same for radio.
checkbox/radio are very useful to work with collections and not only booleans.

on a side note (i discovered while playing with this)
Html.GetEnumSelectList doesn't work with flags (where a multiple select will apply perfectly). [not related to this issue tho]
I think this is because of lack of support for flags enum at the model binder.

I guess this is becoming more of a feature request than anything else.
What do you think?, would it make sense to have this kind of support on the framework?

@Bartmax Html.GetEnumSelectList() is intended for cases like <select asp-for='ListProperty' asp-items='Html.GetEnumSelectList(...)' ... ></select>. But, yes, it has a designed-in restriction around [Flags] enums because such types have no obvious default <option /> collection.
As @Eilon said, we don't have tag helpers that handle generating checkbox or radio button groups. But the <input/> tag helper would generate the radio buttons for your scenario just fine. However a restriction in the <input/> tag helper (it always generates the false case as a type='hidden' field) means that helper is not appropriate for your scenario. This would at least get you the model metadata / validation attributes for the radio buttons.
From my perspective, a tag helper that be used in a checkbox group would be helpful. But new or enhanced HTML helpers seem more appropriate if we start dealing with templates or otherwise generating the entire checkbox / radio button group in a single call. Nice to be able to almost see exactly the generated HTML when looking at a .cshtml file containing tag helpers.

@Bartmax Html.GetEnumSelectList() is intended for cases like <select asp-for='ListProperty' asp-items='Html.GetEnumSelectList(...)' ... >. But, yes, it has a designed-in restriction around [Flags] enums because such types have no obvious default  collection.

I made a new issue here:  https://github.com/aspnet/Mvc/issues/5096 about that.

Nice to be able to almost see exactly the generated HTML when looking at a .cshtml file containing tag helpers.

I'm not suggestion to make a template html thing with all inputs, I agree that it's nice to see almost exact html.
From the top of my head I imagine somthing along this lines:
[Flags]
enum EnumFlag {
    First,
    Second,
    Third
}

class ViewModel {
    [BindRequired]
    public EnumFlag MyEnumFlag {get; set;}
}

<input asp-for="MyEnumFlag" asp-item="First">

<input asp-for="MyEnumFlag" asp-item="Second">

<input asp-for="MyEnumFlag" asp-item="Third">

will render:
My enum flag
First
<input type="checkbox" name="MyEnumFlag" id="MyEnumFlag.First" value="First" />
Second
<input type="checkbox" name="MyEnumFlag" id="MyEnumFlag.Second" value="Second" />
Third
<input type="checkbox" name="MyEnumFlag" id="MyEnumFlag.Third" value="Third" />
 ... the validation here like required ...

If the enum is not flags, the input will switch from checkbox to radio.
To pick the current selected values, using MyEnumFlag.HasFlag on the input should be enough.
Intellisense can be smart to suggest the asp-items value only for the valid enum type.
if asp-item is missing can throw a runtime exception like some taghelpers do with a proper error message like, input type for enum flags must provide a asp-item property.

I think this can also be extended/used for collections. In the case someone want to show a collection as a radio/checkbox on the UI (very useful!). Switching from radio to checkbox would be a matter of the property at hand if it's IEnumerable or not.

I also don't think template-generating multiple inputs is a good idea, but generating proper id attributes for radio buttons and checkboxes is a good idea.
I've actually created a tag helper in my test project for this kind of functionality last week, and have just created a pull request with this functionality here: aspnet/Mvc#5097
It supports appending the radio button value to the id of the input, as well as the for attribute of the label, and also adds support for collection backed checkboxes with the same id generation code

@artiomchi is #5097 a fix for #5084? I suspect #5097 is actually almost completely separate though it touches on the id and name choices mentioned above. We need separate issues to track separate features, decide on the appropriate milestone for them, and so on. Please file the issues you believe need fixes and add a comment to #5097 linking that PR.

@dougbu #5097 is actually semi-related to this issue, mostly around the code sample in hos comment here
The pull request can simplify some of the cshtml code below to auto generate the ids for radio buttons (removing the need to wrap the radio button / checkbox) in the label, as well as actually generating the checkboxes using tag helpers (currently tag helpers will generate labels that ** only** post booleans)
What @Bartmax was asking initially is how to generate a radio button list for an enum. He's thinking if a tag helper will generate all the radio options. In my opinion - tag helpers are not partial view generators - they should generate one, at most several tags, not a whole editor layout.
@Bartmax: This is what you're loking for:
Scenario 1
@foreach (Gender gender in Enum.GetValues(typeof(Gender)))
{

        <input asp-for="Gender" type="radio" value="@gender" />
        @gender

}

This generates the following:

    <input type="radio" value="Male" data-val="true" data-val-required="The Gender field is required." id="Gender" name="Gender">
    Male

    <input type="radio" value="Female" id="Gender" name="Gender">
    Female

Scenario 2
Flag enums work a bit differently..
First of all, you want to assign them specific values.. With your code, Roles.Admin is equal to 0, Roles.User = 1 and Roles.Customer = 2.
What you actually want is:
[Flags]
public enum Roles
{
    Admin    = 1 << 0,   // 1 = 001b
    User     = 1 << 1,   // 2 = 010b
    Customer = 1 << 2,   // 4 = 100b
}

Now, when you have two checkboxes representing these values, they won't be summed up, they'll be posted as separate values. In practice, only the first checkbox will have it's value stored.
What you can do, though, is change your model to the following:
class ViewModel
{
    public Roles[] Roles { get; set; }
    public Roles RolesFlags => Roles?.Aggregate((a, e) => a | e) ?? 0;
}

This way, the checkboxes can post the vales to Roles, and your code can get the values from RolesFlags
To render the checkboxes using the current tooling, you can use the following:
@foreach (Roles role in Enum.GetValues(typeof(Roles)))
{

        <input name="Roles" type="checkbox" value="@role" checked="@(Model != null && Model.RolesFlags.HasFlag(role))" />
        @role

}

Nice work on the samples @artiomchi. Only nit: Model?.RolesFlags.HasFlag(role) == true is a bit more readable.
On #5097, we still need the issues you're addressing because that PR does not line up with this one 1:1.

@dougbu oh yeah, of course! Not sure how I missed that :)
Also, you're right, which is why I created #5098. It contains both the details of what I'm trying to improve and some decisions I had to make in the implementation

@artiomchi exactly that! :+1:

Thanks for the samples @artiomchi
Can I suggest a docs topic to handle this scenario? I recently had to create a "check box list" for Flagged Enums... and ended up with something... really quite horrible.

Back to the topic of flags enums...
This flags enum:
[Flags]
enum EnumFlag {
    First,
    Second,
    Third
}

Is of course not really a proper flags enum, because the values aren't flags per se. You'd more likely have something like this:
[Flags]
enum EnumFlag {
    First = 1 << 0,
    Second = 1 << 1,
    Third = 1 << 2,
}

And now you can combine the flags to create bitmasks. Creating a UI for this flags enum isn't terribly challenging.
But it's quite common for enum types to actually look like this:
[Flags]
enum EnumFlag {
    First = 1 << 0,
    Second = 1 << 1,
    Third = 1 << 2,
    All = First | Second | Third,
}

And what UI do you generate for that?
And beyond that, how often does one have an enum that needs to be projected in a UI? Apps I've seen are often data-driven when it comes to generating checkbox lists. E.g. "select how you heard about us" has the options "web, friend, family, advertisement, radio, other". Or "pick your top languages" has the options "C#, C, C++, Rust, JavaScript, Go, Other". These are all data-driven - there's no CLR type or enum that describes these - it comes from a database.
I think the problem we often have when trying to project UIs from CLR types is that the CLR types weren't designed to be automatically projected as a UI. All these cases end up making for very complex logic, which creates challenges when it comes to compatibility, and also becomes a bug farm.
Instead, we often create alternatives, which is to just have simpler building blocks, which can then be used in composition to create a UI.
I think I'd rather see an approach where we create smaller building blocks instead of trying to build one-size-fits-all UI projection components.

@Eilon I agree, enum is not the right tool for the job. I guess I got biased by the lack of other than bool values of checkbox/radio that I got tempted to the enums route.
I think it's fair to say that this issue can/should be closed and leave a sense that asp.net can do more regarding data to checkbox/radio UI (this ain't about enums at all), which @artiomchi has already pointed out and started an issue around that.
since there is valuable information on this thread, I will let you close and/or reference or whatever.

Closing as per the discussion

In case it's useful for anybody else, this is how I solved the issue of binding checkboxes to a [Flags] enum:
In my example, the User class has a Languages property, which is a flags enum.  This is in the editor for a user.
Sample HTML:
<input type="checkbox" name="User.Languages" value="Other">
<input type="checkbox" name="User.Languages" value="English" checked="checked">
<input type="checkbox" name="User.Languages" value="Spanish">
<input type="checkbox" name="User.Languages" value="French" checked="checked">

FlagsEnumBinder.cs:
public class FlagsEnumBinder : IModelBinder
{
	public Task BindModelAsync(ModelBindingContext bindingContext)
	{
		object result;
		var value = bindingContext.ValueProvider.GetValue(bindingContext.ModelName);

		if (value == null) return Task.FromResult(ModelBindingResult.Failed());

		if (value.Values.Count > 0)
			result = Enum.Parse(bindingContext.ModelType, value.Values);
		else
			result = Activator.CreateInstance(bindingContext.ModelType);

		bindingContext.Result = ModelBindingResult.Success(result);
		return Task.CompletedTask;
	}
}

public class FlagsEnumBinderProvider : IModelBinderProvider
{
	public IModelBinder GetBinder(ModelBinderProviderContext context)
	{
		if (context == null) throw new ArgumentNullException(nameof(context));

		if (context.Metadata.IsFlagsEnum)
			return new FlagsEnumBinder();

		return null;
	}
}

Startup.cs:
services.AddMvc(options =>
{
	options.ModelBinderProviders.Insert(0, new FlagsEnumBinderProvider());
});

Now User.Languages will bind to Languages.English | Languages.French as expected from the HTML, instead of just Languages.English.
I'm not sure if it's quite bulletproof, but after spending a few hours on this (mostly the differences between MVC 5 and 6), I hope this helps somebody in the same boat.

Hey, sorry for digging up this relatively old thread, but I've came across the exact sam issue.
I tried using @ScottKaye solution, but sadly it didn't work in my case - the binding still didn't respond at all. I was wondering - has anybody found a way to resolve get around this issue?
Thanks for your help in advance.


Fix local load for Medusa

What does this PR do?

Close #1418
Close #1415
Before submitting

[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[ ] Did you read the contributor guideline,
Pull Request section?
[ ] Was this discussed/approved via a Github issue or the forum? Please add a link
to it if that's the case.
[ ] Did you make sure to update the documentation with your changes? Here are the
documentation guidelines, and
here are tips on formatting docstrings.
[ ] Did you write any new necessary tests?

Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@Narsil can you review this PR?

@Narsil Hi, I have resolved merge conflict, and kept code style consistent with PR #1419

@OlivierDehaene @Narsil CI failed. How should I fix them, or just ignore them?

This isn't linked to this PR. I'll merge for now.


False positive in Style/TrivialAccessors with inline private

Expected behavior
Not an offense. In this case, private / protected clause needs symbol returned from def but attr_reader returns nil, which causes TypeError.
Actual behavior
# a.rb
class A
  private def foo
    @foo
  end
end

$ rubocop -a a.rb
Inspecting 1 file
C

Offenses:

a.rb:2:11: C: [Corrected] Style/TrivialAccessors: Use attr_reader to define trivial reader methods.
  private def foo
          ^^^

1 file inspected, 1 offense detected, 1 offense corrected

# Corrected a.rb
class A
  private attr_reader :foo
end

$ ruby a.rb
a.rb:2:in `private': nil is not a symbol nor a string (TypeError)
        from a.rb:2:in `<class:A>'
        from a.rb:1:in `<main>'

Steps to reproduce the problem
Described in actual behavour.
RuboCop version
$ rubocop -V
0.53.0 (using Parser <IP_ADDRESS>, running on ruby 2.4.2 x86_64-darwin16)

You can still define private readers using attr_reader:
private

attr_reader :foo

although not using the new inline syntax.

I don't think it is a false positive for the same reason as the @Drenmi comment.
But the auto-correction behaviour is a bug. So we should disable the auto-correction on private.
BTW, maybe we can add an option to ignore this case, i.e. this cop ignores private def foo ... with this option. But I'm not sure the option is necessary as I think the private; attr_reader :foo is better style.

I don't think it is a false positive for the same reason as the @Drenmi comment.
But the auto-correction behaviour is a bug. So we should disable the auto-correction on private.

Agreed. Thanks for fixing this!

Fixed in 0.54. Can we close this?


[ERC721Base] missing virtual on internal function _msgSender

Hello,
I believe we should be able to override this function but it is not marked as virtual.
https://github.com/thirdweb-dev/contracts/blob/114df579c7bc4087384d06b2d562fe0cb255c06a/contracts/base/ERC721Base.sol#L207

It's a valid point that the _msgSender() function should be marked as virtual to allow for easier customization and overrides in derived contracts.I suggest adding the virtual modifier to the _msgSender() function to enable this feature.

If you could assign this issue to me, I'd be glad to implement the necessary changes.


Update

I might be doing something wrong here but here goes.
Before i had
db_(sqlpp::remove().from(players).where(players.time == row.time.text));
i am trying to update it to 0 instead of remove i tried the following.
db_(sqlpp::update(players).where(players.time == row.time.text).set(0));
this doesnt work sadly.

If the field time is an integer field use:
db_(sqlpp::update(players).where(players.time == row.time.text).set(players.time = 0));

If it is a text field:
db_(sqlpp::update(players).where(players.time == row.time.text).set(players.time = "0"));


Bring the example configuration for config/test.exs to Readme

Why
Firstly, to make it similar to the other library like https://github.com/riverrun/pbkdf2_elixir#installation and https://github.com/riverrun/bcrypt_elixir/blob/master/README.md#installation.
Secondly, it will help future developers quickly tweak their test configuration right from the README.
Proof Of Work

Sorry for the delay in getting back to you. I have just added these changes to the latest version.
Many thanks for your help 🙏

Sorry for the delay in getting back to you. I have just added these changes to the latest version.
Many thanks for your help 🙏

Sure @riverrun


Maximum circular subarray sum

Please star this repository to show your support, in the meantime I am reviewing your code.

Please star this repository to show your support, in the meantime I am reviewing your code.

Sorry I thought I had done it before, I just starred the repo

Where you able to take a look at it?

Excellent work @mendoza This is the best PR that I have reviewed till now. The code was properly written and formatted with appropriate variable names and comments Thanks a lot for contributing.

Thank you so much for the compliment, I love this kind of projects so I wanted to make like it was done for me hahaha


[SignalR] Cannot access a disposed object.  Object name: 'SocketsHttpHandler'.

If you believe you have an issue that affects the security of the platform please do NOT create an issue and instead email your issue details to<EMAIL_ADDRESS>Your report may be eligible for our bug bounty but ONLY if it is reported through email.
Describe the bug
A clear and concise description of what the bug is.
I am trying to implement an auto-reconnect for a SignalR client.
Here is my code
Method to construct the connection:
        private void ConstructConnection()
        {
            _logger.LogInformation("Constructing Hub connection.");

            HttpClientHandler handler = new HttpClientHandler
            {
                ClientCertificateOptions = ClientCertificateOption.Manual,
                ServerCertificateCustomValidationCallback = (httpRequestMessage, cert, cetChain, policyErrors) => { return true; }
            };

            _connection = new HubConnectionBuilder()
                .WithUrl(_hubRoot, options =>
                {
                    options.HttpMessageHandlerFactory = _ => handler;
                    options.WebSocketConfiguration = sockets =>
                    {
                        sockets.RemoteCertificateValidationCallback = new RemoteCertificateValidationCallback((sender, certificate, chain, policyErrors) => { return true; });
                    };
                })
                .Build();
            _connection.KeepAliveInterval = new TimeSpan(1);
            _connection.ServerTimeout = new TimeSpan(1, 0, 0);
            _connection.On(Strings.ReaderEvents.CheckConnection, () => _ = CheckConnection());
            _connection.On(Strings.ReaderEvents.Scan, () => _ = ScanTagAsync());
        }

public async Task StartHubConnection(CancellationToken cancellationToken)
        {
            int currentRetry = 0;
            ConstructConnection();

            while (!HubConnected)
            {
                try
                {
                    await _connection.StartAsync(cancellationToken);
                    _connection.Closed += _connection_Closed;
                    _logger.LogInformation($"{_machineName} connected to Hub.");
                    _connection.InvokeAsync("JoinGroup", _machineName);
                    await CheckConnection();

                    HubConnected = true;
                }
                catch (Exception ex)
                {
                    _logger.LogCritical($"There was an error starting the connection:{ex.InnerException.ToString()}");

                    await Task.Delay(delay * currentRetry);
                    currentRetry++;
                    if (currentRetry > this.retryCount)
                    {
                        _logger.LogCritical("Max reconnect attempts reached. Shutting down");
                        StopClientAsync();
                        break;
                    }
                }
            }
        }

My method to reconnect
        private async Task _connection_Closed(Exception arg)
        {
            if (arg != null)
            {
                _logger.LogCritical($"Hub connection lost. Exception: {arg.Message}");
            }
            HubConnected = false;

            _connection.Closed -= _connection_Closed;
            //remove handlers in case this is due to reconnection
            _connection.Remove(Strings.ReaderEvents.CheckConnection);
            _connection.Remove(Strings.ReaderEvents.Scan);
            await _connection.StopAsync().ConfigureAwait(false);
            await _connection.DisposeAysnc();

            using (CancellationTokenSource cts = new CancellationTokenSource())
            {
                _logger.LogInformation($"Trying re-establish Hub Connection.");
                await StartHubConnection(cts.Token).ConfigureAwait(false);
            }

        }

Sometimes I get the following exception when attempting to reconnect:
 There was an error opening the connection:System.ObjectDisposedException: Cannot access a disposed object.
      Object name: 'SocketsHttpHandler'.
         at System.Net.Http.SocketsHttpHandler.CheckDisposed()
         at System.Net.Http.SocketsHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
         at System.Net.Http.HttpClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
         at System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Http.Connections.Client.Internal.AccessTokenHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Http.Connections.Client.Internal.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
         at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
         at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.NegotiateAsync(Uri url, HttpClient httpClient, ILogger logger)
         at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.GetNegotiationResponseAsync(Uri uri)
         at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.SelectAndStartTransport(TransferFormat transferFormat)
         at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.StartAsyncCore(TransferFormat transferFormat)
         at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.StartAsync(TransferFormat transferFormat, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.SignalR.Client.HttpConnectionFactory.ConnectAsync(TransferFormat transferFormat, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.SignalR.Client.HttpConnectionFactory.ConnectAsync(TransferFormat transferFormat, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsyncCore(CancellationToken cancellationToken)
         at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsync(CancellationToken cancellationToken)

Expected behavior
The reconnection works most of the time, however I get the above exception sometimes. Any idea what I am doing wrong?
I've tried this without calling DisposeAysnc and still get the same exception.

I'm not exactly sure how you're getting that error but it might be a good idea to clean up your reconnection logic which might make the problem go away.
You only need to use the builder once unless you want to change options on the connection every retry. The connection is reusable provided you don't dispose it. You also shouldn't need to remove the handlers.
A semi-simplified retry logic would look like:
// called once
void CreateConnection()
{
    _connection = new HubConnectionBuilder()
                .WithUrl(_hubRoot, options =>
                {
                    // stuff
                });
}

async Task StartHubConnection(CancellationToken cancellationToken)
{
    while (!HubConnected)
    {
        try
        {
            await _connection.StartAsync(cancellationToken);
        }
        catch (Exception ex)
        {
            // todo: delay logic
            continue;
        }

        _connection.Closed += _connection_Closed;
        _logger.LogInformation($"{_machineName} connected to Hub.");
        try
        {
            _connection.InvokeAsync("JoinGroup", _machineName);
            await CheckConnection();
            HubConnected = true;
        }
        catch (Exception ex)
        {
            // close callback will invoke this method again, so we don't want to have multiple loops running at the same time
            return;
        }
    }
}

async Task _connection_Closed(Exception arg)
{
    HubConnected = false;

    _connection.Closed -= _connection_Closed;

    using (CancellationTokenSource cts = new CancellationTokenSource())
    {
        await StartHubConnection(cts.Token).ConfigureAwait(false);
    }
}

And if possible you should try out the new automatic reconnect added in 3.0! https://docs.microsoft.com/aspnet/core/signalr/dotnet-client?view=aspnetcore-3.0#automatically-reconnect

Hi
Thanks,
I’ve tried removing the multiple calls to the builder but still get the
same error.
I’ll try not removing the handlers.
Thank you for your help.
On Sat, 13 Jul 2019 at 6:10 AM, Brennan<EMAIL_ADDRESS>wrote:

I'm not exactly sure how you're getting that error but it might be a good
idea to clean up your reconnection logic which might make the problem go
away.
You only need to use the builder once unless you want to change options on
the connection every retry. The connection is reusable provided you don't
dispose it. You also shouldn't need to remove the handlers.
A semi-simplified retry logic would look like:
// called oncevoid CreateConnection()
{
_connection = new HubConnectionBuilder()
.WithUrl(_hubRoot, options =>
{
// stuff
});
}
async Task StartHubConnection(CancellationToken cancellationToken)
{
while (!HubConnected)
{
try
{
await _connection.StartAsync(cancellationToken);
}
catch (Exception ex)
{
// todo: delay logic
continue;
}
    _connection.Closed += _connection_Closed;
    _logger.LogInformation($"{_machineName} connected to Hub.");
    try
    {
        _connection.InvokeAsync("JoinGroup", _machineName);
        await CheckConnection();
        HubConnected = true;
    }
    catch (Exception ex)
    {
        // close callback will invoke this method again, so we don't want to have multiple loops running at the same time
        return;
    }
}

}
async Task _connection_Closed(Exception arg)
{
HubConnected = false;
_connection.Closed -= _connection_Closed;

using (CancellationTokenSource cts = new CancellationTokenSource())
{
    await StartHubConnection(cts.Token).ConfigureAwait(false);
}

}
And if possible you should try out the new automatic reconnect added in
3.0!
https://docs.microsoft.com/aspnet/core/signalr/dotnet-client?view=aspnetcore-3.0#automatically-reconnect
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/aspnet/AspNetCore/issues/12080?email_source=notifications&email_token=AGDEEVXYQZZ7CTKF6ZISHKDP7D6MNA5CNFSM4IANNB42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ27ZJI#issuecomment-511048869,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGDEEVXN6MXSTTABIH5X4ZDP7D6MNANCNFSM4IANNB4Q
.

      public async Task StartHubConnection(CancellationToken cancellationToken)
        {
            int currentRetry = 0;

            while (!HubConnected)
            {
                try
                {
                    await _connection.StartAsync(cancellationToken);
                }
                catch (Exception ex)
                {
                    _logger.LogCritical($"There was an error starting the connection:{ex.StackTrace}");
                    _logger.LogError($"{ex.GetBaseException().Message}");
                    HubConnected = false;
                    await Task.Delay(delay);
                    _logger.LogInformation($"Current retry count: {currentRetry}");
                    currentRetry++;
                    if (currentRetry > this.retryCount)
                    {
                        _logger.LogCritical("Max reconnect attempts reached. Shutting down");
                        StopClientAsync();
                        break;
                    }
                    continue;
                }
                _connection.Closed += _connection_Closed;
                _logger.LogInformation($"{_machineName} connected to Hub.");
                try
                {

                    _connection.InvokeAsync("JoinGroup", _machineName);
                    await CheckConnection();

                    HubConnected = true;
                }
                catch (Exception ex)
                {
                    return;
                }
            }
        }

Ah, that makes sense. I didn't notice the handler not being updated :D
Good catch


Fix culture getting out of sync with the cookie

Fixed in OC https://github.com/OrchardCMS/OrchardCore/commit/76a01d9e19dfca70628b4811f3150326bcdbaa03


Update Blazor .NET Standard content

Fixes #18867
I'll go ahead and say "or later" to future-proof it a bit.
Thanks @operationslazlo326! :rocket:

We lose future-proofing this way, but that's ok. Hopefully, we'll :eyes: it on future .NET Standard updates.


Evaluation with a Portion of Benchmark Data for Fast Experimentation

Proposal
Motivation
An evaluation of full data is always important to ensure an apple-to-apple comparison.
And during quick experimentation in practice, especially in limited compute scenario, sometimes partitioner would just want to use 10% of benchmark data to do evaluation.  While the current limit supports so, it does not proportionately adjust accordingly to the data size.
The proposal is when limit is <1, limit represents the percentage of the total number of examples.
If it is >=1,  then it means the number of examples per task (only use this for testing).
Usage
It evaluates the model with 10% of hellaswag data.
python main.py \
    --model hf-causal \
    --model_args pretrained=[MODEL] \
    --tasks hellaswag \
    --limit 0.1 \
    --device cuda:0

(original behavior) It evaluates the model with 1000 of hellaswag data.
python main.py \
    --model hf-causal \
    --model_args pretrained=[MODEL] \
    --tasks hellaswag \
    --limit 1000 \
    --device cuda:0

Consideration
While this would make the limit to be legal in None, int, float at the same time, this also avoid introducing an additional variable.
scikit-learn has similar practice, for example, https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier
max_samplesint or float, default=None
If bootstrap is True, the number of samples to draw from X to train each base estimator.

If None (default), then draw X.shape[0] samples.

If int, then draw max_samples samples.

If float, then draw max_samples * X.shape[0] samples. Thus, max_samples should be in the interval (0.0, 1.0].

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.0 out of 2 committers have signed the CLA.:x: Ken Tsui:x: kenhktsuiKen Tsui seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


JSONDecodeError: Expecting Value: line 1 column 1 (char 0) in Jikanpy

Hey, I got a problem, I cant call the function jikan.anime(malID) anymore. The following exception happens every time now:
File "/home/pi/Hosting/-----/commands/mal.py", line 13, in getInfosFromID
r = jk.anime(int(malID))
File "/home/pi/.local/lib/python3.7/site-packages/jikanpy/jikan.py", line 123, in anime
return self._get("anime", id, extension, page)
File "/home/pi/.local/lib/python3.7/site-packages/jikanpy/jikan.py", line 91, in _get
return self._wrap_response(response, url, id=id, endpoint=endpoint)
File "/home/pi/.local/lib/python3.7/site-packages/jikanpy/jikan.py", line 65, in _wrap_response
json_response = response.json()
File "/usr/lib/python3/dist-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3/dist-packages/simplejson/init.py", line 518, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Could someone plz help me?
Thanks

I think it's because Jikan API isn't really working right now as MAL blocked the servers that the Jikan API works on. The Python wrapper is likely unable to decode the response from the API is it's not in JSON format because the data isn't getting returned right.

Ah, thank you very much. Do you have any idea when this is gonna work again?

I'm not sure, it's already been a day or 2. I think Nekomata, the creator of Jikan, is working on caching data so the Jikan servers don't have to access MAL. Also, make sure you're on the newest version of Jikanpy, v4.1.0, if you aren't already.

By the way, can you send me the snippet of code that is causing the error? I'm going to try to update Jikanpy so that it shows a more human readable exception when this happens.

Yeah, actually, this snippet is build in my discord bot

so, this is the full code of my command ( https://pastebin.com/k7dNhz0g )
And the exception appears at line 13, when i try to get some Anime informations from the malID

Thanks, I'll look into this.

Can you give me some MAL IDs that cause the exception? I know it must be late for you in Germany, so feel free to send them whenever you're available.

Hmm, since caching is in process, the actually issue might be that you've been IP-banned by Jikan. Try accessing this URL: https://api.jikan.moe/v3/anime/[put MAL id in here without the brackets] and see what it says. If you're actually banned, you can join the Discord server and ask Nekomata to unban you.

Okay, so it gave me on my computer a json output and also the right stuff.
Ill also try it on my Raspberrypi cauz my bot is currently running on this pi.
Btw, i tried the MAL ID from Acchi Kocchi that hasnt worked on my discord bot (12291)

Okay, so on my raspberrypi it also gives me some json output that seems to be the right stuff
Could it be that there is a maximum requests?

I put the code in your pastebin link into a python file and ran getInfosFromID(22199) from my console and it worked. I'm sorry but I'm not really sure what the issue could be if it's just Akame ga Kill that isn't working.

So, first of all, an error appears at nb. 4:
ImportError: No module named pathlib
I installed pathlib with py3 and the same error appears. After I installed pathlib with py2 the following exception happend:
File "/home/pi/Hosting/Tendo/jikanpy/setup.py in line 5 in <module>
README = (HERE / "README.md").read_text()
AttributeError: "PosixPath" object has no attribute 'read_text'

I put the code in your pastebin link into a python file and ran getInfosFromID(22199) from my console and it worked. I'm sorry but I'm not really sure what the issue could be if it's just Akame ga Kill that isn't working.

Yeah, so, I also tried it with Acchi Kocchi but the same exception still happens

Wait, is your bot written in Python 2? Jikanpy only supports 3.6 and up.

My bot is currently written in Python3 and my screen session also runs Python3

To be honest, I have no clue what the error could be. Maybe try using requests instead of jikanpy and doing the below in getInfosFromID() instead of r = jk.anime(int(malID)):
# install requests and simplejson using pip
# Remember to import requests and simplejson at the top of your file
r = requests.get('https://api.jikan.moe/v3/anime/' + int(malID))
try:
    r = r.json()
except simplejson.JSONDecodeError:
    # You can see the raw HTTP response text with this
    raise Exception(r.text)

Okay, that was really a good idea so i got a better exception.
The same exception as above + this:
File "/home/pi/Hosting/Tendo/commands/mal.py", line 18, in getInfosFromID
raise Exception(r.text)
Exception:
429 Too Many Requests

429 Too Many Requests
nginx

Yeah, that means you're getting rate limited.

Yeah, as i said before, i loop through my mal ID's and get for every anime an url and the name of the anime (picture)

Based on this, https://jikan.docs.apiary.io/#introduction/information/rate-limiting, the max is 30 requests/minute and 2 requests/second. Use something like time.sleep() to avoid going over that limit.

So, https://jikan.docs.apiary.io/#introduction/information/wrappers says:

You MUST use a delay of 4 (FOUR) SECONDS between each request

do you have an idea, how i can fix this?
I just dont want to add a dealy between every loop segment

Based on this, https://jikan.docs.apiary.io/#introduction/information/rate-limiting, the max is 30 requests/minute and 2 requests/second. Use something like time.sleep() to avoid going over that limit.

okay, ill try that

I'm not sure what you mean. That's a UI thing so it's up to you.

Closing since issue has been solved.


Goal Warning Color Fixes

Need to make some adjustments to the goal warning color change to ensure that warnings about upcoming transactions don't get overridden by the label color change.
I'll take care of this as soon as I have time.

Can this be closed now that #318 is merged?

Yes, it can.

@blargity close this?


Implement Serialize and Deserialize for all constant structs.

These implementations all use the real representations, not any of the invented numbers used in TryFrom. I'm hoping this won't cause confusion, but I'm not 100% sure.
My reasoning for adding these is for serializing/deserializing constants as part of larger structures separate from interacting with the API. I don't expect any of the Serialize or Deserialize implementations added to be used by screeps-game-api itself, but they could be used by consumers who want to serialize them with serde-json or bincode or some other serde-supported serialization format.
I have no idea why Part names are snake case whereas everything else is camel case...

That's a good point!
I'm not certain whether this can be effectively trimmed out or not. It'll definitely increase compile times and I can't be certain whether it will affect program size or not.
Maybe it'd be best to stick it under a more-serde feature?

I've moved all the new implementations under a feature gate so they shouldn't have any affect if that isn't enabled.

Alright- that sounds good to me. I do like features, but they can get unwieldy. We probably don't want to become like winapi with 300+ features controlling every aspect of the crate.


Fixing bad key used for object removal.

@aaustin
Fixed this once before, but must have been lost in a merge. This is what actually caused the bug in the Invite SDK. I'll probably go through and revert those checks in that SDK, as they will be redundant.

:+1:


chore(deps): upgrade dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-main" workflow

AWS CodeBuild CI Report

CodeBuild project: DDKIntegrationTestsD8472609-5SCHWjldmWcf
Commit ID: b2f2d903c2deec762070b573a15f0ab9f0d081c3
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: DDKIntegrationTestsD8472609-5SCHWjldmWcf
Commit ID: af2274ee639c55dec9e892c616bf858bc4dd8518
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: DDKIntegrationTestsD8472609-5SCHWjldmWcf
Commit ID: 6b8a8d5c8791d252464447051da156d83e23dfb0
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: DDKIntegrationTestsD8472609-5SCHWjldmWcf
Commit ID: d05d73057f1194a303e517705d15cb7b3f602dae
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: DDKIntegrationTestsD8472609-5SCHWjldmWcf
Commit ID: 12f80b787945066d430ab3f66c400619892f400c
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: DDKIntegrationTestsD8472609-5SCHWjldmWcf
Commit ID: d96beeb511dbb65aa0a4e9b5abd57cdfb50dd39a
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: DDKIntegrationTestsD8472609-5SCHWjldmWcf
Commit ID: d68a731ba6b4da60315d5c2b2ee69f9ccd9b93c3
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: DDKIntegrationTestsD8472609-5SCHWjldmWcf
Commit ID: c8d593822b07352d51926de7ef2594ed0de9f1eb
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository