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

Pipeline Config: Eliminate the "isConstant" AST/JSON field

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Pipeline Config 0.1
    • Similar Issues:

      Description

      We've got a field for values called "isConstant" that doesn't serve a very clear purpose - right now, it's basically just used in two places - to determine whether to actually try type-casting in validation and to decide which subtype of ConfigASTValue is used when parsing from JSON. So...we probably don't need it, or if we do need it, we need to actually do something more useful and determinant with it.

      In the first case, which is probably the one that actually matters, since that's what cares which ConfigASTValue subtype is used, we use it to determine whether to try casting for parameter validation. Without that check, we end up with errors for things like [$class: ...] legacy metastep syntax, which are String when they get to us in validation currently, so can't be cast to Map as they'd need to be. So beyond the confusion of isConstant, we're also not actually doing validation of legacy metastep syntax!

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                abayer Andrew Bayer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: