Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.
This repository was archived by the owner on May 30, 2024. It is now read-only.

Fix the logic of GetNextDeploymentNumberOfRepo method  #390

Closed
@noahingh

Description

@noahingh

Describe the bug
Sometimes when an item in the deployments table is deleted, a deployment_conflict error occurs due to a duplicated number. To avoid this, we need to change the logic that it returns the max number to do plus one.

Logs or Screenshots

code: "internal_error"
message: "It failed to save a new deployment.: code: deployment_conflict, message: The conflict occurs, please retry., wrap: ent: constraint failed: insert node to table \"deployments\": Error 1062: Duplicate entry '79-391588357' for key 'deployments.deployment_number_repo_id'"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions