From 857cd092854b5cee9f9c7402e42b7d8a64222a93 Mon Sep 17 00:00:00 2001 From: Many the fish Date: Mon, 15 Jan 2024 11:19:13 +0100 Subject: [PATCH 1/4] Add Setting API reminder in issue template When adding a new setting, there are several important points that can be easily forgotten. This PR adds a small reminder list of some of these points. --- .github/ISSUE_TEMPLATE/sprint_issue.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/sprint_issue.md b/.github/ISSUE_TEMPLATE/sprint_issue.md index 93a6e924c..6d494f68d 100644 --- a/.github/ISSUE_TEMPLATE/sprint_issue.md +++ b/.github/ISSUE_TEMPLATE/sprint_issue.md @@ -27,6 +27,14 @@ Related spec: WIP - [ ] If prototype validated, merge changes into `main` - [ ] Update the spec -## Impacted teams +### Reminders when modifying the Setting API + + + +- [ ] Ensure the new setting route is at least tested by the [`test_setting_routes` macro](https://github.com/meilisearch/meilisearch/blob/5204c0b60b384cbc79621b6b2176fca086069e8e/meilisearch/tests/settings/get_settings.rs#L276) +- [ ] Ensure Analytics are fully implemented + - [ ] `/settings/my-new-setting` configurated in the [`make_setting_routes` macro](https://github.com/meilisearch/meilisearch/blob/5204c0b60b384cbc79621b6b2176fca086069e8e/meilisearch/src/routes/indexes/settings.rs#L141-L165) + - [ ] global `/settings` route configurated in the [`update_all` function](https://github.com/meilisearch/meilisearch/blob/5204c0b60b384cbc79621b6b2176fca086069e8e/meilisearch/src/routes/indexes/settings.rs#L655-L751) +- [ ] Ensure the dump serializing is consistent with the `/settings` route serializing, e.g., enums case can be different (`camelCase` in route and `PascalCase` in the dump) From 9e12a91afbb4b5ee37daabcc07ebc2206da228c5 Mon Sep 17 00:00:00 2001 From: Many the fish Date: Tue, 16 Jan 2024 11:04:50 +0100 Subject: [PATCH 2/4] Update .github/ISSUE_TEMPLATE/sprint_issue.md --- .github/ISSUE_TEMPLATE/sprint_issue.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/sprint_issue.md b/.github/ISSUE_TEMPLATE/sprint_issue.md index 6d494f68d..469167969 100644 --- a/.github/ISSUE_TEMPLATE/sprint_issue.md +++ b/.github/ISSUE_TEMPLATE/sprint_issue.md @@ -37,4 +37,6 @@ Related spec: WIP - [ ] global `/settings` route configurated in the [`update_all` function](https://github.com/meilisearch/meilisearch/blob/5204c0b60b384cbc79621b6b2176fca086069e8e/meilisearch/src/routes/indexes/settings.rs#L655-L751) - [ ] Ensure the dump serializing is consistent with the `/settings` route serializing, e.g., enums case can be different (`camelCase` in route and `PascalCase` in the dump) +## Impacted teams + From ab4d61459951fb274e498354edb0ab5f4b5c7930 Mon Sep 17 00:00:00 2001 From: Many the fish Date: Thu, 18 Jan 2024 10:28:30 +0100 Subject: [PATCH 3/4] Update .github/ISSUE_TEMPLATE/sprint_issue.md Co-authored-by: Louis Dureuil --- .github/ISSUE_TEMPLATE/sprint_issue.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/sprint_issue.md b/.github/ISSUE_TEMPLATE/sprint_issue.md index 469167969..092a3c76e 100644 --- a/.github/ISSUE_TEMPLATE/sprint_issue.md +++ b/.github/ISSUE_TEMPLATE/sprint_issue.md @@ -37,6 +37,12 @@ Related spec: WIP - [ ] global `/settings` route configurated in the [`update_all` function](https://github.com/meilisearch/meilisearch/blob/5204c0b60b384cbc79621b6b2176fca086069e8e/meilisearch/src/routes/indexes/settings.rs#L655-L751) - [ ] Ensure the dump serializing is consistent with the `/settings` route serializing, e.g., enums case can be different (`camelCase` in route and `PascalCase` in the dump) +#### Special cases when adding a setting for an experimental feature + +- [ ] ⚠️ API stability: The setting does not appear on the main settings route when the feature has never been enabled (e.g. mark it `Unset` when returned from the index in this situation. See [an example](https://github.com/meilisearch/meilisearch/blob/7a89abd2a025606a42f8b219e539117eb2eb029f/meilisearch-types/src/settings.rs#L608)) +- [ ] The setting cannot be set when the feature is disabled, either by the main settings route or the subroute (see [`validate_settings` function](https://github.com/meilisearch/meilisearch/blob/7a89abd2a025606a42f8b219e539117eb2eb029f/meilisearch/src/routes/indexes/settings.rs#L811)) +- [ ] If possible, the setting is reset when the feature is disabled (hard if it requires reindexing) + ## Impacted teams From 40fa0b4df682f66f28803e01384405952156ea5e Mon Sep 17 00:00:00 2001 From: Many the fish Date: Thu, 18 Jan 2024 11:17:29 +0100 Subject: [PATCH 4/4] Update .github/ISSUE_TEMPLATE/sprint_issue.md --- .github/ISSUE_TEMPLATE/sprint_issue.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/sprint_issue.md b/.github/ISSUE_TEMPLATE/sprint_issue.md index 092a3c76e..1e90f5946 100644 --- a/.github/ISSUE_TEMPLATE/sprint_issue.md +++ b/.github/ISSUE_TEMPLATE/sprint_issue.md @@ -46,3 +46,4 @@ Related spec: WIP ## Impacted teams +