Feature Request: add parallel/sequence control
jrencz opened this issue · 6 comments
Right now the plugin is processing its configuration and it adds each file to the queue handled by serverless AWS provider.
This gives no control over the order of uploaded files
My use case:
I have a project that consists of source code of a single page app. The code is bundled into several css js and font files and one html file.
It is important for the deployment to be consistent to have a way to upload everything but the html file first and only if it succeeded then upload html file.
I see no way to do that just by using configuration of the plugin
I analysed the code and I see that the promise returned by the awsProvider@request is discarded:
Line 103 in 1107710
File uploads could possibly be sequentialised on 2 levels:
- assets
- files in each asset
with current syntax. Right now everything runs in parallel (or: as parallel as awsProvider allows it to be)
I'd like to open a discussion about:
-
whether the plugin should allow sequences
-
should it
- process assets and files in sequence
- process assets in parallel but files should be uploaded sequentially
- process assets sequentially but files should be uploaded in parallel
- introduce new syntax to express sequences and keep current syntax for maximum parallelisation
Interesting proposal.
For your specific case I can see it easily being addressed by processing each Target in series, but files in parallel. Then have two Targets for the same source files, but one that excludes HTML, and one that includes them.
However, the idea of explicit levels of parallelism, as well as "stop on failure", is more appealing to me.
Looks promising... I'll try to make time to look at it further tomorrow.
Thanks!
Sorry, life got in the way :)
I think your approach looks close to what I'd go with... I'll take another look this weekend and hopefully merge and release soon.