~petersanchez/djeploy#5: 
Release directory conflict in time zone edge case

If a release directory is created, by default is uses the local environment to generate the timestamp. It uses Python, like so:

#!python

time.strftime('%Y%m%d%H%M%S')

This is run on the local deployment system where Fabric is being executed. ie, developers laptop. If a dev is in a timezone ahead of another developer, there can be a situation where the newer deployment is considered older than the existing deployment folders. Thus when using the "remove_old_release" method will delete the "oldest" timestamped folder, which in this case, is actually the latest deployment.

This actually happened to us today. Here is a snippet:

>>> releases = '20170315143441/ 20170315152715/ 20170315152557/ 20170315152256/ 20170315152153/'
>>> releases = [x.replace('/', '') for x in releases.split()]
>>> sorted(releases)
['20170315143441',
 '20170315152153',
 '20170315152256',
 '20170315152557',
 '20170315152715']
>>> 

In this case, the folder "20170315143441" is showing as oldest folder when it actually is the newest deployment folder.

Status
RESOLVED FIXED
Submitter
bitbucket:Peter Sanchez
Assigned to
No-one
Submitted
8 years ago
Updated
5 years ago
Labels
No labels applied.

bitbucket:Peter Sanchez 6 years ago · edit

Updated dynamic release directory to use utc time instead of local time. Closes Issue #5

→ <<cset 67456eb82d26>>

~petersanchez REPORTED FIXED 5 years ago

Register here or Log in to comment, or comment via email.