svengeance / Husky

Modernizing the way developers think about installers
3 stars 0 forks source link

[Feature] Bring HuskyConfigurationBlocks into the Runtime Variable Soup as Read-Write Vars #12

Closed svengeance closed 3 years ago

svengeance commented 3 years ago

Context

In the pursuit of supporting Yaml as a primary configuration & workflow driver, users should be able to use their HuskyConfigurationBlocks as variables in their workflow.

Moreover, since the only way the user can communicate with Husky's internals is via TaskConfiguration blocks and HuskyConfiguration blocks, we should let users write variables from Task outputs into Configuration blocks.

Proposals

HuskyConfigurationBlocks, upon creation of the installer's DI container, will be serialized into the Dictionary<string, string> variable 'soup'. ConfigurationBlocks will not be injected into the container as scoped instances, but will be resolved JiT from the container by reading from the variable soup.

Variable outputs will not be written directly to the HuskyConfiguration blocks, but rather will be written to the variable soup. The next time any element asks for that specific ConfigurationBlock, it will be resolved with the new variables.

Interested Users

Developers, Husky Developers

svengeance commented 3 years ago

Note: During this implementation we should also ensure HuskyConfigurationBlock variables are resolved before attempting to validate HuskyConfigurationBlocks