Duplicate entry error message does not always specify the relevant unique keys

Bug #1756443 reported by Bob Haddleton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
Medium
Bob Haddleton

Bug Description

When creating a workbook/workflow/environment/resource member/event trigger the Duplicate entry error message specifies the name of the columns that need to be unique but does not specify the values that already exist. When loading large groups of workbooks/workflows/etc, often by scripts, it's impossible to know where the conflicts are without a lot of digging.

This change will update the DBDuplicateEntry error messages to always provide the keys and values that are causing the errors.

Changed in mistral:
assignee: nobody → Bob Haddleton (bob-haddleton)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (master)

Fix proposed to branch: master
Review: https://review.openstack.org/553910

Changed in mistral:
status: New → In Progress
Dougal Matthews (d0ugal)
Changed in mistral:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/553910
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=6499733c64c1069a6ab9b9ab959c1e3feaffcbd5
Submitter: Zuul
Branch: master

commit 6499733c64c1069a6ab9b9ab959c1e3feaffcbd5
Author: Bob Haddleton <email address hidden>
Date: Fri Mar 16 16:58:16 2018 -0500

    Update Duplicate entry exceptions to provide more information

    This patchset updates the DuplicateEntry exception messages to
    provide useful information about what exactly the duplicate values
    are. It also adds a test for duplicate workflows within a namespace,
    and methods for testing assert error message contents.

    Change-Id: I186e58e0d7c93d328070f32bd41c5ac79dcbda70
    Closes-Bug: 1756443

Changed in mistral:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 7.0.0.0b1

This issue was fixed in the openstack/mistral 7.0.0.0b1 development milestone.

Dougal Matthews (d0ugal)
Changed in mistral:
milestone: none → rocky-1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.