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

Revert back to loading the ConfigView/StageConfig before start so user provided mains can configure fractions.

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2017.3.2
    • Fix Version/s: 2017.3.2
    • Component/s: core
    • Labels:
      None
    • Sprint:
      2017-Feb-B
    • Steps to Reproduce:
      Hide

      URL stageConfig = cl.getResource("my-stages.yml");
      Swarm swarm = new Swarm().withConfig(stageConfig);
      String key = swarm.configView().resolve("my.db.host").getValue();//throws NPE

      Show
      URL stageConfig = cl.getResource("my-stages.yml"); Swarm swarm = new Swarm().withConfig(stageConfig); String key = swarm.configView().resolve("my.db.host").getValue();//throws NPE

      Description

      I noticed the now deprecated stageConfig() and new configView() methods are in HEAD but looks like the ConfigView is still initialized as part of start(), after the fractions have already been setup in a user-provided main. In my current user provided main I use YAML configurations to setup the UndertowExternalMountsAsset with multiple local directories based on the stage configuration. As it stands I get an NPE if I try to access the configView() before the container is started.

      Please refactor Swarm so that the ConfigView can be initialized before startup so that user provided mains can customize fractions with environmental settings.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bob.mcwhirter Bob McWhirter
                Reporter:
                aanderson1776 Aaron Anderson
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: