Skip to content

Commit

Permalink
Add clarification around reverting changes that touch DynamoDB data (#…
Browse files Browse the repository at this point in the history
…982)

A revert is essentially a delete, but I don't think many of us would
treat one the same as an explicit delete given that generally reverting
code is a safe operation :)
  • Loading branch information
nemacysts authored Jun 25, 2024
1 parent 2653f28 commit ed79172
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tron/config/config_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
contain a validated configuration.
WARNING: it is *NOT* safe to delete classes that are being validated (or their attributes) if there are any references to them in DynamoDB! (See DAR-2328)
WARNING: it is *NOT* safe to delete classes that are being validated (or their attributes) if there are any references to them in DynamoDB until TRON-2200 is complete! (See DAR-2328)
NOTE: this means that reverting a change that adds a new attribute is not safe :)
"""
import datetime
import getpass
Expand Down
6 changes: 4 additions & 2 deletions tron/config/schema.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Immutable config schema objects.
WARNING: it is *NOT* safe to delete these classes (or their attributes) if there are any references to them in DynamoDB! (See DAR-2328)
WARNING: it is *NOT* safe to delete these classes (or their attributes) if there are any references to them in DynamoDB until TRON-2200 is complete! (See DAR-2328)
NOTE: this means that reverting a change that adds a new attribute is not safe :)
"""
from collections import namedtuple
from enum import Enum
Expand Down Expand Up @@ -325,4 +326,5 @@ def _asdict(self) -> dict:

ActionOnRerun = Enum("ActionOnRerun", dict(rerun="rerun")) # type: ignore

# WARNING: it is *NOT* safe to delete these classes (or their attributes) if there are any references to them in DynamoDB! (See DAR-2328)
# WARNING: it is *NOT* safe to delete these classes (or their attributes) if there are any references to them in DynamoDB until TRON-2200 is complete! (See DAR-2328)
# NOTE: this means that reverting a change that adds a new attribute is not safe :)

0 comments on commit ed79172

Please sign in to comment.