Makefile: fix coverage, and don't run tests twice

Makefile: coverage: don't run tests twice
Initially the tests were run twice, once with "-i" to "pre build" the tests;
8ebe4356ea2f659758a130ddbed623b7f7010868
Commit cb50952a3a15a58bbbb76003994a694d7a658872 removed the "-i" options,
as it's no longer needed since go1.10, however it did not remove the
(now duplicate) line, so tests were running twice.
Before this, every test was run twice:

After this, tests are only run once (cutting the time for the unit tests in ~half 😂)

Makefile: coverage: use set -eu to prevent ignoring failures
When running make coverage on macOS, TestCreateOpenInvalidDirFails
fails;
--- FAIL: TestCreateOpenInvalidDirFails (0.00s)
    walwrap_test.go:206:
            Error Trace:	walwrap_test.go:206
            Error:      	An error is expected but got nil.
            Test:       	TestCreateOpenInvalidDirFails
time="2022-11-19T15:40:30Z" level=info msg="repaired WAL error" error="unexpected EOF"

In CI, this failure is not observed, but it seems the test was broken
from the start (using an empty directory is not a failure?). Running
the test with go1.7 using the commit that introduced it fails the test:
git checkout 3e2cebe76b8c7e1ae67b89de3b5fa063234edc85

docker run -it --rm --security-opt seccomp=unconfined -v $(pwd):/go/src/github.com/docker/swarmkit -w /go/src/github.com/docker/swarmkit golang:1.7 sh -c 'go test -v -run TestCreateOpenInvalidDirFails ./manager/state/raft/storage/'

=== RUN   TestCreateOpenInvalidDirFails
--- FAIL: TestCreateOpenInvalidDirFails (0.01s)
        Error Trace:    walwrap_test.go:193
    Error:		An error is expected but got nil.

FAIL
exit status 1
FAIL	github.com/docker/swarmkit/manager/state/raft/storage	0.031s

This issue was reported in https://github.com/moby/swarmkit/issues/2479,
but wasn't reproducible by everyone.
Looking at how tests were run, I noticed we're using a "for" loop, which
can have unexpected behavior (which may depend on the version of Make).
A similar issue was found in github.com/moby/sys, where test failures
went unnoticed in CI; from the PR that fixed that issue:

Since we call a few commands (under for) from the make target, intermediate
failures are ignored unless -e shell option is set (or explicit && is used,
which is not possible to do in for).
Example:
for cmd in false true; do $cmd; done

will succeed unless set -e is set, because the last command executed is true and its exit code is 0.
To fix, use explicit set -e where we execute more than a single command.

To be honest, I'm not sure if this is related, as the exist should already
cover this scenario;
(for cmd in false true; do $cmd || exit; done)
echo $?
1

This patch:

Removes the subshell around the loop
Configures the shell with -e (exit on errors) and -u (error when
using environment variables that are not set); https://man7.org/linux/man-pages/man1/set.1p.html
Removes the exit (as -e should take care of this)

I have a patch for some of the other warnings as well (those also failed on macOS, but looks like CI ignores them);
protoc -I.:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor/github.com/gogo/protobuf:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor:/home/circleci/.go_workspace/src:/usr/local/go_workspace/src:/usr/local/include --include_imports --descriptor_set_out=/tmp/descriptors.pb-2068773414 --gogoswarm_out=plugins=grpc+deepcopy+storeobject+raftproxy+authenticatedwrapper,import_path=github.com/moby/swarmkit/v2/api,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor,Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgithub.com/docker/swarmkit/protobuf/plugin/plugin.proto=github.com/moby/swarmkit/v2/protobuf/plugin,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types:/home/circleci/.go_workspace/src /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/ca.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/control.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/dispatcher.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/health.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/logbroker.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/objects.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/raft.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/resource.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/snapshot.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/specs.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/types.proto /home/circleci/.go_workspace/src/github.com/docker/swarmkit/api/watch.proto
/usr/local/go_workspace/src: warning: directory does not exist.
protoc -I.:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor/github.com/gogo/protobuf:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor:/home/circleci/.go_workspace/src:/usr/local/go_workspace/src:/usr/local/include --gogoswarm_out=plugins=grpc+deepcopy+storeobject+raftproxy+authenticatedwrapper,import_path=github.com/moby/swarmkit/v2/protobuf/plugin,Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgithub.com/docker/swarmkit/protobuf/plugin/plugin.proto=github.com/moby/swarmkit/v2/protobuf/plugin,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:/home/circleci/.go_workspace/src /home/circleci/.go_workspace/src/github.com/docker/swarmkit/protobuf/plugin/plugin.proto
/usr/local/go_workspace/src: warning: directory does not exist.
protoc -I.:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor/github.com/gogo/protobuf:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor:/home/circleci/.go_workspace/src:/usr/local/go_workspace/src:/usr/local/include --gogoswarm_out=plugins=grpc+deepcopy+storeobject+raftproxy+authenticatedwrapper,import_path=github.com/moby/swarmkit/v2/protobuf/plugin/deepcopy/test,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor,Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgithub.com/docker/swarmkit/protobuf/plugin/plugin.proto=github.com/moby/swarmkit/v2/protobuf/plugin,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types:/home/circleci/.go_workspace/src /home/circleci/.go_workspace/src/github.com/docker/swarmkit/protobuf/plugin/deepcopy/test/deepcopy.proto
/usr/local/go_workspace/src: warning: directory does not exist.
protoc -I.:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor/github.com/gogo/protobuf:/home/circleci/.go_workspace/src/github.com/docker/swarmkit/vendor:/home/circleci/.go_workspace/src:/usr/local/go_workspace/src:/usr/local/include --gogoswarm_out=plugins=grpc+deepcopy+storeobject+raftproxy+authenticatedwrapper,import_path=github.com/moby/swarmkit/v2/protobuf/plugin/raftproxy/test,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgithub.com/docker/swarmkit/protobuf/plugin/plugin.proto=github.com/moby/swarmkit/v2/protobuf/plugin,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor,Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types:/home/circleci/.go_workspace/src /home/circleci/.go_workspace/src/github.com/docker/swarmkit/protobuf/plugin/raftproxy/test/service.proto
/usr/local/go_workspace/src: warning: directory does not exist.
protoc -I /usr/local/include --decode google.protobuf.FileDescriptorSet /usr/local/include/google/protobuf/descriptor.proto

Unfortunately, no dice; CI passes;
ok  	github.com/moby/swarmkit/v2/manager/state/raft/storage	1.368s	coverage: 61.6% of statements

Pushed a commit to see what error CI gets (and makes the test pass);
--- FAIL: TestCreateOpenInvalidDirFails (0.03s)
    walwrap_test.go:206:
        	Error Trace:	walwrap_test.go:206
        	Error:      	An error is expected but got nil.
        	Test:       	TestCreateOpenInvalidDirFails
time="2022-11-19T16:24:09Z" level=info msg="repaired WAL error" error="unexpected EOF"
FAIL
coverage: 60.9% of statements
FAIL	github.com/moby/swarmkit/v2/manager/state/raft/storage	1.381s
FAIL

Looks like the repaired WAL error log comes from here; https://github.com/moby/swarmkit/blob/f34bfc0e146ed785e69aa2db16315b981c2d7bc1/manager/state/raft/storage/walwrap.go#L176-L185
I wonder if the issue is in this line; https://github.com/moby/swarmkit/blob/f34bfc0e146ed785e69aa2db16315b981c2d7bc1/manager/state/raft/storage/walwrap.go#L176-L179
That line;

Returns if repaired == true
If err != io.ErrUnexpectedEOF

The last one means that it also returns if err == nil (errors.Wrap(err, "message") returns nil if err was nil)

Ah! Looks like the test is broken indeed; the reason it passes on CI is for unrelated reasons;
--- FAIL: TestCreateOpenInvalidDirFails (0.00s)
    walwrap_test.go:207:
        	Error Trace:	walwrap_test.go:207
        	Error:      	Received unexpected error:
        	            	mkdir /not: permission denied
        	Test:       	TestCreateOpenInvalidDirFails
time="2022-11-19T16:55:42Z" level=info msg="repaired WAL error" error="unexpected EOF"

So what happened was that;

