nussknacker icon indicating copy to clipboard operation
nussknacker copied to clipboard

[NU-1466] ScenarioAction: commands (ADT, sum types) instead of methods

Open arkadius opened this issue 1 year ago • 0 comments

Describe your changes

DeploymentManager's "action" methods - (methods operating on a scenario or its deployment) were replaced by case classes and one method handling them all: processCommand(command):

  • validate - ValidateScenarioCommand
  • deploy - RunDeploymentCommand
  • cancel with deploymentId argument - CancelDeploymentCommand
  • cancel without deploymentId argument - CancelScenarioCommand
  • stop with deploymentId argument - StopDeploymentCommand
  • stop without deploymentId argument - StopScenarioCommand
  • savepoint - MakeAScenarioSavepointCommand
  • test - TestScenarioCommand

Checklist before merge

  • [ ] Related issue ID is placed at the beginning of PR title in [brackets] (can be GH issue or Nu Jira issue)
  • [ ] Code is cleaned from temporary changes and commented out lines
  • [ ] Parts of the code that are not easy to understand are documented in the code
  • [ ] Changes are covered by automated tests
  • [ ] Showcase in dev-application.conf added to demonstrate the feature
  • [ ] Documentation added or updated
  • [ ] Added entry in Changelog.md describing the change from the perspective of a public distribution user
  • [ ] Added MigrationGuide.md entry in the appropriate subcategory if introducing a breaking change
  • [ ] Verify that PR will be squashed during merge

arkadius avatar Feb 22 '24 17:02 arkadius