馃挕 Solution Design: Storing automation rules (WIP)
Problem to solve
We need to find a way to store the automation rules (yaml) and meet the basic CRUD needs while keeping security, performance and scalability in mind.
Please see the epic for more context about the project.
Requirements
- Rules are uniquely identifiable
- Rules can be associated with namespaces such as project, group, instance and individual user
- Rules are version controlled
- Schema of the rules can be easily extended
Proposals
Store in DB
Add a dedicated automation_rules
table with a FK referring to the namespaces
table.
Pros:
- Proven performance and reliability
- Easy to extend with metadata
- Easy to query
Cons:
- Requires another table to achieve version control
- Requires dedicated tools (UI and/or API) to access
Store as repository file(s)
Similar to CI Workflow and Security Policies, the automation rule can be stored as a yaml file under the .gitlab
folder.
Pros:
- Version control is free
- No need to deal with DB migration
- Easy to access
Cons:
- Hard to attach metadata
- Hard to query
Conclusion
TBD
Edited by Tao Guo