walCryptor.Create() is called, which calls wal.Create() (from go.etcd.io/etcd/server/v3/wal/wal.go)
wal.Create() creates a new .tmp directory at the same location as the specified path (see https://github.com/etcd-io/etcd/blob/server/v3.5.1/server/wal/wal.go#L110-L127)
in our case, the directory passed was /not/existing/directory, so it tries to create  /not/existing/directory.tmp
.. and that fails, because CI doesn't run as root and doesn't have permissions to create the path.

On macOS, running the test inside a container passes, as the tests are run as root. And when I was running the test previously, I already included some changes to use t.TempDir(), which also made the test pass (as now the non-existing path would be created inside the tempdir).

Moved the fix for the failing test to https://github.com/moby/swarmkit/pull/3087 and removed the second commit (which wasn't needed after all).
@corhere @neersighted @dperny PTAL

Thx! Let me bring this one in


[defect] install sparkoperator by helm failed with unknown field "annotations"

I want to install sparkoperator  in IBM cloud, but failed with unknown field "annotations"
Steps:

login IBM cloud
ibmcloud login -a cloud.ibm.com -r us-south -g Metering --sso -u<EMAIL_ADDRESS>check kubernets

PS C:\workspace_go> kubectl version --short
Client Version: v1.16.2
Server Version: v1.16.3+IKS
PS C:\workspace_go> kubectl cluster-info
Kubernetes master is running at https://xxx.us-south.containers.cloud.ibm.com:20089
CoreDNS is running at https://xxx.us-south.containers.cloud.ibm.com:20089/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
kubernetes-dashboard is running at https://xxx.us-south.containers.cloud.ibm.com:20089/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy
Metrics-server is running at https://xxx.us-south.containers.cloud.ibm.com:20089/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
PS C:\workspace_go>

install sparkoperator  by helm

PS C:\workspace_go> helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
"incubator" has been added to your repositories
PS C:\workspace_go> helm install incubator/sparkoperator --namespace spark-operator --set sparkJobNamespace=default --generate-name
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(CustomResourceDefinition): unknown field "annotations" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition
PS C:\workspace_go>
PS C:\workspace_go> kubectl delete CustomResourceDefinition -l app.kubernetes.io/name=sparkoperator
customresourcedefinition.apiextensions.k8s.io "scheduledsparkapplications.sparkoperator.k8s.io" deleted
customresourcedefinition.apiextensions.k8s.io "sparkapplications.sparkoperator.k8s.io" deleted
PS C:\workspace_go>
PS C:\workspace_go> helm install incubator/sparkoperator --namespace spark-operator --set sparkJobNamespace=default --generate-name
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(CustomResourceDefinition): unknown field "annotations" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition
PS C:\workspace_go>

Errors:

installing failed by:
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(CustomResourceDefinition): unknown field "annotations" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition

I searched keyword "annotations" by google, and also in the repository "spark-on-k8s-operator", no such error, so I submit a defect, hope any helps
Thanks

I also got the same error today as well: -
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(CustomResourceDefinition): unknown field "annotations" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition```

This seems caused by this commit: https://github.com/helm/charts/commit/0f5eef548a24e49376ebdd249af322bb5ed47531. There's a wrong indention for the field annotations in the cloned CRD manifest under the new crds folder. Will fix that.

Created https://github.com/helm/charts/pull/19654 to fix the issue.

The fix has been merged. The new version of the Chart is 0.6.1. Please give it a try. Thanks!

Not sure whether the installation was successful, cause there is an error message.
PS C:\workspace_go> helm install incubator/sparkoperator --namespace spark-operator --set sparkJobNamespace=default --generate-name
Error: rendered manifests contain a resource that already exists. Unable to continue with install: existing resource conflict: kind: CustomResourceDefinition, namespace: , name: scheduledsparkapplications.sparkoperator.k8s.io
PS C:\workspace_go>
PS C:\workspace_go>
PS C:\workspace_go> kubectl delete CustomResourceDefinition sparkapplications.sparkoperator.k8s.io scheduledsparkapplications.sparkoperator.k8s.io
customresourcedefinition.apiextensions.k8s.io "sparkapplications.sparkoperator.k8s.io" deleted
customresourcedefinition.apiextensions.k8s.io "scheduledsparkapplications.sparkoperator.k8s.io" deleted
PS C:\workspace_go>
PS C:\workspace_go>
PS C:\workspace_go>
PS C:\workspace_go> helm install incubator/sparkoperator --namespace spark-operator --set sparkJobNamespace=default --generate-name
Error: rendered manifests contain a resource that already exists. Unable to continue with install: existing resource conflict: kind: CustomResourceDefinition, namespace: , name: sparkapplications.sparkoperator.k8s.io
PS C:\workspace_go>
PS C:\workspace_go> kubectl delete CustomResourceDefinition -l app.kubernetes.io/name=sparkoperator
customresourcedefinition.apiextensions.k8s.io "scheduledsparkapplications.sparkoperator.k8s.io" deleted
customresourcedefinition.apiextensions.k8s.io "sparkapplications.sparkoperator.k8s.io" deleted
PS C:\workspace_go>
PS C:\workspace_go>
PS C:\workspace_go> kubectl delete CustomResourceDefinition sparkapplications.sparkoperator.k8s.io scheduledsparkapplications.sparkoperator.k8s.io
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "sparkapplications.sparkoperator.k8s.io" not found
Error from server (NotFound): customresourcedefinitions.apiextensions.k8s.io "scheduledsparkapplications.sparkoperator.k8s.io" not found
PS C:\workspace_go>
PS C:\workspace_go> helm install incubator/sparkoperator --namespace spark-operator --set sparkJobNamespace=default --generate-name
Error: rendered manifests contain a resource that already exists. Unable to continue with install: existing resource conflict: kind: CustomResourceDefinition, namespace: , name: sparkapplications.sparkoperator.k8s.io
PS C:\workspace_go>
PS C:\workspace_go>
PS C:\workspace_go> helm version
version.BuildInfo{Version:"v3.0.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}
PS C:\workspace_go> helm list
NAME    NAMESPACE       REVISION        UPDATED STATUS  CHART   APP VERSION
PS C:\workspace_go> helm list -a
NAME    NAMESPACE       REVISION        UPDATED STATUS  CHART   APP VERSION

PS C:\workspace_go> helm inspect chart incubator/sparkoperator
apiVersion: v1
appVersion: v1beta2-1.0.1-2.4.4
description: A Helm chart for Spark on Kubernetes operator
home: https://github.com/GoogleCloudPlatform/spark-on-k8s-operator
keywords:
- spark
maintainers:
- email<EMAIL_ADDRESS>  name: yuchaoran2011
name: sparkoperator
version: 0.6.1

PS C:\workspace_go>

But I checked the kubernetes dashboard, the Custom Resource Definitions "sparkapplications" and "scheduledsparkapplications" can be found in list

see my conversation in slack https://app.slack.com/client/T09NY5SBT/CALBDHMTL/thread/CALBDHMTL-1576435096.006900

Looks I can't access the workspace

would you please invite me<EMAIL_ADDRESS>to the workspace?

this is how i solved it
First I fixed this annotations indent, then i installed with the --skip-crds  flag
It still installs the crds, so there's a double install of crd in the code giving you this error

See https://github.com/helm/charts/pull/19236.

@huineng @liyinan926 thanks for help
I have installed sparkoperator successfully with --skip-crds flag
PS C:\workspace_go> helm install incubator/sparkoperator --namespace spark-operator --set sparkJobNamespace=default --skip-crds --generate-name
NAME: sparkoperator-1576726158
LAST DEPLOYED: Thu Dec 19 11:29:22 2019
NAMESPACE: spark-operator
STATUS: deployed
REVISION: 1
TEST SUITE: None
PS C:\workspace_go>


Revert "Introduce C++ wrappers for gpr_mu and gpr_cv."

This reverts commit a26c09dd258a0d4dc3023e874b13f92e29174a43.

Should I shelf this PR? Not completely sure about the status of the fix forward

@apolcyn yes, please go ahead.
Verdict is that the root cause is not this PR, but it's the first time we are using gpr_mu in gprpp codegen it's surfacing a latent build issue that causes a serious stackoverflow. Until we get that fixed, we shouldn't proceed with rolling this forward.

SG. will merge then

windows: https://github.com/grpc/grpc/issues/18637, https://github.com/grpc/grpc/issues/18126
interop: https://github.com/grpc/grpc/issues/18431


Version 3.2.2 Typescript error with defined classRow

The below is valid AVRO.
{     "type": "record",     "name": "AlbumCreatedEvent",     "namespace": "com.sporkify.dcp.event.schema.krandorify",     "doc": "Information about the Song Added event",     "fields": [{         "name": "eventHeader",         "type": {             "type": "record",             "name": "EventHeader",             "namespace": "com.sporkify.commons.krandorify",             "fields": [{                 "name": "id",                 "type": "string"             }, {                 "name": "time",                 "type": {                     "type": "long",                     "logicalType": "timestamp-millis"                 }             }, {                 "name": "type",                 "type": "string"             }, {                 "name": "source",                 "type": "string"             }]         }     }, {         "name": "albumName",         "type": ["null", "string"],         "default": null     }, {         "name": "songList",         "type": ["null", {             "type": "array",             "items": {                 "type": "record",                 "name": "Song",                 "namespace": "com.sporkify.commons.krandorify",                 "fields": [{                     "name": "title",                     "type": "string",                     "doc": "Title of the Song"                 }, {                     "name": "artist",                     "type": "string",                     "doc": "The song composer"                 }, {                     "name": "duration",                     "type": "int",                     "doc": "Song Duration in minutes"                 }, {                     "name": "bitrate",                     "type": "int",                     "doc": "Song Bitrate, measured in kilobytes per second"                 }, {                     "name": "lyrics",                     "type": "string",                     "doc": "Lyrics of the Song"                 }, {                     "name": "fileURL",                     "type": "string",                     "doc": "Unique file Reference to the song"                 }, {                     "name": "demo_two",                     "type": "string",                     "doc": "Demoing a thing",                     "default": "Doing awesome"                 }]             }         }]     }],     "version": "2" }
We are expecting that an EventHeader and Song are passed into the event every time. When I compile the schema into Typescript I receive an error on the classRow indicating:
"Property 'song' has no initializer and is not definitely assigned in the constructor".
This can be resolved by changing the classRow definition
From:
    public eventHeader: EventHeader;     public song: Song;
To:
    public eventHeader!: EventHeader;     public song!: Song;
I have fixed this locally. If you agree this is the correct solution I will submit a PR.
Thanks!

I see, we did not run into this problem since we had "strictPropertyInitialization" set to false. As such, it should be okay to insert "!" operator, but it should only be placed if property is not possibly undefined or explicitly initialised. Do you agree?

The change I made only inserted the ! when the field was not optional and it did not have a default value. I will submit a PR.
Thanks for you the turn around.

I also made a change to provide a top level index.ts that exports all of the generated Typescript class files. This made creating a publishable package much easier. Would this be something you would want in the library? If so, I'll create another issue and submit another PR.
Thanks!

Hey, sorry for not replying sooner! If the change only handles the "not-optional, no-default" properties then great! Will review it and merge if everything is alright.
About the exports, what was missing from the current index.ts? I tried only exporting what I though was necessary for the end usage of package, but I'm open to exporting everything if you think it's useful

Sorry I meant a generated index.ts that would export the generated
typescript classes. That allows a user to add a package.json to the output
directory and it can be bundled for publishing. The generated index.ts
sites next to the BaseAvroRecord.
On Tue, Mar 12, 2019, 6:49 AM Andrija Dvorski<EMAIL_ADDRESS>wrote:

Hey, sorry for not replying sooner! If the change only handles the
"not-optional, no-default" properties then great! Will review it and merge
if everything is alright.
About the exports, what was missing from the current index.ts? I tried
only exporting what I though was necessary for the end usage of package,
but I'm open to exporting everything if you think it's useful
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/degordian/avro-to-typescript/issues/29#issuecomment-471950991,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADEg3dAPnNiFXXNUzA0Xy8NFx5w-pkM3ks5vV4ZIgaJpZM4bfPcV
.


Fixed Minor Spelling Mistake in ReadME

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


about LZ4

I used LZ4 via messagepack 1.8.74 like this:
RedisHelper.HSet("LONG", longId, LZ4MessagePackSerializer.Serialize(longInfo));
var @long= LZ4MessagePackSerializer.Deserialize(o);
and when I update it to 2.1.90
LZ4MessagePackSerializer is not supported any more.
So what should I do ?  Especially the history data that had been generated.
Thank you!

Sorry for delayed response, and I can tell you some info. Your library is msgpack for C# by @neuecc. AFAIK, it has some incompatibilities between 1.x and 2.x. You should read migration docs in here :).


Sort by type

Add sorting/grouping by type, similar to how the deck lists on mtgtop8.com are organized:

Lands
Creatures
Spells
Other

Preference of group membership descending in that order, i.e. Dryad Arbor is with the other lands, not creatures.
Actual code changes in the first commit, update to the generated cards list JS file in the second in case that's undesired.
JS code change is a giant copy and paste / search and replace of the CMC sort variant.

I meant to comment on this over the weekend, but it got away from me.
The code looks good as far as I can tell, though I haven't actually tested it or given it a thorough look yet. I'll try to do that tonight.
I don't know about @marumari's preference, but I'd prefer the card list update be in a separate PR (or just made by @marumari directly). Keeping separate update efforts in different PRs is easier to manage.

Actually, I'll go update the generated cards now, so if you could just send the sorting by type commit, I'd appreciate that.  Thanks!

Testing from 7f136a4 yielded the "Type" sort option working exactly like the "Alphabetically" sort option. Can't see any obvious bugs in the code, but it's just not working for me. (Seems to be working fine in 71ec592?)
In any event, even when it is working, doing a test entry for cards of all types seems to return an interesting (and not fully correct) list; with the following input:
1 verdant catacombs
1 lightning bolt
1 thoughtseize
1 scavenging ooze
1 liliana of the veil
1 mishra's bauble
1 phyrexian unlife
1 bitterblossom

I was given the following result:

1 Verdant Catacombs
1 Scavenging Ooze
1 Lightning Bolt
1 Thoughtseize
1 Bitterblossom
1 Liliana of the Veil
1 Mishra's Bauble
1 Phyrexian Unlife

@Nightfirecat

I'd kinda prefer if each type was separate; having enchantments and artifacts separate at least would be nice in my opinion, but I may be alone in that thought.

As I wrote in the PR description, I implemented the grouping used on mtgtop8.com, which seems reasonably popular.

@marumari @Nightfirecat
Thanks for your review.
I removed the generated cardlist commit from my branch, and added a new commit addressing review comments. Other review comments have been addressed in comment responses to this PR.

Thanks for the quick fix. LGTM :ship: :it:

Someday I hope to go back and rewrite a lot of this code using lodash and make decks a bit more object-oriented, which will clean up a lot of stuff.  I just haven't had the time.  :)

@marumari @Nightfirecat Any chance to get this merged and deployed soon?

So when I pulled it down and took a look at it with it sorting by type, it looks exactly the same as sorting by original.
file:///Source/decklist/index.html?deckmain=2%09Arid%20Mesa%0A4%09Brainstorm%0A1%09Council%27s%20Judgment%0A4%09Counterbalance%0A2%09Counterspell%0A2%09Entreat%20the%20Angels%0A4%09Flooded%20Strand%0A4%09Force%20of%20Will%0A4%09Island%0A3%09Jace%2C%20the%20Mind%20Sculptor%0A2%09Plains%0A2%09Polluted%20Delta%0A4%09Ponder%0A2%09Scalding%20Tarn%0A4%09Sensei%27s%20Divining%20Top%0A3%09Snapcaster%20Mage%0A4%09Swords%20to%20Plowshares%0A4%09Terminus%0A3%09Tundra%0A2%09Volcanic%20Island&deckside=1%09Council%27s%20Judgment%0A1%09Counterspell%0A1%09Disenchant%0A3%09Flusterstorm%0A1%09Keranos%2C%20God%20of%20Storms%0A1%09Path%20to%20Exile%0A1%09Pyroblast%0A2%09Red%20Elemental%20Blast%0A2%09Rest%20in%20Peace%0A1%09Supreme%20Verdict%0A1%09Surgical%20Extraction%0A
So maybe I'm doing something horribly wrong, but it doesn't seem to work for me.

@marumari You need to run parsecards.py to regenerate the file you wanted me to drop from the PR. I force-pushed over the first commit to remove it from the history of this PR.

Okay!  I'll do that tonight and get this merged.  :)

Thanks for this!  Sorry for the delay, life is crazy with a 4 year old and a 5 month old.  O_o

Pushed to decklist.org.  :)

@marumari Thank you!

And thank you!  I really appreciate the contribution!


Update cgroups vendor for license headers/bug fix

The containerd master branch version of #2198
Signed-off-by: Phil Estes<EMAIL_ADDRESS>

Codecov Report

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

@@           Coverage Diff           @@
##           master    #2199   +/-   ##
=======================================
  Coverage   41.11%   41.11%
=======================================
  Files          66       66
  Lines        7544     7544
=======================================
  Hits         3102     3102
  Misses       3961     3961
  Partials      481      481

Flag
Coverage Δ

#windows
41.11% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

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

LGTM

LGTM


without JavaScript, clicking a topic does nothing

probably should do the same as the arrow, load a permalink page

Yeah, I'm not too interested in getting the site functioning without JavaScript, at the moment.

no prob, but figured a ticket wouldn't hurt anything

Absolutely, I'll leave this open for whoever wants to come along and fix it. Might be me, eventually.


Adding State Machine + Configurator

This set of commits change:

Now a configurator can be declared at the declaration of a Simulator via multiple parameters
You can launch a simulation by passing a string to run_simulation method or register_simulation method
State machine has been internally implemented. Some Fixes are required in order to
Filenames are now handled by the scenario.
Simulation ends now by calling the method SymUnloadCurrentNetworkEx

Fixes #16


Set required CI pipelines for protected branches.

Description
This re-enables the required CI checks based on conversation in ASF-INFRA ticket: https://issues.apache.org/jira/browse/INFRA-21726.
https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features#Git.asf.yamlfeatures-BranchProtection

@mxnet-bot run ci [all]

@szha From the documentation here: https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features#Git.asf.yamlfeatures-BranchProtection
NB (1): Enabling any of the above checks overrides what may have been set previously, so you'll need to add all the existing checks to your .asf.yaml to reproduce those previously set manually by Infra.

NB (2): If you need to remove a required check in order to push a change to .asf.yaml, you will need to create an Infra Jira ticket with a request to have the check manually removed.

and
Branches that are not in the YAML or are not dictionary entries will not be protected.

You are right, this will remove any other protected branches. I will update the ASF-INFRA ticket and ask them to manually re-enable them. I will close this PR (but am testing webhooks with Manu in the meantime, so may reopen and close this just for testing.)

I think you can still enable required checks using pattern match of branch names. You can use v*.x to match all release branches.


Roll Engine from 299eb3e710c1 to 67abe7f9a9e4 (13 revisions)

This is a manual roll since it requires adding a new SemanticsAction to
matcher in flutter_test for SemanticsAction.setText which was
added as part of https://github.com/flutter/engine/pull/24734.
https://github.com/flutter/engine/compare/299eb3e710c1...67abe7f9a9e4
2021-03-05<EMAIL_ADDRESS>Roll Skia from 994a571fc79a to 532138cea7ea (4 revisions) (flutter/engine#24812)
2021-03-05<EMAIL_ADDRESS>Roll Dart SDK from b321d01eec78 to 4693d6d4f88e (1 revision) (flutter/engine#24811)
2021-03-05<EMAIL_ADDRESS>Roll Dart SDK from 835da00aa6b5 to b321d01eec78 (1 revision) (flutter/engine#24808)
2021-03-05<EMAIL_ADDRESS>Roll Skia from d42fe062d0a7 to 994a571fc79a (1 revision) (flutter/engine#24806)
2021-03-05<EMAIL_ADDRESS>Roll Skia from 3b58d38966f4 to d42fe062d0a7 (2 revisions) (flutter/engine#24805)
2021-03-05<EMAIL_ADDRESS>Roll Skia from 6ba242d2a201 to 3b58d38966f4 (1 revision) (flutter/engine#24804)
2021-03-05<EMAIL_ADDRESS>Roll Dart SDK from 1b674d73af53 to 835da00aa6b5 (1 revision) (flutter/engine#24803)
2021-03-05<EMAIL_ADDRESS>Update cppwinrt to build 2.0.210304.5 (flutter/engine#24801)
2021-03-05<EMAIL_ADDRESS>Roll Skia from 55aaefe687c7 to 6ba242d2a201 (18 revisions) (flutter/engine#24799)
2021-03-05<EMAIL_ADDRESS>Adds set text action for voice access (flutter/engine#24734)
2021-03-04<EMAIL_ADDRESS>SkParagraph: support multiple default font families (flutter/engine#24662)
2021-03-04<EMAIL_ADDRESS>Roll Clang Mac from MQQ43_LGr... to MRLGJYv8V... (flutter/engine#24794)
2021-03-04<EMAIL_ADDRESS>Allow calls to legacyMakeTypeface in the AssetFontManager (flutter/engine#24612)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

The Google testing error is expected and will be resolved by this roll:
ERROR: third_party/dart/flutter_test/lib/src/matchers.dart

550: if (hasSetTextAction) SemanticsAction.setText, The getter 'setText' isn't defined for the type 'SemanticsAction'. #undefined_getter

(09:49:03) ERROR: third_party/dart/flutter_test/BUILD:20:13: Dart, ddc, compiling //third_party/dart/flutter_test:flutter_test failed: (Exit 1) ddk_flutter failed: error executing command blaze-out/host/bin/dart/build_defs/action/ddc/ddk_flutter @blaze-out/k8-fastbuild/bin/third_party/dart/flutter_test/lib/flutter_test.normal.js-0.params.  [forge_remote_host=ixql4]
google3:///third_party/dart/flutter_test/lib/src/matchers.dart:550:43: Error: Getter not found: 'setText'.
    if (hasSetTextAction) SemanticsAction.setText,
                                          ^^^^^^^


Cant Create user in Chapter 3 and 4

Please help with this cannot create user

Hi @talatam143,
How did you resolve this?
Thanks


Tags for workspace resource groups

It would be nice to have some meaningful tags for workspace resource groups, so they can be identified properly in the SDE without having to look up all the UUIDs.
I've been (manually) adding a workspace_name tag that contains the workspace name (naturally!). If the UI and resource processor could be updated to handle this automatically, that would be nice.
I've also added an owner tag, with the name of the PI for the project. I haven't added any email or contact information, just the name.

See also #15

Need License to test the implemented solution


Syntastic: unrecognized error format (crashed checker?)?

I'm getting an error when I run :SyntasticCheck on VimL files. I have vim configured with only the options suggested for new users in Syntastic's README:
let g:syntastic_vim_checkers = ['vint']

set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

Here's the output for the Syntastic debug log:
syntastic: warning: checker vim/vint: unrecognized error format (crashed checker?)
syntastic: 255.519186: g:syntastic_version = '3.8.0-3 (Vim 800, Darwin, GUI)'
syntastic: 255.519360: &shell = '/bin/bash', &shellcmdflag = '-c',
  &shellpipe = '2>&1 | tee',
  &shellquote = '',
  &shellredir = '>%s 2>&1',
  &shelltemp = 1,
  &shellxquote = '',
  &autochdir = 0,
  &shellxescape = ''
syntastic: 255.519927: UpdateErrors: vint
syntastic: 255.520186: CacheErrors: vint
syntastic: 255.520800: g:syntastic_aggregate_errors = 0
syntastic: 255.520984: getcwd() = '/Users/rlue'
syntastic: 255.521474: CacheErrors: Invoking checker: vim/vint
syntastic: 255.522067: SyntasticMake: called with options:
  {'preprocess': 'vint',
   'errorformat': '%f:%l:%c:%t: %m',
   'makeprg': 'vint /Users/rlue/.vim/config/mappings.vim --json',
   'returns': [0, 1]}
syntastic: 255.847839: system: command run in 0.325377s
syntastic: 255.848224: checker output:
  ['Traceback (most recent call last):',
   '  File "/usr/local/bin/vint", line 11, in <module>',
   '    sys.exit(main())',
   '  File "/usr/local/lib/python2.7/site-packages/vint/__init__.py", line 11, in main',
   '    init_cli()',
   '  File "/usr/local/lib/python2.7/site-packages/vint/bootstrap.py", line 22, ininit_cli',
   '    cli.start()',
   '  File "/usr/local/lib/python2.7/site-packages/vint/linting/cli.py", line 26, in start',
   '    config_dict = self._build_config_dict(env)',
   '  File "/usr/local/lib/python2.7/site-packages/vint/linting/cli.py", line 56, in _build_config_dict',
   '    ConfigDefaultSource(env),',
   '  File "/usr/local/lib/python2.7/site-packages/vint/linting/config/config_file_source.py", line 12, in __init__',
   ' with config_file_path.open() as file_obj:',
   '  File "/usr/local/lib/python2.7/site-packages/pathlib.py", line 1077, in open',
   '    return io.open(str(self), mode, buffering, encoding, errors, newline)',
   'LookupError: unknown encoding: ', '']
syntastic: warning: checker vim/vint: unrecognized error format (crashed checker?)
syntastic: 255.849312: preprocess: []
syntastic: 255.849533: raw loclist: []
syntastic: 255.849727: getLocList: checker vim/vint returned 1
syntastic: 255.849863: vim/vint raw: []
syntastic: 255.850016: quiet_messages filter: {}
syntastic: 255.850130: getLocList: checker vim/vint run in 0.328544s
syntastic: 255.850399: aggregated: {'_sorted': 0, '_name': '', '_owner': 2, '_columns': 1, '_rawLoclist': []}

It appears this problem has cropped up with other linters, as well. Maybe a null value is being passed as an argument to io.open?
File "/usr/local/lib/python2.7/site-packages/pathlib.py", line 1077, in open
    return io.open(str(self), mode, buffering, encoding, errors, newline)
LookupError: unknown encoding:

I'd dig through the traceback in more detail, but I don't know python at all. :\

Update, this issue only occurs in MacVim, no problem in Terminal.

Update, this issue only occurs in MacVim, no problem in Terminal.

Hmm, it seems strange.
Vint has a feature that guess file encoding, and this feature got something wrong.
What file encoding are you using?

UTF-8

Thank you.
What file encoding are you using for config files such as ~/.vintrc?

There's a .vintrc?? (Clearly, I'm new at this.)
I don't have a .vintrc file (I checked with find . -name "*vintrc*"!). Should I create one and set some settings?
I did a little check on every single file in my ~/.vim/ directory – the only non-UTF-8 files are git indices and objects from my various vim plugins, and all my vimundo files.
(command lifted from this blog.)
$ pwd
/Users/rlue/.vim
$ find . -type f | xargs -I {} bash -c "iconv -f utf-8 -t utf-16 {} &>/dev/null || echo {}" > utf8_fail
$ cat utf8_fail

(you don't want to see the output of cat – it's 700 lines long.)
And no – thank you.

Hmm... could you print the result of the following command?:
$ file -I /usr/local/lib/python2.7/site-packages/vint/asset/default_config.yaml

/usr/local/lib/python2.7/site-packages/vint/asset/default_config.yaml: text/plain; charset=us-ascii

I suspect that the module "chardet" (Vint is using this module) returned an unexpected result.
Could you try the following script?
# test.py
import pprint
import chardet
import sys

file_path = sys.argv[1]
print("Checking: `{0}`".format(file_path))

with open(file_path, mode='rb') as f:
    bytes_seq = f.read()
    pprint.pprint(chardet.detect(bytes_seq))

$ python ./test.py /usr/local/lib/python2.7/site-packages/vint/asset/default_config.yaml
{'confidence': 0.99, 'encoding': 'utf-8'}

Checking: `/usr/local/lib/python2.7/site-packages/vint/asset/default_config.yaml`
{'confidence': 1.0, 'encoding': 'ascii'}

Hmmmmm...! it seems strange! 😰

Very strange indeed! FWIW, the file appears as UTF-8 in vim, and if I add non-ascii characters to it (like “éâ” or “臭小孩”), vim still says it's UTF-8, but chardet says it's ISO-8859-2??

So I posted about this on reddit, and somebody helped me get one step closer to the answer:
If I launch GUI vim from the Finder, I get the error.
But if I launch GUI vim from the terminal (with mvim), then the error goes away!
Clearly this is an issue with the way MacVim is implemented and not with vint itself. Sorry for the trouble!

So I've been investigating this problem a little further. @lcd047 (from Syntastic) suggested it might be wise to look at the output of :echo system('env'). I thought I'd share just in case you found it useful.
I ran the command in both settings (invoking from terminal and invoking from Finder), then removed all the identical lines. Here's what was left:
Launched from the terminal, it looks like this:
TERM_PROGRAM=Apple_Terminal
TERM=xterm-256color
TERM_PROGRAM_VERSION=361.1
TERM_SESSION_ID=510177A0-89AD-482B-93E8-313C3DD5A225
SHLVL=3
LC_CTYPE=UTF-8

and launched from the Finder, it looks like this:
SHLVL=1

So @lcd407 totally figured it out. The problem is that Finder doesn't preserve locales. If I set let g:syntastic_vim_vint_exe = 'LC_CTYPE=UTF-8 vint', then everything works fine
I'm reopening this issue per his/her suggestion:

Also, vint should provide some kind of fallback when locales are not available.

Thank you @kuniwak!

Thanks for sharing the cause! 🎉
I'll fix it later, but also you can send PullRequest to solve it.
Would you send the PullRequest?

I wish I could, but I really don't know python at all! I'd just wind up making your code worse, I think, so I'll leave this one to you ;)

OK, I'll fix it later!

I have a similar issue (and similar to #225). Except that in my case, it does not even work from the terminal, even if setting LC_CTYPE=UTF-8.
The python encoding test script yields the following results:
```Checking: /home/tim/.local/lib/python2.7/site-packages/vint/asset/default_config.yaml
{'confidence': 1.0, 'encoding': 'ascii', 'language': ''}


Problem opening local files

After installing the latest release of Exokit on Windows, I try to run leetsaber locally and get this:
C:\Users\cc\Documents\leetsaber>C:\exokit\exokit.cmd index.html
Error: ENOENT: no such file or directory, open 'C:\exokit\index.html'
Lifecycle library is not connected.

I think the problem is due to cd'ing into C:\exokit (the installation path).

On the other hand, I'm not sure where that cd is happening:

setlocal

set home=%~dp0
set node=%home%node\node.exe
set code=%home%index.js

IF EXIST "%node%" (
  "%node%" "%code%" %*
) ELSE (
  node "%code%" %*
)

This works, but it's ugly:
...

const cwd = process.cwd();
process.chdir(__dirname); // needed for global bin to find libraries

...

    if (u && !url.parse(u).protocol) {
      process.chdir(cwd);
      u = 'file://' + path.resolve(u);
      process.chdir(__dirname);
    }

Suggestions?


jqLiteExtras refactoring

This PR relates to https://github.com/angular-ui/ui-scroll/issues/72 issue and provides a solution of ui.scroll.jqlite extra module removing.
Features:

injected jqLiteExtras service into ui.scroll module
removed  ui.scroll.jqlite module
fixed demos and build process

It becomes irrelevant since PR https://github.com/angular-ui/ui-scroll/pull/135 was accepted.


Support WorkspaceEditMetadata in workspace/applyEdit

To fix https://github.com/microsoft/pylance-release/issues/5217#issuecomment-1863469715 in Pylance, I'd need the Workspace.applyEdit call in handleApplyWorkspaceEdit to pass { isRefactoring: true } as the second parameter.
Is it reasonable to add WorkspaceEditMetadata to workspace/applyEdit, so isRefactoring can be sent optionally via LSP?

@dbaeumer, I'm guessing that you missed this when you got back from vacation.

@dbaeumer, thanks for taking this change. Any guess as to when your next release will be available?

I want to get the snippet support in as well before having a new release. This however requires the new VS Code release that is due this week. So a new LSP release will not arrive before next week.


How do you properly resize canvas for responsive design? Any related API?

First of all, thank you for this wonderful javascript library.
I want full-screen canvas, but I didn't find any API to do this.
In Pixi.js, I can resize like this.
this.App.renderer.resize(clientWidth, clientHeight);

But right now I ended up this code
  resizeCanvasRenderer = () => {
    this.canvasRenderer.canvas.width =
      this.props.width * window.devicePixelRatio;
    this.canvasRenderer.canvas.height =
      this.props.height * window.devicePixelRatio;

    this.canvasRenderer.canvas.style.width = `${this.props.width}px`;
    this.canvasRenderer.canvas.style.height = `${this.props.height}px`;
  };

The code above seems to work.
However, this scene becomes so small. I have no idea why this is happening.
I am very new to Matter.js
Please help~~Thank you

This is expected with the simple built in renderer, but it looks like you just want to account for high density displays? Try using Render.setPixelRatio(renderer, 'auto').


Add some Chart Controls for CrossTab

Add chart controls like Title, Tool tip on/off, Font colour and background colour for cross tab.

Completed and merged.


Cache Field text widths with 2D Canvas's measureText

Resolves
Field rendering performance.
Proposed Changes
Related https://github.com/LLK/scratch-gui/pull/4669.

Use CanvasRendering2DContext.measureText to determine text widths.
Cache text widths by 2 dimensions className and textContext.

Reason for Changes

Use CanvasRendering2DContext.measureText to determine text widths.

The first render of some group of blocks needs to determine the text widths for fields in the blocks. Currently getCachedWidth queries the produced text node layout to get the width. Requesting data from the dom layout in this scenario takes a lot of time. Instead of querying the text width for each field's text we can query the font for each class name.
CanvasRendering2DContext has a helper method for measuring text. Setting the font member of a CanvasRendering2DContext and calling measureText, we can get the width of some text without fetching that from the dom.

Cache text widths by 2 dimensions className and textContext.

measureText still has some cost as its walks the given text and looks up the related glyph in the font. So caching the produced widths is still very helpful. We can improve the cache lookup performance a little by using a nested lookup.

I am very interested in this change :D

/cc @kchadha @paulkaplan


Add support for boolean attributes in view components for Alpine.js and Livewire

#54015
This pull request introduces a new configuration option for handling boolean HTML attributes in view components and updates the ComponentAttributeBag class to utilize this configuration. Additionally, a new test is added to ensure the correct behavior of this feature.
Configuration Updates:

config/view.php: Added a new configuration option, boolean_attributes, to specify which HTML attributes should be treated as boolean attributes when rendering components.

Codebase Enhancements:

src/Illuminate/View/ComponentAttributeBag.php: Imported Illuminate\Config\Repository and updated the __toString method to use the new boolean_attributes configuration for determining boolean attributes. [1] [2]

Testing:

tests/View/ViewComponentAttributeBagTest.php: Added a new test, testBooleanAttributesLivewireWireAndAlpineJS, to verify that the specified boolean attributes are correctly rendered without values.

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If applicable, please consider releasing your code as a package so that the community can still take advantage of your contributions!


BUG: QuadX Motor Saturation

In the current implementation of the handling of motor saturations in quadx.py
It is handled as follows:
  # deal with motor saturations
  if (high := np.max(self.pwm)) > 1.0:
      self.pwm /= high
  if (low := np.min(self.pwm)) < 0.05:
      self.pwm += (1.0 - self.pwm) / (1.0 - low) * (0.05 - low)

I think this implementation is not robust as it can happen that both the maximum is > 1 and the minimum is less than 0.05 at the same time and it will not be handled correctly.
A more robust implementation I think would be the following:
Have the MAX_PWM and MIN_PWM as parameters set to (1, 0.05) by default.
Use the following helper function instead of the previous lines:
@staticmethod
def _motor_saturation(pwm_values: np.ndarray, min_pwm: float, max_pwm: float):
    """
    This function saturates the motors pwm values proportionally to the min_pwm and max_pwm parameters.

    Returns:
        np.array of pwm values saturated between min_pwm and max_pwm.
    """

    max_value = np.max(pwm_values)
    min_value = np.min(pwm_values)

    result = pwm_values

    data_range = max_value - min_value

    if data_range == 0:  # Prevent division by zero if all values are equal
        result = np.clip(pwm_values, min_pwm, max_pwm)
    elif max_value > max_pwm or min_value < min_pwm:
        scale = (max_pwm - min_pwm) / data_range
        result = min_pwm + ((pwm_values - min_value) * scale)

    return result

Optionally we can have a boolean parameter HANDLE_MOTOR_SATURATION set to True by default.
I already have this implemented also, if you accept it let me know and I will create the PR.
Thanks.

The original implementation handles cases of lowerbound + upperbound together as well.
Notice that it's two if loops, not a single if-elif.
The first conditional clips handles overbound, the second one clips underbound.
In addition, the original implementation doesn't increase the bounds should either one of them go out of bounds as severely as your proposed implementation.
Re:
from copy import deepcopy
import numpy as np

def handle_new(pwm: np.ndarray) -> np.ndarray:
    max_value = np.max(pwm)
    min_value = np.min(pwm)

    result = pwm

    data_range = max_value - min_value

    if max_value > 1.0 or min_value < 0.05:
        scale = (1.0 - 0.05) / data_range
        result = 0.05 + ((pwm - min_value) * scale)

    return result

def handle_old(pwm: np.ndarray) -> np.ndarray:
    # deal with motor saturations
    if (high := np.max(pwm)) > 1.0:
        pwm /= high
    if (low := np.min(pwm)) < 0.05:
        pwm += (1.0 - pwm) / (1.0 - low) * (0.05 - low)

    return pwm

if __name__ == "__main__":
    for i in range(100):
        input = np.random.random_sample((4,)) * 1.2
        old = handle_old(deepcopy(input))
        new = handle_new(deepcopy(input))
        print(f"Original {input}")
        print(f"Old {old}")
        print(f"New {new}")
        assert np.max(old) < (np.max(input) + 1e-3), f"Old failed. {np.max(old) - np.max(input)}"
        assert np.max(new) < (np.max(input) + 1e-3), f"Old failed. {np.max(new) - np.max(input)}"
        assert np.min(old) > (np.min(input) - 1e-3), f"New failed. {np.min(old) - np.min(input)}"
        assert np.min(new) > (np.min(input) - 1e-3), f"New failed. {np.min(new) - np.min(input)}"

Published a new release fixing the saturation issue.

Reopening this, you're right, the current implementation does fail under certain scenarios like multiple values being out of bounds. I'll look into it a bit more.

I think a reasonable solution is:
    # deal with motor saturations
    high, low = np.max(pwm), np.min(pwm)
    pwm_range = (high - low)
    if high > 1.0:
        overflow = max(0.0, low - 1.0)
        pwm -= (high - 1.0) / pwm_range * (pwm - 1.0) + overflow
    high, low = np.max(pwm), np.min(pwm)
    if low < 0.05:
        underflow = max(0.0, 0.05 - high)
        pwm += (0.05 - low) / pwm_range * (high - pwm) + underflow

Looks good to me ! only if we can make the thresholds configurable would be nice to have.


Re: Upfluence: Maria Checking In Again TEST

TEST BY CAPUCINEDESCRIPTION Hello,We have been reaching out trying to cancel our subscription. Who is the proper contact?Thanks, Jack On Mon, Jan 24, 2022 at 3:27 PM Maria Mendez<EMAIL_ADDRESS>wrote: Hi Jack,Hope you're well. Just checking in to see how things are going for you as you're navigating the platform. I also wanted to remind you that you have 1:1 training(s) available to you and any other member of your team. It is a service that is included with your subscription to ensure that you're efficiently leveraging the tools of the platform.Additionally, you've purchased the Custom First Campaign service where our campaign strategist, Sarah Singer (also cc'd here) will create all of the content strategy for your first campaign and set it up in the platform for you as well.  Let's make sure we get the ball rolling on the above two items as soon as possible.Are you available Thursday this week at 12pm or 1pm EST for a call?  Otherwise, feel free to use my calendar here to book a time convenient for you. Thanks,Maria--    Maria MendezCustomer success managerNew York - Lyon - Paris - Lausannewww.upfluence.com Attachments:TREATDOA - Upfluence Contract.pdfTREATDOA_Upfluence _1 27-12-2021.pdfScreenShot_73022259409.png

Comment from Freshdesk:

Freshdesk: 3441 linked successfully.

                  Freshdesk: #3441
By: Capucine Du Rostu<EMAIL_ADDRESS>


Set price to 0

Q
A

Bug report?
[ ]

Feature request?
[ ]

Support request?
[ x ]

hi @cocolabssas ,
There is the possibility of finishing the price when inserting an ad to 0, if yes what changes can be made?

Duplicate of #197


fix: text color constrast tweaks

Types of Changes
What types of changes does your code introduce? Put an x in all the boxes that apply:

[ ] Bug fix (non-breaking change which fixes an issue, please reference the issue id)
[ ] New feature (non-breaking change which adds functionality, make sure to open an associated issue first)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] My change requires a change to the documentation
[ ] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[ ] All new and existing tests passed

Description
[Place a meaningful description here.]

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


feat: Extend rfl tactic to use refl attribute.

This extends the rfl tactic in Lean 4 to use refl attribute.

Updated with review fixes.  This branch relies on #425 and that was done in a separate branch since that code was from @siddhartha-gadgil.

bors merge

bors merge

bors merge


Adds a method to build an ObjectMeta object

This also fixes a bug (not sure how that happened) in the object_to_owner_reference method.

Yes, that's a good point. I believe I fixed that warning in my other open PR #44


Add a new Remix template to the CLI

WHY are these changes introduced?
We want shopifolk to be able to create a new Remix app using the CLI.  Right now, the template that is checked out doesn't fully work since it's waiting on https://github.com/Shopify/cli/pull/1789
WHAT is this pull request doing?
Add a new Remix templateto the available templates.  If you work for Shopify this allows you to run yarn create @shopify/app and select Remix.  Or, shopifolk can use yarn create @shopify/app --template=remix.
Non shopifolk do not get access to this template.
How to test your changes?
As a shopify employee:

pnpm create-app --template=remix
pnpm create-app --template=node
pnpm create-app and select remix`
pnpm create-app and select node`

Now fake not working for Shopify (the horror!) by changing isShopify to return false.  Re-run the above commands and check:

pnpm create-app should not present remix as an option in the choice list.
2.pnpm create-app --template=remix should throw an error.
pnpm create-app --template=node should still work.

Post-release steps
Since this is only available to shopifolk I don't think there are any.
Measuring impact
How do we know this change was effective? Please choose one:

[x] n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
[ ] Existing analytics will cater for this addition
[ ] PR includes analytics changes to measure impact

Checklist

[x] I've considered possible cross-platform impacts (Mac, Linux, Windows)
[x] I've considered possible documentation changes
[x] I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

Hi @byrichardpowell .

The problem I found was flags are static, but we need to call an async function to now if the Remix value should be available or not. Any ideas on how to fix this? Alternatively, since the Remix template is just for Shopifolk, would it be ok if the Remix value wasn't in the flag description? What do you think?

Sorry for this, you are completely right!, descriptions are statically generated using refresh-manifests. I guess I don't know any workaround for this issue, so I'm agreed with your suggestion of not adding Remix to the template flag description

I'm going to close this PR in favor of a much simpler PR that adds the Remix template for all users.


Feature request: Win32 IEnumVARIANT iterator for collections

Motivation
This makes it easier to iterate though Win32 collections (eg INetFwRules, INetFwServices, ...)
Drawbacks
At the current time, it seems that the Windows projection does not mark what structs support this kind of operation, so it would be a manual process of determining which structures this can be implemented on.
Rationale and alternatives
It could be implemented as a separate library, but it would mean that the implementation wont be-able to use the IntoIterator trait on the objects directly
Additional context
I have created an iterator for this kind of object. I am using it to iterate over the INetFwRules.
pub struct IEnumIterator<T: Interface>(IEnumVARIANT, PhantomData<T>);

impl<T: Interface> IEnumIterator<T> {
    fn new(i_enum: IEnumVARIANT) -> IEnumIterator<T> {
        IEnumIterator(i_enum, PhantomData)
    }
}

impl<T: Interface> Iterator for IEnumIterator<T> {
    type Item = T;

    fn next(&mut self) -> Option<Self::Item> {
        unsafe {
            let mut c_fetched: u32 = u32::default();
            let mut var = VARIANT::default();
            self.0
                .Next(slice::from_mut(&mut var), &mut c_fetched)
                .ok()
                .ok()?;
            VariantChangeType(&mut var, &var, 0, VT_DISPATCH).ok()?;
            let dispatch = var.Anonymous.Anonymous.Anonymous.pdispVal.as_ref();
            dispatch.and_then(|d| d.cast().ok())
        }
    }
}

Seems like a reasonable addition but would require me to finally get to #539. 😊

And there are of course many COM interfaces that follow the IEnumXxx pattern that could be well served by an Iterator implementation. Ideally, any solution here would need to cover all or most of them generically.

Just reviewing this old issue - we now have first class support for VARIANT and PROPVARIANT in windows-core (#2786) but there isn't enough metadata to generally support iteration of IEnumXxx interfaces due to all of the unique or individual semantics from one enumeration interface to another and I'm reluctant to hand-author Iterator for each one in the windows crate as that doesn't scale.


Issue #517 Bug on log error when verbose=true

On verbose mode log error shows "Cannot read property 'length' of undefined"

+1

thank you!


Clarify the definition of the term "return normally"

The note says:

The term "return normally" means "only throws exceptions that are explicitly allowed by the rule".

but "exceptions" is too vague here. In my opinion, this must be reworded to use specific class names. I've asked about this in the context of §2.13 and based on the replies I propose the following:

The term "return normally" means "only throws instances of java.lang.RuntimeException that are explicitly allowed by the rule, or instances of java.lang.Error".

@anthonyvdotbe Your proposal would possibly be backwards incompatible.
A backwards compatible alternative would be something along the lines of:

The term "return normally" means "only throws instances of java.lang.Throwable that are either explicitly allowed by the rule or signal that a fatal error has occurred.".

Thoughts @reactive-streams/contributors ?

The term "return normally" means "only throws instances of java.lang.Throwable that are either explicitly allowed by the rule or signal that a fatal error has occurred.".

If I'd come across this definition, my train of thoughts would be something like:

fatal error == java.lang.Error, obvious
but then why didn't the spec authors use java.lang.Error to avoid all ambiguity?
maybe "fatal error" is meant to be interpreted as "unchecked exception" here?
but then why didn't they use that instead, since the JLS unambiguously defines that term?

And I'd still be puzzled about whether or not RuntimeExceptions that are not explicitly allowed, are considered "fatal errors" (or may be considered as such under certain conditions). Or even if all instances of java.lang.Error are considered "fatal", e.g. what about java.lang.NoClassDefFoundError? (Also there's the contrived case of using Class::newInstance, which might even cause checked exceptions to be thrown as well.)
So personally I would prefer an unambiguous definition, even if it might introduce an incompatibility. At least you'd know for sure that the implementation is correct/incorrect, whereas now an implementation may be both correct and incorrect at the same time, depending on the definition of "fatal error". Just my 2 cents.

How about: "Fatal error" means that a failure so severe has happened that the only sensible course of action is to crash the virtual machine process.

I'd really like the specification to define "returns normally" in terms of specific class names. Given your definition of "fatal error", I also fail to see why:

[...] or are instances of java.lang.Error

would possibly be backward incompatible, while:

[...] or signal that a fatal error has occurred

would not?

@anthonyvdotbe Why class names?  In other words: if I write a Subscriber implementation, how can I be sure I'm implementing the spec correctly, and rule 2.13 will never be violated? Or is this actually a non-question and do I don't have to care about which unchecked exceptions my implementation may throw, since the spec clarifies what the caller must do if the rule is violated? Or should I have a try { ... } catch(Throwable t) { ... } in all my methods, and simply define fatal error as "any error that occurs while trying to handle the Throwable in the catch block"? Also, in my experience it's very atypical to catch unchecked exceptions or Throwable (unless maybe to add suppressed exceptions, like try-with-resources does). On the other hand, examples I've seen thus far all catch Throwable in their Subscriber implementations. So if this is indeed required for writing a compliant Subscriber, I believe the spec should clearly indicate this, because casual readers will easily miss something "unintuitive" like this.

@anthonyvdotbe There is no way to guarantee that rules will never be violated. :)
Since the main interaction is the Publisher calling signals on the Subscriber, if those fail, there's really not much the publisher can do. By saying that if there is a throwable thrown by the Subscriber, the Subscriber has violated the spec, so we need to log that somehow so it is not just a silent bug.
So:

