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

Remove confusing duplicate unused definition of u_kept_successful_command from lib/common.cf in MPF stdlib

    XMLWordPrintable

    Details

      Description

      From PR: https://github.com/cfengine/masterfiles/pull/1932

      In https://gitlab.com/vsa-cfengine/policy-channels/-/issues/4, it came up that we have an extra, out-of-date copy of body classes u_kept_successful_command body (from the update policy) in lib/common.cf (which is part of the CFEngine Standard Library).

      Remember that the update policy doesn't use the CFEngine Standard Library.

      In the aforelinked issue Nick Anderson stated it was probably some artifact left in promises.cf from some time when update.cf was included in the main policy.

      Remove it so that it doesn't confuse us. (It's confusing to have two copies of the same classes body THAT ARE DIFFERENT.) See https://gitlab.com/vsa-cfengine/policy-channels/-/issues/4 for the full discussion on this.

      If someone is using u_kept_successful_command outside the update policy, that is to so in their main policy (loaded from promises.cf), this will be a breaking change. They shouldn't be; they should be using kept_successful_command in lib/common.cf.

      I appreciate this might be a breaking change for anybody (ab)using u_kept_successful_command from promises.cf entry; putting it in the changelog would mitigate the risk.

      Having two different copies of the same body is definitely broken.

        Attachments

          Activity

            People

            • Assignee:
              a10042 Nick Anderson
              Reporter:
              a10042 Nick Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel