Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54772

computer/<name>/systemInfo doesn't report full Environment

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:
    • Released As:
      2.190

      Description

      computer/<name>/systemInfo page gather values for the table of environment variables from EnvVarsSlaveInfo class which uses Computer.getEnvVars() resp. Computer.getEnvironment() for obtaining an EnvVars structure.

      The EnvVars class stores values as a TreeMap with the case-insensitive comparator. When the keys are different, but the difference is only in character cases, it stores all such keys in one key. It is un-deterministic which environment variable name you will see, it depends on the order returned by System.getenv() (the first occurrence is used as the key for map) - it's a natural behavior of TreeMap.

      In case you have more keys with a difference in the case character(s) only you don't have a real view what is exactly the running environment.

      EnvVars is used in many cases in the core hence I don't want to break a backward-compatibility so I'd propose a fix that don't use EnvVars for display this output, but obtain a full real environment variable collection from the agent at the time of page generation.

        Attachments

          Issue Links

            Activity

            Hide
            pajasoft Pavel Janoušek added a comment -

            PR sent.

            Show
            pajasoft Pavel Janoušek added a comment - PR sent.

              People

              Assignee:
              pajasoft Pavel Janoušek
              Reporter:
              pajasoft Pavel Janoušek
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: