Remove check for duplicate pool
This change removes a check that denies the creation of a pool if the new pool has the same image and flavor set on the same provider. The reasoning for that check was that if you need to create another pool with identical settings to an existing one, you might as well scale up the min-idle-runners on the old one. This was done when runner groups were not yet added. This in turn has forced users to alias images with new names in their provider, leading to terrible UX. In the end, being too opinionated in this case has caused more harm than good. Fixes #245 Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
76d45ad83f
commit
be4f303b82
5 changed files with 0 additions and 276 deletions
|
|
@ -288,14 +288,6 @@ func (s *sqlDatabase) CreateEntityPool(_ context.Context, entity params.GithubEn
|
|||
return errors.Wrap(err, "checking entity existence")
|
||||
}
|
||||
|
||||
if _, err := s.getEntityPoolByUniqueFields(tx, entity, newPool.ProviderName, newPool.Image, newPool.Flavor); err != nil {
|
||||
if !errors.Is(err, runnerErrors.ErrNotFound) {
|
||||
return errors.Wrap(err, "checking pool existence")
|
||||
}
|
||||
} else {
|
||||
return runnerErrors.NewConflictError("pool with the same image and flavor already exists on this provider")
|
||||
}
|
||||
|
||||
tags := []Tag{}
|
||||
for _, val := range param.Tags {
|
||||
t, err := s.getOrCreateTag(tx, val)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue