fix(snapshot): Enable entity snapshot by default

Changed ENTITY_SNAPSHOT_ENABLED default from false to true.

Reasoning:
- Code is tested and deployed to production
- Backward compatibility verified
- No need for gradual rollout with feature flag
- Entity rollback should work by default
- Users expect reject to rollback entities (not just status change)

Feature flag still exists for emergency disable if needed:
- Set ENTITY_SNAPSHOT_ENABLED=false to disable
- Useful for troubleshooting or rollback scenarios

Default behavior (ENTITY_SNAPSHOT_ENABLED=true):
- Entity update creates snapshot in metadata
- Reject operation rolls back entities to old values
- Bulk import reject deletes new entities, restores updated ones
- Restore reject returns to pre-restore state
This commit is contained in:
taylanbakircioglu
2025-11-13 20:32:47 +03:00
parent b427db4c78
commit b8326cc4d4
2 changed files with 6 additions and 5 deletions
+3 -3
View File
@@ -28,6 +28,6 @@ MANAGEMENT_BASE_URL = os.getenv("MANAGEMENT_BASE_URL", PUBLIC_URL) # Backward c
AGENT_HEARTBEAT_TIMEOUT_SECONDS = 15
AGENT_CONFIG_SYNC_INTERVAL_SECONDS = 30
# Entity snapshot feature flag (for gradual rollout)
# IMPORTANT: Keep this FALSE in production until Phase 7 deployment
ENTITY_SNAPSHOT_ENABLED = os.getenv("ENTITY_SNAPSHOT_ENABLED", "false").lower() == "true"
# Entity snapshot enabled by default (rollback functionality)
# Set to "false" only if you need to disable snapshot temporarily
ENTITY_SNAPSHOT_ENABLED = os.getenv("ENTITY_SNAPSHOT_ENABLED", "true").lower() == "true"
+3 -2
View File
@@ -48,8 +48,9 @@ from datetime import datetime
# Setup logger
logger = logging.getLogger(__name__)
# Feature flag for gradual rollout
ENTITY_SNAPSHOT_ENABLED = os.getenv("ENTITY_SNAPSHOT_ENABLED", "false").lower() == "true"
# Entity snapshot enabled by default
# Can be disabled with ENTITY_SNAPSHOT_ENABLED=false if needed
ENTITY_SNAPSHOT_ENABLED = os.getenv("ENTITY_SNAPSHOT_ENABLED", "true").lower() == "true"
async def save_entity_snapshot(