org-formation-cli
org-formation-cli copied to clipboard
Creating types sequentially takes a long time
https://github.com/org-formation/org-formation-cli/blob/416dbaaf6f531a76278d8226850336a4398eec58/src/plugin/impl/rp-build-task-plugin.ts#L127-L130
Is there a way to execute this for multiple types in parallel, so the total wait time is roughly a minute, the time it appears to take for the type to register, as opposed to n minutes for n types — this feels unnecessarily painful when setting up new accounts, in an existing organization (if it only happened when setting up the org then I'd be ok with it, though it would not be ideal)?
Naively, I might expect that rewriting the plugin to handle multiple types would then work… but I don't know whether there are AWS limits. If there is no such limit, would such a change — or an equivalent — be welcome? (I'd add a new plugin, to avoid breaking changes.)
What typically is done to run type-registration in parallel is to increase the MaxConcurrentTasks (see here.)
this will ensure the types gets registered to different accounts & regions in parallel.
if you have a lot of different types, you can set the MaxConcurrentTasks on the Type: include-task that imports the type registrations.
hope that helps
Thanks — I have MaxConcurrentTasks set to 100 as in your example, but I'm hitting the issue for a single account/region.
I don't have it on for the Type: include block, so I'll do that.
Types:
Type: include
+ MacConcurrentTasks: 100
DependsOn: OrganizationBuild
Path: ./templates/005-types/_tasks.yml
Where would be the best place to document this (so I can close the issue — assuming it does in fact work)?
for documentation on this attribute I would refer to the documentation on the include-task. It already mentions the attribute. If you would have expected it somewhere else: feel free to add it!
also happy to close the issue as-is. thanks