Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-31224

setProperties Bulk action should handle constraint violation

    XMLWordPrintable

    Details

    • Release Notes Summary:
      setProperties Bulk action handles constraint violations.
    • Backlog priority:
      800
    • Sprint:
      nxplatform #70
    • Story Points:
      5

      Description

      The setProperties bulk action should handle a constraint violation as a normal error instead of terminate.


      Passing an invalid value to a setProperties command using theĀ api/v1/automation/Bulk.RunAction endpoint causes its consumer group to empty, after which subsequent setProperties commands fail silently.

      Steps to Reproduce:

      1. Configure a Nuxeo instance to leverage Kafka (using Nuxeo Kafka documentation, tested with Kafka 2.13-2.8.0)
      2. Create a File document with some value for dc:nature (e.g. 'Article')
      3. Attempt to set dc:nature to an invalid value (e.g 'm123') using the following curl:
        curl -X POST 'http://localhost:8080/nuxeo/api/v1/automation/Bulk.RunAction' -u ${USER}:${PASS} -H 'content-type: application/json' -d '{"params":{"query":"SELECT * FROM Document WHERE ecm:uuid = \"${DOCUMENT_UID_HERE}\"","action":"setProperties","parameters":"{\"dc:nature\":\"m123\"}"}}'
        
      1. Observe DocumentValidationException in server.log (expected)
      2. Check consumer group status with following command from Kafka /bin directory:
        kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe -group nuxeo-bulk-setProperties
        

      Expected behavior: consumers are attached to group; subsequent setProperties commands run successfully.

      Actual behavior: 'nuxeo-bulk-setProperties' group is empty, subsequent setProperties commands fail silently.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: