Commit Graph

38 Commits

Author SHA1 Message Date
869d331680 Clippy fixes after updating Rust to v1.66 2022-12-19 14:17:12 +01:00
bef81065f9 return the same time in case we didn't found a created or updated at 2022-12-06 11:03:23 +01:00
180511795b Update dump/src/reader/v4/mod.rs fix typo
Co-authored-by: Louis Dureuil <louis@meilisearch.com>
2022-12-06 10:53:43 +01:00
b0cf431614 Fix the dump date-import of the dumpv4 2022-12-05 18:08:35 +01:00
776af129bf Merge #3012
3012: Extract the dates out of the dumpv4. r=irevoire a=funilrys

Hi there, 

please review this PR that tries to fix #2987. I'm still learning Rust and I found that #2987 is an excellent way for me to read and learn what others do with Rust. So please excuse my semantics ...

Stay safe and healthy.

---

# Pull Request

This patch possibly fixes #2987.

This patch introduces a way to fill the IndexMetadata.created_at and IndexMetadata.updated_at keys from the tasks events. This is done by reading the creation date of the first event (created_at) and the creation date of the last event (updated_at).


## Related issue
Fixes #2987

## What does this PR do?
- Extract the dates out of the dumpv4.

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: funilrys <contact@funilrys.com>
2022-12-05 15:57:07 +00:00
8b6eba4f0b Apply fmt. 2022-12-03 17:47:02 +01:00
e510ace179 fixup! Re-open tasks queue. 2022-12-03 17:41:33 +01:00
f056fc118f Re-open tasks queue.
Indeed, before this patch, I was (probably) breaking every usage
of the tasks BufReader. This patch solves the issue by reopening
the the tasks file every time its needed.
2022-12-03 17:29:41 +01:00
7b8641a7af fix the dump tests
The issue was linked to the fact that the debug implementation of the PhantomData wasn't the same between rust stable and rust nightly.
This was causing an issue while snapshsotting the settings and this commit fix it by representing the settings as json which already ignores the PhantomData
2022-11-23 16:59:20 +01:00
8a14f6f545 Add Task.processed_at. 2022-11-13 10:13:10 +01:00
079357ee1f Fix linting issues. 2022-11-12 20:57:27 +01:00
06e7db7a1f fixup! Extract the dates out of the dumpv4. 2022-11-12 18:28:23 +01:00
953b2ec438 fixup! Extract the dates out of the dumpv4. 2022-11-02 17:49:37 +01:00
ab3056cc66 Extract the dates out of the dumpv4.
This patch possibly fixes #2987.

This patch introduces a way to fill the IndexMetadata.created_at
and IndexMetadata.updated_at keys from the tasks events.
This is done by reading the creation date of the first event
(created_at) and the creation date of the last event (updated_at).
2022-10-31 18:58:14 +01:00
225405bb0d ignore the dump tests 2022-10-27 11:35:22 +02:00
6aa816d96a use meili-snap in the dump 2022-10-27 11:35:22 +02:00
866a3676eb reupload the test fix for the dump 2022-10-27 11:35:22 +02:00
fa84eae0f1 Insta review and fix insta snapshots 2022-10-27 11:35:21 +02:00
3979c9f02b fix all the dump snasphots 2022-10-27 11:35:20 +02:00
314b89ca30 Fix insta snapshots 2022-10-27 11:35:20 +02:00
a16604af80 fix all the tests 2022-10-27 11:35:17 +02:00
2de8a0711a Cargo insta test/review 2022-10-27 11:35:16 +02:00
7074872a78 cargo insta accept 2022-10-27 11:35:15 +02:00
ecf4e43b3d rename the dumpExport to dumpCreation 2022-10-27 11:35:10 +02:00
e9055f5572 fix clippy 2022-10-27 11:35:08 +02:00
8d1408c65e fix the import of the dumpv4&v5 when there is no instance-uid + rename the Kind+KindWithContent+Details variant for the DocumentImport and the Setting 2022-10-27 11:35:05 +02:00
80b2e70ee7 Introduce a rustfmt file 2022-10-27 11:35:05 +02:00
66c3b93ef1 fix all the snapshot tests in the dump 2022-10-27 11:34:15 +02:00
fa4c1de019 store md5 instead of the whole snapshots 2022-10-27 11:34:01 +02:00
f176382b34 fix the tests 2022-10-27 11:33:57 +02:00
0284764b5e start dumping the update files to a known format 2022-10-27 11:33:56 +02:00
dc0f307d61 remove all warnings 2022-10-27 11:33:56 +02:00
22ffbf3676 write and test the compat layer from v3 to v4 2022-10-27 11:33:54 +02:00
efe0a5f422 finish the test for the compatibility between v4 and v5 2022-10-27 11:33:53 +02:00
47e0288747 rewrite the compat API to something more generic 2022-10-27 11:33:53 +02:00
2f47443458 rename a few things for consistency 2022-10-27 11:33:53 +02:00
a8128678a4 implement the dump v4 import 2022-10-27 11:33:53 +02:00
0972587cfc start writting the compat layer between v5 and v6 2022-10-27 11:33:52 +02:00