projectatomic / atomicapp

[UNMAINTAINED] This is the reference implementation of the Nulecule container application Specification: Atomic App
102 stars 71 forks source link

Fix namespaces in answers.conf #478

Open rtnpro opened 8 years ago

rtnpro commented 8 years ago

Problem

Given the current structure of answers.conf, there's high chance of namespace(where namespaces are nothing but app names) collisions in nested Nulecule apps. For example, if there's a nested Nulecule application as below:

Baseapp
|- components:
   |- app1
   |- app2
   |- app3 (external nulecule)
       |- components:
          |- app4
          |- app2

The params loaded for app2 in the different Nulecule applications will conflict each other in the section app2 of answers.conf. This is because the current namespace does not have any notion of hierarchy.

Solution

This can be easily solved in we update the way how we generate section names in answers.conf file to be more explicit as to which component in the Nulecule tree it is for:

[general]
foo=bar

[app1]
key1=var1

[app2]
key1=var2

[app3] # equivalent to general section for app3
key1=blah

[app3:app2] # component app2 for app3
key2=var3

[app3:app4]
some-key=some-val
rtnpro commented 8 years ago

@dustymabe @cdrage

Do we want to merge it for GA? If not, we should remove the GA milestone label from this issue.