Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-958

Improve hierarchy of keys for project-stages

    Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2017.2.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      2017-Jan-B

      Description

      We currently eagerly flatten the project-stages hierarchy to a dotted notation, which is now causing problems for things like logging configuration.

      For instance, this doesn't work, because the "key" is actually a string containing dots:

      swarm:
        logging:
          loggers:
            org.wildfly.swarm.whatever:
              level: TRACE
      

      The various key-related things, particularly our simpleSubKeys just look for the next dot, and it looks, inspecting the flattened property of swarm.logging.loggers.org.wildfly.swarm.whatever.level

      I suggest we try to maintain the hierarchy (but I dunno if that'll be useful or possible with kube's config-map or the vertx stuff), so that we can get keys which include dots.

      Basically, the YAML is a tree. Our Fraction stuff is a tree. If we can keep it all internally as a tree, it'll map easier.

      And then just flatten when/if we need to emit it as flattened keys (for System.setProperty(...).

      We could also un-flatten system properties, to know what a system property of swarm.logging.loggers.org.wildfly.swarm.whatever.level maps to the above YAML-esque tree.

      Maybe.

      Anyhow, it'd be a non-trivial change, but might also go nicely in the same unit-of-work as the multiple-enabled-stages JIRA and project-STAGENAME.yml bits. A sequence of trees.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bob.mcwhirter Bob McWhirter
                Reporter:
                bob.mcwhirter Bob McWhirter
              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: