datafold 0.1.39

A personal database for data sovereignty with AI-powered ingestion
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
   Compiling datafold v0.1.38 (/Users/tomtang/Documents/projects/datafold-exemem/fold_db)
warning: failed to parse serde attribute
  | 
  | #[serde(into = "String", try_from = "String")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none", default)]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none", default)]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none", default)]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(into = "String", try_from = "String")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none", default)]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none", default)]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none", default)]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: failed to parse serde attribute
  | 
  | #[serde(skip_serializing_if = "Option::is_none")]
  | 
  = note: ts-rs failed to parse this attribute. It will be ignored.
warning: unused import: `tokio::sync::Mutex`
 --> src/datafold_node/operation_processor.rs:6:5
  |
6 | use tokio::sync::Mutex;
  |     ^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `std::thread`
 --> src/fold_db_core/orchestration/index_event_handler.rs:7:5
  |
7 | use std::thread;
  |     ^^^^^^^^^^^

warning: unused import: `TableConfig`
 --> src/lambda/config.rs:5:53
  |
5 | use crate::storage::{StorageConfig, DynamoDbConfig, TableConfig};
  |                                                     ^^^^^^^^^^^

warning: unused import: `NodeConfig`
 --> src/lambda/context.rs:5:42
  |
5 | use crate::datafold_node::{DataFoldNode, NodeConfig};
  |                                          ^^^^^^^^^^

warning: unused import: `crate::fold_db_core::FoldDB`
 --> src/lambda/context.rs:7:5
  |
7 | use crate::fold_db_core::FoldDB;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `LambdaStorage`
  --> src/lambda/context.rs:11:65
   |
11 | use crate::lambda::config::{AIConfig, AIProvider, LambdaConfig, LambdaStorage};
   |                                                                 ^^^^^^^^^^^^^

warning: unused import: `crate::storage::StorageConfig`
  --> src/lambda/context.rs:14:5
   |
14 | use crate::storage::StorageConfig;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `Mutex`
  --> src/lambda/context.rs:16:22
   |
16 | use std::sync::{Arc, Mutex};
   |                      ^^^^^

warning: unused import: `DynamoDbConfig`
  --> src/lambda/node_manager.rs:76:45
   |
76 |         use crate::storage::{StorageConfig, DynamoDbConfig};
   |                                             ^^^^^^^^^^^^^^

warning: unused import: `tracing_subscriber::layer::SubscriberExt`
 --> src/logging/outputs/console.rs:7:5
  |
7 | use tracing_subscriber::layer::SubscriberExt;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `tracing_subscriber::layer::SubscriberExt`
 --> src/logging/outputs/file.rs:7:5
  |
7 | use tracing_subscriber::layer::SubscriberExt;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `tracing_subscriber::layer::SubscriberExt`
 --> src/logging/outputs/structured.rs:7:5
  |
7 | use tracing_subscriber::layer::SubscriberExt;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `get_current_user_id`
 --> src/logging/outputs/dynamodb.rs:8:56
  |
8 | use crate::logging::core::{Logger, LogEntry, LogLevel, get_current_user_id};
  |                                                        ^^^^^^^^^^^^^^^^^^^

warning: unused import: `fetch_atoms_for_matches`
  --> src/schema/types/field/hash_range_field.rs:12:78
   |
12 | use crate::schema::types::field::{FilterApplicator, apply_hash_range_filter, fetch_atoms_for_matches};
   |                                                                              ^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `fetch_atoms_for_matches`
  --> src/schema/types/field/range_field.rs:11:113
   |
11 | use crate::schema::types::field::{HashRangeFilter, HashRangeFilterResult, FilterApplicator, apply_range_filter, fetch_atoms_for_matches};
   |                                                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `fetch_atoms_for_matches`
 --> src/schema/types/field/single_field.rs:8:75
  |
8 | use crate::schema::types::field::{HashRangeFilter, HashRangeFilterResult, fetch_atoms_for_matches, FilterApplicator};
  |                                                                           ^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `LambdaStorage`
   --> src/lambda/node_manager.rs:174:47
    |
174 |     use crate::lambda::config::{LambdaConfig, LambdaStorage};
    |                                               ^^^^^^^^^^^^^

warning: use of deprecated function `aws_config::load_from_env`: Use the `aws_config::load_defaults` function. If you don't care about future default behavior changes, you can continue to use this function by enabling the `behavior-version-latest` feature. Doing so will make this deprecation notice go away.
   --> src/ingestion/progress.rs:203:34
    |
203 |         let config = aws_config::load_from_env().await;
    |                                  ^^^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

