Skip to content
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

Add generic type to TaskInfoType to handle new Task type #385

Closed
alallema opened this issue Dec 27, 2022 · 5 comments · Fixed by #542
Closed

Add generic type to TaskInfoType to handle new Task type #385

alallema opened this issue Dec 27, 2022 · 5 comments · Fixed by #542
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@alallema
Copy link
Contributor

Description
All types of tasks are grouped in an enum TaskInfoType

    [JsonConverter(typeof(JsonStringEnumConverter))]
    public enum TaskInfoType
    {
        IndexCreation,
        IndexUpdate,
        ...
        IndexSwap
    }

But if a new task type is created there will be a break.

Suggestion
To avoid breaking when a new Task type is created, it would be great to create a generic type such as unknown that will handle all types that do not belong to the existing enum.

@alallema alallema added enhancement New feature or request good first issue Good for newcomers labels Dec 27, 2022
@bidoubiwa bidoubiwa self-assigned this Apr 2, 2023
@postmeback
Copy link
Contributor

postmeback commented Jun 24, 2024

I have added the "Unknown" type in the enum.

What next? Updating the tests @alallema

@curquiza
Copy link
Member

Hello @postmeback

I don't see th Unknown type

public enum TaskInfoType

@postmeback
Copy link
Contributor

@postmeback
Copy link
Contributor

Shall I improve the tests next ?

@curquiza
Copy link
Member

Yes, please, always add/improve the tests if possible when adding new things to the repo 😊

meili-bors bot added a commit that referenced this issue Aug 3, 2024
542: Add `Unknown` type to `TaskInfoType` r=ahmednfwela a=postmeback

# Pull Request

## Related issue
Fixes #385 

## What does this PR do?
- Currently, it adds the "Unknown" type to the enum. It requires more tasks to do

## 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: postmeback <[email protected]>
Co-authored-by: Clémentine <[email protected]>
Co-authored-by: Ahmed Fwela <[email protected]>
Co-authored-by: Arka Poddar <[email protected]>
@meili-bors meili-bors bot closed this as completed in 70a7026 Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants