Description
We've been happily using ember-cli-deploy
and this plugin for over 6 years - thanks!
As a consequence of this, we've built up a large history of previously deployed versions of our apps (which are available via special URLs for testing and other purposes).
I noticed that our activation stage is taking a long time (we have a bunch of apps across a bunch of environments with a bunch of historical versions) and digging into it I found that a lot of this is due to this plugin needing to list the revisions available on S3 for various reasons.
In #119 I optimised some of the easy cases where it was possible to avoid some of this communication with S3 but we're still left with fetchInitialRevisions
and fetchRevisions
.
I was trying to figure out why these functions exist/ are called and whether we could optimise them in some way.
I found some relevant discussions:
- Add: activate pipeline runs
fetchRevisions
-hook ember-cli-deploy#209 - add
fetchRevisions
hook to deploy and activate pipelines ember-cli-deploy#323 (comment)
From these, I wasn't too clear exactly how important these hooks might be. If they impose a high cost on some users (those with full buckets on S3) then could we change their behaviour or somehow speed them up?
It seems like the prime use-case for fetchInitialRevisions
is to generate a changelog and indeed we have code which adds an entry to an audit log with the previously active revision and the new one. If other plugins only need to know the previously active revision then we can optimise by at least bailing out of the listObjectRecursively
loop once we've found the active revision.
I'm interested in the appetite here for changes around this. If you think this is a problem that most people don't suffer from then we can fork the plugin and change the behaviour for our purposes. But if you think it's something that this plugin should handle then I'd love to talk about possible approaches and exactly what we need from fetchInitialRevisions
and fetchRevisions