summaryrefslogtreecommitdiff
path: root/doc/todo/info_propigation_out_of_nested_properties.mdwn
diff options
context:
space:
mode:
authorJoey Hess <joeyh@debian.org>2014-07-09 22:11:31 -0400
committerJoey Hess <joeyh@debian.org>2014-07-09 22:11:31 -0400
commit82da31b3e0e9acdfbca4c48eb12ab1f28515ba10 (patch)
tree0a3e0c6e134680e35665364b2cd6895863bcc990 /doc/todo/info_propigation_out_of_nested_properties.mdwn
propellor (0.8.1) unstable; urgency=medium
* Run apt-get update in initial bootstrap. * --list-fields now includes a table of fields that are not currently set, but would be used if they got set. * Remove .gitignore from cabal file list, to avoid build failure on Debian. Closes: #754334 # imported from the archive
Diffstat (limited to 'doc/todo/info_propigation_out_of_nested_properties.mdwn')
-rw-r--r--doc/todo/info_propigation_out_of_nested_properties.mdwn28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/todo/info_propigation_out_of_nested_properties.mdwn b/doc/todo/info_propigation_out_of_nested_properties.mdwn
new file mode 100644
index 00000000..9e69b0b4
--- /dev/null
+++ b/doc/todo/info_propigation_out_of_nested_properties.mdwn
@@ -0,0 +1,28 @@
+Currently, Info about a Host's Properties is manually gathered and
+propigated. propertyList combines the Info of the Properties in the list.
+Docker.docked extracts relevant Info from the Properties of the container
+(but not al of it, intentionally!).
+
+This works, but it's error-prone. Consider this example:
+
+ withOS desc $ \o -> case o of
+ (Just (System (Debian Unstable) _)) -> ensureProperty foo
+ _ -> ensureProperty bar
+
+Here, the Info of `foo` is not propigated out. Nor is `bar`'s Info.
+Of course, only one of them will be run, and only its info should be propigated
+out..
+
+One approach might be to make the Propellor monad be able to be run in two
+modes. In one mode, it actually perform IO, etc. In the other mode, all
+liftIO is a no-op, but all Info encountered is accumulated using a Reader
+monad. This might need two separate monad definitions.
+
+That is surely doable, but the withOS example above shows a problem with it --
+the OS is itself part of a Host's info, so won't be known until all its
+properties have been examined for info!
+
+Perhaps that can be finessed. We don't really need to propigate out OS info.
+Just DNS and PrivDataField Info. So info could be collected in 2 passes,
+first as it's done now by static propertyInfo values. Then by running
+the Properties in the Reader monad.