-
Notifications
You must be signed in to change notification settings - Fork 3
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
Replace family and stage tables with enum fields #238
Replace family and stage tables with enum fields #238
Conversation
class StageName(str, Enum): | ||
proposed = "proposed" | ||
updates = "updates" | ||
edge = "edge" | ||
beta = "beta" | ||
candidate = "candidate" | ||
stable = "stable" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could further distinguish between the stages of each family. But I think that's not necessary right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a big change, but everything looks fine. I've double-checked it :)
Description
Changes:
Reasoning:
Families and stages were first introduced as tables with the idea of it being easier to add families in the future. That turned out not to be so simple though. Adding families requires specific code changes for each family. Hence the code base ended up knowing the families and in fact using them in conditionals. That beats the purpose of storing them as data tables. So this PR removes these tables. Doing so simplified our queries as it avoids the need for joins to figure out an artefact's family or stage.
Resolved issues
A refactor to help towards https://warthogs.atlassian.net/browse/RTW-301
Documentation
Web service API changes
Family.name
toArtefact.family
(these endpoints are only used by us)Tests
Updated tests.