Calling onSubscribe, onNext, onError or onComplete MUST return normally except when any provided parameter is null in which case it MUST throw a java.lang.NullPointerException to the caller, for all other situations the only legal way for a Subscriber to signal failure is by cancelling its Subscription. In the case that this rule is violated, any associated Subscription to the Subscriber MUST be considered as cancelled, and the caller MUST raise this error condition in a fashion that is adequate for the runtime environment.

As for fatalities, it is about Throwables where the catcher deems them as being indicative of irrecoverable system failures, i.e. warranting a System.exit(nonzero).

Ok, I think I get it. Actually, I'd just change the note to the following then:

The term "return normally" means "only throws instances of java.lang.Throwable that are explicitly allowed by the rule".

and add a note to §2.13 saying something like:

an adequate fashion may be, for example, logging the exception. Or, for Throwables that are deemed indicative of irrecoverable system failures, halting/crashing the VM.

@viktorklang what do you think?

@anthonyvdotbe Doesn't have to ber something like:

The term "return normally" means "MOST ONLY return a value or throws instances of java.lang.Throwable that are explicitly allowed by the rule".

?
I like your footnote.

@viktorklang I had simply replaced exceptions with instances of java.lang.Throwable in the actual note. But yes, upon rereading it, I'd say it's not an improvement over the current wording.
I think the use of return a value in your proposal may cause some confusion, since all methods are defined to return void.
Bottom line: I believe this issue can be closed without change, and the addition of the note to §2.13 can be taken care of in #328

@anthonyvdotbe Deal :)


BC break: Calling a method unnecessarily

Making an indirect call to the $this->getOldAttributes() method caused my code to break. I understand that the correct thing would be to reference $this->_oldAttributes.

Q
A

Is bugfix?
✔

New feature?
❌

Breaks BC?
❌

Fixed issues
#19272

caused my code to break.

What broke? Were there error messages, wrong data?

The problem was because I was overriding the _get() method.
I only opened the PR because it may be that the same problem occurs with other people. In my understanding, it makes no sense to force the call in the $this->getOldAttributes method without the slightest need, since the $this->_oldAttributes is available.
Anyway, MY problem I already solved.
Feel free to close the PR. Or improve it, because, in my opinion, that wasn't the most adequate implementation. I'm open to suggestions.

I think we could change it to use private property indeed but with additional check for null.

@bizley done

Would you please a line for CHANGELOG?

@samdark done!

Sorry, just noticed that this is wrong, let's make it like that for example
private function isValueDifferent($newValue, $oldValue)
{
    if (is_array($newValue) && is_array($oldValue)) {
        $newValue = ArrayHelper::recursiveSort($newValue);
        $oldValue = ArrayHelper::recursiveSort($oldValue);
    }

    return $newValue !== $oldValue;
}

then we can just call it like
if (isset($names[$name]) && (!array_key_exists($name, $this->_oldAttributes) || $this->isValueDifferent($value, $this->_oldAttributes[$name]))) {
    $attributes[$name] = $value;
}

Otherwise we compare $value to an empty array if not set in old attributes.

Thanks.

Owww... GitHub did not update the comments before I hit the merge button :(

@thiagotalma would you please fix it as @bizley suggested?


Focus on combobox not bubbling up

Current behavior
For some reason, the focus on the combobox input is not bubbling up, preventing components higher in the hierarchy from reacting accordingly:
https://user-images.githubusercontent.com/943036/180580200-bba88f68-0df3-4578-ba9f-99776a158575.mov
This also affects hovering with focusOnHover.
We caught this issue while building a component that has a different style based on whether it has a focused element within. A naive solution is using the :focus-within selector, but in React it would not always work since elements rendered in portals aren't descent of the parent element, so the style isn't applied. There is no option left but to listen for focus events, as React correctly propagates to the respective parents in the rendering tree. However, due to the current behavior of the combobox input, the component isn't notified about the focus change. So, when moving from an item to the input, a blur event is notified removing the style, but no focus bubbles up after that.
The same doesn't happen to other components like menus.
Steps to reproduce the bug

Open sandbox: https://codesandbox.io/s/gallant-lucy-wtq0jc?file=/src/combobox.tsx
Click on the comobobox
The counter increment by 1
Press arrow down
The counter increment by 1
Press arrow up
The counter does not increment

Expected behavior
All events being notified.
Workaround
https://github.com/ariakit/ariakit/issues/1659#issuecomment-1193034269
Possible solutions
No response

We caught this issue while building a component that has a different style based on whether it has a focused element within.

Are you comfortable sharing the design of what you're building? If we implement this, we'll likely need to build an example with tests so we can guarantee this keeps functioning. It's better if that's based on a real-world example.

As a workaround, you can either listen to combobox.activeId === null if you have access to the combobox state in your parent component.
Or ignore blur events where event.relatedTarget is the combobox input element:
const ref = useRef(null);

<Combobox ref={ref} />
<ComboboxPopover
  onBlur={(event) => {
    if (event.relatedTarget === ref.current) {
      event.stopPropagation();
    }
  }}
/>

Or disable virtualFocus:
useComboboxState({ virtualFocus: false })

We caught this issue while building a component that has a different style based on whether it has a focused element within.

Are you comfortable sharing the design of what you're building? If we implement this, we'll likely need to build an example with tests so we can guarantee this keeps functioning. It's better if that's based on a real-world example.

Sure!
Here's the real component:
https://user-images.githubusercontent.com/943036/180609324-2638e9fa-15cc-440c-893f-0e9034224603.mov
And here's  a simplified implementation so we can iterate over:
https://user-images.githubusercontent.com/943036/180610264-07678cbd-dfe4-4b64-84a1-3d97f8531c57.mov

Or ignore blur events where event.relatedTarget is the combobox input element:

Unfurnatelly, this introduces other issues. Because the last onblur event isn't fired, the style isn't removed.

Or disable virtualFocus:
useComboboxState({ virtualFocus: false })

This fixed the issue, but it is not an option for select combobox since searching for something becomes a pain – you have to navigate up to the input before searching for something.

Thanks for the videos and the CodeSandbox!

This fixes the issue indeed. However, it is not an option to select comboboxes since searching for something becomes a pain – you have to navigate up to the input before searching for something.

When using with Select, you would have to disable typeahead on the SelectPopover component:
<SelectPopover typeahead={false}>

But I see you're using autoSelect, which doesn't work without virtual focus. So that may still not be an option.

Based on your sandbox, it looks like this could work:
<SelectPopover
  onBlur={(event) => {
    if (event.currentTarget.contains(event.relatedTarget)) {
      event.stopPropagation();
    }
  }}
  autoFocusOnHide={(element) => {
    queueMicrotask(() => {
      element.focus();
    });
    return false;
  }}
>

Updated CodeSandbox with comments.
I'll mark this as a feature request because that's the expected behavior since the combobox input already has DOM focus when you move to it with arrow keys. We would've to dispatch a custom focus event somehow programmatically.

Based on your sandbox, it looks like this could work:
<SelectPopover
  onBlur={(event) => {
    if (event.currentTarget.contains(event.relatedTarget)) {
      event.stopPropagation();
    }
  }}
  autoFocusOnHide={(element) => {
    queueMicrotask(() => {
      element.focus();
    });
    return false;
  }}
>

Updated CodeSandbox with comments.

That worked just fine, thanks @diegohaz!

@diegohaz, I just found a caveat with this approach: pressing tab suppresses the blur event.
Uploading Screen Recording 2022-07-25 at 12.39.49.mov…
Codesandbox

The workaround is checking whether the focus is still inside the container:
if (!event.currentTarget.contains(document.activeElement)) {
    setFocused(false);
}

I've updated the Codesandbox with the fix.

Yeah, that happens because the blur event we dispatch on the item when you move the focus out of the select popover ends up being fired after the focus event on the element outside. That's why that autoFocusOnHide prop was needed in my first suggestion.
This is the relevant code: https://github.com/ariakit/ariakit/blob/b1f3d9b3bcab322494e4460c7e377e222f5cbf2b/packages/ariakit/src/composite/composite.ts#L301-L308
I'm not sure why this happens since we're synchronously firing it in the composite's blur event (which supposedly fires before the next focus event).
Anyway, with your solution, you can remove the autoFocusOnHide prop. But I would use event.relatedTarget instead of document.activeElement:
<div
  onBlur={(event) => {
    if (!event.currentTarget.contains(event.relatedTarget)) {
      setFocused(false);
    }
  }}
>
  <SelectPopover
    portal
    onBlur={(event) => {
      if (event.currentTarget.contains(event.relatedTarget)) {
        event.stopPropagation();
      }
    }}
  />
</div>

Also noting that onBlur on SelectPopover is needed just because we're using portal. Otherwise, only the check on the parent's blur event would be needed.

I'm not sure why this happens since we're synchronously firing it in the composite's blur event (which supposedly fires before the next focus event).

In fact, I did some tests locally, and the blur event is always fired before the focus event. I don't understand why that's happening differently on that CodeSandbox.

There's something wrong with the popover and the blur event. I just noticed that if you focus on a hovercard (portal) and press tab (to focus on the next element out of the popover), it will fire blur and then focus, each more than once. That completely broke our panel behavior.

There's something wrong with the popover and the blur event. I just noticed that if you focus on a hovercard (portal) and press tab (to focus on the next element out of the popover), it will fire blur and then focus, each more than once. This completely breaks our panel behavior.

Looks like a different issue. Does that happen if you use <Hovercard portal preserveTabOrder={false}>?

Yep, it still happens. That was my first try.

There's something wrong with the popover and the blur event. I just noticed that if you focus on a hovercard (portal) and press tab (to focus on the next element out of the popover), it will fire blur and then focus, each more than once. This completely breaks our panel behavior.
Notice that it fires the focus event after the blur event, even though we're the container is losing focus.

Could you please open a separate issue for that?


route config: add dynamic_metadata to route match

For #17621
Signed-off-by: Yangmin Zhu<EMAIL_ADDRESS>Commit Message: add dynamic_metadata to route match
Additional Description:
Risk Level: Low
Testing: Unit Test
Docs Changes:
Release Notes: Updated
Platform Specific Features:
[Optional Fixes #17621 ]
[Optional API Considerations:]

/retest

/retest
Initial windows flake was grabbing an external package, this flake seems to be a pipeline timeout.

@lizan could you take a look again? thanks


[Bug] select with LIKE leads to BE crash

Search before asking

[X] I had searched in the issues and found no similar issues.

Version
branch-2.0 (doris-2.0.7-b1955a9)
What's Wrong?
SELECT SQL with sub query and LIKE key words leads to BE crash
What You Expected?
work
How to Reproduce?
just execute sql as below and we'll find all BEs crash
CREATE table tbl (c1 varchar(31), c2 varchar(10)) ENGINE=OLAP DUPLICATE KEY( c1 ) COMMENT "OLAP"  DISTRIBUTED BY HASH( c1 ) BUCKETS  auto PROPERTIES (     "replication_num" = "1"  );
insert into tbl select 'ab', 'abc';
SELECT c2 LIKE 'ab' FROM (     SELECT c2      FROM tbl     EXCEPT      SELECT 'ab' c2 ) AS t1;
Anything Else?
This resulted in all the BE nodes crashing, so I think it might be quite urgent.
Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

The subsequent version has been fixed.
mysql [test]>CREATE table tbl (c1 varchar(31), c2 varchar(10)) ENGINE=OLAP DUPLICATE KEY( c1 ) COMMENT "OLAP"  DISTRIBUTED BY HASH( c1 ) BUCKETS  auto PROPERTIES ( "replication_num" = "1"  );
ct 'ab', 'abc';
mysql [test]>insert into tbl select 'ab', 'abc';
mysql [test]>SELECT c2 LIKE 'ab' FROM ( SELECT c2  FROM tbl EXCEPT  SELECT 'ab' c2 ) AS t1;
+----------------+
| (c2 like 'ab') |
+----------------+
|              0 |
+----------------+

The subsequent version has been fixed.
mysql [test]>CREATE table tbl (c1 varchar(31), c2 varchar(10)) ENGINE=OLAP DUPLICATE KEY( c1 ) COMMENT "OLAP"  DISTRIBUTED BY HASH( c1 ) BUCKETS  auto PROPERTIES ( "replication_num" = "1"  );
ct 'ab', 'abc';
mysql [test]>insert into tbl select 'ab', 'abc';
mysql [test]>SELECT c2 LIKE 'ab' FROM ( SELECT c2  FROM tbl EXCEPT  SELECT 'ab' c2 ) AS t1;
+----------------+
| (c2 like 'ab') |
+----------------+
|              0 |
+----------------+

Can you tell me the exact version number, or which pull request fixed this issue? ty

The subsequent version has been fixed.
mysql [test]>CREATE table tbl (c1 varchar(31), c2 varchar(10)) ENGINE=OLAP DUPLICATE KEY( c1 ) COMMENT "OLAP"  DISTRIBUTED BY HASH( c1 ) BUCKETS  auto PROPERTIES ( "replication_num" = "1"  );
ct 'ab', 'abc';
mysql [test]>insert into tbl select 'ab', 'abc';
mysql [test]>SELECT c2 LIKE 'ab' FROM ( SELECT c2  FROM tbl EXCEPT  SELECT 'ab' c2 ) AS t1;
+----------------+
| (c2 like 'ab') |
+----------------+
|              0 |
+----------------+

I tested it on 3/26(yesterday) 2.0 branch, and I found it. Can you tell me the exact version number, or which pull request fixed this issue? ty

Do you have any non-default config in fe.conf, be.conf, or session variables?

The subsequent version has been fixed.
mysql [test]>CREATE table tbl (c1 varchar(31), c2 varchar(10)) ENGINE=OLAP DUPLICATE KEY( c1 ) COMMENT "OLAP"  DISTRIBUTED BY HASH( c1 ) BUCKETS  auto PROPERTIES ( "replication_num" = "1"  );
ct 'ab', 'abc';
mysql [test]>insert into tbl select 'ab', 'abc';
mysql [test]>SELECT c2 LIKE 'ab' FROM ( SELECT c2  FROM tbl EXCEPT  SELECT 'ab' c2 ) AS t1;
+----------------+
| (c2 like 'ab') |
+----------------+
|              0 |
+----------------+

I tested it on 3/26(yesterday) 2.0 branch, and I found it. Can you tell me the exact version number, or which pull request fixed this issue? ty

This PR https://github.com/apache/doris/pull/26673 fixed the issue where the VEXCEPT operator would improperly execute the expr if open was not correct in the past. This PR includes relevant checks and fixes the errors. It has been merged into version 2.1 but has not yet been merged into version 2.0.
I'll try to pick that into 2.0 today.

I tested it in 2.1 version yesterday, and this issue has been fixed, I want to figure out which PR fixed it with git bisect, but I found compile the old version requires old docker container, that's a big problem :monocle_face: . Any way, thank u! :tada:

I tested it in 2.1 version yesterday, and this issue has been fixed, I want to figure out which PR fixed it with git bisect, but I found compile the old version requires old docker container, that's a big problem 🧐 . Any way, thank u! 🎉
This PR https://github.com/apache/doris/pull/26673 fixed the issue where the VEXCEPT operator would improperly execute the expr if open was not correct in the past. This PR includes relevant checks and fixes the errors. It has been merged into version 2.1 but has not yet been merged into version 2.0.

I tested it in 2.1 version yesterday, and this issue has been fixed, I want to figure out which PR fixed it with git bisect, but I found compile the old version requires old docker container, that's a big problem 🧐 . Any way, thank u! 🎉

This PR https://github.com/apache/doris/pull/26673 fixed the issue where the VEXCEPT operator would improperly execute the expr if open was not correct in the past. This PR includes relevant checks and fixes the errors. It has been merged into version 2.1 but has not yet been merged into version 2.0.


the white castle

Submitting this PR means you have:

[ ] searched the readme file and searched the open pull requests (no duplicates please)
[ ] and will follow the desired format
[ ] used image links that resolve correctly, are appropriately sized, and are served over HTTPS

Once your PR is created, it will trigger a build a GitHub Action (Awesome-Lint). This includes a format linting process, so if there are any issues with the build, please address them.
Do you have further questions? Check the contribution guidelines or open an issue.
When you're ready, check off the above acknowledgements and continue with your Pull Request... and thanks!

Your PR title does not match the game you added. Please fix that.


160ms to 200ms to initialize and open a box.

Question
I created a function which takes over 150ms and often 200ms to load:
    await Hive.initFlutter();
    final authBox = await Hive.openBox(STORED_AUTH_STATE);

Is this normal? The delay is noticeable because I call it before my runApp function as the app depends on local state.
The delay creates a black screen on the app before it starts (since it's running the call to hive).
Code sample
boostrap().then((widget) => runApp(widget));

Version
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.14.6 18G103, locale en-US)
• Flutter version 1.12.13+hotfix.8 at /Users/anton/Personal/flutter
• Framework revision 0b8abb4724 (5 days ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0

Looks like the delay originates from WidgetsFlutterBinding.ensureInitialized();
I wonder if there is a way around that.

@abacaj Using runApp multiple times is considered good practice:
main() async {
  runApp(Center(child: CircularProgressIndicator()));
  await Hive.initFlutter();
  final authBox = await Hive.openBox(STORED_AUTH_STATE);
  // ...
  runApp(MyApp());
}

I wonder if there is a way around that. May need to show a temp loader while this call happens.

This call is only needed to make sure path_provider returns a valid path. If you can provide a path yourself, you can use Hive.init().


Cross Account Cloudformation ChangeSet

I am in the process of writing a CDK app that creates a CodePipeline that deploys to a stage in another account. In CloudFormation I can change the RoleArn for the CodePipeline Action and for the configuration of the CloudFormation ChangeSet but when I try doing this in CDK I get the following error:

Error: Can only reference cross stacks in the same region and account.

Is there a way to do this currently?

You have to build the ARN manually from well-defined parts (not resource attributes) using stack.formatArn().

There doesn't appear to be anyway to include an ARN manually in either PipelineCreateReplaceChangeSetAction or PipelineExecuteChangeSetAction

Hey @bensechrist ,
I'm actually working on this functionality as we speak :). It involves some framework changes, so I can't promise when it'll be released, but rest assured we're aware of this use-case, and working hard on making it awesome :).
In the mean time, like Rico said, you need to import and IRole using Role.import(this, 'Role', {   roleArn: yourArnHere, }), and then pass this role as a property when creating either a PipelineCreateReplaceChangeSetAction or a PipelineExecuteChangeSetAction.
Thanks,
Adam

Thanks! That fixed the issue around the role but now I get the same error when I try to set the region to anything.

Could you give an example? I don't understand what "set the region to anything" means.

When setting the region param to 'us-east-1' with the pipeline in 'us-west-2' and passing in an imported role for the role and deploymentRole properties it gives me that error.

Could you reduce to a minimal reproducing example? Unfortunately, our error reporting here is a little lacking and it's hard for me to judge from the error message alone.

const region = 'us-east-1'; // Current stack and Pipeline are in us-west-2
const crossAccountRoleArn = `arn:aws:iam::${crossAccountId}:role/CrossAccountRole`;
const cloudformationRoleArn = `arn:aws:iam::${crossAccountId}:role/CloudformationRole`;
const crossAccountRole: iam.IRole = iam.Role.import(this, 'CrossAccountRole', {
  roleArn: crossAccountRoleArn
});
const cloudformationRole: iam.IRole = iam.Role.import(this, 'CloudformationRole', {
  roleArn: cloudformationRoleArn
});
new PipelineCreateReplaceChangeSetAction(this, `MakeChangeSet${stage}-${region}`, {
  region,
  stackName,
  changeSetName,
  stage: stageSpecificStage,
  runOrder: 1,
  adminPermissions: false,
  role: crossAccountRole,
  deploymentRole: cloudformationRole,
  capabilities: CloudFormationCapabilities.AnonymousIAM,
});

Removing the region parameter gets rid of the error.

Unfortunately that example was not complete. I tried the following and did not reproduce the error.
Can you try this code, or paste your full reproducing example?
import { CloudFormationCapabilities, PipelineCreateReplaceChangeSetAction } from '@aws-cdk/aws-cloudformation';
import codepipeline = require('@aws-cdk/aws-codepipeline');
import { Artifact, ArtifactPath } from '@aws-cdk/aws-codepipeline-api';
import iam = require('@aws-cdk/aws-iam');
import cdk = require('@aws-cdk/cdk');
import { Secret } from '@aws-cdk/cdk';

export class TestStack extends cdk.Stack {
  constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
    super(scope, id, { env: { account: '13255', region: 'eu-west-1' }, ...props});

    const crossAccountId = 'ap-southeast-1';
    const stage = 'prod';
    const stackName = 'Henk';
    const changeSetName = 'Biertje';

    const pipeline = new codepipeline.Pipeline(this, 'Pipeline', {
    });

    const sourceStage = new codepipeline.Stage(this, 'SourceStage', {
      pipeline
    });
    const action = new codepipeline.GitHubSourceAction(this, 'Action', {
      owner: 'bier',
      repo: 'lekker',
      stage: sourceStage,
      oauthToken: new Secret()
    });

    const region = 'us-east-1'; // Current stack and Pipeline are in us-west-2
    const crossAccountRoleArn = `arn:aws:iam::${crossAccountId}:role/CrossAccountRole`;
    const cloudformationRoleArn = `arn:aws:iam::${crossAccountId}:role/CloudformationRole`;
    const crossAccountRole: iam.IRole = iam.Role.import(this, 'CrossAccountRole', {
      roleArn: crossAccountRoleArn
    });
    const cloudformationRole: iam.IRole = iam.Role.import(this, 'CloudformationRole', {
    roleArn: cloudformationRoleArn
    });

    const stageSpecificStage = new codepipeline.Stage(this, 'Stage', {
      pipeline
    });
    new PipelineCreateReplaceChangeSetAction(this, `MakeChangeSet${stage}-${region}`, {
      region,
      stackName,
      changeSetName,
      stage: stageSpecificStage,
      runOrder: 1,
      adminPermissions: false,
      role: crossAccountRole,
      deploymentRole: cloudformationRole,
      templatePath: new ArtifactPath(new Artifact(action, 'henk'), 'asdf'),
      capabilities: CloudFormationCapabilities.AnonymousIAM,
    });
  }
}

I discovered the problem was I was creating my own crossRegionReplicationBuckets and was using the bucketName reference. When I changed that to the static bucket name, I don't get the error any more.


remove ungated case from manifest-merge

Removes overrides for nearly all clusterprofiles (authentication remains because it needs featuregates-by-cluster-profile to work).
Removes overrides for ungated.
Removes ungated option from generator

/override ci/prow/verify-crd-schema

/retest

/retest

/lgtm


Refactor: Check HTTP-Status in CTClient instead of RequestBuilder

The AbstractRequestBuilder contains code to validate the Http-Status-Code:
// AbstractRequestBuilder.php
public function delete(string $modelId): void
{
    $url = $this->getApiEndpoint() . '/' . $modelId;

    $client = CTClient::getClient();
    $response = $client->delete($url);

    if (!in_array($response->getStatusCode(), [200, 204])) {
        throw CTRequestException::ofErrorResponse($response);
    }
}

and
// AbstractRequestBuilder.php
protected function updateData(string $objectId, array $data): void
{
    $url = $this->getApiEndpoint() . '/' . $objectId;

    $client = CTClient::getClient();
    $response = $client->patch($url, ['json' => $data]);

    if ($response->getStatusCode() !== 200) {
        throw CTRequestException::ofErrorResponse($response);
    }
}

I think it would be better to handle the HTTP-Status Code in the CTClient itself. For this reason i created the handleResponse function that is called by every POST, GET, PATCH and DELETE-Method:
// CTClient.php
private function handleResponse(ResponseInterface $response): ResponseInterface
{
    switch ($response->getStatusCode()) {
        case 401:
            throw new CTAuthException("Unauthorized.", 401);
    }
    return $response;
}

If neccessary we could also add a second "HTTP-Method" parameter to handle distinguish HTTP-Methods differently:
private function handleResponse(ResponseInterface $reponse, string $httpMethod): ResponseInterface {}

But i think a good first shot could be to throw a CTRequestException::ofErrorResponse($response) for every status code that is not between 200 and 299.

@naitsirch This refactoring belongs to parts of your code so im thankful for your feedback. What do you think of this refactoring? Does it make sense to you?
Im also totally opened if you have a diffrent mind on this.

Yes, that makes absolutely sense to me ;-)


