•  
      request #3298 SQL errors in Gerrit
    Infos
    #3298
    Patrick Renaud (patrick.renaud)
    2017-02-02 16:24
    2013-05-09 17:59
    2115
    Details
    SQL errors in Gerrit
    Adding a user to a Tuleap group for a project connected to Gerrit results in a SQL error if the given user is already a member of the target group in Gerrit.

    This can happen if the project lead adds the user to the group directly in Gerrit, than later on adds the same user to the same group in Tuleap.

    Tuleap should list the membership of the target Gerrit group first before attempting to add the user. If the user is already a member of the group then it should abort.
    SCM/Gerrit
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    vladimir.cantiru@ericsson.com, Emilio Palmiero (empa)
    Stage
    Empty
    Closed
    2017-02-02
    Attachments
    Empty
    References
    Referencing request #3298

    Follow-ups

    User avatar
    Given that we do not rely on GSQL anymore (only REST API), I close this request.

    • Status changed from Verified to Closed
    • Reported in version cleared values: 6.0
    • Close date set to 2017-02-02
    User avatar
    • Status changed from Verified to Waiting for information
    • Is an Enhancement or an internal improvement? set to
    User avatar
    dylan bowden (dylan)2013-05-16 12:30
    Hi,

    I can confirm that I have reproduced the issue.

    • Status changed from Acknowledged to Verified
    User avatar
    The logs are those produced by your Gerrit DB server. In our case it's PostgreSQL. Here is an example:

    ERROR: duplicate key value violates unique constraint "account_group_members_pkey"
    DETAIL: Key (account_id, group_id)=(1000000, 33) already exists.
    STATEMENT: INSERT INTO account_group_members (account_id, group_id) SELECT A.account_id, G.group_id FROM account_external_ids A, account_groups G WHERE A.external_id='username:lmcpare' AND G.name='patrick3/test-6'
    User avatar
    dylan bowden (dylan)2013-05-13 17:42
    Hello Patrick,
    where does the SQL error appear and would you have a copy of it?

    Thanks,
    Dylan

    • Status set to New