profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/vmg/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Vicent Martí vmg @planetscale Madrid http://twitter.com/vmg Working on perf @planetscale. Previously: Principal Systems Engineer @github (this website, yo).

vitessio/vitess 12542

Vitess is a database clustering system for horizontal scaling of MySQL.

commonmark/commonmark-spec 4449

CommonMark spec, with reference implementations in C and JavaScript

gjtorikian/html-pipeline 2143

HTML processing filters and utilities

brianmario/charlock_holmes 938

Character encoding detection, brought to you by ICU

pygments/pygments.rb 554

💎 Ruby wrapper for Pygments syntax highlighter

brianmario/escape_utils 522

Faster string escaping routines for your ruby apps

arthurnn/memcached 427

A Ruby interface to the libmemcached C client

planetscale/vtprotobuf 324

A Protocol Buffers compiler that generates optimized marshaling & unmarshaling Go code for ProtoBuf APIv2

clar-test/clar 192

What tests are made of.

brianmario/utf8 33

A lightweight UTF8-aware String class meant for use with Ruby 1.8.x

create barnchvmg/go

branch : maxheap-1.17

created branch time in 2 hours

fork vmg/go

The Go programming language

https://golang.org

fork in 3 hours

PullRequestReviewEvent

Pull request review commentvitessio/vitess

