guardian / typerighter

Even if you’re the right typer, couldn’t hurt to use Typerighter!
Apache License 2.0
276 stars 12 forks source link

Manage tag in existing rule methods #351

Closed rhystmills closed 1 year ago

rhystmills commented 1 year ago

Co-authored with @jonathonherbert

What does this change?

This PR updates existing methods in the rule manager to create and update rule-tag relationships when the list of tags in a rule are specified.

Our rule methods will provide tags to the user as a list of ids as part of the rule data provided by our API.

The frontend maps these ids to a preloaded table of tags when providing tags as tag names in our frontend rule forms (and table).

The PR includes a database evolution:

We've also increased the simultaneous connections in Postgres to get around an issue where we're running short of connections locally. This is a temporary workaround pending a proper fix.

How to test

Run the rule manager locally, including the tests. Do they all pass?

Also try creating, updating, and publishing rules. If you remove or add tags in these operations, do the changes persist as you'd expect?

rhystmills commented 1 year ago

Have tested the following locally and all worked as expected:

jonathonherbert commented 1 year ago

Code looks great, tested in CODE with a fresh ingest and all works as expected.