duct

2019-11-04T18:16:31.057300Z

I expected duct profiles provided to exec-config to be merged in the supplied order; however it appears no explicit order is set… is that correct?!

ccann 2019-11-04T18:18:33.058700Z

I think we ran into this and discovered empirically that it’s potentially alphabetical, perhaps as an incidental consequence of iterating over keys in a map (not that we’d rely on that ordering)

2019-11-04T18:19:41.059400Z

It looks like the order is arbitrary as determined by (keys config)

2019-11-04T18:19:52.059700Z

(defn profile-keys
  "Return a collection of keys for a configuration that excludes any profile
  not present in the supplied colleciton of profiles. Profiles may be specified
  as namespaced keywords, or as un-namespaced keywords, in which case only the
  name will matched (e.g. `:dev` will match `:duct.profile/dev`). If the :all
  keyword is supplied instead of a profile collection, all keys are returned."
  [config profiles]
  (cond->> (keys config)
    (not= profiles :all) (filter (partial keep-key? profiles))))

2019-11-04T18:20:20.060200Z

surely that’s not right

ccann 2019-11-04T18:37:25.060500Z

I would have expected right-to-left

2019-11-04T18:47:18.061400Z

left to right is what I would expect; in order of the keys in profile