Discovery isn't finding devices

I'm using ESP8266 and have the necessary board and library added. Also verified that I have the latest version of this library, i.e., 2.7.0.
Discovery stopped working about an hour ago. I tried on 3 different ESP8266s with two different Echo Dots running under different accounts, but the results are the same.
Debug Ouput:
Adding device 1
Adding device 2
Adding device 3
Adding device 4
Espalexa Begin...
MAXDEVICES 10
Done
Got UDP!
M-SEARCH * HTTP/1.1
HOST: <IP_ADDRESS>:1900
MAN: "ssdp:discover"
MX: 1
ST: urn:dial-multiscreen-org:service:dial:1

Got UDP!
M-SEARCH * HTTP/1.1
HOST: <IP_ADDRESS>:1900
MAN: "ssdp:discover"
MX: 1
ST: urn:dial-multiscreen-org:service:dial:1

Got UDP!
M-SEARCH * HTTP/1.1
HOST: <IP_ADDRESS>:1900
MAN: "ssdp:discover"
MX: 1
ST: urn:dial-multiscreen-org:service:dial:1

Got UDP!
M-SEARCH * HTTP/1.1
HOST: <IP_ADDRESS>:1900
MAN: "ssdp:discover"
MX: 1
ST: urn:dial-multiscreen-org:service:dial:1

