Uploaded image for project: 'Couchbase Gateway'
  1. Couchbase Gateway
  2. CBG-3955

[3.1.7 backport] Updating import_filter and sync_filter to empty string does not work for named collection

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.1.7
    • None
    • None
    • Security Level: Public
    • CBG Sprint 150
    • 0

    Description

      /keyspace/_config/import_filter and /keyspace/_config/sync_filter will update the javascript to an empty string. This violates CBG-1808 and is mismatch of behavior for default collection.

      The reason that this is broken is because update based on a copy of the the struct and don't update the config. https://github.com/couchbase/sync_gateway/blob/e3bb61dee0245bb5d41b6ac0e3287d3eb2f2fc01/rest/config.go#L955

      I don't like that the validate function updates the config to begin with because I wouldn't expect a validation function to mutate the underlying struct.

      Attachments

        Issue Links

          Activity

            People

              tor.colvin Tor Colvin
              tor.colvin Tor Colvin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty