Validate actions during their creation #1354
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As seen in issue #1341
Motivation
Method
validate()
in theJobAction
class was never used. All validation was done inside the action's constructor.Changes:
validate()
from theJobAction
class and all its subclasses.job-create.interceptor
at all. It has been removed fromcreate
in thejobs.controller
. The reason for this is that the interceptor was doing two things: Apart from action validation which has already been removed, it was also adding theconfiguration
field in the job instance to be created. However this part is already covered by theinstanceAuthorizationJobCreate
function injobs.controller
.checkAuthenticatedUser
has been removed fromjobs.controller
, as it was never used.statusUpdate
we check whether the configuration file has been updated by comparing the new with the one stored inside the job. However, even if they are different, we still proceed with the update as usual, as all actions have been automatically re-initialized with the new configuration. This is a point to be discussed later.