Got UDP!
M-SEARCH * HTTP/1.1
HOST: <IP_ADDRESS>:1900
MAN: "ssdp:discover"
MX: 1
ST: urn:dial-multiscreen-org:service:dial:1

Got UDP!
M-SEARCH * HTTP/1.1
HOST: <IP_ADDRESS>:1900
MAN: "ssdp:discover"
MX: 1
ST: urn:dial-multiscreen-org:service:dial:1

Got UDP!
M-SEARCH * HTTP/1.1
HOST: <IP_ADDRESS>:1900
ST: ssdp:all
MAN: "ssdp:discover"
MX: 3

Responding search req...
Got UDP!
M-SEARCH * HTTP/1.1
HOST: <IP_ADDRESS>:1900
ST: upnp:rootdevice
MAN: "ssdp:discover"
MX: 3

Responding search req...
# Responding to description.xml ... #

Send setup.xml
<?xml version="1.0" ?><root xmlns="urn:schemas-upnp-org:device-1-0"><specVersion><major>1</major><minor>0</minor></specVersion><URLBase>http://<IP_ADDRESS>:80/</URLBase><device><deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType><friendlyName>Espalexa (<IP_ADDRESS>:80)</friendlyName><manufacturer>Royal Philips Electronics</manufacturer><manufacturerURL>http://www.philips.com</manufacturerURL><modelDescription>Philips hue Personal Wireless Lighting</modelDescription><modelName>Philips hue bridge 2012</modelName><modelNumber>929000226503</modelNumber><modelURL>http://www.meethue.com</modelURL><serialNumber>483fda401653</serialNumber><UDN>uuid:2f402f80-da50-11e1-9b23-483fda401653</UDN><presentationURL>index.html</presentationURL></device></root>