gateway: use keyspace events when buffering requests

 func (gw *TabletGateway) withRetry(ctx context.Context, target *querypb.Target, 				defer retryDone() 				bufferedOnce = true 			}++			if bufferErr != nil {+				err = vterrors.Wrapf(bufferErr,+					"failed to automatically buffer and retry failed request during failover. original err (type=%T): %v",+					err, err)+				break+			} 		}  		tablets := gw.hc.GetHealthyTabletStats(target) 		if len(tablets) == 0 {+			// if we have a keyspace event watcher, check if the reason why our primary is not available is that it's currently being resharded+			if target.TabletType == topodatapb.TabletType_PRIMARY && gw.kev != nil && gw.kev.TargetIsBeingResharded(target.Keyspace, target.Shard) {+				err = vterrors.Errorf(vtrpcpb.Code_CLUSTER_EVENT, "current keyspace is being resharded")+				continue+			}

This is correct. What is stored in memory is a watcher-struct which is shared between all the requests to the same target (i.e. shard + keyspace), and the individual requests for the target become individually blocked on their corresponding goroutines until the buffering has finished.

vmg

comment created time in 21 hours

Pull request review commentvitessio/vitess

gateway: use keyspace events when buffering requests

+/*+Copyright 2021 The Vitess Authors.++Licensed under the Apache License, Version 2.0 (the "License");+you may not use this file except in compliance with the License.+You may obtain a copy of the License at++    http://www.apache.org/licenses/LICENSE-2.0++Unless required by applicable law or agreed to in writing, software+distributed under the License is distributed on an "AS IS" BASIS,+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+See the License for the specific language governing permissions and+limitations under the License.+*/++package discovery++import (+	"context"+	"fmt"+	"sync"+	"time"++	"google.golang.org/protobuf/proto"++	"vitess.io/vitess/go/vt/log"+	"vitess.io/vitess/go/vt/proto/query"+	topodatapb "vitess.io/vitess/go/vt/proto/topodata"+	"vitess.io/vitess/go/vt/srvtopo"+	"vitess.io/vitess/go/vt/topo"+	"vitess.io/vitess/go/vt/topo/topoproto"+)++type KeyspaceEventWatcher struct {+	ts        srvtopo.Server+	hc        HealthCheck+	localCell string++	mu        sync.Mutex+	keyspaces map[string]*keyspaceState++	subsMu sync.Mutex+	subs   map[chan *KeyspaceEvent]struct{}+}++type KeyspaceEvent struct {+	Cell     string+	Keyspace string+	Shards   []ShardEvent+}++type ShardEvent struct {+	Tablet  *topodatapb.TabletAlias+	Target  *query.Target+	Serving bool+}++func NewKeyspaceEventWatcher(ctx context.Context, topoServer srvtopo.Server, hc HealthCheck, localCell string) *KeyspaceEventWatcher {+	kew := &KeyspaceEventWatcher{+		hc:        hc,+		ts:        topoServer,+		localCell: localCell,+		keyspaces: make(map[string]*keyspaceState),+		subs:      make(map[chan *KeyspaceEvent]struct{}),+	}+	kew.run(ctx)+	log.Infof("started watching keyspace events in %q", localCell)+	return kew+}++type keyspaceState struct {+	kew      *KeyspaceEventWatcher+	keyspace string++	mu         sync.Mutex+	deleted    bool+	consistent bool++	lastError    error+	lastKeyspace *topodatapb.SrvKeyspace+	shards       map[string]*shardState+}++func (kss *keyspaceState) Format(f fmt.State, verb rune) {+	kss.mu.Lock()+	defer kss.mu.Unlock()++	fmt.Fprintf(f, "Keyspace(%s) = deleted: %v, consistent: %v, shards: [\n", kss.keyspace, kss.deleted, kss.consistent)+	for shard, ss := range kss.shards {+		fmt.Fprintf(f, "  Shard(%s) = target: [%s/%s %v], serving: %v, externally_reparented: %d, current_primary: %s\n",+			shard,+			ss.target.Keyspace, ss.target.Shard, ss.target.TabletType,+			ss.serving, ss.externallyReparented,+			ss.currentPrimary.String(),+		)+	}+	fmt.Fprintf(f, "]\n")+}++func (kss *keyspaceState) beingResharded(currentShard string) bool {+	kss.mu.Lock()+	defer kss.mu.Unlock()++	if kss.deleted || kss.consistent {+		return false+	}++	for shard, sstate := range kss.shards {+		if shard != currentShard && sstate.serving {+			return true+		}+	}++	return false+}++type shardState struct {+	target               *query.Target+	serving              bool+	externallyReparented int64+	currentPrimary       *topodatapb.TabletAlias+}++func (kew *KeyspaceEventWatcher) Subscribe() chan *KeyspaceEvent {+	kew.subsMu.Lock()+	defer kew.subsMu.Unlock()+	c := make(chan *KeyspaceEvent, 2)+	kew.subs[c] = struct{}{}+	return c+}++// Unsubscribe removes a listener.+func (kew *KeyspaceEventWatcher) Unsubscribe(c chan *KeyspaceEvent) {+	kew.subsMu.Lock()+	defer kew.subsMu.Unlock()+	delete(kew.subs, c)+}++func (kew *KeyspaceEventWatcher) broadcast(th *KeyspaceEvent) {+	kew.subsMu.Lock()+	defer kew.subsMu.Unlock()+	for c := range kew.subs {+		select {+		case c <- th:+		default:+		}+	}+}++func (kew *KeyspaceEventWatcher) run(ctx context.Context) {+	hcChan := kew.hc.Subscribe()+	bufferCtx, bufferCancel := context.WithCancel(ctx)++	go func() {+		defer bufferCancel()++		for {+			select {+			case <-bufferCtx.Done():+				return+			case result := <-hcChan:+				if result == nil {+					return+				}+				kew.processHealthCheck(result)+			}+		}+	}()++	go func() {+		defer bufferCancel()++		tick := time.NewTicker(5 * time.Second)+		defer tick.Stop()++		for {+			select {+			case <-bufferCtx.Done():+				return+			case <-tick.C:+				keyspaces, err := kew.ts.GetSrvKeyspaceNames(ctx, kew.localCell, true)+				if err != nil {+					log.Errorf("CEM: initialize failed cell %q: %v", kew.localCell, err)+					continue+				}+				for _, ks := range keyspaces {+					kew.getKeyspaceStatus(ks)+				}+			}+		}+	}()+}++func (kss *keyspaceState) ensureConsistentLocked() {+	if kss.consistent {+		return+	}++	primary := topoproto.SrvKeyspaceGetPartition(kss.lastKeyspace, topodatapb.TabletType_PRIMARY)+	if primary == nil || len(primary.ShardTabletControls) > 0 {+		return+	}++	activeShardsInPartition := make(map[string]bool)+	for _, shard := range primary.ShardReferences {+		sstate := kss.shards[shard.Name]+		if sstate == nil || !sstate.serving {

I've documented this behavior in #8890 -- it explains all the different consistency checks.

vmg

comment created time in 21 hours

PullRequestReviewEvent

Pull request review commentvitessio/vitess

gateway: use keyspace events when buffering requests

 func (b *Buffer) ProcessPrimaryHealth(th *discovery.TabletHealth) { 	sb.recordExternallyReparentedTimestamp(timestamp, th.Tablet.Alias) } +func (b *Buffer) HandleKeyspaceEvent(ksevent *discovery.KeyspaceEvent) {+	for _, shard := range ksevent.Shards {+		sb := b.getOrCreateBuffer(shard.Target.Keyspace, shard.Target.Shard)+		if sb != nil {+			sb.recordKeyspaceEvent(shard.Tablet, shard.Serving)

...In retrospect, this function could use a different name since CLUSTER_EVENT can also be caused by a resharding operation. :sweat_smile:

vmg

comment created time in 21 hours

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentvitessio/vitess

gateway: use keyspace events when buffering requests

 func (b *Buffer) ProcessPrimaryHealth(th *discovery.TabletHealth) { 	sb.recordExternallyReparentedTimestamp(timestamp, th.Tablet.Alias) } +func (b *Buffer) HandleKeyspaceEvent(ksevent *discovery.KeyspaceEvent) {+	for _, shard := range ksevent.Shards {+		sb := b.getOrCreateBuffer(shard.Target.Keyspace, shard.Target.Shard)+		if sb != nil {+			sb.recordKeyspaceEvent(shard.Tablet, shard.Serving)

The error handling on the tablet was wired up by @harshit-gangal, so I don't know all the details, but the actual buffering code is triggered with this check, so the only relevant error code when it comes to buffering is CLUSTER_EVENT:

https://github.com/vitessio/vitess/blob/ca5a27ed5aacbb523d678d910cda8d5571e653f0/go/vt/vtgate/buffer/buffer.go#L72-L75

vmg

comment created time in 21 hours

pull request commentplanetscale/vtprotobuf

Add support for pools for oneof fields

Yeah for sure, sorry about that missing functionality, we just don't have any oneof fields in Vitess. If you can write some tests for this I'll definitely merge. :+1:

maticz

comment created time in a day

PR opened vitessio/vitess

discovery: document KeyspaceEventWatcher Type: Documentation Component: Cluster management

Description

While I answering questions by @sonne5 in https://github.com/vitessio/vitess/pull/8700, I noticed the code is not clear enough to be merged without comments. I described the consolidation algorithm in this PR with more detail.

Related Issue(s)

  • https://github.com/vitessio/vitess/pull/8700

Checklist

  • [ ] Should this PR be backported?
  • [x] Tests were added or are not required
  • [x] Documentation was added or is not required

Deployment Notes

<!-- Notes regarding deployment of the contained body of work. These should note any db migrations, etc. -->

+106 -27

0 comment

2 changed files

pr created time in a day

create barnchvmg/vitess

branch : vmg/ksevent-doc

created branch time in a day

Pull request review commentvitessio/vitess

gateway: use keyspace events when buffering requests

+/*+Copyright 2021 The Vitess Authors.++Licensed under the Apache License, Version 2.0 (the "License");+you may not use this file except in compliance with the License.+You may obtain a copy of the License at++    http://www.apache.org/licenses/LICENSE-2.0++Unless required by applicable law or agreed to in writing, software+distributed under the License is distributed on an "AS IS" BASIS,+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+See the License for the specific language governing permissions and+limitations under the License.+*/++package discovery++import (+	"context"+	"fmt"+	"sync"+	"time"++	"google.golang.org/protobuf/proto"++	"vitess.io/vitess/go/vt/log"+	"vitess.io/vitess/go/vt/proto/query"+	topodatapb "vitess.io/vitess/go/vt/proto/topodata"+	"vitess.io/vitess/go/vt/srvtopo"+	"vitess.io/vitess/go/vt/topo"+	"vitess.io/vitess/go/vt/topo/topoproto"+)++type KeyspaceEventWatcher struct {+	ts        srvtopo.Server+	hc        HealthCheck+	localCell string++	mu        sync.Mutex+	keyspaces map[string]*keyspaceState++	subsMu sync.Mutex+	subs   map[chan *KeyspaceEvent]struct{}+}++type KeyspaceEvent struct {+	Cell     string+	Keyspace string+	Shards   []ShardEvent+}++type ShardEvent struct {+	Tablet  *topodatapb.TabletAlias+	Target  *query.Target+	Serving bool+}++func NewKeyspaceEventWatcher(ctx context.Context, topoServer srvtopo.Server, hc HealthCheck, localCell string) *KeyspaceEventWatcher {+	kew := &KeyspaceEventWatcher{+		hc:        hc,+		ts:        topoServer,+		localCell: localCell,+		keyspaces: make(map[string]*keyspaceState),+		subs:      make(map[chan *KeyspaceEvent]struct{}),+	}+	kew.run(ctx)+	log.Infof("started watching keyspace events in %q", localCell)+	return kew+}++type keyspaceState struct {+	kew      *KeyspaceEventWatcher+	keyspace string++	mu         sync.Mutex+	deleted    bool+	consistent bool++	lastError    error+	lastKeyspace *topodatapb.SrvKeyspace+	shards       map[string]*shardState+}++func (kss *keyspaceState) Format(f fmt.State, verb rune) {+	kss.mu.Lock()+	defer kss.mu.Unlock()++	fmt.Fprintf(f, "Keyspace(%s) = deleted: %v, consistent: %v, shards: [\n", kss.keyspace, kss.deleted, kss.consistent)+	for shard, ss := range kss.shards {+		fmt.Fprintf(f, "  Shard(%s) = target: [%s/%s %v], serving: %v, externally_reparented: %d, current_primary: %s\n",+			shard,+			ss.target.Keyspace, ss.target.Shard, ss.target.TabletType,+			ss.serving, ss.externallyReparented,+			ss.currentPrimary.String(),+		)+	}+	fmt.Fprintf(f, "]\n")+}++func (kss *keyspaceState) beingResharded(currentShard string) bool {+	kss.mu.Lock()+	defer kss.mu.Unlock()++	if kss.deleted || kss.consistent {+		return false+	}++	for shard, sstate := range kss.shards {+		if shard != currentShard && sstate.serving {+			return true+		}+	}++	return false+}++type shardState struct {+	target               *query.Target+	serving              bool+	externallyReparented int64+	currentPrimary       *topodatapb.TabletAlias+}++func (kew *KeyspaceEventWatcher) Subscribe() chan *KeyspaceEvent {+	kew.subsMu.Lock()+	defer kew.subsMu.Unlock()+	c := make(chan *KeyspaceEvent, 2)+	kew.subs[c] = struct{}{}+	return c+}++// Unsubscribe removes a listener.+func (kew *KeyspaceEventWatcher) Unsubscribe(c chan *KeyspaceEvent) {+	kew.subsMu.Lock()+	defer kew.subsMu.Unlock()+	delete(kew.subs, c)+}++func (kew *KeyspaceEventWatcher) broadcast(th *KeyspaceEvent) {+	kew.subsMu.Lock()+	defer kew.subsMu.Unlock()+	for c := range kew.subs {+		select {+		case c <- th:+		default:+		}+	}+}++func (kew *KeyspaceEventWatcher) run(ctx context.Context) {+	hcChan := kew.hc.Subscribe()+	bufferCtx, bufferCancel := context.WithCancel(ctx)++	go func() {+		defer bufferCancel()++		for {+			select {+			case <-bufferCtx.Done():+				return+			case result := <-hcChan:+				if result == nil {+					return+				}+				kew.processHealthCheck(result)+			}+		}+	}()++	go func() {+		defer bufferCancel()++		tick := time.NewTicker(5 * time.Second)+		defer tick.Stop()++		for {+			select {+			case <-bufferCtx.Done():+				return+			case <-tick.C:+				keyspaces, err := kew.ts.GetSrvKeyspaceNames(ctx, kew.localCell, true)+				if err != nil {+					log.Errorf("CEM: initialize failed cell %q: %v", kew.localCell, err)+					continue+				}+				for _, ks := range keyspaces {+					kew.getKeyspaceStatus(ks)+				}+			}+		}+	}()+}++func (kss *keyspaceState) ensureConsistentLocked() {+	if kss.consistent {+		return+	}++	primary := topoproto.SrvKeyspaceGetPartition(kss.lastKeyspace, topodatapb.TabletType_PRIMARY)+	if primary == nil || len(primary.ShardTabletControls) > 0 {+		return+	}++	activeShardsInPartition := make(map[string]bool)+	for _, shard := range primary.ShardReferences {+		sstate := kss.shards[shard.Name]+		if sstate == nil || !sstate.serving {+			return+		}+		activeShardsInPartition[shard.Name] = true+	}++	for shard, sstate := range kss.shards {+		if sstate.serving && !activeShardsInPartition[shard] {

That's not accurate: the first check in line 209 is iterating through all the shards that the topology service knows and making sure we already know about them and that we know them to be healthy. This second loop is iterating through all the shards that we know about, to make sure there are no healthy shards that we know about but the topology service doesn't.

vmg

comment created time in a day

PullRequestReviewEvent

Pull request review commentvitessio/vitess

gateway: use keyspace events when buffering requests

 func (b *Buffer) ProcessPrimaryHealth(th *discovery.TabletHealth) { 	sb.recordExternallyReparentedTimestamp(timestamp, th.Tablet.Alias) } +func (b *Buffer) HandleKeyspaceEvent(ksevent *discovery.KeyspaceEvent) {+	for _, shard := range ksevent.Shards {+		sb := b.getOrCreateBuffer(shard.Target.Keyspace, shard.Target.Shard)+		if sb != nil {+			sb.recordKeyspaceEvent(shard.Tablet, shard.Serving)

We actually don't trigger any buffering operations when we receive the healcheck fail for a primary! That's because these healthchecks are processed by the topology engine, which often lags behind the actual availability issue. Instead, what we do it start buffering once the vtgate itself fails to reach the primary (i.e. when we get an error return during a request), and the Keyspace Events handler is designed to detect when the availability incident is over cluster-wide.

vmg

comment created time in a day

PullRequestReviewEvent

push eventvmg/vitess

Vicent Marti

commit sha ce1d668b7f0898695f8c3b42a81da4475a79637b

utf16: implement decomposition Signed-off-by: Vicent Marti <vmg@strn.cat>

view details

push time in 4 days

push eventvmg/vitess

Vicent Marti

commit sha 05ef122dcc1f2a7afdc0603fb983074f8e4d868c

strings: fix uca collate Signed-off-by: Vicent Marti <vmg@strn.cat>

view details

Lakshya Singh

commit sha 883a3a9ffb75a67a90eb949c4509e7acf9e6d7c6

fix: parse xml maps properly xml parser parses each character even spaces and newlines we only need the integers so we take them in as string and then parse it down to []byte or []uint as required Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>

view details

Vicent Marti

commit sha ec5c27d97ce8394d2692101f6d8cc29d85f2c5e1

strings: simplify table parsing in makemysqlextra Signed-off-by: Vicent Marti <vmg@strn.cat>

view details

push time in 4 days

push eventvmg/vitess

Vicent Marti

commit sha 60b46f7f487fe66157f58945aa2ada2667213b4c

strings: implement collation handlers for extra Signed-off-by: Vicent Marti <vmg@strn.cat>

view details

Vicent Marti

commit sha 40e28fe504bb5e3dc12cb2c5c9f6ab594f6d30ec

strings: make mysqlextra output stable Signed-off-by: Vicent Marti <vmg@strn.cat>

view details

push time in 5 days

push eventvmg/vitess

Vicent Marti

commit sha bb873cf36d3ea1bd3da2afe92dd1119b986759b3

strings: reduce surface in charsetinfo Signed-off-by: Vicent Marti <vmg@strn.cat>

view details

push time in 5 days

push eventvmg/vitess

Vicent Marti

commit sha c2cf5ba7073a94e4f1448a4943bdc95b896a3ac9

uca: bugfixes Signed-off-by: Vicent Marti <vmg@strn.cat>

view details

Lakshya Singh

commit sha 601693a586a3c5197f53d2aa9997cac171304e37

feat: conf to src parsing implement proper parsing using map and xml structs methods implemented on structs to keep it modular Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>

view details

Lakshya Singh

commit sha 37396370f03116d724488bafe43d51248bb0ed76

feat: printing file properly add in tabs and spaces for organized printing go structs need names so add them instead of comments Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>

view details

Vicent Marti

commit sha 971e128cd071ed40e41b0ce1604b3dc305b4da06

strings: integrate king-11's extra parser Signed-off-by: Vicent Marti <vmg@strn.cat>

view details

push time in 5 days

startedhehonghui/the-economist-ebooks

started time in 5 days

push eventvmg/vitess

Vicent Marti

commit sha b31daff67114733eca1309f12ae47d6483487812

uca: implement more weight strings Signed-off-by: Vicent Marti <vmg@strn.cat>

view details

push time in 6 days

push eventvmg/vitess

Manuel Fontan

commit sha 42afcdf4531df7f69b4784efe7d54f27329f781a

Add new dashboards, Add recording rules, Update dashboard folder structure, Add e2e falpha code for local and automated testing, Add go.mod, Update scripts Signed-off-by: Manuel Fontan <mfontangarcia@slack-corp.com>

view details

Manuel Fontan

commit sha 0b6360dfada8c8bf7191f45ef15b10d4bf2ea046

Merge remote-tracking branch 'upstream/master' into manfontan-vitess-mixin-update Signed-off-by: Manuel Fontan <mfontangarcia@slack-corp.com>

view details

Manuel Fontan

commit sha 2f8d9daf81d438139ef5f080b87337d5a439c991

Remove region filter, Update README.mc, Fix minor bug in make tools target Signed-off-by: Manuel Fontan <mfontangarcia@slack-corp.com>

view details

Manuel Fontan

commit sha bb62e15902162f5774ed8389ab62e8e6639f291d

Update e2e tests > remove Region template assertions Signed-off-by: Manuel Fontan <mfontangarcia@slack-corp.com>

view details

Manuel Fontan

commit sha 628ee0ba6ecb9fe5897d792d8875a45accff1ec9

Update Docs > fix typos Signed-off-by: Manuel Fontan <mfontangarcia@slack-corp.com>

view details

Manuel Fontan

commit sha ff1af0c37b12d11d969a877e84ef25cd0656669f

Add make targets for testing with compose. Remove references to Slack custom keyspace/shard prometheus labels" Signed-off-by: Manuel Fontan <mfontangarcia@slack-corp.com>

view details

Manuel Fontan

commit sha 0f57d33829dd3c0f10e40ae46227a41d177260c0

Update recording rules names Signed-off-by: Manuel Fontan <mfontangarcia@slack-corp.com>

view details

Manuel Fontan

commit sha 526956453c4211fd4b7bf166a91fff911071a6ed

Cleanup: - remove references to deprecated keyspace_overview dashboard - update cypress dashboard specs - update vitess-mixin-quickstart.md Signed-off-by: Manuel Fontan <mfontangarcia@slack-corp.com>

view details

Jacques Grove

commit sha 0a247a41e65d078c7b3e0d11c947835ffa97f6e7

Add optional query annotations, i.e. prefix SQL comments indicating the vtgate username and tablet type a query was sent to. Helpful for auditing and log analysis happening on the MySQL level. Signed-off-by: Jacques Grove <aquarapid@gmail.com>

view details

Florent Poinsard

commit sha 660c096ada9bd59bdb7fd06f710c48a0b5bfa12c

Analyze colName depending on unexpended star expressions Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha da5bbd11f382346b8b4584da9fdff788d54e7a5b

Better DepsFor function with select star Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha 2ede5aadc0e143520726a1b1df3f0e158a130adb

Plan test with star expression on information schema Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha 7b0e75e7568099328101a22fbadbe35c14b035a7

Enhance the push predicates for derivedTree Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha 1c34641af191cf7cf9b1ca3fc0762d2e94e2561e

go-simple tweak Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha fdb47f1aba4c973061a913281531c681d49d906d

Merge remote-tracking branch 'upstream/main' into gen4-improve-expend-star Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha 4c3cfc4129d7c863738ae50250fb6ec3da2152f4

Push proper extra cols when joining a derived tree Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha 13279068a7a7b8784c858fe6f50088e43fff985d

Removed extra joinColumnIndexes values from joinTree Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha b81b92828ca763a8cbbe0e33ba08657e0111b215

Improved derivedTree's pushOutputColumns method with proper analysis of already existing cols Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Yang Wu

commit sha 16575c0e6a7463293c871cbdabb1b64f80698db0

add isActive flag to vtgr Signed-off-by: Yang Wu <y.wu4515@gmail.com>

view details

Yang Wu

commit sha ca667eea88038d012620d842a9a304a8ef1885bb

Redo some inclusive renamings Signed-off-by: Yang Wu <y.wu4515@gmail.com>

view details

push time in 7 days

push eventvitessio/vitess

Florent Poinsard

commit sha 7b484e7b9dc34401d8bdd04db260ed8ecadb9e68

Applying goimports before checking sizegen to reduce import-related errors Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha 43124d09ed4b7072ff2526a0a5cffff275d3f906

Apply goimports Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha 589b1d076e94b68cbae168419707105b67b11bb2

Apply goimport in TestFullGeneration while comparing jennifer and local files Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha b7c668ff08ca6eae3f56c32ec5511e3f08671861

go get goimports in CI workflows Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha 15b766ce3a97ebbe03cd32382c0ac5395d5718a4

Test install goimports in CI dockerfile Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha a5443e89ecbea72a582f4122c0908541a3403498

go install instead of go get for goimports in CI Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha b8630c5831332d7a5443a143aad056b37b7cd739

Addition of a check imports CI workflow to run and compare goimports output Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha 528d66ff97a21aab2f508abad49bb70bdcd6b1f7

New way of installing goimports in CI Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha f428a273b59caff0753c6b351ea9d311711e4032

Upgrade actions/setup-go from v1 to v2 to enable go install within CI Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha 4dc32005c6c89133fcd00528be621b09f90f73c6

Upgraded sizegen to run goimports in every situation and removed unrequired package from E2E ci tests Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Florent Poinsard

commit sha 247a4f01f503aab1a415248cdbc74c700de28818

Trigger format and goimports check on every push Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>

view details

Vicent Martí

commit sha 51c6c54628b818ba1c9ddaaba94fbd7782287670

Merge pull request #8828 from planetscale/fix-make-sizegen Apply goimports before checking make sizegen

view details

push time in 11 days

delete branch planetscale/vitess

delete branch : fix-make-sizegen

delete time in 11 days

PR merged vitessio/vitess

Reviewers
Apply goimports before checking make sizegen Component: Build/CI Type: CI/Build

Description

After having issues with check_make_sizegen due to a difference between the source file (on which goimports was applied) and the file generated by Jennifer in the import statement, CI builds started failing in this pull request with the following error:

--- FAIL: TestFullGeneration (1.66s)
    sizegen_test.go:31: 
        	Error Trace:	sizegen_test.go:31
        	Error:      	Should be empty, but was ['/home/runner/work/vitess/vitess/go/tools/sizegen/integration/cached_size.go' has changed]
        	Test:       	TestFullGeneration

To alleviate this issue, this pull request changes how the TestFullGeneration test compares the local and generated files. After Jennifer has generated the file, we write its content to a temporary file, execute goimports on it, and finally, we run the comparison between the local and generated files. This ensures that we compare local files against goimports'ed files. And to make sure our local files are always goimports'ed, this pull request adds a new workflow (check_imports) that fails if a file is not goimports'ed.

Adding this new workflow requires the installation of goimports, to do that, it was necessary to upgrade setup-go action from v1 to v2 as explained in this issue: https://github.com/actions/setup-go/issues/27.

Related Issue(s)

Checklist

  • [x] Tests were added or are not required
  • [x] Documentation was added or is not required
+173 -87

0 comment

85 changed files

frouioui

pr closed time in 11 days

PullRequestReviewEvent

push eventvmg/vitess

Vicent Marti

commit sha 38c6de1ca584bd0f6d89275e7ae641381dff917a

strings: more latin1 and simple implementations Signed-off-by: Vicent Marti <vmg@strn.cat>

view details

push time in 13 days