Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-8549

Reduce regular expression garbage in puppet

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 5.5.1
    • Component/s: None
    • Labels:
      None
    • Release Notes:
      Not Needed
    • QA Risk Assessment:
      Needs Assessment

      Description

      Lots of garbage is generated by the ValidTagRegex in tagging.rb, as on JRuby it's forced to rebuild the regular expression every time it is matched against a string of a different encoding.

       

      One solution is to put a u on the end to force UTF-8 and not let it change. It will fail hard if it encounters something other than UTF-8 or ASCII. There is a test that fails when this change is applied and I'm not sure whether the test is wrong or the fix is wrong.

       

      Another solution would be to make sure strings reaching that are almost always UTF-8 (an occasional cache invalidation won't hurt too much, but right now it seems to happen on every match).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                justin Justin Stoller
                Reporter:
                patrick Patrick Carlisle
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support