griddynamics / mpl

[IT-36925] Jenkins Shared Modular Pipeline Library
https://blog.griddynamics.com/developing-a-modular-pipeline-library-to-improve-devops-collaboration/
Apache License 2.0
158 stars 97 forks source link

MplConfig singleton #41

Closed marcelaraujo closed 4 years ago

marcelaraujo commented 5 years ago

Hi,

Why does every module create a new MplConfig instance instead of provides unique instance?

In some modules I need update config and reflecting on the next modules.

Tks

sparshev commented 5 years ago

Hi @marcelaraujo,

The reason why MPL was born - is to fight the "Configuration hell" problem - so the whole architecture of MPL is trying to make sure there will be no "global" configuration. The modules can control what's inside their CFG and pass this CFG to the children modules (using MPLModule('name', CFG)) - but can't affect CFG for the parent modules/pipeline.

You can get some additional info in #10 and #8 (where we working on solution to provide the return interface to control the configuration content properly).

Thank you

sparshev commented 4 years ago

Almost a month no response - so I think I can close it.