Please check if it can be fixed.
Thank you.

Hello,
Same here! The added ESPDEVICES are not discoverable anymore!  Please help to resolve the issue.
Thank you,

Hello,
Same here! The added ESPDEVICES are not discoverable anymore! Please help to resolve the issue.
Thank you,

After restarting my Router, Echo device and reset of board (Wemos) (in the sequence mentioned) the issue got resolved. :-)
Seems to be a temporary glitch!

After about an hour or two, with a restart of all the devices involved, i.e., router and ESP, it was discoverable. As @esrpradeep mentioned, seems to be a temp issue.


[Bug]: Bot throws exception if an external API call takes more than 24 seconds

Language
C#
Version
latest
Description
When making an external API call, the bot throws a TaskCanceledException if the call takes longer than 24 seconds.  Previous TeamsActivityHandler bots did not have this limitation--they would successfully process such requests.
The bot waits until the call is complete and then throws an exception.  For example, if the call takes 30 seconds, the bot will wait 30 seconds and then throw the exception.  If the call takes 60 seconds, the bot will wait 60 seconds and then throw the exception.
I've simulated this behaviour by creating a simple bot based on the Echo bot sample.  I changed the Activity handler to the code below and verified the behavior by modifying the delay value.

app.OnActivity(ActivityTypes.Message, async (turnContext, turnState, cancellationToken) =>
{
    var delay = 10;
    await turnContext.SendActivityAsync($"Starting wait for {delay} seconds", cancellationToken: cancellationToken);
    await Task.Delay(TimeSpan.FromSeconds(delay), cancellationToken);
    await turnContext.SendActivityAsync("Ending wait", cancellationToken: cancellationToken);
});

Reproduction Steps
1. Clone Echo bot sample
2. Change Activity Handler to sample in description
3. Set delay to 10
4. Send bot a message. Both start and end message will appear
5. Change the delay to 60
6. Send bot a message.  Start message will appear and 60 seconds later an error message will appear (TaskCanceledException thrown)

Hi there,
Any update on this issue?  Unfortunately it is preventing me from deploying the bot.

Same problem here.


[AssetServer] Remove 'new' keyword before Promise.race()

I'm not sure if this was actually breaking anything, but I don't think new before Promise.race() is conventional.

By analyzing the blame information on this pull request, we identified @bestander and @davidaurelio to be potential reviewers.

I'm confused how this was working earlier
$ node
> new Promise.race([])
TypeError: Promise.race is not a constructor

@facebook-github-bot shipit

Thanks for importing. If you are an FB employee go to Phabricator to review internal test results.