Uploaded image for project: 'Kite SDK'
  1. Kite SDK
  2. KITE-664

View URI is invalid if constraint value contains reserved/encoded characters

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.16.0
    • Fix Version/s: 0.17.0
    • Component/s: Data Module
    • Labels:
      None

      Description

      After upgrading to Kite 0.16.0, our Crunch jobs are no longer working correctly, finding 0 splits to process when a constraint value that contains characters which must be percent-encoded is set for a dataset view. For example,

      view.with("field", "/type:string")
      

      The constraint value is triple-encoded in the view URI, but only decoded twice when subsequently loading the view from the URI, resulting in a predicate value that is still improperly encoded.

      For example, "/" is expanded to "%2F" -> "%252F" -> "%25252F". It is first encoded in Constraint#toQueryMap(), then again in URIBuilder#build() when the URI returned from URIPattern#construct(...) is converted to a String, and a third time when the URI returned from View#getUri() is converted to a String when being set as the value of the the kite.inputUri configuration property.

      The encoding that occurs in URIBuilder#build() can be avoided by using URI#getScheme() + ":" + URI#getSchemeSpecificPart(), instead of URI#toString(), when specifying the scheme-specific part of the returned URI.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              noslowerdna Andrew Olson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: