-
Notifications
You must be signed in to change notification settings - Fork 351
Prevent modifying and/or deleting reserved statuses #6817
Prevent modifying and/or deleting reserved statuses #6817
Conversation
|
just curious. is "PRE_PROD" a reserved status? i.e. is there code that looks specifically for PRE_PROD and performs certain actions based on that status? is this status seeded? i was kind of under the impression Comcast added this status to support an internal process. |
I added it in there for two reasons:
|
traffic_ops/app/db/migrations/2022050916074300_add_reserved_statuses.down.sql
Outdated
Show resolved
Hide resolved
Comcast may have done that, but it's seeded into everyone's TODB on installation. There is no code in ATC that checks for and acts explicitly on that status. It has no non-semantic meaning. |
ok well is guess since it's "seeded" it should be immutable |
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.
The changes to the tests are basically the same in all four of the places you're making them, so I just put the comment I had on v4 to avoid repeating myself a bunch of times.
Also, though, now that any cache status that t3c could possibly care about is guaranteed to always exist, they shouldn't need to have any fixture data or testing functions at all. Can probably even be removed from their TCObj/WithObj stuff.
* prevent modifying and/or deleting reserved statuses * fix tests * cleanup * code review fixes * fix test * code review round 2 * remove unused file
This PR closes #6291
Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
Run TO and TP locally.
Try to modify/ delete one of the following statuses. You should get an error while doing so.
Reserved status names:
PRE_PROD, ONLINE, OFFLINE, ADMIN_DOWN, REPORTEDIf this is a bugfix, which Traffic Control versions contained the bug?
PR submission checklist