warning: use of deprecated function `aws_config::from_env`: Use the `aws_config::defaults` function. If you don't care about future default behavior changes, you can continue to use this function by enabling the `behavior-version-latest` feature. Doing so will make this deprecation notice go away.
  --> src/logging/mod.rs:98:46
   |
98 |                 let sdk_config = aws_config::from_env().region(region_provider).load().await;
   |                                              ^^^^^^^^

warning: use of deprecated function `aws_config::load_from_env`: Use the `aws_config::load_defaults` function. If you don't care about future default behavior changes, you can continue to use this function by enabling the `behavior-version-latest` feature. Doing so will make this deprecation notice go away.
  --> src/logging/outputs/dynamodb.rs:29:34
   |
29 |         let config = aws_config::load_from_env().await;
   |                                  ^^^^^^^^^^^^^

warning: use of deprecated function `schema::types::field::filter_utils::fetch_atoms_for_matches`: Use fetch_atoms_for_matches_async instead
  --> src/schema/types/field/mod.rs:17:5
   |
17 |     fetch_atoms_for_matches,
   |     ^^^^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated function `schema::types::field::filter_utils::fetch_atoms_for_matches`: Use fetch_atoms_for_matches_async instead
  --> src/schema/types/field/hash_range_field.rs:12:78
   |
12 | use crate::schema::types::field::{FilterApplicator, apply_hash_range_filter, fetch_atoms_for_matches};
   |                                                                              ^^^^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated function `schema::types::field::filter_utils::fetch_atoms_for_matches`: Use fetch_atoms_for_matches_async instead
  --> src/schema/types/field/range_field.rs:11:113
   |
11 | use crate::schema::types::field::{HashRangeFilter, HashRangeFilterResult, FilterApplicator, apply_range_filter, fetch_atoms_for_matches};
   |                                                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated function `schema::types::field::filter_utils::fetch_atoms_for_matches`: Use fetch_atoms_for_matches_async instead
 --> src/schema/types/field/single_field.rs:8:75
  |
8 | use crate::schema::types::field::{HashRangeFilter, HashRangeFilterResult, fetch_atoms_for_matches, FilterApplicator};
  |                                                                           ^^^^^^^^^^^^^^^^^^^^^^^

warning: unused variable: `non_blocking`
  --> src/logging/outputs/file.rs:51:14
   |
51 |         let (non_blocking, guard) = non_blocking(file_appender);
   |              ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_non_blocking`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `fold_db`
   --> src/ingestion/core.rs:953:13
    |
953 |         let fold_db = FoldDB::new(&test_path).await.unwrap();
    |             ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_fold_db`

warning: associated function `parse_file_size` is never used
  --> src/logging/outputs/file.rs:86:8
   |
