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

Stage config file with .yaml extension

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 2017.4.0
    • Fix Version/s: 2017.5.0
    • Component/s: config-api
    • Labels:
      None
    • Sprint:
      2017-Apr-B
    • Steps to Reproduce:
      Hide

      Programatically create a Swarm() and try to load stage config file with .yaml extension. Its properties will not be available in ConfigView.

      Show
      Programatically create a Swarm() and try to load stage config file with .yaml extension. Its properties will not be available in ConfigView.

      Description

      When trying to use your own project stage config YAML file using the swarm.project.stage.file system property, the file will only be recognized if it has a .yml extension and not with .yaml. The latter is even recommended by yaml.org. See here.

      I have found the problematic code in ConfigViewFactory:

          public void load(String profileName, URL url) throws IOException {
              if (url.getPath().endsWith(".properties")) {
                  loadProperties(profileName, url);
              } else if (url.getPath().endsWith(".yml")) {
                  loadYaml(profileName, url);
              }
          }
      

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: