Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix race condition in doesProjectExist #601

Merged
merged 2 commits into from
Feb 29, 2024
Merged

Fix race condition in doesProjectExist #601

merged 2 commits into from
Feb 29, 2024

Commits on Feb 29, 2024

  1. Fix race condition in doesProjectExist

    ... by enforcing uniqueness as database constraints, instead of trying to do it in the application code.
    
    This bug affects DT v4.x as well, but because we can't create partial indexes there (DataNucleus doesn't give us that much control), we can't really fix it.
    
    Fixes DependencyTrack/hyades#1101
    
    Signed-off-by: nscuro <[email protected]>
    nscuro committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    a2dc4ab View commit details
    Browse the repository at this point in the history
  2. Fix failing tests due to new UNIQUE constraints

    Tests made bad assumptions about duplicate projects being allowed.
    
    Also, remove `JdbiTestUtil` which was only necessary to run JDBI tests with H2. Since we dropped H2, this is no longer required.
    
    Signed-off-by: nscuro <[email protected]>
    nscuro committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    e8b8158 View commit details
    Browse the repository at this point in the history