Skip to content

Commit

Permalink
Revert UseCommonTable global flag (#960)
Browse files Browse the repository at this point in the history
I have to revert it temporarily as integration tests failing
https://github.com/QuesmaOrg/quesma/actions/runs/11719484324/job/32643244756
  • Loading branch information
pdelewski authored Nov 7, 2024
1 parent 67bbaed commit 686e2f5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
24 changes: 0 additions & 24 deletions quesma/quesma/config/config_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ type QuesmaNewConfiguration struct {
Processors []Processor `koanf:"processors"`
Pipelines []Pipeline `koanf:"pipelines"`
DisableTelemetry bool `koanf:"disableTelemetry"`
UseCommonTable bool `koanf:"useCommonTable"` // global setting
}

type LoggingConfiguration struct {
Expand Down Expand Up @@ -528,8 +527,6 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
conf.Logging.RemoteLogDrainUrl = nil
}

conf.CreateCommonTable = c.UseCommonTable

conf.InstallationId = c.InstallationId
conf.LicenseKey = c.LicenseKey

Expand Down Expand Up @@ -568,10 +565,6 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
if val, exists := target.properties["useCommonTable"]; exists {
conf.CreateCommonTable = val == "true"
conf.UseCommonTableForWildcard = val == "true"
} else {
// inherit global setting
conf.CreateCommonTable = c.UseCommonTable
conf.UseCommonTableForWildcard = c.UseCommonTable
}
}

Expand Down Expand Up @@ -607,9 +600,6 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
}
if val, exists := target.properties["useCommonTable"]; exists {
processedConfig.UseCommonTable = val == "true"
} else {
// inherit global setting
processedConfig.UseCommonTable = c.UseCommonTable
}
if val, exists := target.properties["tableName"]; exists {
processedConfig.Override = val.(string)
Expand Down Expand Up @@ -670,10 +660,6 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
if val, exists := target.properties["useCommonTable"]; exists {
conf.CreateCommonTable = val == "true"
conf.UseCommonTableForWildcard = val == "true"
} else {
// inherit global setting
conf.CreateCommonTable = c.UseCommonTable
conf.UseCommonTableForWildcard = c.UseCommonTable
}
}
if defaultConfig.SchemaOverrides != nil {
Expand All @@ -700,10 +686,6 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
if val, exists := target.properties["useCommonTable"]; exists {
conf.CreateCommonTable = val == "true"
conf.UseCommonTableForWildcard = val == "true"
} else {
// inherit global setting
conf.CreateCommonTable = c.UseCommonTable
conf.UseCommonTableForWildcard = c.UseCommonTable
}
}
if ingestProcessorDefaultIndexConfig.SchemaOverrides != nil {
Expand Down Expand Up @@ -748,9 +730,6 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
}
if val, exists := target.properties["useCommonTable"]; exists {
processedConfig.UseCommonTable = val == true
} else {
// inherit global setting
processedConfig.UseCommonTable = c.UseCommonTable
}
if val, exists := target.properties["tableName"]; exists {
processedConfig.Override = val.(string)
Expand Down Expand Up @@ -800,9 +779,6 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
}
if val, exists := target.properties["useCommonTable"]; exists {
processedConfig.UseCommonTable = val == true
} else {
// inherit global setting
processedConfig.UseCommonTable = c.UseCommonTable
}
if val, exists := target.properties["tableName"]; exists {
processedConfig.Override = val.(string)
Expand Down
1 change: 1 addition & 0 deletions quesma/quesma/config/config_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ func TestTargetNewVariant(t *testing.T) {
}

func TestUseCommonTableGlobalProperty(t *testing.T) {
t.Skip()
os.Setenv(configFileLocationEnvVar, "./test_configs/use_common_table_global_property.yaml")
cfg := LoadV2Config()
if err := cfg.Validate(); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion quesma/quesma/config/test_configs/has_common_table.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ pipelines:
- name: my-elasticsearch-proxy-write
frontendConnectors: [ elastic-ingest ]
processors: [ IP ]
backendConnectors: [ E, C ]
backendConnectors: [ E, C ]

0 comments on commit 686e2f5

Please sign in to comment.