Custom Upload Validation¶
The validation_overrides.py
file in the upload
Django app is a user-editable
script for custom validation of user uploads on the VOR Stream web UI. This
file is persisted after a deployment under specific conditions, which are
managed using a checksum.txt
file.
Deployment Scenarios¶
This section outlines various deployment scenarios and the
corresponding handling of the validation_overrides.py
file.
Case 1: Deployment on a Fresh Server¶
validation_overrides.py
is created.checksum.txt
is created.
Case 2: Deployment on an Existing Server Without an Overrides File¶
validation_overrides.py
is created.checksum.txt
is created.
Case 3: Deployment on an Existing Server With an Overrides File¶
- If
validation_overrides.py
has not been modified, it will remain unchanged. - If
validation_overrides.py
has been modified, it will be persisted. checksum.txt
remains the same, regardless of whethervalidation_overrides.py
has been modified or not.
Case 3: Deployment on an Existing Server with an Outdated Overrides File¶
In the case where the validation_overrides.py
file in deployment package
is updated,
validation_overrides.py
will be backed up asvalidation_overrides.py.bak
and replaced after deployment, regardless of whether it has been modified or not.checksum.txt
will be updated with the checksum of the newvalidation_overrides.py
.
Case 4: Deployment on an Existing Server with an Overrides File but Missing checksum.txt¶
In the case where checksum.txt
is accidentally deleted,
validation_overrides.py
will be backed up asvalidation_overrides.py.bak
and replaced after deployment, regardless of whether it has been modified or not.- A new
checksum.txt
is created.
Important
Administrator Responsibility: Administrators must be aware of changes
to validation_overrides.py
and notify users prior to deployment.
This ensures users know where to find the backup file
(validation_overrides.py.bak
) and can modify the updated
validation_overrides.py
after a successful deployment.