mirror of
https://github.com/googleforgames/open-match.git
synced 2025-03-25 13:24:18 +00:00
Remove index configuration (#862)
Part of moving to the new API proposal: #765
This commit is contained in:
@ -17,12 +17,6 @@ You may control the behavior of Open Match by overriding the configs in `install
|
||||
# 2. Configs under the subchart name - e.g. `open-match-test` only affects the settings in that subchart.
|
||||
# 3. Otherwise, the configs are for core components (templates in the parent chart) only.
|
||||
|
||||
# Setup Open Match with customized ticket indices
|
||||
ticketIndices:
|
||||
+ - myfirstindice
|
||||
+ - mysecondice
|
||||
+ - ...
|
||||
|
||||
# Overrides spec.type of a specific Kubernetes Service
|
||||
# Equivalent helm cli flag --set swaggerui.portType=LoadBalancer
|
||||
swaggerui:
|
||||
@ -72,4 +66,4 @@ open-match-customize:
|
||||
+ image: [YOUR_EVALUATOR_IMAGE_NAME]
|
||||
```
|
||||
|
||||
Please see [Helm - Chart Template Guide](https://helm.sh/docs/chart_template_guide/#the-chart-template-developer-s-guide "Chart Template Guide") for the advanced usages and our [Makefile](https://github.com/googleforgames/open-match/blob/master/Makefile#L358 "Makefile") for how we use the helm charts to deploy Open Match.
|
||||
Please see [Helm - Chart Template Guide](https://helm.sh/docs/chart_template_guide/#the-chart-template-developer-s-guide "Chart Template Guide") for the advanced usages and our [Makefile](https://github.com/googleforgames/open-match/blob/master/Makefile#L358 "Makefile") for how we use the helm charts to deploy Open Match.
|
||||
|
@ -97,9 +97,4 @@ data:
|
||||
ignoreLists:
|
||||
ttl: {{ .Values.redis.ignoreLists.ttl }}
|
||||
expiration: 43200
|
||||
|
||||
ticketIndices:
|
||||
{{- range .Values.ticketIndices }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -94,21 +94,6 @@ image:
|
||||
tag: 0.0.0-dev
|
||||
pullPolicy: Always
|
||||
|
||||
# Specifies the supported customizable indices per Match
|
||||
ticketIndices:
|
||||
- char
|
||||
- attribute.mmr
|
||||
- attribute.level
|
||||
- attribute.defense
|
||||
- mode.battleroyale
|
||||
- mode.ctf
|
||||
- mode.demo
|
||||
- region.europe-east1
|
||||
- region.europe-west1
|
||||
- region.europe-west2
|
||||
- region.europe-west3
|
||||
- region.europe-west4
|
||||
|
||||
# Specifies the location and name of the Open Match application-level config volumes.
|
||||
# Used in template: `openmatch.volumemounts.configs` and `openmatch.volumes.configs` under `templates/_helpers.tpl` file.
|
||||
configs:
|
||||
|
@ -262,7 +262,6 @@ func TestDoAssignTickets(t *testing.T) {
|
||||
t.Run(test.description, func(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(utilTesting.NewContext(t))
|
||||
cfg := viper.New()
|
||||
cfg.Set("ticketIndices", []string{fakeProperty})
|
||||
store, closer := statestoreTesting.NewStoreServiceForTesting(t, cfg)
|
||||
defer closer()
|
||||
|
||||
|
@ -34,7 +34,6 @@ import (
|
||||
|
||||
func TestDoCreateTickets(t *testing.T) {
|
||||
cfg := viper.New()
|
||||
cfg.Set("ticketIndices", []string{"test-property"})
|
||||
|
||||
tests := []struct {
|
||||
description string
|
||||
|
@ -134,7 +134,6 @@ func TestDoQueryTickets(t *testing.T) {
|
||||
t.Run(test.description, func(t *testing.T) {
|
||||
cfg := viper.New()
|
||||
cfg.Set("storage.page.size", 1000)
|
||||
cfg.Set("ticketIndices", []string{attribute1, attribute2})
|
||||
store, closer := statestoreTesting.NewStoreServiceForTesting(t, cfg)
|
||||
defer closer()
|
||||
|
||||
|
@ -281,7 +281,7 @@ func (rb *redisBackend) IndexTicket(ctx context.Context, ticket *pb.Ticket) erro
|
||||
}
|
||||
defer handleConnectionClose(&redisConn)
|
||||
|
||||
indexedFields := extractIndexedFields(rb.cfg, ticket)
|
||||
indexedFields := extractIndexedFields(ticket)
|
||||
|
||||
err = redisConn.Send("MULTI")
|
||||
if err != nil {
|
||||
|
@ -18,7 +18,6 @@ import (
|
||||
"math"
|
||||
"strings"
|
||||
|
||||
"open-match.dev/open-match/internal/config"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
@ -32,9 +31,7 @@ import (
|
||||
// Strings values are indexed by a unique attribute/value pair with value 0.
|
||||
// Filters are strings look up that attribute/value pair.
|
||||
|
||||
func extractIndexedFields(cfg config.View, t *pb.Ticket) map[string]float64 {
|
||||
// TODO: Remove cfg variable as part of removing indicies configuration.
|
||||
_ = cfg
|
||||
func extractIndexedFields(t *pb.Ticket) map[string]float64 {
|
||||
result := make(map[string]float64)
|
||||
|
||||
for arg, value := range t.GetSearchFields().GetDoubleArgs() {
|
||||
|
@ -18,7 +18,6 @@ import (
|
||||
"math"
|
||||
"testing"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
@ -71,9 +70,7 @@ func TestExtractIndexedFields(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.description, func(t *testing.T) {
|
||||
cfg := viper.New()
|
||||
|
||||
actual := extractIndexedFields(cfg, &pb.Ticket{SearchFields: test.searchFields})
|
||||
actual := extractIndexedFields(&pb.Ticket{SearchFields: test.searchFields})
|
||||
|
||||
assert.Equal(t, test.expectedValues, actual)
|
||||
})
|
||||
|
@ -390,7 +390,6 @@ func createRedis(t *testing.T) (config.View, func()) {
|
||||
cfg.Set("backoff.maxInterval", 300*time.Millisecond)
|
||||
cfg.Set("backoff.maxElapsedTime", 100*time.Millisecond)
|
||||
cfg.Set(telemetry.ConfigNameEnableMetrics, true)
|
||||
cfg.Set("ticketIndices", []string{"testindex1", "testindex2"})
|
||||
|
||||
return cfg, func() { mredis.Close() }
|
||||
}
|
||||
|
@ -16,10 +16,6 @@ package e2e
|
||||
|
||||
var (
|
||||
zygote OM
|
||||
|
||||
// Indices covers all ticketIndices that will be used in the e2e test
|
||||
// Please update the ticketIndices in the helm chart for in-cluster end-to-end test if you need to add new indices.
|
||||
Indices = []string{AttributeMMR, AttributeLevel, AttributeDefense, ModeDemo, Role}
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -125,8 +125,6 @@ func createMinimatchForTest(t *testing.T, evalTc *rpcTesting.TestContext) *rpcTe
|
||||
tc := rpcTesting.MustServeInsecure(t, func(p *rpc.ServerParams) {
|
||||
closer = statestoreTesting.New(t, cfg)
|
||||
cfg.Set("storage.page.size", 10)
|
||||
// Set up the attributes that a ticket will be indexed for.
|
||||
cfg.Set("ticketIndices", Indices)
|
||||
assert.Nil(t, minimatch.BindService(p, cfg))
|
||||
})
|
||||
// TODO: Revisit the Minimatch test setup in future milestone to simplify passing config
|
||||
|
Reference in New Issue
Block a user