-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return 404 when getting a task on an unexisting index #1889
Conversation
IndexMeta contains the uuid and the creation task id for an index. Adds a method to the UuidStore trait to retrieve the creation task id, and pass the task id on index creation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors merge
🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set. |
bors cancel |
Stopped waiting for PR status (Github check) without running due to duplicate requests to run. You may check Bors to see that this PR is included in a batch by one of the other requests. |
poor bors |
https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md - [x] The update resource is renamed task. The names of existing API routes are also changed to reflect this change. - [x] Tasks are now also accessible as an independent resource of an index. GET - /tasks; GET - /tasks/:taskUid - [x] The task uid is not incremented by index anymore. The sequence is generated globally. - [x] A task_not_found error is introduced. - [x] The format of the task object is updated. - [x] updateId becomes uid. - [x] Attributes of an error appearing in a failed task are now contained in a dedicated error object. - [x] type is no longer an object. It now becomes a string containing the values of its name field previously defined in the type object. - [x] The possible values for the type field are reworked to be more clear and consistent with our naming rules. - [x] A details object is added to contain specific information related to a task payload that was previously displayed in the type nested object. Previous number key is renamed numberOfDocuments. - [x] An indexUid field is added to give information about the related index on which the task is performed. - [x] duration format has been updated to express an ISO 8601 duration. - [x] processed status changes to succeeded. - [x] startedProcessingAt is updated to startedAt. - [x] processedAt is updated to finishedAt. - [x] 202 Accepted requests previously returning an updateId are now returning a summarized task object. - [x] MEILI_MAX_UDB_SIZE env var is updated MEILI_MAX_TASK_DB_SIZE. - [x] --max-udb-size cli option is updated to --max-task-db-size. - [x] task object lists are now returned under a results array. - [x] Each operation on an index (creation, update, deletion) is now asynchronous and represented by a task. - [x] Restore Snapshots - [x] Restore dumps of documents - [x] Implements the dump of updates - [x] Error handling - [x] Fix stats - [x] Restore the Analytics - [x] [Add the new analytics](https://github.com/meilisearch/specifications/pull/92/files) - [x] Fix tests - [x] ~Deleting tasks when index is deleted (see bellow)~ see #1891 instead - [x] Improve details for documents addition and deletion tasks - [ ] Add integration test - [ ] Test task store filtering - [x] Rename `UuidStore` to `IndexMetaStore`, and simplify the trait. - [x] Fix task store initialization: fill pending queue from hard state - [x] Synchronously return error when creating an index with an invalid index_uid and add test - [x] Task should be returned in decreasing uid + tests (on index task route) - [x] Summarized task view - [x] fix snapshot permissions - #1889 - #1891 - #1892 - #1902 - #1906 - #1911 - #1914 - #1915 - #1916 - #1918 - #1924 - #1925 - #1926 - #1930 - #1936 - #1937 - #1942 - #1944 - #1945 - #1946 - #1947 - #1950 - #1951 - #1957 - #1959 - #1960 - #1961 - #1962 - #1964 - meilisearch/milli#414 - meilisearch/milli#409 - meilisearch/milli#406 - meilisearch/milli#418 - close #1687 - close #1786 - close #1940 - close #1948 - close #1949 - close #1932 - close #1956 - meilisearch/specifications#90
implements: https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md linked PR: - #1889 - #1891 - #1892 - #1902 - #1906 - #1911 - #1914 - #1915 - #1916 - #1918 - #1924 - #1925 - #1926 - #1930 - #1936 - #1937 - #1942 - #1944 - #1945 - #1946 - #1947 - #1950 - #1951 - #1957 - #1959 - #1960 - #1961 - #1962 - #1964 - meilisearch/milli#414 - meilisearch/milli#409 - meilisearch/milli#406 - meilisearch/milli#418 - close #1687 - close #1786 - close #1940 - close #1948 - close #1949 - close #1932 - close #1956
1796: Feature branch: Task store r=irevoire a=MarinPostma # Feature branch: Task Store ## Spec todo https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md - [x] The update resource is renamed task. The names of existing API routes are also changed to reflect this change. - [x] Tasks are now also accessible as an independent resource of an index. GET - /tasks; GET - /tasks/:taskUid - [x] The task uid is not incremented by index anymore. The sequence is generated globally. - [x] A task_not_found error is introduced. - [x] The format of the task object is updated. - [x] updateId becomes uid. - [x] Attributes of an error appearing in a failed task are now contained in a dedicated error object. - [x] type is no longer an object. It now becomes a string containing the values of its name field previously defined in the type object. - [x] The possible values for the type field are reworked to be more clear and consistent with our naming rules. - [x] A details object is added to contain specific information related to a task payload that was previously displayed in the type nested object. Previous number key is renamed numberOfDocuments. - [x] An indexUid field is added to give information about the related index on which the task is performed. - [x] duration format has been updated to express an ISO 8601 duration. - [x] processed status changes to succeeded. - [x] startedProcessingAt is updated to startedAt. - [x] processedAt is updated to finishedAt. - [x] 202 Accepted requests previously returning an updateId are now returning a summarized task object. - [x] MEILI_MAX_UDB_SIZE env var is updated MEILI_MAX_TASK_DB_SIZE. - [x] --max-udb-size cli option is updated to --max-task-db-size. - [x] task object lists are now returned under a results array. - [x] Each operation on an index (creation, update, deletion) is now asynchronous and represented by a task. ## Todo tech - [x] Restore Snapshots - [x] Restore dumps of documents - [x] Implements the dump of updates - [x] Error handling - [x] Fix stats - [x] Restore the Analytics - [x] [Add the new analytics](https://github.com/meilisearch/specifications/pull/92/files) - [x] Fix tests - [x] ~Deleting tasks when index is deleted (see bellow)~ see #1891 instead - [x] Improve details for documents addition and deletion tasks - [ ] Add integration test - [ ] Test task store filtering - [x] Rename `UuidStore` to `IndexMetaStore`, and simplify the trait. - [x] Fix task store initialization: fill pending queue from hard state - [x] Synchronously return error when creating an index with an invalid index_uid and add test - [x] Task should be returned in decreasing uid + tests (on index task route) - [x] Summarized task view - [x] fix snapshot permissions ## Implementation ### Linked PRs - #1889 - #1891 - #1892 - #1902 - #1906 - #1911 - #1914 - #1915 - #1916 - #1918 - #1924 - #1925 - #1926 - #1930 - #1936 - #1937 - #1942 - #1944 - #1945 - #1946 - #1947 - #1950 - #1951 - #1957 - #1959 - #1960 - #1961 - #1962 - #1964 ### Linked PRs in milli: - meilisearch/milli#414 - meilisearch/milli#409 - meilisearch/milli#406 - meilisearch/milli#418 ### Issues - close #1687 - close #1786 - close #1940 - close #1948 - close #1949 - close #1932 - close #1956 ### Spec patches - meilisearch/specifications#90 Co-authored-by: Marin Postma <postma.marin@protonmail.com>
implements: https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md linked PR: - #1889 - #1891 - #1892 - #1902 - #1906 - #1911 - #1914 - #1915 - #1916 - #1918 - #1924 - #1925 - #1926 - #1930 - #1936 - #1937 - #1942 - #1944 - #1945 - #1946 - #1947 - #1950 - #1951 - #1957 - #1959 - #1960 - #1961 - #1962 - #1964 - meilisearch/milli#414 - meilisearch/milli#409 - meilisearch/milli#406 - meilisearch/milli#418 - close #1687 - close #1786 - close #1940 - close #1948 - close #1949 - close #1932 - close #1956
implements: https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md linked PR: - #1889 - #1891 - #1892 - #1902 - #1906 - #1911 - #1914 - #1915 - #1916 - #1918 - #1924 - #1925 - #1926 - #1930 - #1936 - #1937 - #1942 - #1944 - #1945 - #1946 - #1947 - #1950 - #1951 - #1957 - #1959 - #1960 - #1961 - #1962 - #1964 - meilisearch/milli#414 - meilisearch/milli#409 - meilisearch/milli#406 - meilisearch/milli#418 - close #1687 - close #1786 - close #1940 - close #1948 - close #1949 - close #1932 - close #1956
1796: Feature branch: Task store r=irevoire a=MarinPostma # Feature branch: Task Store ## Spec todo https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md - [x] The update resource is renamed task. The names of existing API routes are also changed to reflect this change. - [x] Tasks are now also accessible as an independent resource of an index. GET - /tasks; GET - /tasks/:taskUid - [x] The task uid is not incremented by index anymore. The sequence is generated globally. - [x] A task_not_found error is introduced. - [x] The format of the task object is updated. - [x] updateId becomes uid. - [x] Attributes of an error appearing in a failed task are now contained in a dedicated error object. - [x] type is no longer an object. It now becomes a string containing the values of its name field previously defined in the type object. - [x] The possible values for the type field are reworked to be more clear and consistent with our naming rules. - [x] A details object is added to contain specific information related to a task payload that was previously displayed in the type nested object. Previous number key is renamed numberOfDocuments. - [x] An indexUid field is added to give information about the related index on which the task is performed. - [x] duration format has been updated to express an ISO 8601 duration. - [x] processed status changes to succeeded. - [x] startedProcessingAt is updated to startedAt. - [x] processedAt is updated to finishedAt. - [x] 202 Accepted requests previously returning an updateId are now returning a summarized task object. - [x] MEILI_MAX_UDB_SIZE env var is updated MEILI_MAX_TASK_DB_SIZE. - [x] --max-udb-size cli option is updated to --max-task-db-size. - [x] task object lists are now returned under a results array. - [x] Each operation on an index (creation, update, deletion) is now asynchronous and represented by a task. ## Todo tech - [x] Restore Snapshots - [x] Restore dumps of documents - [x] Implements the dump of updates - [x] Error handling - [x] Fix stats - [x] Restore the Analytics - [x] [Add the new analytics](https://github.com/meilisearch/specifications/pull/92/files) - [x] Fix tests - [x] ~Deleting tasks when index is deleted (see bellow)~ see #1891 instead - [x] Improve details for documents addition and deletion tasks - [ ] Add integration test - [ ] Test task store filtering - [x] Rename `UuidStore` to `IndexMetaStore`, and simplify the trait. - [x] Fix task store initialization: fill pending queue from hard state - [x] Synchronously return error when creating an index with an invalid index_uid and add test - [x] Task should be returned in decreasing uid + tests (on index task route) - [x] Summarized task view - [x] fix snapshot permissions ## Implementation ### Linked PRs - #1889 - #1891 - #1892 - #1902 - #1906 - #1911 - #1914 - #1915 - #1916 - #1918 - #1924 - #1925 - #1926 - #1930 - #1936 - #1937 - #1942 - #1944 - #1945 - #1946 - #1947 - #1950 - #1951 - #1957 - #1959 - #1960 - #1961 - #1962 - #1964 ### Linked PRs in milli: - meilisearch/milli#414 - meilisearch/milli#409 - meilisearch/milli#406 - meilisearch/milli#418 ### Issues - close #1687 - close #1786 - close #1940 - close #1948 - close #1949 - close #1932 - close #1956 ### Spec patches - meilisearch/specifications#90 Co-authored-by: Marin Postma <postma.marin@protonmail.com>
implements: https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md linked PR: - #1889 - #1891 - #1892 - #1902 - #1906 - #1911 - #1914 - #1915 - #1916 - #1918 - #1924 - #1925 - #1926 - #1930 - #1936 - #1937 - #1942 - #1944 - #1945 - #1946 - #1947 - #1950 - #1951 - #1957 - #1959 - #1960 - #1961 - #1962 - #1964 - meilisearch/milli#414 - meilisearch/milli#409 - meilisearch/milli#406 - meilisearch/milli#418 - close #1687 - close #1786 - close #1940 - close #1948 - close #1949 - close #1932 - close #1956
1796: Feature branch: Task store r=irevoire a=MarinPostma # Feature branch: Task Store ## Spec todo https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md - [x] The update resource is renamed task. The names of existing API routes are also changed to reflect this change. - [x] Tasks are now also accessible as an independent resource of an index. GET - /tasks; GET - /tasks/:taskUid - [x] The task uid is not incremented by index anymore. The sequence is generated globally. - [x] A task_not_found error is introduced. - [x] The format of the task object is updated. - [x] updateId becomes uid. - [x] Attributes of an error appearing in a failed task are now contained in a dedicated error object. - [x] type is no longer an object. It now becomes a string containing the values of its name field previously defined in the type object. - [x] The possible values for the type field are reworked to be more clear and consistent with our naming rules. - [x] A details object is added to contain specific information related to a task payload that was previously displayed in the type nested object. Previous number key is renamed numberOfDocuments. - [x] An indexUid field is added to give information about the related index on which the task is performed. - [x] duration format has been updated to express an ISO 8601 duration. - [x] processed status changes to succeeded. - [x] startedProcessingAt is updated to startedAt. - [x] processedAt is updated to finishedAt. - [x] 202 Accepted requests previously returning an updateId are now returning a summarized task object. - [x] MEILI_MAX_UDB_SIZE env var is updated MEILI_MAX_TASK_DB_SIZE. - [x] --max-udb-size cli option is updated to --max-task-db-size. - [x] task object lists are now returned under a results array. - [x] Each operation on an index (creation, update, deletion) is now asynchronous and represented by a task. ## Todo tech - [x] Restore Snapshots - [x] Restore dumps of documents - [x] Implements the dump of updates - [x] Error handling - [x] Fix stats - [x] Restore the Analytics - [x] [Add the new analytics](https://github.com/meilisearch/specifications/pull/92/files) - [x] Fix tests - [x] ~Deleting tasks when index is deleted (see bellow)~ see #1891 instead - [x] Improve details for documents addition and deletion tasks - [ ] Add integration test - [ ] Test task store filtering - [x] Rename `UuidStore` to `IndexMetaStore`, and simplify the trait. - [x] Fix task store initialization: fill pending queue from hard state - [x] Synchronously return error when creating an index with an invalid index_uid and add test - [x] Task should be returned in decreasing uid + tests (on index task route) - [x] Summarized task view - [x] fix snapshot permissions ## Implementation ### Linked PRs - #1889 - #1891 - #1892 - #1902 - #1906 - #1911 - #1914 - #1915 - #1916 - #1918 - #1924 - #1925 - #1926 - #1930 - #1936 - #1937 - #1942 - #1944 - #1945 - #1946 - #1947 - #1950 - #1951 - #1957 - #1959 - #1960 - #1961 - #1962 - #1964 ### Linked PRs in milli: - meilisearch/milli#414 - meilisearch/milli#409 - meilisearch/milli#406 - meilisearch/milli#418 ### Issues - close #1687 - close #1786 - close #1940 - close #1948 - close #1949 - close #1932 - close #1956 ### Spec patches - meilisearch/specifications#90 Co-authored-by: Marin Postma <postma.marin@protonmail.com>
implements: https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md linked PR: - #1889 - #1891 - #1892 - #1902 - #1906 - #1911 - #1914 - #1915 - #1916 - #1918 - #1924 - #1925 - #1926 - #1930 - #1936 - #1937 - #1942 - #1944 - #1945 - #1946 - #1947 - #1950 - #1951 - #1957 - #1959 - #1960 - #1961 - #1962 - #1964 - meilisearch/milli#414 - meilisearch/milli#409 - meilisearch/milli#406 - meilisearch/milli#418 - close #1687 - close #1786 - close #1940 - close #1948 - close #1949 - close #1932 - close #1956
1796: Feature branch: Task store r=irevoire a=MarinPostma # Feature branch: Task Store ## Spec todo https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md - [x] The update resource is renamed task. The names of existing API routes are also changed to reflect this change. - [x] Tasks are now also accessible as an independent resource of an index. GET - /tasks; GET - /tasks/:taskUid - [x] The task uid is not incremented by index anymore. The sequence is generated globally. - [x] A task_not_found error is introduced. - [x] The format of the task object is updated. - [x] updateId becomes uid. - [x] Attributes of an error appearing in a failed task are now contained in a dedicated error object. - [x] type is no longer an object. It now becomes a string containing the values of its name field previously defined in the type object. - [x] The possible values for the type field are reworked to be more clear and consistent with our naming rules. - [x] A details object is added to contain specific information related to a task payload that was previously displayed in the type nested object. Previous number key is renamed numberOfDocuments. - [x] An indexUid field is added to give information about the related index on which the task is performed. - [x] duration format has been updated to express an ISO 8601 duration. - [x] processed status changes to succeeded. - [x] startedProcessingAt is updated to startedAt. - [x] processedAt is updated to finishedAt. - [x] 202 Accepted requests previously returning an updateId are now returning a summarized task object. - [x] MEILI_MAX_UDB_SIZE env var is updated MEILI_MAX_TASK_DB_SIZE. - [x] --max-udb-size cli option is updated to --max-task-db-size. - [x] task object lists are now returned under a results array. - [x] Each operation on an index (creation, update, deletion) is now asynchronous and represented by a task. ## Todo tech - [x] Restore Snapshots - [x] Restore dumps of documents - [x] Implements the dump of updates - [x] Error handling - [x] Fix stats - [x] Restore the Analytics - [x] [Add the new analytics](https://github.com/meilisearch/specifications/pull/92/files) - [x] Fix tests - [x] ~Deleting tasks when index is deleted (see bellow)~ see #1891 instead - [x] Improve details for documents addition and deletion tasks - [ ] Add integration test - [ ] Test task store filtering - [x] Rename `UuidStore` to `IndexMetaStore`, and simplify the trait. - [x] Fix task store initialization: fill pending queue from hard state - [x] Synchronously return error when creating an index with an invalid index_uid and add test - [x] Task should be returned in decreasing uid + tests (on index task route) - [x] Summarized task view - [x] fix snapshot permissions ## Implementation ### Linked PRs - #1889 - #1891 - #1892 - #1902 - #1906 - #1911 - #1914 - #1915 - #1916 - #1918 - #1924 - #1925 - #1926 - #1930 - #1936 - #1937 - #1942 - #1944 - #1945 - #1946 - #1947 - #1950 - #1951 - #1957 - #1959 - #1960 - #1961 - #1962 - #1964 ### Linked PRs in milli: - meilisearch/milli#414 - meilisearch/milli#409 - meilisearch/milli#406 - meilisearch/milli#418 ### Issues - close #1687 - close #1786 - close #1940 - close #1948 - close #1949 - close #1932 - close #1956 ### Spec patches - meilisearch/specifications#90 Co-authored-by: Marin Postma <postma.marin@protonmail.com>
implements: https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md linked PR: - #1889 - #1891 - #1892 - #1902 - #1906 - #1911 - #1914 - #1915 - #1916 - #1918 - #1924 - #1925 - #1926 - #1930 - #1936 - #1937 - #1942 - #1944 - #1945 - #1946 - #1947 - #1950 - #1951 - #1957 - #1959 - #1960 - #1961 - #1962 - #1964 - meilisearch/milli#414 - meilisearch/milli#409 - meilisearch/milli#406 - meilisearch/milli#418 - close #1687 - close #1786 - close #1940 - close #1948 - close #1949 - close #1932 - close #1956
1796: Feature branch: Task store r=irevoire a=MarinPostma # Feature branch: Task Store ## Spec todo https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md - [x] The update resource is renamed task. The names of existing API routes are also changed to reflect this change. - [x] Tasks are now also accessible as an independent resource of an index. GET - /tasks; GET - /tasks/:taskUid - [x] The task uid is not incremented by index anymore. The sequence is generated globally. - [x] A task_not_found error is introduced. - [x] The format of the task object is updated. - [x] updateId becomes uid. - [x] Attributes of an error appearing in a failed task are now contained in a dedicated error object. - [x] type is no longer an object. It now becomes a string containing the values of its name field previously defined in the type object. - [x] The possible values for the type field are reworked to be more clear and consistent with our naming rules. - [x] A details object is added to contain specific information related to a task payload that was previously displayed in the type nested object. Previous number key is renamed numberOfDocuments. - [x] An indexUid field is added to give information about the related index on which the task is performed. - [x] duration format has been updated to express an ISO 8601 duration. - [x] processed status changes to succeeded. - [x] startedProcessingAt is updated to startedAt. - [x] processedAt is updated to finishedAt. - [x] 202 Accepted requests previously returning an updateId are now returning a summarized task object. - [x] MEILI_MAX_UDB_SIZE env var is updated MEILI_MAX_TASK_DB_SIZE. - [x] --max-udb-size cli option is updated to --max-task-db-size. - [x] task object lists are now returned under a results array. - [x] Each operation on an index (creation, update, deletion) is now asynchronous and represented by a task. ## Todo tech - [x] Restore Snapshots - [x] Restore dumps of documents - [x] Implements the dump of updates - [x] Error handling - [x] Fix stats - [x] Restore the Analytics - [x] [Add the new analytics](https://github.com/meilisearch/specifications/pull/92/files) - [x] Fix tests - [x] ~Deleting tasks when index is deleted (see bellow)~ see #1891 instead - [x] Improve details for documents addition and deletion tasks - [ ] Add integration test - [ ] Test task store filtering - [x] Rename `UuidStore` to `IndexMetaStore`, and simplify the trait. - [x] Fix task store initialization: fill pending queue from hard state - [x] Synchronously return error when creating an index with an invalid index_uid and add test - [x] Task should be returned in decreasing uid + tests (on index task route) - [x] Summarized task view - [x] fix snapshot permissions ## Implementation ### Linked PRs - #1889 - #1891 - #1892 - #1902 - #1906 - #1911 - #1914 - #1915 - #1916 - #1918 - #1924 - #1925 - #1926 - #1930 - #1936 - #1937 - #1942 - #1944 - #1945 - #1946 - #1947 - #1950 - #1951 - #1957 - #1959 - #1960 - #1961 - #1962 - #1964 ### Linked PRs in milli: - meilisearch/milli#414 - meilisearch/milli#409 - meilisearch/milli#406 - meilisearch/milli#418 ### Issues - close #1687 - close #1786 - close #1940 - close #1948 - close #1949 - close #1932 - close #1956 ### Spec patches - meilisearch/specifications#90 Co-authored-by: Marin Postma <postma.marin@protonmail.com>
implements: https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md linked PR: - #1889 - #1891 - #1892 - #1902 - #1906 - #1911 - #1914 - #1915 - #1916 - #1918 - #1924 - #1925 - #1926 - #1930 - #1936 - #1937 - #1942 - #1944 - #1945 - #1946 - #1947 - #1950 - #1951 - #1957 - #1959 - #1960 - #1961 - #1962 - #1964 - meilisearch/milli#414 - meilisearch/milli#409 - meilisearch/milli#406 - meilisearch/milli#418 - close #1687 - close #1786 - close #1940 - close #1948 - close #1949 - close #1932 - close #1956
implements: https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md linked PR: - #1889 - #1891 - #1892 - #1902 - #1906 - #1911 - #1914 - #1915 - #1916 - #1918 - #1924 - #1925 - #1926 - #1930 - #1936 - #1937 - #1942 - #1944 - #1945 - #1946 - #1947 - #1950 - #1951 - #1957 - #1959 - #1960 - #1961 - #1962 - #1964 - meilisearch/milli#414 - meilisearch/milli#409 - meilisearch/milli#406 - meilisearch/milli#418 - close #1687 - close #1786 - close #1940 - close #1948 - close #1949 - close #1932 - close #1956
1796: Feature branch: Task store r=irevoire a=MarinPostma # Feature branch: Task Store ## Spec todo https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md - [x] The update resource is renamed task. The names of existing API routes are also changed to reflect this change. - [x] Tasks are now also accessible as an independent resource of an index. GET - /tasks; GET - /tasks/:taskUid - [x] The task uid is not incremented by index anymore. The sequence is generated globally. - [x] A task_not_found error is introduced. - [x] The format of the task object is updated. - [x] updateId becomes uid. - [x] Attributes of an error appearing in a failed task are now contained in a dedicated error object. - [x] type is no longer an object. It now becomes a string containing the values of its name field previously defined in the type object. - [x] The possible values for the type field are reworked to be more clear and consistent with our naming rules. - [x] A details object is added to contain specific information related to a task payload that was previously displayed in the type nested object. Previous number key is renamed numberOfDocuments. - [x] An indexUid field is added to give information about the related index on which the task is performed. - [x] duration format has been updated to express an ISO 8601 duration. - [x] processed status changes to succeeded. - [x] startedProcessingAt is updated to startedAt. - [x] processedAt is updated to finishedAt. - [x] 202 Accepted requests previously returning an updateId are now returning a summarized task object. - [x] MEILI_MAX_UDB_SIZE env var is updated MEILI_MAX_TASK_DB_SIZE. - [x] --max-udb-size cli option is updated to --max-task-db-size. - [x] task object lists are now returned under a results array. - [x] Each operation on an index (creation, update, deletion) is now asynchronous and represented by a task. ## Todo tech - [x] Restore Snapshots - [x] Restore dumps of documents - [x] Implements the dump of updates - [x] Error handling - [x] Fix stats - [x] Restore the Analytics - [x] [Add the new analytics](https://github.com/meilisearch/specifications/pull/92/files) - [x] Fix tests - [x] ~Deleting tasks when index is deleted (see bellow)~ see #1891 instead - [x] Improve details for documents addition and deletion tasks - [ ] Add integration test - [ ] Test task store filtering - [x] Rename `UuidStore` to `IndexMetaStore`, and simplify the trait. - [x] Fix task store initialization: fill pending queue from hard state - [x] Synchronously return error when creating an index with an invalid index_uid and add test - [x] Task should be returned in decreasing uid + tests (on index task route) - [x] Summarized task view - [x] fix snapshot permissions ## Implementation ### Linked PRs - #1889 - #1891 - #1892 - #1902 - #1906 - #1911 - #1914 - #1915 - #1916 - #1918 - #1924 - #1925 - #1926 - #1930 - #1936 - #1937 - #1942 - #1944 - #1945 - #1946 - #1947 - #1950 - #1951 - #1957 - #1959 - #1960 - #1961 - #1962 - #1964 ### Linked PRs in milli: - meilisearch/milli#414 - meilisearch/milli#409 - meilisearch/milli#406 - meilisearch/milli#418 ### Issues - close #1687 - close #1786 - close #1940 - close #1948 - close #1949 - close #1932 - close #1956 ### Spec patches - meilisearch/specifications#90 Co-authored-by: Marin Postma <postma.marin@protonmail.com>
When getting a task from
/indexex/uid/tasks
, a 404 is now returned to the user if the index hasn't been created.When the index is created, the task id that lead to it's creation is ascociated to it, so only tasks that have a higher
task_id
than the creationtask_id
are returned to the the user. This solves the issue when a user deletes an index and then re-creates one with the same name. Now older tasks are not returned.The older tasks are still available from the
/tasks
route.