docker-plugin icon indicating copy to clipboard operation
docker-plugin copied to clipboard

Improving uniqueness of templateID string

Open davidtlascelles opened this issue 4 years ago • 0 comments

The instance capacity help text says that it is "The maximum number of containers, based on this template, that this provider is allowed to run in total.".

With the current implementation, the instance capacity is based on the number of instances of an image, not of a template. This causes issues when multiple templates are made using the same image, but different names or labels are used to define the template.

This change makes the templateID more unique, so a user can define different templates that use the same image as long as the labels and name are unique.

Alternatively, this could be changed to template.hashCode().toString(), but that may cause other problems due to the kinds of values that contribute to the hash.

This may resolve the issue described in issue #655, as it seems to be the same problem I am having.

  • [x] Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • [x] Ensure that the pull request title represents the desired changelog entry
  • [x] Please describe what you did
  • [x] Link to relevant issues in GitHub or Jira
  • [ ] Link to relevant pull requests, esp. upstream and downstream changes
  • [ ] Ensure you have provided tests - that demonstrates feature works or fixes the issue

davidtlascelles avatar Jan 11 '22 09:01 davidtlascelles