Issues icon indicating copy to clipboard operation
Issues copied to clipboard

No validation on WorkerPool deletion when WorkerPool is referenced in a process via a Variable

Open mjhilton opened this issue 1 year ago • 1 comments

Severity

SEV-3

Version

All current versions

Latest Version

I could reproduce the problem in the latest build

What happened?

If a worker pool is referenced in a Deployment Process using a Variable, and that worker pool is subsequently deleted, any deployment step that depends on it will fail with an EntityNotFoundException

Reproduction

  1. Add a worker pool
  2. Create a project
  3. Create a variable in the project. Change its type to Worker Pool. Set the value to the worker pool created in step 1.
  4. Create a deployment process with a step that selects its Worker Pool using the variable from step 3.
  5. Delete the worker pool

Expected: Customer should be warned/prevented from deleting the worker pool because it's in use, or the deployment failure message should be clearer about what went wrong. Actual: Deployment fails with an ambiguous stacktrace and EntityNotFoundException

Error and Stacktrace

Exception of type 'Octopus.Core.Model.Exceptions.EntityNotFoundException' was thrown.
Octopus.Core.Model.Exceptions.EntityNotFoundException at Octopus.Core.Persistence.Database.DatabaseDocumentStore`2.Get(TKey id) in DatabaseDocumentStore.cs:line 67 at
Octopus.Core.Persistence.Database.FullTableCacheDocumentStoreDecorator`2.Get(TKey id) in FullTableCacheDocumentStoreDecorator.cs:line 58 at
Octopus.Core.Persistence.EntityTracking.GetOrTrack[TDocument,TKey](TKey id, Func`2 getDocument)) in EntityTracker.cs:line 60
...

More Information

No response

Workaround

No response

mjhilton avatar Feb 20 '24 04:02 mjhilton

The Octopus engineering team has reviewed this issue.
After careful consideration, we’ve classed this low priority. This means we won’t work on it in the near future. We prioritize issues based on the number of people affected, the impact type, and available workarounds. If you’ve encountered this issue and haven’t informed our support team, please email [email protected]. Knowing how many people this issue affects helps us determine its priority.

mjhilton avatar Feb 20 '24 04:02 mjhilton