Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-1486

Expansion of $(this.promiser) is broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.0
    • Component/s: Evaluation
    • Labels:
      None
    • Platform:
      Any
    • Found in version (details):
      Current master

      Description

      The promise variable $(this.promiser) fails to be evaluated correctly, or too late, leaving list evaluation erroneous and out-of-synch. This is a potentially dangerous bug with harmful consequences.

      Consider this example

      bundle agent main()
      {
      vars:
      "list" slist =>

      { "1", "2", "3" }

      ;
      commands:
      "/bin/echo $(list)"
      args => "or $(this.promiser)";
      }

      ##

      body common control
      {
      bundlesequence =>

      { "main" }

      ;
      }

      It should output:

      1 or 1
      2 or 2
      3 or 3

      But it outputs

      1 or $(this.promiser)
      2 or 1
      3 or 2

      My guess is that the update / evaluation of $(this.promiser) is happening too late and the cache is not being cleared correctly

        Attachments

          Activity

            People

            • Assignee:
              a10025 Volker Hilsheimer (Inactive)
              Reporter:
              a10004 Mark Burgess (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel