Further to #273, this PR adds the missing properties (e.g. notes, googleSheetId, forceRedRule, advisoryRule) to the rule model. SheetsRuleManager now creates dbRule instead of RuleResource.
When translating rules in the database into the rule resource for the checker, the rule manager filters out any rules that should be ignored (ignore = true).
How to test
The automated tests should pass.
Using the steps mentioned in https://github.com/guardian/typerighter/pull/229, make a POST request to the /refresh endpoint and inspect the database. The rules should contain the new fields and the corresponding data from the Google Sheet.
How can we measure success?
We can refresh rules from the Google sheet with those additional properties, and read them from S3.
Additional work to add the UI is to come.
Have we considered potential risks?
There is a new test to check that rules are filtered correctly depending on their 'ignore' flag.
co-authored-by: @jonathonherbert
What does this change?
Further to #273, this PR adds the missing properties (e.g. notes, googleSheetId, forceRedRule, advisoryRule) to the rule model. SheetsRuleManager now creates dbRule instead of RuleResource.
When translating rules in the database into the rule resource for the checker, the rule manager filters out any rules that should be ignored (
ignore = true
).How to test
How can we measure success?
We can refresh rules from the Google sheet with those additional properties, and read them from S3. Additional work to add the UI is to come.
Have we considered potential risks?
There is a new test to check that rules are filtered correctly depending on their 'ignore' flag.