prefab-cloud-ruby 1.8.8 → 1.8.9
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/CHANGELOG.md +89 -86
- data/VERSION +1 -1
- data/compile_protos.sh +4 -2
- data/lib/prefab/context.rb +1 -8
- data/lib/prefab/criteria_evaluator.rb +9 -7
- data/lib/prefab_pb.rb +3 -1
- data/prefab-cloud-ruby.gemspec +3 -3
- data/test/support/common_helpers.rb +0 -1
- data/test/test_context.rb +0 -15
- data/test/test_context_shape.rb +1 -1
- data/test/test_criteria_evaluator.rb +22 -0
- data/test/test_evaluation_summary_aggregator.rb +69 -69
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d367fac3af817df60008ab3c698329f6eafb48903524b834ad23caf91c35ee57
|
4
|
+
data.tar.gz: ff9a6a62b7dfc16765582d2e9198eee72e80b83da1968de8c5138ce865180ecc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6f678df72fc31514aa9f259da3fbffacc910974dab7abb1c2ccaa09929add8dba10746a421130ab3a2cc01ffc8c75695eb102d7e8cace0aa32d42266d449c37
|
7
|
+
data.tar.gz: 98f92995deb4c40c7f6abf820654576d48d39a825e7d0b9e3bbd9d7a5bde23e692559ed603054f3e72cec7c9b3c75b8d9ecb47976fe0e0e51165cf298b288ffc
|
data/CHANGELOG.md
CHANGED
@@ -1,88 +1,91 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.8.9 - 2025-04-15
|
4
|
+
|
5
|
+
- Fix support for virtual context `prefab.current-time` [#229]
|
3
6
|
|
4
7
|
## 1.8.8 - 2025-02-28
|
5
8
|
|
6
|
-
- Add conditional fetch support for configurations
|
7
|
-
- Operator support for string starts with, contains
|
8
|
-
- Operator support for regex, semver (protobuf update)
|
9
|
-
- Operator support for date comparison (before/after)
|
10
|
-
- Operator support for numeric comparisons
|
9
|
+
- Add conditional fetch support for configurations [#226]
|
10
|
+
- Operator support for string starts with, contains [#212]
|
11
|
+
- Operator support for regex, semver (protobuf update) [#215]
|
12
|
+
- Operator support for date comparison (before/after) [#221]
|
13
|
+
- Operator support for numeric comparisons [#220]
|
11
14
|
|
12
15
|
|
13
16
|
## 1.8.7 - 2024-10-25
|
14
17
|
|
15
|
-
- Add option symbolize_json_names
|
18
|
+
- Add option symbolize_json_names [#211]
|
16
19
|
|
17
20
|
|
18
21
|
## 1.8.6 - 2024-10-07
|
19
22
|
|
20
|
-
- Fix deprecation warning caused by x_datafile being set by default
|
23
|
+
- Fix deprecation warning caused by x_datafile being set by default [#208]
|
21
24
|
|
22
25
|
## 1.8.5 - 2024-09-27
|
23
26
|
|
24
|
-
- Fix JS bootstrapping and improve performance
|
25
|
-
- Promote `datafile` from `x_datafile`
|
27
|
+
- Fix JS bootstrapping and improve performance [#206]
|
28
|
+
- Promote `datafile` from `x_datafile` [#205]
|
26
29
|
|
27
30
|
## 1.8.4 - 2024-09-19
|
28
31
|
|
29
|
-
- Use `stream` subdomain for SSE
|
32
|
+
- Use `stream` subdomain for SSE [#203]
|
30
33
|
|
31
34
|
## 1.8.3 - 2024-09-16
|
32
35
|
|
33
|
-
- Add JavaScript stub & bootstrapping
|
36
|
+
- Add JavaScript stub & bootstrapping [#200]
|
34
37
|
|
35
38
|
## 1.8.2 - 2024-09-03
|
36
39
|
|
37
|
-
- Forbid bad semantic_logger version
|
40
|
+
- Forbid bad semantic_logger version [#198]
|
38
41
|
|
39
42
|
## 1.8.1 - 2024-09-03
|
40
43
|
|
41
|
-
- Fix SSE reconnection bug
|
44
|
+
- Fix SSE reconnection bug [#197]
|
42
45
|
|
43
46
|
## 1.8.0 - 2024-08-22
|
44
47
|
|
45
|
-
- Load config from belt and failover to suspenders
|
48
|
+
- Load config from belt and failover to suspenders [#195]
|
46
49
|
|
47
50
|
## 1.7.2 - 2024-06-24
|
48
51
|
|
49
|
-
- Support JSON config values
|
52
|
+
- Support JSON config values [#194]
|
50
53
|
|
51
54
|
## 1.7.1 - 2024-04-11
|
52
55
|
|
53
|
-
- Ergonomics
|
56
|
+
- Ergonomics [#191]
|
54
57
|
|
55
58
|
## 1.7.0 - 2024-04-10
|
56
59
|
|
57
|
-
- Add duration support
|
60
|
+
- Add duration support [#187]
|
58
61
|
|
59
62
|
## 1.6.2 - 2024-03-29
|
60
63
|
|
61
|
-
- Fix context telemetry when JIT and Block contexts are combined
|
62
|
-
- Remove logger prefix
|
64
|
+
- Fix context telemetry when JIT and Block contexts are combined [#185]
|
65
|
+
- Remove logger prefix [#186]
|
63
66
|
|
64
67
|
## 1.6.1 - 2024-03-28
|
65
68
|
|
66
|
-
- Performance optimizations
|
67
|
-
- Global context
|
69
|
+
- Performance optimizations [#178]
|
70
|
+
- Global context [#182]
|
68
71
|
|
69
72
|
## 1.6.0 - 2024-03-27
|
70
73
|
|
71
|
-
- Use semantic_logger for internal logging
|
72
|
-
- Remove Prefab::LoggerClient as a logger for end users
|
73
|
-
- Provide log_filter for end users
|
74
|
+
- Use semantic_logger for internal logging [#173]
|
75
|
+
- Remove Prefab::LoggerClient as a logger for end users [#173]
|
76
|
+
- Provide log_filter for end users [#173]
|
74
77
|
|
75
78
|
## 1.5.1 - 2024-02-22
|
76
79
|
|
77
|
-
- Fix: Send context shapes by default
|
80
|
+
- Fix: Send context shapes by default [#174]
|
78
81
|
|
79
82
|
## 1.5.0 - 2024-02-12
|
80
83
|
|
81
|
-
- Fix potential inconsistent Context behavior
|
84
|
+
- Fix potential inconsistent Context behavior [#172]
|
82
85
|
|
83
86
|
## 1.4.5 - 2024-01-31
|
84
87
|
|
85
|
-
- Refactor out a `should_log?` method
|
88
|
+
- Refactor out a `should_log?` method [#170]
|
86
89
|
|
87
90
|
## 1.4.4 - 2024-01-26
|
88
91
|
|
@@ -94,152 +97,152 @@
|
|
94
97
|
|
95
98
|
## 1.4.2 - 2023-12-14
|
96
99
|
|
97
|
-
- Use reportable value even for invalid data
|
100
|
+
- Use reportable value even for invalid data [#166]
|
98
101
|
|
99
102
|
## 1.4.1 - 2023-12-08
|
100
103
|
|
101
|
-
- Include version in `get` request
|
104
|
+
- Include version in `get` request [#165]
|
102
105
|
|
103
106
|
## 1.4.0 - 2023-11-28
|
104
107
|
|
105
|
-
- ActiveJob tagged logger issue
|
106
|
-
- Compact Log Format
|
107
|
-
- Tagged Logging
|
108
|
-
- ContextKey logging thread safety
|
108
|
+
- ActiveJob tagged logger issue [#164]
|
109
|
+
- Compact Log Format [#163]
|
110
|
+
- Tagged Logging [#161]
|
111
|
+
- ContextKey logging thread safety [#162]
|
109
112
|
|
110
113
|
## 1.3.2 - 2023-11-15
|
111
114
|
|
112
|
-
- Send back cloud.prefab logging telemetry
|
115
|
+
- Send back cloud.prefab logging telemetry [#160]
|
113
116
|
|
114
117
|
## 1.3.1 - 2023-11-14
|
115
118
|
|
116
|
-
- Improve path of rails.controller logging & fix strong param include
|
119
|
+
- Improve path of rails.controller logging & fix strong param include [#159]
|
117
120
|
|
118
121
|
## 1.3.0 - 2023-11-13
|
119
122
|
|
120
|
-
- Less logging when wifi is off and we load from cache
|
121
|
-
- Alpha: Add Provided & Secret Support
|
122
|
-
- Alpha: x_datafile
|
123
|
-
- Add single line action-controller output under rails.controller
|
123
|
+
- Less logging when wifi is off and we load from cache [#157]
|
124
|
+
- Alpha: Add Provided & Secret Support [#152]
|
125
|
+
- Alpha: x_datafile [#156]
|
126
|
+
- Add single line action-controller output under rails.controller [#158]
|
124
127
|
|
125
128
|
## 1.2.1 - 2023-11-01
|
126
129
|
|
127
|
-
- Update protobuf definitions
|
130
|
+
- Update protobuf definitions [#154]
|
128
131
|
|
129
132
|
## 1.2.0 - 2023-10-30
|
130
133
|
|
131
|
-
- Add `Prefab.get('key')` style usage after a `Prefab.init()` call
|
132
|
-
- Add `add_context_keys` and `with_context_keys` method for LoggerClient
|
134
|
+
- Add `Prefab.get('key')` style usage after a `Prefab.init()` call [#151]
|
135
|
+
- Add `add_context_keys` and `with_context_keys` method for LoggerClient [#145]
|
133
136
|
|
134
137
|
## 1.1.2 - 2023-10-13
|
135
138
|
|
136
|
-
- Add `cloud.prefab.client.criteria_evaluator` `debug` logging of evaluations
|
137
|
-
- Add `x_use_local_cache` for local caching
|
138
|
-
- Tests run in RubyMine
|
139
|
+
- Add `cloud.prefab.client.criteria_evaluator` `debug` logging of evaluations [#150]
|
140
|
+
- Add `x_use_local_cache` for local caching [#148]
|
141
|
+
- Tests run in RubyMine [#147]
|
139
142
|
|
140
143
|
## 1.1.1 - 2023-10-11
|
141
144
|
|
142
|
-
- Migrate happy-path client-initialization logging to `DEBUG` level rather than `INFO`
|
143
|
-
- Add `ConfigClientPresenter` for logging out stats upon successful client initialization
|
144
|
-
- Add support for default context
|
145
|
+
- Migrate happy-path client-initialization logging to `DEBUG` level rather than `INFO` [#144]
|
146
|
+
- Add `ConfigClientPresenter` for logging out stats upon successful client initialization [#144]
|
147
|
+
- Add support for default context [#146]
|
145
148
|
|
146
149
|
## 1.1.0 - 2023-09-18
|
147
150
|
|
148
|
-
- Add support for structured logging
|
151
|
+
- Add support for structured logging [#143]
|
149
152
|
- Ability to pass a hash of key/value context pairs to any of the user-facing log methods
|
150
153
|
|
151
154
|
## 1.0.1 - 2023-08-17
|
152
155
|
|
153
|
-
- Bug fix for StringList w/ ExampleContextsAggregator
|
156
|
+
- Bug fix for StringList w/ ExampleContextsAggregator [#141]
|
154
157
|
|
155
158
|
## 1.0.0 - 2023-08-10
|
156
159
|
|
157
|
-
- Removed EvaluatedKeysAggregator
|
158
|
-
- Change `collect_evaluation_summaries` default to true
|
159
|
-
- Removed some backwards compatibility shims
|
160
|
-
- Standardizing options
|
160
|
+
- Removed EvaluatedKeysAggregator [#137]
|
161
|
+
- Change `collect_evaluation_summaries` default to true [#136]
|
162
|
+
- Removed some backwards compatibility shims [#133]
|
163
|
+
- Standardizing options [#132]
|
161
164
|
- Note that the default value for `context_upload_mode` is `:periodic_example` which means example contexts will be collected.
|
162
165
|
This enables easy variant override assignment in our UI. More at https://prefab.cloud/blog/feature-flag-variant-assignment/
|
163
166
|
|
164
167
|
## 0.24.6 - 2023-07-31
|
165
168
|
|
166
|
-
- Logger Client compatibility
|
167
|
-
- Replace EvaluatedConfigs with ExampleContexts
|
168
|
-
- Add ConfigEvaluationSummaries (opt-in for now)
|
169
|
+
- Logger Client compatibility [#129]
|
170
|
+
- Replace EvaluatedConfigs with ExampleContexts [#128]
|
171
|
+
- Add ConfigEvaluationSummaries (opt-in for now) [#123]
|
169
172
|
|
170
173
|
## 0.24.5 - 2023-07-10
|
171
174
|
|
172
|
-
- Report Client Version
|
175
|
+
- Report Client Version [#121]
|
173
176
|
|
174
177
|
## [0.24.4] - 2023-07-06
|
175
178
|
|
176
|
-
- Support Timed Loggers
|
177
|
-
- Added EvaluatedConfigsAggregator (disabled by default)
|
178
|
-
- Added EvaluatedKeysAggregator (disabled by default)
|
179
|
-
- Dropped Ruby 2.6 support
|
180
|
-
- Capture/report context shapes
|
181
|
-
- Added bin/console
|
179
|
+
- Support Timed Loggers [#119]
|
180
|
+
- Added EvaluatedConfigsAggregator (disabled by default) [#118]
|
181
|
+
- Added EvaluatedKeysAggregator (disabled by default) [#117]
|
182
|
+
- Dropped Ruby 2.6 support [#116]
|
183
|
+
- Capture/report context shapes [#115]
|
184
|
+
- Added bin/console [#114]
|
182
185
|
|
183
186
|
## [0.24.3] - 2023-05-15
|
184
187
|
|
185
|
-
- Add JSON log formatter
|
188
|
+
- Add JSON log formatter [#106]
|
186
189
|
|
187
190
|
# [0.24.2] - 2023-05-12
|
188
191
|
|
189
|
-
- Fix bug in FF rollout eval consistency
|
190
|
-
- Simplify forking
|
192
|
+
- Fix bug in FF rollout eval consistency [#108]
|
193
|
+
- Simplify forking [#107]
|
191
194
|
|
192
195
|
# [0.24.1] - 2023-04-26
|
193
196
|
|
194
|
-
- Fix misleading deprecation warning
|
197
|
+
- Fix misleading deprecation warning [#105]
|
195
198
|
|
196
199
|
# [0.24.0] - 2023-04-26
|
197
200
|
|
198
|
-
- Backwards compatibility for JIT context
|
199
|
-
- Remove upsert
|
200
|
-
- Add resolver presenter and `on_update` callback
|
201
|
-
- Deprecate `lookup_key` and introduce Context
|
201
|
+
- Backwards compatibility for JIT context [#104]
|
202
|
+
- Remove upsert [#103]
|
203
|
+
- Add resolver presenter and `on_update` callback [#102]
|
204
|
+
- Deprecate `lookup_key` and introduce Context [#99]
|
202
205
|
|
203
206
|
# [0.23.8] - 2023-04-21
|
204
207
|
|
205
|
-
- Update protobuf
|
208
|
+
- Update protobuf [#101]
|
206
209
|
|
207
210
|
# [0.23.7] - 2023-04-21
|
208
211
|
|
209
|
-
- Guard against ActiveJob not being loaded
|
212
|
+
- Guard against ActiveJob not being loaded [#100]
|
210
213
|
|
211
214
|
# [0.23.6] - 2023-04-17
|
212
215
|
|
213
|
-
- Fix bug in FF rollout eval consistency
|
214
|
-
- Add tests for block-form of logging
|
216
|
+
- Fix bug in FF rollout eval consistency [#98]
|
217
|
+
- Add tests for block-form of logging [#96]
|
215
218
|
|
216
219
|
# [0.23.5] - 2023-04-13
|
217
220
|
|
218
|
-
- Cast the value to string when checking presence in string list
|
221
|
+
- Cast the value to string when checking presence in string list [#95]
|
219
222
|
|
220
223
|
# [0.23.4] - 2023-04-12
|
221
224
|
|
222
|
-
- Remove GRPC
|
225
|
+
- Remove GRPC [#93]
|
223
226
|
|
224
227
|
# [0.23.3] - 2023-04-07
|
225
228
|
|
226
|
-
- Use exponential backoff for log level uploading
|
229
|
+
- Use exponential backoff for log level uploading [#92]
|
227
230
|
|
228
231
|
# [0.23.2] - 2023-04-04
|
229
232
|
|
230
|
-
- Move log collection logs from INFO to DEBUG
|
231
|
-
- Fix: Handle trailing slash in PREFAB_API_URL
|
233
|
+
- Move log collection logs from INFO to DEBUG [#91]
|
234
|
+
- Fix: Handle trailing slash in PREFAB_API_URL [#90]
|
232
235
|
|
233
236
|
# [0.23.1] - 2023-03-30
|
234
237
|
|
235
|
-
- ActiveStorage not defined in Rails < 5.2
|
238
|
+
- ActiveStorage not defined in Rails < 5.2 [#87]
|
236
239
|
|
237
240
|
# [0.23.0] - 2023-03-28
|
238
241
|
|
239
|
-
- Convenience for setting Rails.logger
|
240
|
-
- Log evaluation according to rules
|
242
|
+
- Convenience for setting Rails.logger [#85]
|
243
|
+
- Log evaluation according to rules [#81]
|
241
244
|
|
242
245
|
# [0.22.0] - 2023-03-15
|
243
246
|
|
244
|
-
- Report log paths and usages
|
245
|
-
- Accept hash or keyword args in `initialize`
|
247
|
+
- Report log paths and usages [#79]
|
248
|
+
- Accept hash or keyword args in `initialize` [#78]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.8.
|
1
|
+
1.8.9
|
data/compile_protos.sh
CHANGED
@@ -2,14 +2,16 @@
|
|
2
2
|
|
3
3
|
set -e
|
4
4
|
|
5
|
+
PROTO_ROOT="${PROTO_ROOT:-..}"
|
6
|
+
|
5
7
|
gem install grpc-tools
|
6
8
|
|
7
9
|
(
|
8
|
-
cd
|
10
|
+
cd "$PROTO_ROOT/prefab-cloud"
|
9
11
|
git pull --rebase
|
10
12
|
)
|
11
13
|
|
12
|
-
grpc_tools_ruby_protoc -I
|
14
|
+
grpc_tools_ruby_protoc -I "$PROTO_ROOT/prefab-cloud/" --ruby_out=lib --grpc_out=lib prefab.proto
|
13
15
|
|
14
16
|
gsed -i 's/^module Prefab$/module PrefabProto/g' lib/prefab_pb.rb
|
15
17
|
|
data/lib/prefab/context.rb
CHANGED
@@ -200,12 +200,6 @@ module Prefab
|
|
200
200
|
end
|
201
201
|
|
202
202
|
def to_proto(namespace)
|
203
|
-
prefab_context = {
|
204
|
-
'current-time' => ConfigValueWrapper.wrap(Prefab::TimeHelpers.now_in_ms)
|
205
|
-
}
|
206
|
-
|
207
|
-
prefab_context['namespace'] = ConfigValueWrapper.wrap(namespace) if namespace&.length&.positive?
|
208
|
-
|
209
203
|
reportable_contexts = {}
|
210
204
|
|
211
205
|
reportable_tree.each do |ctx|
|
@@ -217,8 +211,7 @@ module Prefab
|
|
217
211
|
PrefabProto::ContextSet.new(
|
218
212
|
contexts: reportable_contexts.map do |name, context|
|
219
213
|
context.to_proto
|
220
|
-
end
|
221
|
-
values: prefab_context)])
|
214
|
+
end
|
222
215
|
)
|
223
216
|
end
|
224
217
|
|
@@ -86,12 +86,7 @@ module Prefab
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def IN_INT_RANGE(criterion, properties)
|
89
|
-
value =
|
90
|
-
Time.now.utc.to_i * 1000
|
91
|
-
else
|
92
|
-
value_from_properties(criterion, properties)
|
93
|
-
end
|
94
|
-
|
89
|
+
value = value_from_properties(criterion, properties)
|
95
90
|
value && value >= criterion.value_to_match.int_range.start && value < criterion.value_to_match.int_range.end
|
96
91
|
end
|
97
92
|
|
@@ -150,7 +145,14 @@ module Prefab
|
|
150
145
|
end
|
151
146
|
|
152
147
|
def value_from_properties(criterion, properties)
|
153
|
-
|
148
|
+
case criterion.property_name
|
149
|
+
when NAMESPACE_KEY
|
150
|
+
@namespace
|
151
|
+
when 'prefab.current-time'
|
152
|
+
Time.now.utc.to_i * 1000
|
153
|
+
else
|
154
|
+
properties.get(criterion.property_name)
|
155
|
+
end
|
154
156
|
end
|
155
157
|
|
156
158
|
COMPARE_TO_OPERATORS = {
|
data/lib/prefab_pb.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
|
8
|
-
descriptor_data = "\n\x0cprefab.proto\x12\x06prefab\"W\n\x14\x43onfigServicePointer\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x13\n\x0bstart_at_id\x18\x02 \x01(\x03\x12\x16\n\x0eproject_env_id\x18\x03 \x01(\x03\"\x8f\x04\n\x0b\x43onfigValue\x12\r\n\x03int\x18\x01 \x01(\x03H\x00\x12\x10\n\x06string\x18\x02 \x01(\tH\x00\x12\x0f\n\x05\x62ytes\x18\x03 \x01(\x0cH\x00\x12\x10\n\x06\x64ouble\x18\x04 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x05 \x01(\x08H\x00\x12\x31\n\x0fweighted_values\x18\x06 \x01(\x0b\x32\x16.prefab.WeightedValuesH\x00\x12\x33\n\x10limit_definition\x18\x07 \x01(\x0b\x32\x17.prefab.LimitDefinitionH\x00\x12%\n\tlog_level\x18\t \x01(\x0e\x32\x10.prefab.LogLevelH\x00\x12)\n\x0bstring_list\x18\n \x01(\x0b\x32\x12.prefab.StringListH\x00\x12%\n\tint_range\x18\x0b \x01(\x0b\x32\x10.prefab.IntRangeH\x00\x12$\n\x08provided\x18\x0c \x01(\x0b\x32\x10.prefab.ProvidedH\x00\x12\'\n\x08\x64uration\x18\x0f \x01(\x0b\x32\x13.prefab.IsoDurationH\x00\x12\x1c\n\x04json\x18\x10 \x01(\x0b\x32\x0c.prefab.JsonH\x00\x12\x19\n\x0c\x63onfidential\x18\r \x01(\x08H\x01\x88\x01\x01\x12\x19\n\x0c\x64\x65\x63rypt_with\x18\x0e \x01(\tH\x02\x88\x01\x01\x42\x06\n\x04typeB\x0f\n\r_confidentialB\x0f\n\r_decrypt_with\"\x14\n\x04Json\x12\x0c\n\x04json\x18\x01 \x01(\t\"!\n\x0bIsoDuration\x12\x12\n\ndefinition\x18\x01 \x01(\t\"b\n\x08Provided\x12+\n\x06source\x18\x01 \x01(\x0e\x32\x16.prefab.ProvidedSourceH\x00\x88\x01\x01\x12\x13\n\x06lookup\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\t\n\x07_sourceB\t\n\x07_lookup\"B\n\x08IntRange\x12\x12\n\x05start\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x10\n\x03\x65nd\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_end\"\x1c\n\nStringList\x12\x0e\n\x06values\x18\x01 \x03(\t\"C\n\rWeightedValue\x12\x0e\n\x06weight\x18\x01 \x01(\x05\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue\"~\n\x0eWeightedValues\x12.\n\x0fweighted_values\x18\x01 \x03(\x0b\x32\x15.prefab.WeightedValue\x12\"\n\x15hash_by_property_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x18\n\x16_hash_by_property_name\"X\n\x0e\x41piKeyMetadata\x12\x13\n\x06key_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07user_id\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\t\n\x07_key_idB\n\n\x08_user_idJ\x04\x08\x02\x10\x03\"\xa0\x02\n\x07\x43onfigs\x12\x1f\n\x07\x63onfigs\x18\x01 \x03(\x0b\x32\x0e.prefab.Config\x12<\n\x16\x63onfig_service_pointer\x18\x02 \x01(\x0b\x32\x1c.prefab.ConfigServicePointer\x12\x34\n\x0f\x61pikey_metadata\x18\x03 \x01(\x0b\x32\x16.prefab.ApiKeyMetadataH\x00\x88\x01\x01\x12\x30\n\x0f\x64\x65\x66\x61ult_context\x18\x04 \x01(\x0b\x32\x12.prefab.ContextSetH\x01\x88\x01\x01\x12\x17\n\nkeep_alive\x18\x05 \x01(\x08H\x02\x88\x01\x01\x42\x12\n\x10_apikey_metadataB\x12\n\x10_default_contextB\r\n\x0b_keep_alive\"\xfc\x03\n\x06\x43onfig\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x12\n\nproject_id\x18\x02 \x01(\x03\x12\x0b\n\x03key\x18\x03 \x01(\t\x12%\n\nchanged_by\x18\x04 \x01(\x0b\x32\x11.prefab.ChangedBy\x12\x1f\n\x04rows\x18\x05 \x03(\x0b\x32\x11.prefab.ConfigRow\x12-\n\x10\x61llowable_values\x18\x06 \x03(\x0b\x32\x13.prefab.ConfigValue\x12\'\n\x0b\x63onfig_type\x18\x07 \x01(\x0e\x32\x12.prefab.ConfigType\x12\x15\n\x08\x64raft_id\x18\x08 \x01(\x03H\x00\x88\x01\x01\x12,\n\nvalue_type\x18\t \x01(\x0e\x32\x18.prefab.Config.ValueType\x12\x1a\n\x12send_to_client_sdk\x18\n \x01(\x08\"\xb6\x01\n\tValueType\x12\x16\n\x12NOT_SET_VALUE_TYPE\x10\x00\x12\x07\n\x03INT\x10\x01\x12\n\n\x06STRING\x10\x02\x12\t\n\x05\x42YTES\x10\x03\x12\n\n\x06\x44OUBLE\x10\x04\x12\x08\n\x04\x42OOL\x10\x05\x12\x14\n\x10LIMIT_DEFINITION\x10\x07\x12\r\n\tLOG_LEVEL\x10\t\x12\x0f\n\x0bSTRING_LIST\x10\n\x12\r\n\tINT_RANGE\x10\x0b\x12\x0c\n\x08\x44URATION\x10\x0c\x12\x08\n\x04JSON\x10\rB\x0b\n\t_draft_id\"?\n\tChangedBy\x12\x0f\n\x07user_id\x18\x01 \x01(\x03\x12\r\n\x05\x65mail\x18\x02 \x01(\t\x12\x12\n\napi_key_id\x18\x03 \x01(\t\"\xe4\x01\n\tConfigRow\x12\x1b\n\x0eproject_env_id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12(\n\x06values\x18\x02 \x03(\x0b\x32\x18.prefab.ConditionalValue\x12\x35\n\nproperties\x18\x03 \x03(\x0b\x32!.prefab.ConfigRow.PropertiesEntry\x1a\x46\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue:\x02\x38\x01\x42\x11\n\x0f_project_env_id\"[\n\x10\x43onditionalValue\x12#\n\x08\x63riteria\x18\x01 \x03(\x0b\x32\x11.prefab.Criterion\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue\"\x96\x06\n\tCriterion\x12\x15\n\rproperty_name\x18\x01 \x01(\t\x12\x35\n\x08operator\x18\x02 \x01(\x0e\x32#.prefab.Criterion.CriterionOperator\x12+\n\x0evalue_to_match\x18\x03 \x01(\x0b\x32\x13.prefab.ConfigValue\"\x8d\x05\n\x11\x43riterionOperator\x12\x0b\n\x07NOT_SET\x10\x00\x12\x11\n\rLOOKUP_KEY_IN\x10\x01\x12\x15\n\x11LOOKUP_KEY_NOT_IN\x10\x02\x12\n\n\x06IN_SEG\x10\x03\x12\x0e\n\nNOT_IN_SEG\x10\x04\x12\x0f\n\x0b\x41LWAYS_TRUE\x10\x05\x12\x12\n\x0ePROP_IS_ONE_OF\x10\x06\x12\x16\n\x12PROP_IS_NOT_ONE_OF\x10\x07\x12\x19\n\x15PROP_ENDS_WITH_ONE_OF\x10\x08\x12!\n\x1dPROP_DOES_NOT_END_WITH_ONE_OF\x10\t\x12\x16\n\x12HIERARCHICAL_MATCH\x10\n\x12\x10\n\x0cIN_INT_RANGE\x10\x0b\x12\x1b\n\x17PROP_STARTS_WITH_ONE_OF\x10\x0c\x12#\n\x1fPROP_DOES_NOT_START_WITH_ONE_OF\x10\r\x12\x18\n\x14PROP_CONTAINS_ONE_OF\x10\x0e\x12 \n\x1cPROP_DOES_NOT_CONTAIN_ONE_OF\x10\x0f\x12\x12\n\x0ePROP_LESS_THAN\x10\x10\x12\x1b\n\x17PROP_LESS_THAN_OR_EQUAL\x10\x11\x12\x15\n\x11PROP_GREATER_THAN\x10\x12\x12\x1e\n\x1aPROP_GREATER_THAN_OR_EQUAL\x10\x13\x12\x0f\n\x0bPROP_BEFORE\x10\x14\x12\x0e\n\nPROP_AFTER\x10\x15\x12\x10\n\x0cPROP_MATCHES\x10\x16\x12\x17\n\x13PROP_DOES_NOT_MATCH\x10\x17\x12\x19\n\x15PROP_SEMVER_LESS_THAN\x10\x18\x12\x15\n\x11PROP_SEMVER_EQUAL\x10\x19\x12\x1c\n\x18PROP_SEMVER_GREATER_THAN\x10\x1a\"\x89\x01\n\x07Loggers\x12\x1f\n\x07loggers\x18\x01 \x03(\x0b\x32\x0e.prefab.Logger\x12\x10\n\x08start_at\x18\x02 \x01(\x03\x12\x0e\n\x06\x65nd_at\x18\x03 \x01(\x03\x12\x15\n\rinstance_hash\x18\x04 \x01(\t\x12\x16\n\tnamespace\x18\x05 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_namespace\"\xd9\x01\n\x06Logger\x12\x13\n\x0blogger_name\x18\x01 \x01(\t\x12\x13\n\x06traces\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x13\n\x06\x64\x65\x62ugs\x18\x03 \x01(\x03H\x01\x88\x01\x01\x12\x12\n\x05infos\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05warns\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x13\n\x06\x65rrors\x18\x06 \x01(\x03H\x04\x88\x01\x01\x12\x13\n\x06\x66\x61tals\x18\x07 \x01(\x03H\x05\x88\x01\x01\x42\t\n\x07_tracesB\t\n\x07_debugsB\x08\n\x06_infosB\x08\n\x06_warnsB\t\n\x07_errorsB\t\n\x07_fatals\"\x16\n\x14LoggerReportResponse\"\xdb\x03\n\rLimitResponse\x12\x0e\n\x06passed\x18\x01 \x01(\x08\x12\x12\n\nexpires_at\x18\x02 \x01(\x03\x12\x16\n\x0e\x65nforced_group\x18\x03 \x01(\t\x12\x16\n\x0e\x63urrent_bucket\x18\x04 \x01(\x03\x12\x14\n\x0cpolicy_group\x18\x05 \x01(\t\x12;\n\x0bpolicy_name\x18\x06 \x01(\x0e\x32&.prefab.LimitResponse.LimitPolicyNames\x12\x14\n\x0cpolicy_limit\x18\x07 \x01(\x05\x12\x0e\n\x06\x61mount\x18\x08 \x01(\x03\x12\x16\n\x0elimit_reset_at\x18\t \x01(\x03\x12\x39\n\x0csafety_level\x18\n \x01(\x0e\x32#.prefab.LimitDefinition.SafetyLevel\"\xa9\x01\n\x10LimitPolicyNames\x12\x0b\n\x07NOT_SET\x10\x00\x12\x14\n\x10SECONDLY_ROLLING\x10\x01\x12\x14\n\x10MINUTELY_ROLLING\x10\x03\x12\x12\n\x0eHOURLY_ROLLING\x10\x05\x12\x11\n\rDAILY_ROLLING\x10\x07\x12\x13\n\x0fMONTHLY_ROLLING\x10\x08\x12\x0c\n\x08INFINITE\x10\t\x12\x12\n\x0eYEARLY_ROLLING\x10\n\"\x99\x02\n\x0cLimitRequest\x12\x12\n\naccount_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x61\x63quire_amount\x18\x02 \x01(\x05\x12\x0e\n\x06groups\x18\x03 \x03(\t\x12:\n\x0elimit_combiner\x18\x04 \x01(\x0e\x32\".prefab.LimitRequest.LimitCombiner\x12\x1e\n\x16\x61llow_partial_response\x18\x05 \x01(\x08\x12\x39\n\x0csafety_level\x18\x06 \x01(\x0e\x32#.prefab.LimitDefinition.SafetyLevel\"6\n\rLimitCombiner\x12\x0b\n\x07NOT_SET\x10\x00\x12\x0b\n\x07MINIMUM\x10\x01\x12\x0b\n\x07MAXIMUM\x10\x02\"/\n\nContextSet\x12!\n\x08\x63ontexts\x18\x01 \x03(\x0b\x32\x0f.prefab.Context\"\x96\x01\n\x07\x43ontext\x12\x11\n\x04type\x18\x01 \x01(\tH\x00\x88\x01\x01\x12+\n\x06values\x18\x02 \x03(\x0b\x32\x1b.prefab.Context.ValuesEntry\x1a\x42\n\x0bValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue:\x02\x38\x01\x42\x07\n\x05_type\"\x93\x01\n\x08Identity\x12\x13\n\x06lookup\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x34\n\nattributes\x18\x02 \x03(\x0b\x32 .prefab.Identity.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07_lookup\"\xd6\x02\n\x18\x43onfigEvaluationMetaData\x12\x1d\n\x10\x63onfig_row_index\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12$\n\x17\x63onditional_value_index\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12!\n\x14weighted_value_index\x18\x03 \x01(\x03H\x02\x88\x01\x01\x12%\n\x04type\x18\x04 \x01(\x0e\x32\x12.prefab.ConfigTypeH\x03\x88\x01\x01\x12\x0f\n\x02id\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12\x31\n\nvalue_type\x18\x06 \x01(\x0e\x32\x18.prefab.Config.ValueTypeH\x05\x88\x01\x01\x42\x13\n\x11_config_row_indexB\x1a\n\x18_conditional_value_indexB\x17\n\x15_weighted_value_indexB\x07\n\x05_typeB\x05\n\x03_idB\r\n\x0b_value_type\"\x8b\x03\n\x11\x43lientConfigValue\x12\r\n\x03int\x18\x01 \x01(\x03H\x00\x12\x10\n\x06string\x18\x02 \x01(\tH\x00\x12\x10\n\x06\x64ouble\x18\x03 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x04 \x01(\x08H\x00\x12%\n\tlog_level\x18\x05 \x01(\x0e\x32\x10.prefab.LogLevelH\x00\x12)\n\x0bstring_list\x18\x07 \x01(\x0b\x32\x12.prefab.StringListH\x00\x12%\n\tint_range\x18\x08 \x01(\x0b\x32\x10.prefab.IntRangeH\x00\x12*\n\x08\x64uration\x18\t \x01(\x0b\x32\x16.prefab.ClientDurationH\x00\x12\x1c\n\x04json\x18\n \x01(\x0b\x32\x0c.prefab.JsonH\x00\x12I\n\x1a\x63onfig_evaluation_metadata\x18\x06 \x01(\x0b\x32 .prefab.ConfigEvaluationMetaDataH\x01\x88\x01\x01\x42\x06\n\x04typeB\x1d\n\x1b_config_evaluation_metadata\"D\n\x0e\x43lientDuration\x12\x0f\n\x07seconds\x18\x01 \x01(\x03\x12\r\n\x05nanos\x18\x02 \x01(\x05\x12\x12\n\ndefinition\x18\x03 \x01(\t\"\xa4\x02\n\x11\x43onfigEvaluations\x12\x35\n\x06values\x18\x01 \x03(\x0b\x32%.prefab.ConfigEvaluations.ValuesEntry\x12\x34\n\x0f\x61pikey_metadata\x18\x02 \x01(\x0b\x32\x16.prefab.ApiKeyMetadataH\x00\x88\x01\x01\x12\x30\n\x0f\x64\x65\x66\x61ult_context\x18\x03 \x01(\x0b\x32\x12.prefab.ContextSetH\x01\x88\x01\x01\x1aH\n\x0bValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.prefab.ClientConfigValue:\x02\x38\x01\x42\x12\n\x10_apikey_metadataB\x12\n\x10_default_context\"\xa8\x02\n\x0fLimitDefinition\x12;\n\x0bpolicy_name\x18\x02 \x01(\x0e\x32&.prefab.LimitResponse.LimitPolicyNames\x12\r\n\x05limit\x18\x03 \x01(\x05\x12\r\n\x05\x62urst\x18\x04 \x01(\x05\x12\x12\n\naccount_id\x18\x05 \x01(\x03\x12\x15\n\rlast_modified\x18\x06 \x01(\x03\x12\x12\n\nreturnable\x18\x07 \x01(\x08\x12\x39\n\x0csafety_level\x18\x08 \x01(\x0e\x32#.prefab.LimitDefinition.SafetyLevel\"@\n\x0bSafetyLevel\x12\x0b\n\x07NOT_SET\x10\x00\x12\x12\n\x0eL4_BEST_EFFORT\x10\x04\x12\x10\n\x0cL5_BOMBPROOF\x10\x05\"@\n\x10LimitDefinitions\x12,\n\x0b\x64\x65\x66initions\x18\x01 \x03(\x0b\x32\x17.prefab.LimitDefinition\"\x8a\x01\n\x0f\x42ufferedRequest\x12\x12\n\naccount_id\x18\x01 \x01(\x03\x12\x0e\n\x06method\x18\x02 \x01(\t\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12\x0c\n\x04\x62ody\x18\x04 \x01(\t\x12\x14\n\x0climit_groups\x18\x05 \x03(\t\x12\x14\n\x0c\x63ontent_type\x18\x06 \x01(\t\x12\x0c\n\x04\x66ifo\x18\x07 \x01(\x08\"\x94\x01\n\x0c\x42\x61tchRequest\x12\x12\n\naccount_id\x18\x01 \x01(\x03\x12\x0e\n\x06method\x18\x02 \x01(\t\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12\x0c\n\x04\x62ody\x18\x04 \x01(\t\x12\x14\n\x0climit_groups\x18\x05 \x03(\t\x12\x16\n\x0e\x62\x61tch_template\x18\x06 \x01(\t\x12\x17\n\x0f\x62\x61tch_separator\x18\x07 \x01(\t\" \n\rBasicResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\"3\n\x10\x43reationResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0e\n\x06new_id\x18\x02 \x01(\x03\"h\n\x07IdBlock\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x16\n\x0eproject_env_id\x18\x02 \x01(\x03\x12\x15\n\rsequence_name\x18\x03 \x01(\t\x12\r\n\x05start\x18\x04 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x05 \x01(\x03\"a\n\x0eIdBlockRequest\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x16\n\x0eproject_env_id\x18\x02 \x01(\x03\x12\x15\n\rsequence_name\x18\x03 \x01(\t\x12\x0c\n\x04size\x18\x04 \x01(\x03\"\x8a\x01\n\x0c\x43ontextShape\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x0b\x66ield_types\x18\x02 \x03(\x0b\x32$.prefab.ContextShape.FieldTypesEntry\x1a\x31\n\x0f\x46ieldTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\"[\n\rContextShapes\x12$\n\x06shapes\x18\x01 \x03(\x0b\x32\x14.prefab.ContextShape\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_namespace\"C\n\rEvaluatedKeys\x12\x0c\n\x04keys\x18\x01 \x03(\t\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_namespace\"\x93\x01\n\x0f\x45valuatedConfig\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0e\x63onfig_version\x18\x02 \x01(\x03\x12#\n\x06result\x18\x03 \x01(\x0b\x32\x13.prefab.ConfigValue\x12#\n\x07\x63ontext\x18\x04 \x01(\x0b\x32\x12.prefab.ContextSet\x12\x11\n\ttimestamp\x18\x05 \x01(\x03\"<\n\x10\x45valuatedConfigs\x12(\n\x07\x63onfigs\x18\x01 \x03(\x0b\x32\x17.prefab.EvaluatedConfig\"\xc4\x03\n\x17\x43onfigEvaluationCounter\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x16\n\tconfig_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1b\n\x0eselected_index\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x30\n\x0eselected_value\x18\x04 \x01(\x0b\x32\x13.prefab.ConfigValueH\x02\x88\x01\x01\x12\x1d\n\x10\x63onfig_row_index\x18\x05 \x01(\rH\x03\x88\x01\x01\x12$\n\x17\x63onditional_value_index\x18\x06 \x01(\rH\x04\x88\x01\x01\x12!\n\x14weighted_value_index\x18\x07 \x01(\rH\x05\x88\x01\x01\x12\x36\n\x06reason\x18\x08 \x01(\x0e\x32&.prefab.ConfigEvaluationCounter.Reason\"\x15\n\x06Reason\x12\x0b\n\x07UNKNOWN\x10\x00\x42\x0c\n\n_config_idB\x11\n\x0f_selected_indexB\x11\n\x0f_selected_valueB\x13\n\x11_config_row_indexB\x1a\n\x18_conditional_value_indexB\x17\n\x15_weighted_value_index\"{\n\x17\x43onfigEvaluationSummary\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x04type\x18\x02 \x01(\x0e\x32\x12.prefab.ConfigType\x12\x31\n\x08\x63ounters\x18\x03 \x03(\x0b\x32\x1f.prefab.ConfigEvaluationCounter\"k\n\x19\x43onfigEvaluationSummaries\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\x12\x32\n\tsummaries\x18\x03 \x03(\x0b\x32\x1f.prefab.ConfigEvaluationSummary\"Z\n\x15LoggersTelemetryEvent\x12\x1f\n\x07loggers\x18\x01 \x03(\x0b\x32\x0e.prefab.Logger\x12\x10\n\x08start_at\x18\x02 \x01(\x03\x12\x0e\n\x06\x65nd_at\x18\x03 \x01(\x03\"\x98\x02\n\x0eTelemetryEvent\x12\x36\n\tsummaries\x18\x02 \x01(\x0b\x32!.prefab.ConfigEvaluationSummariesH\x00\x12\x33\n\x10\x65xample_contexts\x18\x03 \x01(\x0b\x32\x17.prefab.ExampleContextsH\x00\x12+\n\x0c\x63lient_stats\x18\x04 \x01(\x0b\x32\x13.prefab.ClientStatsH\x00\x12\x30\n\x07loggers\x18\x05 \x01(\x0b\x32\x1d.prefab.LoggersTelemetryEventH\x00\x12/\n\x0e\x63ontext_shapes\x18\x06 \x01(\x0b\x32\x15.prefab.ContextShapesH\x00\x42\t\n\x07payload\"P\n\x0fTelemetryEvents\x12\x15\n\rinstance_hash\x18\x01 \x01(\t\x12&\n\x06\x65vents\x18\x02 \x03(\x0b\x32\x16.prefab.TelemetryEvent\"*\n\x17TelemetryEventsResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\";\n\x0f\x45xampleContexts\x12(\n\x08\x65xamples\x18\x01 \x03(\x0b\x32\x16.prefab.ExampleContext\"K\n\x0e\x45xampleContext\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12&\n\ncontextSet\x18\x02 \x01(\x0b\x32\x12.prefab.ContextSet\"F\n\x0b\x43lientStats\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\x12\x1b\n\x13\x64ropped_event_count\x18\x03 \x01(\x04*:\n\x0eProvidedSource\x12\x1b\n\x17PROVIDED_SOURCE_NOT_SET\x10\x00\x12\x0b\n\x07\x45NV_VAR\x10\x01*\x82\x01\n\nConfigType\x12\x17\n\x13NOT_SET_CONFIG_TYPE\x10\x00\x12\n\n\x06\x43ONFIG\x10\x01\x12\x10\n\x0c\x46\x45\x41TURE_FLAG\x10\x02\x12\r\n\tLOG_LEVEL\x10\x03\x12\x0b\n\x07SEGMENT\x10\x04\x12\x14\n\x10LIMIT_DEFINITION\x10\x05\x12\x0b\n\x07\x44\x45LETED\x10\x06*a\n\x08LogLevel\x12\x15\n\x11NOT_SET_LOG_LEVEL\x10\x00\x12\t\n\x05TRACE\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\x08\n\x04WARN\x10\x05\x12\t\n\x05\x45RROR\x10\x06\x12\t\n\x05\x46\x41TAL\x10\t*G\n\tOnFailure\x12\x0b\n\x07NOT_SET\x10\x00\x12\x10\n\x0cLOG_AND_PASS\x10\x01\x12\x10\n\x0cLOG_AND_FAIL\x10\x02\x12\t\n\x05THROW\x10\x03\x42L\n\x13\x63loud.prefab.domainB\x06PrefabZ-github.com/prefab-cloud/prefab-cloud-go/protob\x06proto3"
|
8
|
+
descriptor_data = "\n\x0cprefab.proto\x12\x06prefab\"W\n\x14\x43onfigServicePointer\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x13\n\x0bstart_at_id\x18\x02 \x01(\x03\x12\x16\n\x0eproject_env_id\x18\x03 \x01(\x03\"\xb1\x04\n\x0b\x43onfigValue\x12\r\n\x03int\x18\x01 \x01(\x03H\x00\x12\x10\n\x06string\x18\x02 \x01(\tH\x00\x12\x0f\n\x05\x62ytes\x18\x03 \x01(\x0cH\x00\x12\x10\n\x06\x64ouble\x18\x04 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x05 \x01(\x08H\x00\x12\x31\n\x0fweighted_values\x18\x06 \x01(\x0b\x32\x16.prefab.WeightedValuesH\x00\x12\x33\n\x10limit_definition\x18\x07 \x01(\x0b\x32\x17.prefab.LimitDefinitionH\x00\x12%\n\tlog_level\x18\t \x01(\x0e\x32\x10.prefab.LogLevelH\x00\x12)\n\x0bstring_list\x18\n \x01(\x0b\x32\x12.prefab.StringListH\x00\x12%\n\tint_range\x18\x0b \x01(\x0b\x32\x10.prefab.IntRangeH\x00\x12$\n\x08provided\x18\x0c \x01(\x0b\x32\x10.prefab.ProvidedH\x00\x12\'\n\x08\x64uration\x18\x0f \x01(\x0b\x32\x13.prefab.IsoDurationH\x00\x12\x1c\n\x04json\x18\x10 \x01(\x0b\x32\x0c.prefab.JsonH\x00\x12 \n\x06schema\x18\x11 \x01(\x0b\x32\x0e.prefab.SchemaH\x00\x12\x19\n\x0c\x63onfidential\x18\r \x01(\x08H\x01\x88\x01\x01\x12\x19\n\x0c\x64\x65\x63rypt_with\x18\x0e \x01(\tH\x02\x88\x01\x01\x42\x06\n\x04typeB\x0f\n\r_confidentialB\x0f\n\r_decrypt_with\"\x14\n\x04Json\x12\x0c\n\x04json\x18\x01 \x01(\t\"!\n\x0bIsoDuration\x12\x12\n\ndefinition\x18\x01 \x01(\t\"b\n\x08Provided\x12+\n\x06source\x18\x01 \x01(\x0e\x32\x16.prefab.ProvidedSourceH\x00\x88\x01\x01\x12\x13\n\x06lookup\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\t\n\x07_sourceB\t\n\x07_lookup\"B\n\x08IntRange\x12\x12\n\x05start\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x10\n\x03\x65nd\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_end\"\x1c\n\nStringList\x12\x0e\n\x06values\x18\x01 \x03(\t\"C\n\rWeightedValue\x12\x0e\n\x06weight\x18\x01 \x01(\x05\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue\"~\n\x0eWeightedValues\x12.\n\x0fweighted_values\x18\x01 \x03(\x0b\x32\x15.prefab.WeightedValue\x12\"\n\x15hash_by_property_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x18\n\x16_hash_by_property_name\"X\n\x0e\x41piKeyMetadata\x12\x13\n\x06key_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07user_id\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\t\n\x07_key_idB\n\n\x08_user_idJ\x04\x08\x02\x10\x03\"\xa0\x02\n\x07\x43onfigs\x12\x1f\n\x07\x63onfigs\x18\x01 \x03(\x0b\x32\x0e.prefab.Config\x12<\n\x16\x63onfig_service_pointer\x18\x02 \x01(\x0b\x32\x1c.prefab.ConfigServicePointer\x12\x34\n\x0f\x61pikey_metadata\x18\x03 \x01(\x0b\x32\x16.prefab.ApiKeyMetadataH\x00\x88\x01\x01\x12\x30\n\x0f\x64\x65\x66\x61ult_context\x18\x04 \x01(\x0b\x32\x12.prefab.ContextSetH\x01\x88\x01\x01\x12\x17\n\nkeep_alive\x18\x05 \x01(\x08H\x02\x88\x01\x01\x42\x12\n\x10_apikey_metadataB\x12\n\x10_default_contextB\r\n\x0b_keep_alive\"\xa4\x04\n\x06\x43onfig\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x12\n\nproject_id\x18\x02 \x01(\x03\x12\x0b\n\x03key\x18\x03 \x01(\t\x12%\n\nchanged_by\x18\x04 \x01(\x0b\x32\x11.prefab.ChangedBy\x12\x1f\n\x04rows\x18\x05 \x03(\x0b\x32\x11.prefab.ConfigRow\x12-\n\x10\x61llowable_values\x18\x06 \x03(\x0b\x32\x13.prefab.ConfigValue\x12\'\n\x0b\x63onfig_type\x18\x07 \x01(\x0e\x32\x12.prefab.ConfigType\x12\x15\n\x08\x64raft_id\x18\x08 \x01(\x03H\x00\x88\x01\x01\x12,\n\nvalue_type\x18\t \x01(\x0e\x32\x18.prefab.Config.ValueType\x12\x1a\n\x12send_to_client_sdk\x18\n \x01(\x08\x12\x17\n\nschema_key\x18\x0b \x01(\tH\x01\x88\x01\x01\"\xb6\x01\n\tValueType\x12\x16\n\x12NOT_SET_VALUE_TYPE\x10\x00\x12\x07\n\x03INT\x10\x01\x12\n\n\x06STRING\x10\x02\x12\t\n\x05\x42YTES\x10\x03\x12\n\n\x06\x44OUBLE\x10\x04\x12\x08\n\x04\x42OOL\x10\x05\x12\x14\n\x10LIMIT_DEFINITION\x10\x07\x12\r\n\tLOG_LEVEL\x10\t\x12\x0f\n\x0bSTRING_LIST\x10\n\x12\r\n\tINT_RANGE\x10\x0b\x12\x0c\n\x08\x44URATION\x10\x0c\x12\x08\n\x04JSON\x10\rB\x0b\n\t_draft_idB\r\n\x0b_schema_key\"?\n\tChangedBy\x12\x0f\n\x07user_id\x18\x01 \x01(\x03\x12\r\n\x05\x65mail\x18\x02 \x01(\t\x12\x12\n\napi_key_id\x18\x03 \x01(\t\"\xe4\x01\n\tConfigRow\x12\x1b\n\x0eproject_env_id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12(\n\x06values\x18\x02 \x03(\x0b\x32\x18.prefab.ConditionalValue\x12\x35\n\nproperties\x18\x03 \x03(\x0b\x32!.prefab.ConfigRow.PropertiesEntry\x1a\x46\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue:\x02\x38\x01\x42\x11\n\x0f_project_env_id\"[\n\x10\x43onditionalValue\x12#\n\x08\x63riteria\x18\x01 \x03(\x0b\x32\x11.prefab.Criterion\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue\"\x96\x06\n\tCriterion\x12\x15\n\rproperty_name\x18\x01 \x01(\t\x12\x35\n\x08operator\x18\x02 \x01(\x0e\x32#.prefab.Criterion.CriterionOperator\x12+\n\x0evalue_to_match\x18\x03 \x01(\x0b\x32\x13.prefab.ConfigValue\"\x8d\x05\n\x11\x43riterionOperator\x12\x0b\n\x07NOT_SET\x10\x00\x12\x11\n\rLOOKUP_KEY_IN\x10\x01\x12\x15\n\x11LOOKUP_KEY_NOT_IN\x10\x02\x12\n\n\x06IN_SEG\x10\x03\x12\x0e\n\nNOT_IN_SEG\x10\x04\x12\x0f\n\x0b\x41LWAYS_TRUE\x10\x05\x12\x12\n\x0ePROP_IS_ONE_OF\x10\x06\x12\x16\n\x12PROP_IS_NOT_ONE_OF\x10\x07\x12\x19\n\x15PROP_ENDS_WITH_ONE_OF\x10\x08\x12!\n\x1dPROP_DOES_NOT_END_WITH_ONE_OF\x10\t\x12\x16\n\x12HIERARCHICAL_MATCH\x10\n\x12\x10\n\x0cIN_INT_RANGE\x10\x0b\x12\x1b\n\x17PROP_STARTS_WITH_ONE_OF\x10\x0c\x12#\n\x1fPROP_DOES_NOT_START_WITH_ONE_OF\x10\r\x12\x18\n\x14PROP_CONTAINS_ONE_OF\x10\x0e\x12 \n\x1cPROP_DOES_NOT_CONTAIN_ONE_OF\x10\x0f\x12\x12\n\x0ePROP_LESS_THAN\x10\x10\x12\x1b\n\x17PROP_LESS_THAN_OR_EQUAL\x10\x11\x12\x15\n\x11PROP_GREATER_THAN\x10\x12\x12\x1e\n\x1aPROP_GREATER_THAN_OR_EQUAL\x10\x13\x12\x0f\n\x0bPROP_BEFORE\x10\x14\x12\x0e\n\nPROP_AFTER\x10\x15\x12\x10\n\x0cPROP_MATCHES\x10\x16\x12\x17\n\x13PROP_DOES_NOT_MATCH\x10\x17\x12\x19\n\x15PROP_SEMVER_LESS_THAN\x10\x18\x12\x15\n\x11PROP_SEMVER_EQUAL\x10\x19\x12\x1c\n\x18PROP_SEMVER_GREATER_THAN\x10\x1a\"\x89\x01\n\x07Loggers\x12\x1f\n\x07loggers\x18\x01 \x03(\x0b\x32\x0e.prefab.Logger\x12\x10\n\x08start_at\x18\x02 \x01(\x03\x12\x0e\n\x06\x65nd_at\x18\x03 \x01(\x03\x12\x15\n\rinstance_hash\x18\x04 \x01(\t\x12\x16\n\tnamespace\x18\x05 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_namespace\"\xd9\x01\n\x06Logger\x12\x13\n\x0blogger_name\x18\x01 \x01(\t\x12\x13\n\x06traces\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x13\n\x06\x64\x65\x62ugs\x18\x03 \x01(\x03H\x01\x88\x01\x01\x12\x12\n\x05infos\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05warns\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x13\n\x06\x65rrors\x18\x06 \x01(\x03H\x04\x88\x01\x01\x12\x13\n\x06\x66\x61tals\x18\x07 \x01(\x03H\x05\x88\x01\x01\x42\t\n\x07_tracesB\t\n\x07_debugsB\x08\n\x06_infosB\x08\n\x06_warnsB\t\n\x07_errorsB\t\n\x07_fatals\"\x16\n\x14LoggerReportResponse\"\xdb\x03\n\rLimitResponse\x12\x0e\n\x06passed\x18\x01 \x01(\x08\x12\x12\n\nexpires_at\x18\x02 \x01(\x03\x12\x16\n\x0e\x65nforced_group\x18\x03 \x01(\t\x12\x16\n\x0e\x63urrent_bucket\x18\x04 \x01(\x03\x12\x14\n\x0cpolicy_group\x18\x05 \x01(\t\x12;\n\x0bpolicy_name\x18\x06 \x01(\x0e\x32&.prefab.LimitResponse.LimitPolicyNames\x12\x14\n\x0cpolicy_limit\x18\x07 \x01(\x05\x12\x0e\n\x06\x61mount\x18\x08 \x01(\x03\x12\x16\n\x0elimit_reset_at\x18\t \x01(\x03\x12\x39\n\x0csafety_level\x18\n \x01(\x0e\x32#.prefab.LimitDefinition.SafetyLevel\"\xa9\x01\n\x10LimitPolicyNames\x12\x0b\n\x07NOT_SET\x10\x00\x12\x14\n\x10SECONDLY_ROLLING\x10\x01\x12\x14\n\x10MINUTELY_ROLLING\x10\x03\x12\x12\n\x0eHOURLY_ROLLING\x10\x05\x12\x11\n\rDAILY_ROLLING\x10\x07\x12\x13\n\x0fMONTHLY_ROLLING\x10\x08\x12\x0c\n\x08INFINITE\x10\t\x12\x12\n\x0eYEARLY_ROLLING\x10\n\"\x99\x02\n\x0cLimitRequest\x12\x12\n\naccount_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x61\x63quire_amount\x18\x02 \x01(\x05\x12\x0e\n\x06groups\x18\x03 \x03(\t\x12:\n\x0elimit_combiner\x18\x04 \x01(\x0e\x32\".prefab.LimitRequest.LimitCombiner\x12\x1e\n\x16\x61llow_partial_response\x18\x05 \x01(\x08\x12\x39\n\x0csafety_level\x18\x06 \x01(\x0e\x32#.prefab.LimitDefinition.SafetyLevel\"6\n\rLimitCombiner\x12\x0b\n\x07NOT_SET\x10\x00\x12\x0b\n\x07MINIMUM\x10\x01\x12\x0b\n\x07MAXIMUM\x10\x02\"/\n\nContextSet\x12!\n\x08\x63ontexts\x18\x01 \x03(\x0b\x32\x0f.prefab.Context\"\x96\x01\n\x07\x43ontext\x12\x11\n\x04type\x18\x01 \x01(\tH\x00\x88\x01\x01\x12+\n\x06values\x18\x02 \x03(\x0b\x32\x1b.prefab.Context.ValuesEntry\x1a\x42\n\x0bValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue:\x02\x38\x01\x42\x07\n\x05_type\"\x93\x01\n\x08Identity\x12\x13\n\x06lookup\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x34\n\nattributes\x18\x02 \x03(\x0b\x32 .prefab.Identity.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07_lookup\"\xd6\x02\n\x18\x43onfigEvaluationMetaData\x12\x1d\n\x10\x63onfig_row_index\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12$\n\x17\x63onditional_value_index\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12!\n\x14weighted_value_index\x18\x03 \x01(\x03H\x02\x88\x01\x01\x12%\n\x04type\x18\x04 \x01(\x0e\x32\x12.prefab.ConfigTypeH\x03\x88\x01\x01\x12\x0f\n\x02id\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12\x31\n\nvalue_type\x18\x06 \x01(\x0e\x32\x18.prefab.Config.ValueTypeH\x05\x88\x01\x01\x42\x13\n\x11_config_row_indexB\x1a\n\x18_conditional_value_indexB\x17\n\x15_weighted_value_indexB\x07\n\x05_typeB\x05\n\x03_idB\r\n\x0b_value_type\"\x8b\x03\n\x11\x43lientConfigValue\x12\r\n\x03int\x18\x01 \x01(\x03H\x00\x12\x10\n\x06string\x18\x02 \x01(\tH\x00\x12\x10\n\x06\x64ouble\x18\x03 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x04 \x01(\x08H\x00\x12%\n\tlog_level\x18\x05 \x01(\x0e\x32\x10.prefab.LogLevelH\x00\x12)\n\x0bstring_list\x18\x07 \x01(\x0b\x32\x12.prefab.StringListH\x00\x12%\n\tint_range\x18\x08 \x01(\x0b\x32\x10.prefab.IntRangeH\x00\x12*\n\x08\x64uration\x18\t \x01(\x0b\x32\x16.prefab.ClientDurationH\x00\x12\x1c\n\x04json\x18\n \x01(\x0b\x32\x0c.prefab.JsonH\x00\x12I\n\x1a\x63onfig_evaluation_metadata\x18\x06 \x01(\x0b\x32 .prefab.ConfigEvaluationMetaDataH\x01\x88\x01\x01\x42\x06\n\x04typeB\x1d\n\x1b_config_evaluation_metadata\"D\n\x0e\x43lientDuration\x12\x0f\n\x07seconds\x18\x01 \x01(\x03\x12\r\n\x05nanos\x18\x02 \x01(\x05\x12\x12\n\ndefinition\x18\x03 \x01(\t\"\xa4\x02\n\x11\x43onfigEvaluations\x12\x35\n\x06values\x18\x01 \x03(\x0b\x32%.prefab.ConfigEvaluations.ValuesEntry\x12\x34\n\x0f\x61pikey_metadata\x18\x02 \x01(\x0b\x32\x16.prefab.ApiKeyMetadataH\x00\x88\x01\x01\x12\x30\n\x0f\x64\x65\x66\x61ult_context\x18\x03 \x01(\x0b\x32\x12.prefab.ContextSetH\x01\x88\x01\x01\x1aH\n\x0bValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.prefab.ClientConfigValue:\x02\x38\x01\x42\x12\n\x10_apikey_metadataB\x12\n\x10_default_context\"\xa8\x02\n\x0fLimitDefinition\x12;\n\x0bpolicy_name\x18\x02 \x01(\x0e\x32&.prefab.LimitResponse.LimitPolicyNames\x12\r\n\x05limit\x18\x03 \x01(\x05\x12\r\n\x05\x62urst\x18\x04 \x01(\x05\x12\x12\n\naccount_id\x18\x05 \x01(\x03\x12\x15\n\rlast_modified\x18\x06 \x01(\x03\x12\x12\n\nreturnable\x18\x07 \x01(\x08\x12\x39\n\x0csafety_level\x18\x08 \x01(\x0e\x32#.prefab.LimitDefinition.SafetyLevel\"@\n\x0bSafetyLevel\x12\x0b\n\x07NOT_SET\x10\x00\x12\x12\n\x0eL4_BEST_EFFORT\x10\x04\x12\x10\n\x0cL5_BOMBPROOF\x10\x05\"@\n\x10LimitDefinitions\x12,\n\x0b\x64\x65\x66initions\x18\x01 \x03(\x0b\x32\x17.prefab.LimitDefinition\"\x8a\x01\n\x0f\x42ufferedRequest\x12\x12\n\naccount_id\x18\x01 \x01(\x03\x12\x0e\n\x06method\x18\x02 \x01(\t\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12\x0c\n\x04\x62ody\x18\x04 \x01(\t\x12\x14\n\x0climit_groups\x18\x05 \x03(\t\x12\x14\n\x0c\x63ontent_type\x18\x06 \x01(\t\x12\x0c\n\x04\x66ifo\x18\x07 \x01(\x08\"\x94\x01\n\x0c\x42\x61tchRequest\x12\x12\n\naccount_id\x18\x01 \x01(\x03\x12\x0e\n\x06method\x18\x02 \x01(\t\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12\x0c\n\x04\x62ody\x18\x04 \x01(\t\x12\x14\n\x0climit_groups\x18\x05 \x03(\t\x12\x16\n\x0e\x62\x61tch_template\x18\x06 \x01(\t\x12\x17\n\x0f\x62\x61tch_separator\x18\x07 \x01(\t\" \n\rBasicResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\"3\n\x10\x43reationResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0e\n\x06new_id\x18\x02 \x01(\x03\"h\n\x07IdBlock\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x16\n\x0eproject_env_id\x18\x02 \x01(\x03\x12\x15\n\rsequence_name\x18\x03 \x01(\t\x12\r\n\x05start\x18\x04 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x05 \x01(\x03\"a\n\x0eIdBlockRequest\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x16\n\x0eproject_env_id\x18\x02 \x01(\x03\x12\x15\n\rsequence_name\x18\x03 \x01(\t\x12\x0c\n\x04size\x18\x04 \x01(\x03\"\x8a\x01\n\x0c\x43ontextShape\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x0b\x66ield_types\x18\x02 \x03(\x0b\x32$.prefab.ContextShape.FieldTypesEntry\x1a\x31\n\x0f\x46ieldTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\"[\n\rContextShapes\x12$\n\x06shapes\x18\x01 \x03(\x0b\x32\x14.prefab.ContextShape\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_namespace\"C\n\rEvaluatedKeys\x12\x0c\n\x04keys\x18\x01 \x03(\t\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_namespace\"\x93\x01\n\x0f\x45valuatedConfig\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0e\x63onfig_version\x18\x02 \x01(\x03\x12#\n\x06result\x18\x03 \x01(\x0b\x32\x13.prefab.ConfigValue\x12#\n\x07\x63ontext\x18\x04 \x01(\x0b\x32\x12.prefab.ContextSet\x12\x11\n\ttimestamp\x18\x05 \x01(\x03\"<\n\x10\x45valuatedConfigs\x12(\n\x07\x63onfigs\x18\x01 \x03(\x0b\x32\x17.prefab.EvaluatedConfig\"\xc4\x03\n\x17\x43onfigEvaluationCounter\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x16\n\tconfig_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1b\n\x0eselected_index\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x30\n\x0eselected_value\x18\x04 \x01(\x0b\x32\x13.prefab.ConfigValueH\x02\x88\x01\x01\x12\x1d\n\x10\x63onfig_row_index\x18\x05 \x01(\rH\x03\x88\x01\x01\x12$\n\x17\x63onditional_value_index\x18\x06 \x01(\rH\x04\x88\x01\x01\x12!\n\x14weighted_value_index\x18\x07 \x01(\rH\x05\x88\x01\x01\x12\x36\n\x06reason\x18\x08 \x01(\x0e\x32&.prefab.ConfigEvaluationCounter.Reason\"\x15\n\x06Reason\x12\x0b\n\x07UNKNOWN\x10\x00\x42\x0c\n\n_config_idB\x11\n\x0f_selected_indexB\x11\n\x0f_selected_valueB\x13\n\x11_config_row_indexB\x1a\n\x18_conditional_value_indexB\x17\n\x15_weighted_value_index\"{\n\x17\x43onfigEvaluationSummary\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x04type\x18\x02 \x01(\x0e\x32\x12.prefab.ConfigType\x12\x31\n\x08\x63ounters\x18\x03 \x03(\x0b\x32\x1f.prefab.ConfigEvaluationCounter\"k\n\x19\x43onfigEvaluationSummaries\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\x12\x32\n\tsummaries\x18\x03 \x03(\x0b\x32\x1f.prefab.ConfigEvaluationSummary\"Z\n\x15LoggersTelemetryEvent\x12\x1f\n\x07loggers\x18\x01 \x03(\x0b\x32\x0e.prefab.Logger\x12\x10\n\x08start_at\x18\x02 \x01(\x03\x12\x0e\n\x06\x65nd_at\x18\x03 \x01(\x03\"\x98\x02\n\x0eTelemetryEvent\x12\x36\n\tsummaries\x18\x02 \x01(\x0b\x32!.prefab.ConfigEvaluationSummariesH\x00\x12\x33\n\x10\x65xample_contexts\x18\x03 \x01(\x0b\x32\x17.prefab.ExampleContextsH\x00\x12+\n\x0c\x63lient_stats\x18\x04 \x01(\x0b\x32\x13.prefab.ClientStatsH\x00\x12\x30\n\x07loggers\x18\x05 \x01(\x0b\x32\x1d.prefab.LoggersTelemetryEventH\x00\x12/\n\x0e\x63ontext_shapes\x18\x06 \x01(\x0b\x32\x15.prefab.ContextShapesH\x00\x42\t\n\x07payload\"P\n\x0fTelemetryEvents\x12\x15\n\rinstance_hash\x18\x01 \x01(\t\x12&\n\x06\x65vents\x18\x02 \x03(\x0b\x32\x16.prefab.TelemetryEvent\"*\n\x17TelemetryEventsResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\";\n\x0f\x45xampleContexts\x12(\n\x08\x65xamples\x18\x01 \x03(\x0b\x32\x16.prefab.ExampleContext\"K\n\x0e\x45xampleContext\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12&\n\ncontextSet\x18\x02 \x01(\x0b\x32\x12.prefab.ContextSet\"F\n\x0b\x43lientStats\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\x12\x1b\n\x13\x64ropped_event_count\x18\x03 \x01(\x04\"}\n\x06Schema\x12\x0e\n\x06schema\x18\x01 \x01(\t\x12.\n\x0bschema_type\x18\x02 \x01(\x0e\x32\x19.prefab.Schema.SchemaType\"3\n\nSchemaType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x07\n\x03ZOD\x10\x01\x12\x0f\n\x0bJSON_SCHEMA\x10\x02*:\n\x0eProvidedSource\x12\x1b\n\x17PROVIDED_SOURCE_NOT_SET\x10\x00\x12\x0b\n\x07\x45NV_VAR\x10\x01*\x8e\x01\n\nConfigType\x12\x17\n\x13NOT_SET_CONFIG_TYPE\x10\x00\x12\n\n\x06\x43ONFIG\x10\x01\x12\x10\n\x0c\x46\x45\x41TURE_FLAG\x10\x02\x12\r\n\tLOG_LEVEL\x10\x03\x12\x0b\n\x07SEGMENT\x10\x04\x12\x14\n\x10LIMIT_DEFINITION\x10\x05\x12\x0b\n\x07\x44\x45LETED\x10\x06\x12\n\n\x06SCHEMA\x10\x07*a\n\x08LogLevel\x12\x15\n\x11NOT_SET_LOG_LEVEL\x10\x00\x12\t\n\x05TRACE\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\x08\n\x04WARN\x10\x05\x12\t\n\x05\x45RROR\x10\x06\x12\t\n\x05\x46\x41TAL\x10\t*G\n\tOnFailure\x12\x0b\n\x07NOT_SET\x10\x00\x12\x10\n\x0cLOG_AND_PASS\x10\x01\x12\x10\n\x0cLOG_AND_FAIL\x10\x02\x12\t\n\x05THROW\x10\x03\x42L\n\x13\x63loud.prefab.domainB\x06PrefabZ-github.com/prefab-cloud/prefab-cloud-go/protob\x06proto3"
|
9
9
|
|
10
10
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
11
|
pool.add_serialized_file(descriptor_data)
|
@@ -68,6 +68,8 @@ module PrefabProto
|
|
68
68
|
ExampleContexts = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.ExampleContexts").msgclass
|
69
69
|
ExampleContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.ExampleContext").msgclass
|
70
70
|
ClientStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.ClientStats").msgclass
|
71
|
+
Schema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.Schema").msgclass
|
72
|
+
Schema::SchemaType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.Schema.SchemaType").enummodule
|
71
73
|
ProvidedSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.ProvidedSource").enummodule
|
72
74
|
ConfigType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.ConfigType").enummodule
|
73
75
|
LogLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.LogLevel").enummodule
|
data/prefab-cloud-ruby.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: prefab-cloud-ruby 1.8.
|
5
|
+
# stub: prefab-cloud-ruby 1.8.9 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "prefab-cloud-ruby".freeze
|
9
|
-
s.version = "1.8.
|
9
|
+
s.version = "1.8.9"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Jeff Dwyer".freeze]
|
14
|
-
s.date = "2025-
|
14
|
+
s.date = "2025-04-15"
|
15
15
|
s.description = "Feature Flags, Live Config, and Dynamic Log Levels as a service".freeze
|
16
16
|
s.email = "jdwyer@prefab.cloud".freeze
|
17
17
|
s.extra_rdoc_files = [
|
data/test/test_context.rb
CHANGED
@@ -141,14 +141,6 @@ class TestContext < Minitest::Test
|
|
141
141
|
"id" => PrefabProto::ConfigValue.new(int: 2),
|
142
142
|
"name" => PrefabProto::ConfigValue.new(string: "team-name")
|
143
143
|
}
|
144
|
-
),
|
145
|
-
|
146
|
-
PrefabProto::Context.new(
|
147
|
-
type: "prefab",
|
148
|
-
values: {
|
149
|
-
'current-time' => PrefabProto::ConfigValue.new(int: Prefab::TimeHelpers.now_in_ms),
|
150
|
-
'namespace' => PrefabProto::ConfigValue.new(string: namespace)
|
151
|
-
}
|
152
144
|
)
|
153
145
|
]
|
154
146
|
), contexts.to_proto(namespace)
|
@@ -226,13 +218,6 @@ class TestContext < Minitest::Test
|
|
226
218
|
"name" => PrefabProto::ConfigValue.new(string: "team-name")
|
227
219
|
}
|
228
220
|
),
|
229
|
-
# via to_proto
|
230
|
-
PrefabProto::Context.new(
|
231
|
-
type: "prefab",
|
232
|
-
values: {
|
233
|
-
'current-time' => PrefabProto::ConfigValue.new(int: Prefab::TimeHelpers.now_in_ms),
|
234
|
-
}
|
235
|
-
)
|
236
221
|
]
|
237
222
|
)
|
238
223
|
|
data/test/test_context_shape.rb
CHANGED
@@ -36,7 +36,7 @@ class TestContextShape < Minitest::Test
|
|
36
36
|
|
37
37
|
# If this test fails, it means that we've added a new type to the ConfigValue
|
38
38
|
def test_mapping_is_exhaustive
|
39
|
-
unsupported = [:bytes, :limit_definition, :log_level, :weighted_values, :int_range, :provided, :duration, :json]
|
39
|
+
unsupported = [:bytes, :limit_definition, :log_level, :weighted_values, :int_range, :provided, :duration, :json, :schema]
|
40
40
|
type_fields = PrefabProto::ConfigValue.descriptor.lookup_oneof("type").entries
|
41
41
|
supported = type_fields.entries.reject do |entry|
|
42
42
|
unsupported.include?(entry.name.to_sym)
|
@@ -1068,6 +1068,28 @@ class TestCriteriaEvaluator < Minitest::Test
|
|
1068
1068
|
assert_equal DESIRED_VALUE, evaluator.evaluate(context(user:{version: "3.0.0"})).unwrapped_value
|
1069
1069
|
end
|
1070
1070
|
|
1071
|
+
def test_date_before_with_current_time
|
1072
|
+
future_time = Time.now.utc + 3600 # 1 hour in the future
|
1073
|
+
config = create_prefab_config(
|
1074
|
+
operator: PrefabProto::Criterion::CriterionOperator::PROP_BEFORE,
|
1075
|
+
property_name: 'prefab.current-time',
|
1076
|
+
value_to_match: future_time.iso8601
|
1077
|
+
)
|
1078
|
+
evaluator = Prefab::CriteriaEvaluator.new(config, project_env_id: PROJECT_ENV_ID, resolver: nil, base_client: @base_client, namespace: nil)
|
1079
|
+
assert_equal DESIRED_VALUE, evaluator.evaluate(context({})).unwrapped_value
|
1080
|
+
end
|
1081
|
+
|
1082
|
+
def test_date_after_with_current_time
|
1083
|
+
past_time = Time.now.utc - 3600 # 1 hour in the past
|
1084
|
+
config = create_prefab_config(
|
1085
|
+
operator: PrefabProto::Criterion::CriterionOperator::PROP_AFTER,
|
1086
|
+
property_name: 'prefab.current-time',
|
1087
|
+
value_to_match: past_time.iso8601
|
1088
|
+
)
|
1089
|
+
evaluator = Prefab::CriteriaEvaluator.new(config, project_env_id: PROJECT_ENV_ID, resolver: nil, base_client: @base_client, namespace: nil)
|
1090
|
+
assert_equal DESIRED_VALUE, evaluator.evaluate(context({})).unwrapped_value
|
1091
|
+
end
|
1092
|
+
|
1071
1093
|
private
|
1072
1094
|
|
1073
1095
|
def string_list(values)
|
@@ -59,86 +59,86 @@ class TestEvaluationSummaryAggregator < Minitest::Test
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def test_sync
|
62
|
-
|
63
|
-
|
62
|
+
Timecop.freeze('2023-08-09 15:18:12 -0400') do
|
63
|
+
awhile_ago = Time.now - 60
|
64
|
+
now = Time.now
|
64
65
|
|
65
|
-
|
66
|
+
client = MockBaseClient.new
|
66
67
|
|
67
|
-
|
68
|
+
aggregator = nil
|
68
69
|
|
69
|
-
|
70
|
-
|
71
|
-
|
70
|
+
Timecop.freeze(awhile_ago) do
|
71
|
+
# start the aggregator in the past
|
72
|
+
aggregator = Prefab::EvaluationSummaryAggregator.new(client: client, max_keys: 10,
|
72
73
|
sync_interval: EFFECTIVELY_NEVER)
|
73
|
-
|
74
|
-
|
75
|
-
add_example_data(aggregator)
|
74
|
+
end
|
76
75
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
76
|
+
add_example_data(aggregator)
|
77
|
+
|
78
|
+
expected_post = PrefabProto::TelemetryEvents.new(
|
79
|
+
instance_hash: client.instance_hash,
|
80
|
+
events: [
|
81
|
+
PrefabProto::TelemetryEvent.new(
|
82
|
+
summaries: PrefabProto::ConfigEvaluationSummaries.new(
|
83
|
+
start: awhile_ago.to_i * 1000,
|
84
|
+
end: now.to_i * 1000,
|
85
|
+
summaries: [
|
86
|
+
PrefabProto::ConfigEvaluationSummary.new(
|
87
|
+
key: 'config-1',
|
88
|
+
type: :CONFIG,
|
89
|
+
counters: [
|
90
|
+
PrefabProto::ConfigEvaluationCounter.new(
|
91
|
+
config_id: 1,
|
92
|
+
selected_index: 2,
|
93
|
+
config_row_index: 3,
|
94
|
+
conditional_value_index: 4,
|
95
|
+
weighted_value_index: 5,
|
96
|
+
selected_value: EXAMPLE_VALUE_1,
|
97
|
+
count: 3
|
98
|
+
),
|
99
|
+
PrefabProto::ConfigEvaluationCounter.new(
|
100
|
+
config_id: 1,
|
101
|
+
selected_index: 3,
|
102
|
+
config_row_index: 7,
|
103
|
+
conditional_value_index: 8,
|
104
|
+
weighted_value_index: 10,
|
105
|
+
selected_value: EXAMPLE_VALUE_2,
|
106
|
+
count: 1
|
107
|
+
)
|
108
|
+
]
|
109
|
+
),
|
110
|
+
PrefabProto::ConfigEvaluationSummary.new(
|
111
|
+
key: 'config-2',
|
112
|
+
type: :FEATURE_FLAG,
|
113
|
+
counters: [
|
114
|
+
PrefabProto::ConfigEvaluationCounter.new(
|
115
|
+
config_id: 2,
|
116
|
+
selected_index: 3,
|
117
|
+
config_row_index: 5,
|
118
|
+
conditional_value_index: 7,
|
119
|
+
weighted_value_index: 6,
|
120
|
+
selected_value: EXAMPLE_VALUE_1,
|
121
|
+
count: 9
|
122
|
+
)
|
123
|
+
]
|
124
|
+
)
|
125
|
+
]
|
126
|
+
)
|
125
127
|
)
|
126
128
|
]
|
127
129
|
)
|
128
|
-
)
|
129
|
-
]
|
130
|
-
)
|
131
130
|
|
132
|
-
|
133
|
-
|
134
|
-
|
131
|
+
requests = wait_for_post_requests(client) do
|
132
|
+
Timecop.freeze(now) do
|
133
|
+
aggregator.sync
|
134
|
+
end
|
135
135
|
end
|
136
|
-
end
|
137
136
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
137
|
+
assert_equal [[
|
138
|
+
'/api/v1/telemetry',
|
139
|
+
expected_post
|
140
|
+
]], requests
|
141
|
+
end
|
142
142
|
end
|
143
143
|
|
144
144
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prefab-cloud-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Dwyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|