Skip to content

fix: import of rules and synonyms#118

Merged
Nagriar merged 2 commits into
mainfrom
fix/rulesImport
Apr 4, 2023
Merged

fix: import of rules and synonyms#118
Nagriar merged 2 commits into
mainfrom
fix/rulesImport

Conversation

@Nagriar
Copy link
Copy Markdown
Member

@Nagriar Nagriar commented Apr 4, 2023

Summary

This PR contains 2 fixes:

Clear rules/synoyms when empty batch is provided with clear existing

When the input is empty no batches are sent which led to keeping the existing rules/synonyms.
The expected behaviour is to clear the existing rules/synonyms.
Since the API rejected empty batches, the clear endpoint is required for this specific case.

Disable clear existing after the first batch

If the input contains more than 1000 items, the cli splits the input into several batches but if the flag ClearExistingRules/ReplaceExistingSynonyms is provided, only the last batch will be kept.
This PR set the flag only for the first batch.

Test strategy

unit tests has been added to test both fixes

… disable clear existing after the first batch
…g and disable replace existing after the first batch
@Nagriar Nagriar changed the title fix: clear rules when empty batch is provided with clear existing and disable clear existing after the first batch fix: import of rules and synonyms Apr 4, 2023
@Nagriar Nagriar merged commit c4f6c76 into main Apr 4, 2023
@Nagriar Nagriar deleted the fix/rulesImport branch April 4, 2023 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants