Details
-
Bug
-
Resolution: Fixed
-
Major
-
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.