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

Adding unique constraint on the service name #92

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kumarashit
Copy link
Collaborator

What this PR does / why we need it: If service is created with an existing name then it should not be allowed. To solve this, we have put a unique constraint on the Service name.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #84

Special notes for your reviewer: Tested from UI that when service is created with same name then it throws 400 error and the response is " Instance name should be unique"

Release note:

@codecov-io
Copy link

codecov-io commented Jul 5, 2019

Codecov Report

Merging #92 into development will decrease coverage by 0.77%.
The diff coverage is 39.13%.

@@               Coverage Diff               @@
##           development      #92      +/-   ##
===============================================
- Coverage         59.6%   58.83%   -0.78%     
===============================================
  Files               12       12              
  Lines              854      872      +18     
  Branches            89       91       +2     
===============================================
+ Hits               509      513       +4     
- Misses             304      318      +14     
  Partials            41       41
Impacted Files Coverage Δ
orchestration/db/models.py 98.66% <100%> (+0.01%) ⬆️
orchestration/api/instances.py 52.36% <25%> (-1.18%) ⬇️
orchestration/db/api.py 68.6% <38.46%> (-2.29%) ⬇️

… with python 2.x nd then 3.5, as the name creation is unique avoiding the issue with random string generation
@wisererik wisererik changed the base branch from development to master July 29, 2019 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Volume Service is getting created with duplicate name
2 participants