19 | impl FileOutput {
   | --------------- associated function in this implementation
...
86 |     fn parse_file_size(size_str: &str) -> Result<u64, LoggingError> {
   |        ^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: unused variable: `schemas`
   --> src/storage/dynamodb_store.rs:543:13
    |
543 |         let schemas = store.list_schema_names().await.unwrap();
    |             ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_schemas`

warning: `datafold` (lib) generated 25 warnings (1 duplicate) (run `cargo fix --lib -p datafold` to apply 16 suggestions)
warning: unused import: `HttpResponse`
 --> tests/mock_check.rs:2:65
  |
2 | use aws_smithy_runtime_api::client::orchestrator::{HttpRequest, HttpResponse};
  |                                                                 ^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `aws_smithy_runtime_api::box_error::BoxError`
 --> tests/mock_check.rs:3:5
  |
3 | use aws_smithy_runtime_api::box_error::BoxError;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `LogLevel`
 --> tests/lambda_sync_logging_test.rs:2:71
  |
2 | use datafold::lambda::{LambdaConfig, LambdaContext, Logger, LogEntry, LogLevel, LambdaLogging};
  |                                                                       ^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `datafold::ingestion::IngestionError`
 --> tests/lambda_sync_logging_test.rs:3:5
  |
3 | use datafold::ingestion::IngestionError;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `std::collections::HashMap`
 --> tests/lambda_sync_logging_test.rs:9:5
  |
9 | use std::collections::HashMap;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `SledNamespacedStore`
  --> examples/storage_abstraction_demo.rs:12:25
   |
12 | use datafold::storage::{SledNamespacedStore, InMemoryNamespacedStore, NamespacedStore};
   |                         ^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: unused imports: `LambdaConfig`, `LambdaContext`, `LambdaLogging`, and `StdoutLogger`
  --> examples/lambda_dynamodb_logger.rs:77:24
   |
77 | use datafold::lambda::{LambdaConfig, LambdaContext, StdoutLogger, Logger, LogEntry, LogLevel, LambdaLogging};
   |                        ^^^^^^^^^^^^  ^^^^^^^^^^^^^  ^^^^^^^^^^^^                              ^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: use of deprecated function `aws_config::load_from_env`: Use the `aws_config::load_defaults` function. If you don't care about future default behavior changes, you can continue to use this function by enabling the `behavior-version-latest` feature. Doing so will make this deprecation notice go away.
   --> examples/lambda_dynamodb_logger.rs:112:34
    |
112 |         let config = aws_config::load_from_env().await;
    |                                  ^^^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

warning: `datafold` (test "mock_check") generated 2 warnings (run `cargo fix --test "mock_check"` to apply 2 suggestions)
warning: `datafold` (example "lambda_dynamodb_logger") generated 2 warnings (run `cargo fix --example "lambda_dynamodb_logger"` to apply 1 suggestion)
warning: `datafold` (example "storage_abstraction_demo") generated 1 warning (run `cargo fix --example "storage_abstraction_demo"` to apply 1 suggestion)
warning: unused import: `StdoutLogger`
  --> examples/lambda_simple_logger_test.rs:26:68
   |
26 | use datafold::lambda::{LambdaConfig, LambdaContext, LambdaLogging, StdoutLogger};
   |                                                                    ^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: unused import: `std::sync::Arc`
  --> examples/lambda_simple_logger_test.rs:34:5
   |
34 | use std::sync::Arc;
   |     ^^^^^^^^^^^^^^

warning: unused variable: `mutation_json`
  --> tests/transform_execution_test.rs:78:9
   |
78 |     let mutation_json = json!({
   |         ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_mutation_json`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: unused import: `LogLevel`
 --> tests/logging_verification_test.rs:5:71
  |
5 | use datafold::lambda::{LambdaConfig, LambdaContext, Logger, LogEntry, LogLevel, LambdaLogging};
  |                                                                       ^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0599]: no method named `is_ok` found for opaque type `impl std::future::Future<Output = Result<Option<IngestionProgress>, IngestionError>>` in the current scope
   --> tests/lambda_ingestion_logging_test.rs:189:18
    |
189 |         progress.is_ok(),
    |                  ^^^^^
    |
help: there is a method `inspect_ok` with a similar name, but with different arguments
   --> /Users/tomtang/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/futures-util-0.3.31/src/future/try_future/mod.rs:467:5
    |
467 | /     fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
468 | |     where
469 | |         F: FnOnce(&Self::Ok),
470 | |         Self: Sized,
    | |____________________^
help: consider `await`ing on the `Future` and calling the method on its `Output`
    |
189 |         progress.await.is_ok(),
    |                  ++++++

error[E0277]: `impl std::future::Future<Output = Result<Option<IngestionProgress>, IngestionError>>` doesn't implement `std::fmt::Debug`
   --> tests/lambda_ingestion_logging_test.rs:191:9
    |
190 |         "Failed to get progress: {:?}",
    |                                  ---- required by this formatting parameter
191 |         progress
    |         ^^^^^^^^ `impl std::future::Future<Output = Result<Option<IngestionProgress>, IngestionError>>` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
    |
    = help: the trait `std::fmt::Debug` is not implemented for `impl std::future::Future<Output = Result<Option<IngestionProgress>, IngestionError>>`

error[E0308]: mismatched types
   --> tests/lambda_ingestion_logging_test.rs:194:12
    |
194 |     if let Ok(Some(progress_info)) = progress {
    |            ^^^^^^^^^^^^^^^^^^^^^^^   -------- this expression has type `impl std::future::Future<Output = Result<Option<IngestionProgress>, IngestionError>>`
    |            |
    |            expected future, found `Result<_, _>`
    |
    = note: expected opaque type `impl std::future::Future<Output = Result<Option<IngestionProgress>, IngestionError>>`
                      found enum `Result<_, _>`
help: consider `await`ing on the `Future`
    |
194 |     if let Ok(Some(progress_info)) = progress.await {
    |                                              ++++++

Some errors have detailed explanations: E0277, E0308, E0599.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `datafold` (test "lambda_ingestion_logging_test") due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
warning: `datafold` (test "lambda_sync_logging_test") generated 3 warnings (run `cargo fix --test "lambda_sync_logging_test"` to apply 3 suggestions)
warning: `datafold` (test "transform_execution_test") generated 1 warning
warning: `datafold` (test "logging_verification_test") generated 1 warning (run `cargo fix --test "logging_verification_test"` to apply 1 suggestion)
warning: `datafold` (example "lambda_simple_logger_test") generated 2 warnings (run `cargo fix --example "lambda_simple_logger_test"` to apply 2 suggestions)
warning: `datafold` (lib test) generated 28 warnings (24 duplicates) (run `cargo fix --lib -p datafold --tests` to apply 1 suggestion)