elasticgraph-datastore_core 0.18.0.3 → 0.18.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/elastic_graph/datastore_core/config.rb +2 -2
- data/lib/elastic_graph/datastore_core/configuration/client_faraday_adapter.rb +1 -1
- data/lib/elastic_graph/datastore_core/configuration/cluster_definition.rb +3 -3
- data/lib/elastic_graph/datastore_core/configuration/index_definition.rb +4 -4
- data/lib/elastic_graph/datastore_core/index_definition/base.rb +3 -3
- data/lib/elastic_graph/datastore_core/index_definition/rollover_index_template.rb +3 -3
- data/lib/elastic_graph/datastore_core/index_definition.rb +2 -2
- metadata +16 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15d37c38b8e9b42f2366492db37c097b2f2f65e3eaf7ddaab35d4f1cb524737b
|
4
|
+
data.tar.gz: 12eb3ed31d636264b9f8e0d63cc1d54f7b1b4ce8403ab7548a740b81ae7d5d76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d5cc0811acde64f9380ea4a7b05da5a0110d240cbb816ab6180bb9d41135d2b0b66c8aa9d7f514b6cff723190f49aab3602cc80cbe7815bbe9feb6a4af92590
|
7
|
+
data.tar.gz: 130851f1e929a3b8dedd2b03c5525bc58ec14751a3249475817e0a0dd37bb13210aa7dcc7da18232c6bc3eb7660b13de3f96717c5af530aff499536c137778d5
|
@@ -9,7 +9,7 @@
|
|
9
9
|
require "elastic_graph/datastore_core/configuration/client_faraday_adapter"
|
10
10
|
require "elastic_graph/datastore_core/configuration/cluster_definition"
|
11
11
|
require "elastic_graph/datastore_core/configuration/index_definition"
|
12
|
-
require "elastic_graph/
|
12
|
+
require "elastic_graph/errors"
|
13
13
|
|
14
14
|
module ElasticGraph
|
15
15
|
class DatastoreCore
|
@@ -40,7 +40,7 @@ module ElasticGraph
|
|
40
40
|
extra_keys = parsed_yaml.keys - EXPECTED_KEYS
|
41
41
|
|
42
42
|
unless extra_keys.empty?
|
43
|
-
raise ConfigError, "Unknown `datastore` config settings: #{extra_keys.join(", ")}"
|
43
|
+
raise Errors::ConfigError, "Unknown `datastore` config settings: #{extra_keys.join(", ")}"
|
44
44
|
end
|
45
45
|
|
46
46
|
new(
|
@@ -22,7 +22,7 @@ module ElasticGraph
|
|
22
22
|
extra_keys = parsed_yaml.keys - EXPECTED_KEYS
|
23
23
|
|
24
24
|
unless extra_keys.empty?
|
25
|
-
raise ConfigError, "Unknown `datastore.client_faraday_adapter` config settings: #{extra_keys.join(", ")}"
|
25
|
+
raise Errors::ConfigError, "Unknown `datastore.client_faraday_adapter` config settings: #{extra_keys.join(", ")}"
|
26
26
|
end
|
27
27
|
|
28
28
|
new(
|
@@ -6,7 +6,7 @@
|
|
6
6
|
#
|
7
7
|
# frozen_string_literal: true
|
8
8
|
|
9
|
-
require "elastic_graph/
|
9
|
+
require "elastic_graph/errors"
|
10
10
|
|
11
11
|
module ElasticGraph
|
12
12
|
class DatastoreCore
|
@@ -16,7 +16,7 @@ module ElasticGraph
|
|
16
16
|
extra_keys = hash.keys - EXPECTED_KEYS
|
17
17
|
|
18
18
|
unless extra_keys.empty?
|
19
|
-
raise ConfigError, "Unknown `datastore.clusters` config settings: #{extra_keys.join(", ")}"
|
19
|
+
raise Errors::ConfigError, "Unknown `datastore.clusters` config settings: #{extra_keys.join(", ")}"
|
20
20
|
end
|
21
21
|
|
22
22
|
backend_name = hash["backend"]
|
@@ -29,7 +29,7 @@ module ElasticGraph
|
|
29
29
|
require "elastic_graph/opensearch/client"
|
30
30
|
OpenSearch::Client
|
31
31
|
else
|
32
|
-
raise ConfigError, "Unknown `datastore.clusters` backend: `#{backend_name}`. Valid backends are `elasticsearch` and `opensearch`."
|
32
|
+
raise Errors::ConfigError, "Unknown `datastore.clusters` backend: `#{backend_name}`. Valid backends are `elasticsearch` and `opensearch`."
|
33
33
|
end
|
34
34
|
|
35
35
|
new(
|
@@ -7,7 +7,7 @@
|
|
7
7
|
# frozen_string_literal: true
|
8
8
|
|
9
9
|
require "elastic_graph/support/time_set"
|
10
|
-
require "elastic_graph/
|
10
|
+
require "elastic_graph/errors"
|
11
11
|
require "time"
|
12
12
|
|
13
13
|
module ElasticGraph
|
@@ -50,7 +50,7 @@ module ElasticGraph
|
|
50
50
|
s1.intersect?(s2)
|
51
51
|
end
|
52
52
|
|
53
|
-
raise ConfigError, "Your configured `custom_timestamp_ranges` are not disjoint, as required."
|
53
|
+
raise Errors::ConfigError, "Your configured `custom_timestamp_ranges` are not disjoint, as required."
|
54
54
|
end
|
55
55
|
|
56
56
|
def without_env_overrides
|
@@ -83,7 +83,7 @@ module ElasticGraph
|
|
83
83
|
super
|
84
84
|
|
85
85
|
if time_set.empty?
|
86
|
-
raise ConfigError, "Custom timestamp range with suffix `#{index_name_suffix}` is invalid: no timestamps exist in it."
|
86
|
+
raise Errors::ConfigError, "Custom timestamp range with suffix `#{index_name_suffix}` is invalid: no timestamps exist in it."
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
@@ -95,7 +95,7 @@ module ElasticGraph
|
|
95
95
|
|
96
96
|
private_class_method def self.from(index_name_suffix:, setting_overrides:, **predicates_hash)
|
97
97
|
if predicates_hash.empty?
|
98
|
-
raise ConfigSettingNotSetError, "Custom timestamp range with suffix `#{index_name_suffix}` lacks boundary definitions."
|
98
|
+
raise Errors::ConfigSettingNotSetError, "Custom timestamp range with suffix `#{index_name_suffix}` lacks boundary definitions."
|
99
99
|
end
|
100
100
|
|
101
101
|
range_options = predicates_hash.transform_values { |iso8601_string| ::Time.iso8601(iso8601_string) }
|
@@ -7,7 +7,7 @@
|
|
7
7
|
# frozen_string_literal: true
|
8
8
|
|
9
9
|
require "elastic_graph/datastore_core/index_config_normalizer"
|
10
|
-
require "elastic_graph/
|
10
|
+
require "elastic_graph/errors"
|
11
11
|
require "elastic_graph/support/hash_util"
|
12
12
|
|
13
13
|
module ElasticGraph
|
@@ -33,7 +33,7 @@ module ElasticGraph
|
|
33
33
|
return nil unless has_custom_routing?
|
34
34
|
|
35
35
|
unless route_with_path
|
36
|
-
raise ConfigError, "`#{self}` uses custom routing, but `route_with_path` is misconfigured (was `nil`)"
|
36
|
+
raise Errors::ConfigError, "`#{self}` uses custom routing, but `route_with_path` is misconfigured (was `nil`)"
|
37
37
|
end
|
38
38
|
|
39
39
|
config_routing_value = Support::HashUtil.fetch_value_at_path(prepared_record, route_with_path).to_s
|
@@ -81,7 +81,7 @@ module ElasticGraph
|
|
81
81
|
|
82
82
|
def clusters_to_index_into
|
83
83
|
env_index_config.index_into_clusters.tap do |clusters_to_index_into|
|
84
|
-
raise ConfigError, "No `index_into_clusters` defined for #{self} in env_index_config" unless clusters_to_index_into
|
84
|
+
raise Errors::ConfigError, "No `index_into_clusters` defined for #{self} in env_index_config" unless clusters_to_index_into
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
@@ -11,7 +11,7 @@ require "elastic_graph/datastore_core/index_config_normalizer"
|
|
11
11
|
require "elastic_graph/datastore_core/index_definition/base"
|
12
12
|
require "elastic_graph/datastore_core/index_definition/index"
|
13
13
|
require "elastic_graph/datastore_core/index_definition/rollover_index"
|
14
|
-
require "elastic_graph/
|
14
|
+
require "elastic_graph/errors"
|
15
15
|
require "elastic_graph/support/memoizable_data"
|
16
16
|
require "elastic_graph/support/time_set"
|
17
17
|
require "elastic_graph/support/time_util"
|
@@ -77,7 +77,7 @@ module ElasticGraph
|
|
77
77
|
# `custom_time_sets`) and also indices that have been auto-created from the template.
|
78
78
|
#
|
79
79
|
# Note that there can be discrepancies between the configuration settings and the indices in
|
80
|
-
# the
|
80
|
+
# the datastore. Sometimes this is planned/expected (e.g. such as when invoking `elasticgraph-admin`
|
81
81
|
# to configure an index newly defined in configuration) and in other cases it's not.
|
82
82
|
#
|
83
83
|
# The `only_if_exists` argument controls how a discrepancy is treated.
|
@@ -133,7 +133,7 @@ module ElasticGraph
|
|
133
133
|
|
134
134
|
def after_initialize
|
135
135
|
unless timestamp_field_path && ROLLOVER_SUFFIX_FORMATS_BY_FREQUENCY.key?(frequency)
|
136
|
-
raise SchemaError, "Rollover index config 'timestamp_field' or 'frequency' is invalid."
|
136
|
+
raise Errors::SchemaError, "Rollover index config 'timestamp_field' or 'frequency' is invalid."
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
require "elastic_graph/datastore_core/index_definition/index"
|
10
10
|
require "elastic_graph/datastore_core/index_definition/rollover_index_template"
|
11
|
-
require "elastic_graph/
|
11
|
+
require "elastic_graph/errors"
|
12
12
|
|
13
13
|
module ElasticGraph
|
14
14
|
class DatastoreCore
|
@@ -20,7 +20,7 @@ module ElasticGraph
|
|
20
20
|
module IndexDefinition
|
21
21
|
def self.with(name:, runtime_metadata:, config:, datastore_clients_by_name:)
|
22
22
|
if (env_index_config = config.index_definitions[name]).nil?
|
23
|
-
raise ConfigError, "Configuration does not provide an index definition for `#{name}`, " \
|
23
|
+
raise Errors::ConfigError, "Configuration does not provide an index definition for `#{name}`, " \
|
24
24
|
"but it is required so we can identify the datastore cluster(s) to query and index into."
|
25
25
|
end
|
26
26
|
|
metadata
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticgraph-datastore_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.0.
|
4
|
+
version: 0.18.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Myron Marston
|
8
|
+
- Ben VandenBos
|
9
|
+
- Square Engineering
|
8
10
|
autorequire:
|
9
11
|
bindir: exe
|
10
12
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
13
|
+
date: 2024-09-20 00:00:00.000000000 Z
|
12
14
|
dependencies:
|
13
15
|
- !ruby/object:Gem::Dependency
|
14
16
|
name: rubocop-factory_bot
|
@@ -266,84 +268,84 @@ dependencies:
|
|
266
268
|
requirements:
|
267
269
|
- - '='
|
268
270
|
- !ruby/object:Gem::Version
|
269
|
-
version: 0.18.0.
|
271
|
+
version: 0.18.0.5
|
270
272
|
type: :runtime
|
271
273
|
prerelease: false
|
272
274
|
version_requirements: !ruby/object:Gem::Requirement
|
273
275
|
requirements:
|
274
276
|
- - '='
|
275
277
|
- !ruby/object:Gem::Version
|
276
|
-
version: 0.18.0.
|
278
|
+
version: 0.18.0.5
|
277
279
|
- !ruby/object:Gem::Dependency
|
278
280
|
name: elasticgraph-support
|
279
281
|
requirement: !ruby/object:Gem::Requirement
|
280
282
|
requirements:
|
281
283
|
- - '='
|
282
284
|
- !ruby/object:Gem::Version
|
283
|
-
version: 0.18.0.
|
285
|
+
version: 0.18.0.5
|
284
286
|
type: :runtime
|
285
287
|
prerelease: false
|
286
288
|
version_requirements: !ruby/object:Gem::Requirement
|
287
289
|
requirements:
|
288
290
|
- - '='
|
289
291
|
- !ruby/object:Gem::Version
|
290
|
-
version: 0.18.0.
|
292
|
+
version: 0.18.0.5
|
291
293
|
- !ruby/object:Gem::Dependency
|
292
294
|
name: elasticgraph-admin
|
293
295
|
requirement: !ruby/object:Gem::Requirement
|
294
296
|
requirements:
|
295
297
|
- - '='
|
296
298
|
- !ruby/object:Gem::Version
|
297
|
-
version: 0.18.0.
|
299
|
+
version: 0.18.0.5
|
298
300
|
type: :development
|
299
301
|
prerelease: false
|
300
302
|
version_requirements: !ruby/object:Gem::Requirement
|
301
303
|
requirements:
|
302
304
|
- - '='
|
303
305
|
- !ruby/object:Gem::Version
|
304
|
-
version: 0.18.0.
|
306
|
+
version: 0.18.0.5
|
305
307
|
- !ruby/object:Gem::Dependency
|
306
308
|
name: elasticgraph-elasticsearch
|
307
309
|
requirement: !ruby/object:Gem::Requirement
|
308
310
|
requirements:
|
309
311
|
- - '='
|
310
312
|
- !ruby/object:Gem::Version
|
311
|
-
version: 0.18.0.
|
313
|
+
version: 0.18.0.5
|
312
314
|
type: :development
|
313
315
|
prerelease: false
|
314
316
|
version_requirements: !ruby/object:Gem::Requirement
|
315
317
|
requirements:
|
316
318
|
- - '='
|
317
319
|
- !ruby/object:Gem::Version
|
318
|
-
version: 0.18.0.
|
320
|
+
version: 0.18.0.5
|
319
321
|
- !ruby/object:Gem::Dependency
|
320
322
|
name: elasticgraph-opensearch
|
321
323
|
requirement: !ruby/object:Gem::Requirement
|
322
324
|
requirements:
|
323
325
|
- - '='
|
324
326
|
- !ruby/object:Gem::Version
|
325
|
-
version: 0.18.0.
|
327
|
+
version: 0.18.0.5
|
326
328
|
type: :development
|
327
329
|
prerelease: false
|
328
330
|
version_requirements: !ruby/object:Gem::Requirement
|
329
331
|
requirements:
|
330
332
|
- - '='
|
331
333
|
- !ruby/object:Gem::Version
|
332
|
-
version: 0.18.0.
|
334
|
+
version: 0.18.0.5
|
333
335
|
- !ruby/object:Gem::Dependency
|
334
336
|
name: elasticgraph-schema_definition
|
335
337
|
requirement: !ruby/object:Gem::Requirement
|
336
338
|
requirements:
|
337
339
|
- - '='
|
338
340
|
- !ruby/object:Gem::Version
|
339
|
-
version: 0.18.0.
|
341
|
+
version: 0.18.0.5
|
340
342
|
type: :development
|
341
343
|
prerelease: false
|
342
344
|
version_requirements: !ruby/object:Gem::Requirement
|
343
345
|
requirements:
|
344
346
|
- - '='
|
345
347
|
- !ruby/object:Gem::Version
|
346
|
-
version: 0.18.0.
|
348
|
+
version: 0.18.0.5
|
347
349
|
description:
|
348
350
|
email:
|
349
351
|
- myron@squareup.com
|