pressbooks / pressbooks-book-directory-fe

A Vue.js frontend for the Pressbooks Directory
0 stars 1 forks source link

Previous version files compiled in S3 #161

Closed richard015ar closed 3 years ago

richard015ar commented 3 years ago

In S3 we are not moving or removing previously compiled files. In that way previous releases are accessible via browser. Screenshot from 2021-02-09 16-15-51

Example: https://dev.pressbooks.directory/js/app.140e7aa2.js This file is obsolete and was deployed on Aug, 2020.

richard015ar commented 3 years ago

I did it using S3 versioning feature. I changed the file names of the built files, to keep those with the same name, in that way rather than have multiple different names in our buckets, each one corresponding to a different file version, now we have the same files name but with different versions, ready to rollback when is needed. There are multiple ways we could implement a rollback action, I created an issue to discuss and solve it: https://github.com/pressbooks/pressbooks-book-directory-fe/issues/214

From now, we will track different versions of the objects in the bucket. I created a life cycle rule for each bucket what removes previous versions of the objects with >= 90 days (we can change that if necessary).

The versioning feature and life cycle were created for our Dev and Staging buckets. I will leave this task Pending and assign it to @ho-man-chan, so we can review it and bring any concern / opinion before apply it to Production S3 Bucket.